We are using an MMA8452Q and are utilizing the Self Test feature during production test.
The datasheet indicates that when self test is activated, the XYZ axes will be deflected by +45, +64, and +420 LSBs off of the current acceleration acting on the sensor respectively.
Our procedure is as follows:
Set to ACTIVE mode
Set to ST mode
Compute absolute differences in XYZ for ACTIVE and ST mode.
(We are doing quite a bit of averaging along the way to account for any noise that may exist in the system.)
We routinely get values that are 380 and below for the Z axis. The XY are usually pretty marginal, but sometimes are dead-on.
Each accel is different.
Can you please give me some insight into why the Z axis is not even close to the +420 specified in the datasheet?
(Note that we do set the accel range to +/-4G. The Active bit in CTRL_REG1 is cleared before we set ST. The accel is still during the test).
The reason why the Z axis self-test output does not correspond to the typical value specified in the datasheet is that the self-test is not factory trimmed. Generally, the test is considered successful if the minimum magnitude of change (50 counts for all axes at ±4g mode) is achieved.
PS: If my answer helps to solve your question, please mark it as "Correct" or “Helpful”. Thank you.
Thank you Tomas for the response. I am assuming by magnitude you mean the magnitude of the XYZ vector?
Would this then be the correct procedure:
1. Measure xyz in Active mode.
2. Compute magnitude (mag0=sqrt(x2+y2+z^2))
3. Measure xyz in Self Test mode.
4. Compute magnitude (mag1=sqrt(x2+y2+z^2)).
5. Test pass if abs(mag1-mag2)>=50.
Sorry for not being clear enough, the procedure does not require calculating the XYZ vector, just simply compute the difference between the acceleration output of all axes with self-test enabled and disabled as follows:
XST = XST_ON − XST_OFF
YST = YST_ON − YST_OFF
ZST = ZST_ON − ZST_OFF
and if these self-test changes are higher than 50 counts at ±4g mode, the test is considered to pass.
As you are doing correctly, it is recommended to take several samples (e.g. 10) for each axis and average them.
I hope it helps.