cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSO not reading 1G at rest

Diogo_Goto
Visitor

I  am writing my own library in C++ to operate the LSM6DSO and when the sensor is at rest it reads 0.5 G on the z-axis, I've tried the code with 2 ICs, one in an Adafruit breakout board, and another one in an old PCB that had the sensor soldered one and both got the same error, so I believe that the issue might be in the code, but I can't identify where is the problem. Btw, I am using the dev kit NUH7AZIQ$ATZ3A140012 (STM32H7A3ZIT6Q). Also, when i turn the sensor 90 deg the 0.5g moves to the other axis, and regardless of the range scale I choose, the readings adjust themselves so that it still gives the 0.5 G after applying the conversion factor .

Diogo_Goto_0-1739051739233.png
The first line shows the reading from the CTRL1_XL register and breaks it down into the configurations in that register (which in this picture is set up to +-2G range and sampling of Hz)
the second lines show the reading from the OUTZ_L_A (2Ch) and OUTZ_H_A (2Dh) registers, then it combines that into the raw data and multiply by the sensitivity factor suggested in the data sheet for each range ( in this case 0.0061) 

Diogo_Goto_1-1739054006872.png

Small programs that plots the lsm6dso outputs, as I turned the imu, the 0.5 g readings moved to the other axis

Diogo_Goto_2-1739054522593.png

Here is the part of the code, in this section I its not exactly the library i am writing but it has follows the same procedures and gets the same numbers.




0 REPLIES 0