cancel
Showing results for 
Search instead for 
Did you mean: 

Dear Sir. How do I calculate the tilt angle of LSM6DSL ?. Thanks

EOved.1
Associate II
 
1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @Community member​ ,

It depends on your target application.

If you want to exploit the embedded digital feature (Tilt), you can follow the instruction in the application note AN5040, p.54.

An example of tilt detection implementation code (with the LSM6DSM) can be found on Github, C drivers repository --> lsm6dsm_tilt.c

On the ou can use the same formulas used for the inclinometers, and described in the DT0140 design tip.

For example, at pag. 16 the trigonometric details are reported:

0693W00000JPTNKQA5.pngAs general suggestion, make sure that the device is well calibrated (i.e. the residual acceleration along the axis in a steady condition is close to the ideal value (0g or 1g). You can write the "calibration" value peculiar for each device in the OFS_USR registers.

If my reply answered 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 @Community member​ ,

It depends on your target application.

If you want to exploit the embedded digital feature (Tilt), you can follow the instruction in the application note AN5040, p.54.

An example of tilt detection implementation code (with the LSM6DSM) can be found on Github, C drivers repository --> lsm6dsm_tilt.c

On the ou can use the same formulas used for the inclinometers, and described in the DT0140 design tip.

For example, at pag. 16 the trigonometric details are reported:

0693W00000JPTNKQA5.pngAs general suggestion, make sure that the device is well calibrated (i.e. the residual acceleration along the axis in a steady condition is close to the ideal value (0g or 1g). You can write the "calibration" value peculiar for each device in the OFS_USR registers.

If my reply answered 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

EOved.1
Associate II

Hi.

Many Thanks.