Skip to main content
AJura.1
Associate II
Mar 13, 2021 5:13 PM UTC
Solved

How to calibrate the LIS3DHTR accelerometer?

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?

This topic has been closed for replies.
Eleon BORLINI
Eleon BORLINIBest answer
ST Employee
Mar 15, 2021 12:16 PM UTC

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

2 replies

Eleon BORLINI
Eleon BORLINIBest answer
ST Employee
Mar 15, 2021 12:16 PM UTC

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

AJura.1
AJura.1Author
Associate II
Mar 15, 2021 8:32 PM UTC

Thanks! It will be help. I will do as you suggest.