Generate Interrupt on horizontal rotation using LIS3DH
Hi,
I have a jar lid which is equipped with LIS3DH accelerometer. The accelerometer is placed in the PCB such that the top layer of LIS3DH will face the sky in normal position. The jar has a groove for holding the lid and we need to put the lid in the groove and rotate it horizontally to lock it in. I want to use the LIS3DH to detect if some one is trying to open the lid. He/She will have to turn the lid horizontally in groove in the opposite direction to unlock it. Basically I need an interrupt to be triggered when the lid is rotated horizontally. Can anyone suggest the I2C register settings for detecting this?
I tried many combinations but most of them are generating interrupt when there is a tilt in vertical position. If I keep the device horizontally and keep rotating it without tilting no interrupt is getting generated.
I tired the following settings:
CTRL_Reg1 - 0x57 - 100HZ with All Axes Enabled
CTRL_Reg2 - 0
CTRL_Reg3 - 0x40 - IA1 interrupt on INT1
CTRL_Reg4 - 0
CTRL_Reg5 - 0x08 - Latch INT1 to INT1_SRC
INT1_THS - 0x10 = 250mg
INT1_DUR - 0
With these settings I tried many INT1_CFGs like 6D movement on all X and Y, 6D position on all X and Y, OR interrupt on all X and Y. None of them are helping in detecting the horizontal rotation.
Kindly let me know if you have a solution for this.
