# MEMS accelerometer calibration

I am trying to calibrate a MEMS accelerometer. I was able to calibrate it for the current axis which is parallel to gravity and shows correctly, 1g. But the other two axes which should be 0.00g are showing +-0.02g instead. So, e.g., when the accelerometer's x axis is parallel to gravity, it should show (1g, 0g, 0g) and not (1g, 0.02g, -0.01g) like now.

How could I eliminate those values, e.g. further calibrate accelerometer?

EDIT: The acelerometer's datasheet says nothing about calibrating except that The IC interface is factory calibrated for sensitivity (So) and Zero-g level (Off) (page 20).

• Have you compared your errors to those on page 18? You are getting max 20 mg at rest. This seems to be within the tolerance specified: $\pm$70 mg Dec 11, 2012 at 15:31
• You have a valid point there! But why am I getting errors only on axes perpendicular to gravity (0g) and not on axis parallel to gravity (1g)? Isn't that strange? Dec 11, 2012 at 15:59
• I wouldn't complain if one axis is performing better than the rest. Happy robot-ing. Dec 11, 2012 at 17:15
• It doesn't really matter which axis - x, y and z show 1.00g but only and only if parallel to gravity. I hope I didn't express myself wrong by telling that only one axis shows correct value - it depends whether the axis is parallel to gravity or not! Case for only one axis, say x: when parallel to gravity it shows 1.00g (this is good); when perpendicular to gravity is shows 0.02g (not good). This occurs for all three axes. Does this info change any of your answers? Dec 11, 2012 at 17:55
• if (error < tolerance of device), life is good. I can't help you remove the remaining .02g error, unless you want to subtract it, given it seems to always appear. Dec 11, 2012 at 18:33

• Shouldn't the bias be eliminated since I was using this matlab script? Basically, I measured (x,y,z) output in nine different positions and then calculated scale factors matrix and bias vector which I incorporated in the code. What if the errors in perpendicular axes are because they are misaligned? Maybe the axes of MEMS are not orthogonal in the first place causing the deviation. I am not sure if the script should take care of that or not. Dec 11, 2012 at 8:21