How to Calibrate a Magnetometer | DigiKey
Magnetometers are fantastic sensors that allow you to measure the strength and direction of magnetic fields. With a little bit of math, they can be used as digital compasses to find your absolute orientation on Earth. However, they are very susceptible to extraneous magnetic fields (hard iron distortions) and nearby ferrous materials (soft iron distortions). In this video, we construct a basic digital compass using a magnetometer, which measures the strength and direction of the Earth’s magnetic field. We demonstrate possible distortion effects and show how to perform hard iron and soft iron calibration.