I'm trying to understand the notion of transient acceleration threshold. I'm working with the popular MMA8452 and the way I understand transient acceleration is that it represents the dynamic component of acceleration.
The issue is that when I set the transient threshold to 1g or less, I'd get interrupts fired even when the device is stationary. If the transient acceleration is simply the second derivative of velocity, the device shouldn't fire off interrupts when stationary even with a 0g threshold – right?
If it's because of noise, 1g of noise would be terrible.
Am I missing something obvious?
Thanks
EDIT
These are the registers I've set:
writeRegister(TRANSIENT_CFG, 0x1F);
writeRegister(TRANSIENT_THS, 0x0F);
writeRegister(TRANSIENT_COUNT, 0x00);
writeRegister(CTRL_REG4, 0x2B);
Best Answer
I think the problem is that you're setting the
HPF_BYP
bit of theTRANSIENT_CFG
register. This bypasses the high-pass filter, so it is no longer actually looking at transient acceleration only, but the total acceleration including the 1g due to gravity.