ADXL345: How to calibrate

Document created by analog-archivist Employee on Feb 23, 2016
Version 1Show Document
  • View in full screen mode

Could you tell me if it is possible to calibrate the ADXL345?


Calibration is done similar to any other accelerometer.  Depending on how
calibrated you would like it to be.  Basically, you would just place the part
flat, so 1 g in Z, 0 g in X and Y, determine the offset and then program the
opposite value into the OFFSET registers of the part.  This would need to be
reprogrammed whenever the part is power-cycled though.  If you want it to be
even more calibrated, you should also orient it such that there is a 0 g in the
Z-axis, to correctly calibrate the 0 g offset of Z, otherwise you assume an
ideal 256 codes and calibrate for that.

Sensitivity can be calibrated the same way. Position the sensor such that 1 g
is in the positive direction, say +X, record how many LSBs that is, then rotate
it so that 1 g is in the -X and record that.  Half of the average value would
be the offset and half the sum of the absolute value of each would be the
sensitivity.  i.e.

If +X was +270 LSB and -X was -250 LSB:
+270 + (-250) = +20 LSB
Offset would be +10 LSB