AnsweredAssumed Answered

LIS2DH12 Movement Interrupt configuration

Question asked by Harrison.Curtis on Oct 3, 2016
Latest reply on Dec 1, 2016 by Cannon.Timothy
Good morning, I'm having a heck of a time trying to get my configuration settings correct on my LIS2DH12 Accelerometer.

I would like it to fire the interrupt when an abrupt movement occurs on any or all axes.
I have some settings (below) that I'm trying, but it seems too sensitive and sometimes fires the interrupt when it's just sitting there not moving at all.  Seems like there are too many interrelated settings on this, but that's the nature of the beast.  Has anybody got some settings that work well to detect movement on any/all axes ?  The way I understand it is that Threshold is the amount of movement and Duration is the time frame in which that movement occurs.  So a short time frame and a large threshold should indicate an abrupt movement?

Any assistance on this would be GREATLY appreciated

Anyway, here are the settings I'm currently using:

#define      ACCL_CTRL_REG1_DEFAULT     0x37 
#define      ACCL_CTRL_REG2_DEFAULT     0x01
#define      ACCL_CTRL_REG3_DEFAULT     0x06
#define      ACCL_CTRL_REG4_DEFAULT     0x98
#define      ACCL_CTRL_REG5_DEFAULT     0x41
#define      ACCL_CTRL_REG6_DEFAULT     0x20

#define      ACCL_INT1_CFG_DEFAULT      0x7F   
#define      ACCL_INT1_SRC_DEFAULT      0x00   
#define      ACCL_INT1_THS_DEFAULT      0x04
#define      ACCL_INT1_DUR_DEFAULT      0x00 

#define      ACCL_INT2_CFG_DEFAULT      0x7F   
#define      ACCL_INT2_SRC_DEFAULT      0x10   
#define      ACCL_INT2_THS_DEFAULT      0x04
#define      ACCL_INT2_DUR_DEFAULT      0x00