Innovative solution for RC hobby

I made another external module with GPS and magnetometer. This time I put on board 3 different magnetometer sensors to be independent of the availability of equipment and to be able use this module in another 3-rd party projects where due to magnetic interference is required to mount external magnetometer. Of course on the board will be mounted only one of the 3 sensors. On picture you can see all 3 sensors installed, but it is done only for comparative testing.

moduł magnetometr

On the module can be found: MMC3140 production Memsic, MAG3110 production Freescale and HMC5883 from Honywell. All sensors has built in analog to digital converter and I2C communication interface.

To be able to compare the sensors parameters, all it works in triggered measurement mode without averaging. Before comparison sensors were calibrated manually.  Calibration was to find minima and maxima indicated in all axes, selecting the gain so all axes has the same range of indications and moving the data ranges so they are symmetric with respect to zero. Occurence of minima and maxima is indicated by the AutoPitLot on-board computer with acoustic way, so you know if all extremes are no longer found and calibration can be finished.

The graph below shows measurement data recorded for 2 turns of the sensor in all 3 axes. Red graphs are for axis X, green for Y and blue for Z. The brightest colors are for MMC3140 sensor, medium for MAG3110 and dark for HMC5883.


Click on the picture to enlarge it.

obroty zarejestrowane magnetometrami

We can see that sensors has different sensitivity and different noise level. To be able to compare it, the measurement data were imported to spreadsheet and calculated. Measurement span is the difference between maximum and minimum indication recorded during the measurement. Note that is not the maximum value possible to obtain. Was made only flat turnover in main axis and because magnetic field vector is oriented in an angle (magnetic inclination) so the vector is not parallel with sensor axis and we can't  each maximum sensitivity but for comparative purposes it is sufficient.

The noise is calculated as the square root of the mean square of the difference between first 70 stable measurements and mean of the measurements.


The results presented in below table:

Measurement span 534,9 537,3 517,0 529,7 1052,8 1077,0 1068,8 1066,2 1218,3 1248,5 1209,3 1225,3
Measurement noise 1,30 1,26 1,09 1,22 3,67 3,98 7,57 5,07 1,47 1,54 1,96 1,66
Relative noise  [%] 0,24 0,23 0,23 0,21 0,35 0,37 0,71 0,48 0,12 0,12 0,16 0,14


Both in terms of the measurement span and measurement noise the favorite is HMC5883.


Magnetometer calibration rating


For validate calibration was draw X-Y chart for all magnetometers. Quality of calibration has no influence for magnetometer comparison but it is essential to use the magnetometer for course measurement so it is worth to mention about it. Charts are made only in X-Y plane from part of data. For full validation is worth to plot the graph in another plane X-Z or Y-Z.

wykres XY dla MMC3140

In case of MMC3140 magnetometer the Y axis calibration is correct, but in X axis is large deviation in direction positive values eligible to perform re-calibration.


wykres XY dla MAG3110

In case of MAG3110 magnetometer we can see big noise. Using this chart we can better see how it influence on course measurement error. Calibration in X axis very little shifted in positive values side. In Y axis is little bigger shift. We can also see the plot is not a circle, but looks like ellipse stretched in the direction of quadrants 2 and 4. any way for basic application that configuration should be good enough.


wykres XY dla HMC5883

In case of HMC5883 magnetometer we can see very small noise and high repeatability of measurements in successive revolution. It has little offset in X axis in positive values side. The calibration is good enough for basic measurements but sensor can be re-calibrated for best performance.



Temperature drift rating

Another important parameter is temperature drift. It is change of sensor readings caused by change of ambient temperature. It is a negative phenomenon , because introduces significant measurement distortion. It is especially true when electronic circuit heated by the sun (in summer) or out out from warm car (in winter) is rapidly cooled in fast flowing cool air. The sensor is less sensitive to changes in ambient temperature, the better.

The image below shows a test results of heating magnetometers from 10,6°C to 29,3°C. The change of temperature is shown in upper, yellow graph. Changes in the indication for all axis of the 3 lying motionless sensors are on the bottom. The meaning of the colours is the same as before


Click on the picture to enlarge it.

Dryft temperaturowy mangetometrów


Image shows the biggest drift has MAG3110 sensor. Much better is for HMC5883. The favorite is MMC3140.

For better compare, the data have been loaded into a spreadsheet. First and last 10 samples was averaged for removing noise, next was calculated absolute difference. To be able to refer to the sensors with varying scale span, I did relative comparison for the temperature change of 18,7°C.


Absolute change 0,54 -5,20 8,15


54,49 -60,33 81,87 65,57 -7,36 49,44 -25,88 27,56
Relative change [%] 0,10 -0,97 1,58 0,88 5,18 -5,60 7,66 6,15 -0,60 3,96 -2,14 2,23


Note that the calculated temperature drift is only true for the test pieces. Typically each piece has a different value of drift. The above measurements and calcultions are made solely for the purpose of comparison. To calibrate sensors in your device you should measure each sensor in all axis.


Modules with magnetometers are available in Pit.Lab.Shop:

We use cookies to improve our website and your experience when using it. Cookies used for the essential operation of the site have already been set. To find out more about the cookies we use and how to delete them, see our privacy policy.

I accept cookies from this site.

EU Cookie Directive Module Information