MMA8652 accelerometer motion trigger event

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MMA8652 accelerometer motion trigger event

1,039 Views
øysteinkristian
Contributor I

I am setting up the MMA8652 accelerometer sensor to trigger on motion event if an object moves in any direction, but it should not trigger on transient event like pulses or shakes etc. I have setup the unit with high pass filter and readout over I2C bus that the data registers 0x01 - 0x06 are almost zero so the static 1 g force in the Z direction is removed. Even though it always triggers an interrupt on the Z axis if the threshold values is set at 1 g or lower. Does the motion interrupt uses the high pass filtered values in the data registers or is there another filter I need to setup? Is there any code example on how to setup the registers to trigger on motion only and filter out ant shakes, noise etc? BR Øystein

Labels (1)
0 Kudos
1 Reply

523 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Øystein,

The embedded motion detection function does not use the high-pass filtered data available in the data registers 0x01 – 0x06 when HPF_OUT = 1. Instead, there is the transient detection function working with high-pass filtered data by default (HPF_BYB = 0). Please take a closer look at our AN4070 and AN4071 for more information and example settings. I would recommend using the transient detection function and experiment with both the threshold and debounce counter settings to eliminate unwanted events like pulses etc. 

I hope it helps.

Regards,

Tomas

PS: If my answer helps to solve your question, please mark it as "Correct". Thank you.

0 Kudos