cancel
Showing results for 
Search instead for 
Did you mean: 

Can't vary duration on LIS3DH fall detection

BLage.1803
Associate

I have been trying to setup fall detection interrupt on LIS3DH. I can get it to work but only with specific setup. In particular INT1_DURATION values: 0x05 works (but is too short) so my global setup is ok. But with any other duration values, even just 0x07, I can't see the interrupt anymore even though I am in free fall for that time (dropping from 3m). I am using the arduino IDE.

I have tried also to go at 100Hz, and I can't see the interrupt either then.

Looks like I am missing something. Can anyone advise?

My setup:

//LIS3DH_CTRL_REG1 0x6F; // Turn on the sensor, enable X, Y, and Z, ODR = 200 Hz LPEN=

 //LIS3DH_CTRL_REG2 0x00;

 //LIS3DH_CTRL_REG3 0x40;  //AOI1 event (Generator 1 interrupt on INT1)

 //LIS3DH_CTRL_REG4 0x00; // FS = ±2 g

 //LIS3DH_CTRL_REG5 0x08; //Latch interrupt (Cleared by reading int1_src)

 //LIS3DH_CTRL_REG6 0;

 //LIS3DH_INT1_THS 0x20; //x32 (=500mg in FS2G)

 //LIS3DH_INT1_DURATION 0x05; // 5x WORKS but 0x07 DOES NOT

 //LIS3DH_INT1_CFG 0x95; // X,Y,Z active

1 REPLY 1
Eleon BORLINI
ST Employee

Hi @BLage.1803​ , the LIS3DH is well configured and the procedure seems ok.

  • It could be an issue related to the "tuning" of the threshold / duration. Basically the devices seems unable to detect an event that exceeds the 500mg threshold for more than 5/ODR = 50ms in case of 100Hz... you can maybe try to tune the threshold setting a lower value, such as 16h into INT1_THS (350 mg), because it refers to every single axes and it can be the case that X, Y or Z axes stay above the threshold for less than 50ms (e.g. the device is rotating during the free fall).
  • Try also to clear the LPen bit of the LIS3DH_CTRL_REG1 you enabled, changing the overall register content from 0x6F to 0x67. The difference between the Normal /High performance modes and the Low power mode should impact only the least significant bits, but the BW and the turn on time changes so please check.

Regards