Hello,
I'm using ADXL 345 accelerometer with an Arduino Leonardo.
Everything looks fine but i am having problems with the 3-axis 1g-values.
When i set range to +-2g the 1g values should be like 255/256 but i receive this:
x-axis:
+1g: ~262
-1g: ~-253
y-axis:
+1g ~268
-1g ~-256
z-axis:
+1g; ~220-225
-1g: ~-280
the 0g values are good too so i cannot just add a calculated offset. Does someone of you know why the z-axis values are that bad or how i can filter this deviation?
For best results all accelerometers and magnetometers should be recalibrated frequently using a robust procedure. There will be a different gain and offset along each axis. For magnetometers there is often also a rotation, especially if something in the environment is distorting the local magnetic field.