cancel
Showing results for 
Search instead for 
Did you mean: 

AppMEMS#9: The X-CUBE-MEMS1 libraries in detail - MotionMC application

Eleon BORLINI
ST Employee

The description of MotionMC library for the magnetic sensor calibration gives the opportunity to get a more detailed overview on the magnetic sensor.

A magnetic sensor is usually intended to measure Earth magnetic field to get the absolute position/direction of the sensor in space. However, near the surroundings of a magnetometer, it can cause distortion of Earth magnetic field. Based on the distortion character, we can categorize it as two types: hard iron and soft iron effect. Hard iron distortion arises from permanent magnets, magnetized iron or steel located nearby the magnetometer. This distortion remains constant and in fixed location related to the magnetometer for all heading orientations. Hard iron effect adds a constant magnitude field component along each magnetometer axis. Soft iron distortion arises from the interaction of the Earth magnetic field and the material which surrounds the magnetometer sensor distorting the Earth magnetic field. The distortion magnitude and direction depend on the incident angle of the Earth magnetic field on the material. Hence, it varies with the magnetometer orientation.

As we will see in more detail in the next post, the library acquires data from the magnetometer and calculates the hard iron (HI) and soft iron (SI) coefficients. The calibration coefficients are then used to compensate raw data from the magnetometer and reduce hard iron and soft iron effects.

Next post will deal with the magnetometer compensation algorithms with some high-level function explanation :soon_arrow:

1 REPLY 1
Eleon BORLINI
ST Employee

0690X000009Z3znQAC.png