2021-03-13 09:13 AM
Hi, I'm working with the LIS3DHTR and I'm trying to calibrate the sensor but I couldn't achieve. When I read the output registers I see most of the time a positive acceleration of more or less of 15mg, I know that there is an offset of +-40mg, but in my case is only positive and once in a while negative.
I'm using full scale of 2g and high resolution mode.
I need 0g on the three axis, so there is a way to calibrate the sensor?
Solved! Go to Solution.
2021-03-15 05:16 AM
Hi @AJura.1 ,
on the LIS3DHTR there are unfortunately no register for the automatic "runtime" compensation (as on other devices)
My suggestion would be to characterize the 3-axis offset in a rest position (averaged on some samples) and then subtract this value to the acquired dataout by software.
Alternatively, you could check one of the X-CUBE-MEMS1 libraries dedicated to the calibration of the accelerometers, such as the MotionAC accelerometer calibration library, but you should first check if you are running your code on an STM32, so that the library is natively supported.
If my reply answered -at least partially- your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster.
-Eleon
2021-03-15 05:16 AM
Hi @AJura.1 ,
on the LIS3DHTR there are unfortunately no register for the automatic "runtime" compensation (as on other devices)
My suggestion would be to characterize the 3-axis offset in a rest position (averaged on some samples) and then subtract this value to the acquired dataout by software.
Alternatively, you could check one of the X-CUBE-MEMS1 libraries dedicated to the calibration of the accelerometers, such as the MotionAC accelerometer calibration library, but you should first check if you are running your code on an STM32, so that the library is natively supported.
If my reply answered -at least partially- your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster.
-Eleon
2021-03-15 01:32 PM
Thanks! It will be help. I will do as you suggest.