1
\$\begingroup\$

I'm using the MMA8453Q for motion detection. The accelerometer is mounted such a way that when it is stationary, X & Y axes are at 0g & Z-axis is at 1g.

My usecase is: A tilt across any axes beyond 45 degree should generate an interrupt.

I have enabled motion detection with threshold 0.707g. For X & Y axes the motion detection works properly & interrupts when tilted beyond 45 degree. But, for Z-axis, even while it is untouched it interrupts as by default it reads 1g.

Is it possible for me to correct this 1g and make it zero-g offset?

The description for the OFF_Z (User offset correction registers) mentions the following:

The 2’s complement 8-bit value would result in an offset compensation range ±256 mg

And, when I referred the application note AN4069, for calibration, they subtract from 0g,0g & 1g for X, Y & Z axes respectively. This makes me feel suspicious whether I could achieve a tilt detection across Z-axis.

Kindly suggest me how I could achieve my usecase.

\$\endgroup\$
  • \$\begingroup\$ Check pps 13 and 14 of the datasheet. There is a lockout region for z axis, possibly because the device usually has y or x axis oriented vertically. Maybe mounting it rotated would solve the problem. I still do not get how would you think tilt on three axis look like: one of the rotation is undetectable by the accelerometer. \$\endgroup\$ – Vladimir Cravero Aug 10 '16 at 7:26
  • \$\begingroup\$ @VladimirCravero Thanks. But, the Z-lockout region is for orientation detection & not for motion detection. The accelerometer is already mounted, so it is quite impossible for remounting it. \$\endgroup\$ – Gomu Aug 10 '16 at 7:36
  • 2
    \$\begingroup\$ "The motion configuration has the option of enabling or disabling a high-pass filter to eliminate tilt data (static offset). [...] For details on the freefall and motion detection with specific application examples and recommended configuration settings, refer to NXP application note AN4070." \$\endgroup\$ – Vladimir Cravero Aug 10 '16 at 7:39
  • \$\begingroup\$ You were just one figure away :) good luck. \$\endgroup\$ – Vladimir Cravero Aug 10 '16 at 7:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.