cancel
Showing results for 
Search instead for 
Did you mean: 

How to calibrate the LIS3DHTR accelerometer?

AJura.1
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

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

View solution in original post

2 REPLIES 2
Eleon BORLINI
ST Employee

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
Associate II

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