filmov
tv
How to Calibrate a Magnetometer | Digi-Key Electronics
Показать описание
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.
Due to the moving, liquid metal in the outer core, the Earth acts like a giant magnet. While the magnetic field produced is not very strong, we can still detect it with permanent magnets (how a needle compass works) or magnetometers. If we find the direction of the field, we can find the direction of the magnetic north and south poles. From there, we can calculate our absolute heading.
However, nearby permanent magnets and electric currents produce magnetic fields that can interfere with these readings. This is known as “hard iron distortion.” We can sample the magnetic field strength around the sensor to create simple X, Y, and Z offset values that we subtract from our raw readings.
In the video, we show how to perform the magnetometer calibration process using Adafruit SensorLab and PJRC MotionCal. We then use the offset values from that program to create a calibrated digital compass. Finally, we include magnetic declination so you can see how to convert from a magnetic heading to a geographic heading.
Product Links:
Related Videos:
Related Project Links:
Related Articles:
Learn more:
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.
Due to the moving, liquid metal in the outer core, the Earth acts like a giant magnet. While the magnetic field produced is not very strong, we can still detect it with permanent magnets (how a needle compass works) or magnetometers. If we find the direction of the field, we can find the direction of the magnetic north and south poles. From there, we can calculate our absolute heading.
However, nearby permanent magnets and electric currents produce magnetic fields that can interfere with these readings. This is known as “hard iron distortion.” We can sample the magnetic field strength around the sensor to create simple X, Y, and Z offset values that we subtract from our raw readings.
In the video, we show how to perform the magnetometer calibration process using Adafruit SensorLab and PJRC MotionCal. We then use the offset values from that program to create a calibrated digital compass. Finally, we include magnetic declination so you can see how to convert from a magnetic heading to a geographic heading.
Product Links:
Related Videos:
Related Project Links:
Related Articles:
Learn more:
Комментарии