2018-02-26 03:02 AM
Hello all
My goal is to use two INT pins to generate two interrupts in a device which will be used in a car. INT2 will be pulled when a crash of the car is detected and INT1 when the car moves.
Here is my init setting:
CTRL_REG1 = 0x27 //10Hz, normal power mode, ZXY enable
CTRL_REG2 = 0x01 // HP filter for INT1
CTRL_REG3 = 0x40 //IA1 enable
CTRL_REG4 = 0x90 //4g | BDU
CTRL_REG5 = 0x0A //latch on INT1 and INT2
CTRL_REG6 = 0x22 //active low & INT2 enable
INT2_THS = 0x6D //~3500mg
INT2_DURATION = 0x00 // 0.1*0s
INT2_CFG = 0x2A //OR, X,Y,Z higher than threshold
INT1_THS = 0x02 //
INT1_DURATION = 0x03 //
INT1_CFG = 0x2A //
Generally, the motion detection part works fine (thanks to Miroslav). I am concerned about the crash detection part.The threshold is quite high (I don't want it to interrupt on every bump on the road) but it still sometimes interrupts when no hight acceleration is applied. It is very rare but still occurs.
If you have any inputs to this I'll appreciate.
2018-02-26 05:33 AM
I think the threshold depends on the sensor location and stiffness of the mounting.
I'm not expert on automotive but I think the threshold 3.5g is not so high, this peak value can be generated during standard operation.
Please be aware there are dedicated
and accelerometer for airbacks which have full scale 100g or 200g.2018-02-26 10:19 AM
You're right. I'll try with 8g.
2018-04-16 03:21 PM
I would like to go back to this question since I still struggle with it.
I modified the configuration so it looks like this:
CTRL_REG1 = 0x27 //10Hz, normal power mode, ZXY enable
CTRL_REG2 = 0x01 // HP filter for INT1
CTRL_REG3 = 0x40 //IA1 enable
CTRL_REG4 = 0xB0 //16g | BDU
CTRL_REG5 = 0x0A //latch on INT1 and INT2
CTRL_REG6 = 0x22 //active low & INT2 enable
INT2_THS = 0x7F //max
INT2_DURATION = 0x00 // 0.1*0s
INT2_CFG = 0x2A //OR, X,Y,Z higher than threshold
INT1_THS = 0x01 //186mg * 1?????
INT1_DURATION = 0x03 //0.1s * 3
INT1_CFG = 0x2A //
Now with full scale 16g when the threshold is set to 186mg it constantly interrupts, even when the device remains in place! Changing it to 372mg helps but it is too much for me. Before when full scale was 8g and the threshold value was 128mg I didn't have such problems. What might be a reason of such behavior?
2018-04-17 01:45 AM
The reason of this behavior is most probably offset of the sensor.