cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to make lis2dh sense any rotation

abdu21
Associate

Hi, I was trying to make the sensor sense slow rotation.

I read the datasheet and I guess if I set HPM to work as normal mode, and High-pass filter for interrupt 1

so CTRL_REG2 should have 0x81,

Then I should read the REFERENCE (0x26) register, (according to the thread in here https://community.st.com/t5/mems-sensors/lis2dh12-measure-conversion/td-p/420708)

 

My question is, is it even doable ? 

Can I sense slow rotations until it reaches some point ?

Thanks in advance

 

1 REPLY 1
Federica Bossi
ST Employee

Hi @abdu21 ,

The LIS2DH12 is a 3-axis accelerometer and does not measure rotation rates directly, it cannot sense rotation velocity like a gyroscope does.

Setting HPM (High-Pass Mode) to normal mode and enabling the high-pass filter on interrupt 1 (e.g., CTRL_REG2 = 0x81) configures the accelerometer to filter out low-frequency components (like gravity) and detect dynamic acceleration changes.

Reading the REFERENCE register (0x26) is used to set the baseline for the high-pass filter, so that slow changes (like tilt or slow movement) can be differentiated from sudden movements.

Using the high-pass filter and REFERENCE register helps detect dynamic events but may not capture very slow rotational movements.

If you don't want to use a gyroscope, you can use LIS2DH12 for tilt angle estimation but be aware of limitations for slow rotation detection.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.