Hello, I'm using accelerometer MMA8451QT only for motion detection via interupt. Device working fine with one exception, when I put device on edge (chip on edge, edge with dot on table, dot on right side) then i receive contionous interupts for movement.
By trial error i found that issue is in Y axis, when I disable motion sensing on Y everything works fine and I cannot find any other position with this behavior.
Code is based on example from AN4070.
Hi Ondrej,
Could you please post here your complete source code or send me a direct message if you would like to keep it confidential?
However, it sounds like your threshold value for motion detection is less than 1g. And since the accelerometer also measures the projection of the gravity vector on the sensing axis, the threshold value might be exceeded when the device is placed vertically:
To eliminate the DC tilt offset (gravity), I would recommend using the the transient detection function which uses the high-pass filtered data by default (HPF_BYP bit = 0). Have a look at our AN4071 for more information.
I hope it helps.
Regards,
Tomas
PS: If my answer helps to solve your question, please mark it as "Correct". Thank you.