cancel
Showing results for 
Search instead for 
Did you mean: 

Does the acceleration have to remain in same direction over the THS for the DUR in order for the INT to occur?

ASele.2
Associate

We are using the LIS2DH12 accelerometer. We want to trigger an interrupt upon motion that exceeds our INTx_THS value. The sensor could experience vibration in its deployment, therefore to prevent false positives we define a INTx_DUR value (the sensor must undergo a certain acceleration value for a certain duration in order for INT to be triggered). We are bit confused what constitutes the duration. Does acceleration have to exceed the threshold along the same axis for the defined duration?

For example, if we set the INTx_THS value to be 2000 mg and INTx_DUR to be 100 ms, does the LIS2DH12 interrupt clock reset if the sensor experiences +2000 mg for 50 ms, and -2000 mg for another 50 ms? In other words, would an interrupt not be triggered for this case? Or is it looking at overall magnitude to generate an interrupt.

1 REPLY 1
Eleon BORLINI
ST Employee

Hi @ASele.2​ ,

you are right, this is the correct interpretation of the INT1_DURATION (33h) register. Regarding your example, you need the >2000mg mechanical event to last longer than 100ms. In fact, if your stimulus starts above 2000mg and drops down to -2000mg after, it will cross the 2000mg threshold at least one time in the required 100mg, thus preventing the interrupt to be triggered, and the interrupt will not be raised in this case.

More specifically, you can refer to the App note AN5005, p.22:

The content of the duration registers sets the minimum duration of the interrupt event to be recognized. Duration steps and maximum values depend on the ODR chosen. Duration time is measured in N/ODR, where N is the content of the duration register.

0693W00000FD7y9QAD.pngIf 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