2024-03-25
07:03 AM
- last edited on
2024-03-25
08:34 AM
by
Lina_DABASINSKA
Guys, I ran into a strange problem while debugging LIS2DH12, someone help me.
I configured the high-precision mode, using 12 bits, with a range of +-4g, that is, when I placed the table (the chip with the sign facing up, the positive direction described in the instructions) it should have been subject to neutral acceleration and the converted value should have been -1g, but the result I got was +1g, I verified the other two axes, The resulting acceleration value is the opposite of the direction indicated in the manual, that is, when I always accelerate in the opposite direction of each axis, the resulting conversion value is indeed positive
Moreover, I read out the register value directly using lis2dh12_from_fs4_hr_to_mg function for conversion, and the size is close to 1g, but its direction is reverse, at this time I am the chip marked up, the acceleration value should be gravity acceleration downward is negative, it is positive.
Solved! Go to Solution.
2024-03-26 02:36 AM
Hi @bennanbei ,
So everything works fine now, right?
2024-03-25 10:15 PM
I see. It's the accelerometer and the direction of acceleration. I didn't get it. I should have looked at how the accelerometer works
2024-03-26 02:36 AM
Hi @bennanbei ,
So everything works fine now, right?
2024-03-26 03:07 AM
yes
2024-05-31 11:53 PM
Hello, I have recently encountered a new problem that I cannot understand. Now I read the original data in three directions. I set lis2dh12 to 25hz high-precision 12-bit mode range +-4g, and then I put the three axes stationary on the table to read the original data. I changed the measuring range to +-2g or +-8g. Every time the original acceleration data changed, it was a multiple of 16. My understanding should not be such a coincidence, why?