I did the magnetic calibration here on the LSM303DLHC for a field roughly 48 uT. The method seems to have worked in that the combined bias (b) values went from thousands to hundreds like the tutorial says they should

The readings are around 48uT indeed, but they vary by +/- 50% upon moving the sensor around. Is this the expected behaviour ?

• Calibrated and tested in the same spot.
• Was unable to obtain any better calibration values than those from the second run (meaning the first actual calibration run) - tried running the calibration program again and again but the combined bias (b) values from magneto12 software did not get any closer to 0 (neither did they stay the same).

LE

I have read today about elevation and bank angle effects (collectively called tilt) on the magnetometer's axial sensitivities. I'll be diving deeper into it. Don't know if that is my issue indeed

http://www.sensorsmag.com/components/compensating-for-tilt-hard-iron-and-soft-iron-effects

LE2

Nope, seems that tilt effect is used for correcting heading readings (yaw angle around the z axis) and after doing the correction the overall field magnitude does not change. Just tried again calibrating it with some longer wires running from the Arduino to the module - same deal. Perhaps their accuracy is just not as good as their advertised precision is.

• Current-carrying wires near the sensor can disrupt earth's field. Have you done calibration in the same magnetic environment? – glen_geek May 21 '17 at 11:47
• @glen_geek Yes, calibrated and tested in the same spot. Then proceeded to test in other spots as well, including outside. – kellogs May 21 '17 at 11:51
• @Kellogs: Where did you get your calibration values from? Are they the same as in the linked example? I guess they have to be specific for each particular sensor/device. – Curd May 22 '17 at 7:21
• Is your question about the unstability of the reading (as the title suggests) or about the absolute calibration (reading != 48µT) as the further content of your post suggests? – Curd May 22 '17 at 7:25
• @Curd It is about it being unstable - see the edit below. The values are specific to my device, not copied verbatim from that tutorial. – kellogs May 22 '17 at 12:10