cancel
Showing results for 
Search instead for 
Did you mean: 

Free fall detection in LIS2DE12 Accelerometer

Kinjal Prajapati
Associate II
Posted on June 05, 2017 at 15:21

  • Hi, I am working with LIS2DE12 accelerometer. Till now, I am able to read the raw data provided by the chip. Now, I have to detect free fall for the same. In the data sheet, I couldnt find any specific registers assigned for this purpose. The only thing I could find is that there are two interrupt pins available for the motion detect and free fall detect. But I dont know how to configure this interrupts. Can anyone provide me the steps for the configurations? How can I decide the threshold value for generating this free fall detect?? Thank you in advance!!!
2 REPLIES 2
Miroslav BATEK
ST Employee
Posted on June 06, 2017 at 14:27

Below is an example how to use INT1 for free fall detection.

1. Write 57h into CTRL_REG1 // Turn on the sensor, enable X, Y, and Z // ODR = 100 Hz

2. Write 00h into CTRL_REG2 // High-pass filter disabled

3. Write 40h into CTRL_REG3 // Interrupt activity 1 driven to INT1 pad

4. Write 00h into CTRL_REG4 // FS = ±2 g

5. Write 08h into CTRL_REG5 // Interrupt 1 pin latched

6. Write 16h into INT1_THS // Set free-fall threshold = 350 mg

7. Write 03h into INT1_DURATION // Set minimum event duration

8. Write 95h into INT1_CFG // Configure free-fall recognition

9. Poll INT1 pad; if INT1 = 0 then go to 10 // Poll INT1 pin waiting for the free-fall event

10. (Free-fall event has occurred; insert your code here) // Event handling

11. Read INT1_SRC register // Clear interrupt request

12. Go to 9

Posted on June 09, 2017 at 08:21

Thanks a lot for your Reply!!

The INT1 pin goes high when the free fall is detected!!