Skip to main content
EOved.1
Associate II
February 10, 2022
Solved

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

  • February 10, 2022
  • 2 replies
  • 1886 views

..

This topic has been closed for replies.
Best answer by Eleon BORLINI

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

2 replies

Eleon BORLINI
Eleon BORLINIBest answer
ST Employee
February 11, 2022

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
EOved.1Author
Associate II
February 13, 2022

Hi.

Many Thanks.