Go Down

Topic: HMC5883L Calibration? (Read 4 times) previous topic - next topic

mamette

Mar 23, 2013, 01:03 pm Last Edit: Mar 23, 2013, 01:08 pm by mamette Reason: 1
Hi, i have HMC5883L 3 axis magnetometer. I heard that magnetometer must be calibrated first before it can used properly. And the method is depending from the area where we live.

I find out the magnetic field on my area through this website:
http://www.geomag.bgs.ac.uk/data_service/models_compass/wmm_calc.html

There is many variable, like Declination, Inclination, North Intensity, East Intensity, Horizontal Intensity, Vertical Intensity, and total Intensity.

The question is, are those variables used in magnetometer calibration? Or which variables that used in magnetometer calibration? And how to do a magnetometer calibration?

Thank you..

Erdin

If you keep if flat, it senses the magnetic north. No problem so far.

The 'D' is deviation or declination and is the difference between the real north and the magnetic north. You could take that into account.
If the HMC5883L sensor is tilted, you need an accelerometer to detect how much it is tilted and you have to correct it. Because of the 'I' (Inclination) the magnetism is pointing downward or upward causing a change in the direction if it is tilted.

jd.steinberger


mamette


If you keep if flat, it senses the magnetic north. No problem so far.

The 'D' is deviation or declination and is the difference between the real north and the magnetic north. You could take that into account.
If the HMC5883L sensor is tilted, you need an accelerometer to detect how much it is tilted and you have to correct it. Because of the 'I' (Inclination) the magnetism is pointing downward or upward causing a change in the direction if it is tilted.



i have do it, but magnetometer tilt compensation is the problem, i have tried many algorithm like on this site:
https://www.loveelectronics.co.uk/Tutorials/13/tilt-compensated-compass-arduino-tutorial

and many others algorithm that not too different with it, but i still failed.



http://www.jameco.com/Jameco/Products/ProdDS/2150248.pdf

Explains declination adjustment, tilt compensation, etc.


Yes, the algorithm is not too different like on this site:
https://www.loveelectronics.co.uk/Tutorials/13/tilt-compensated-compass-arduino-tutorial

and many other version of magnetometer tilt compensation algorithm that i have tried, but still didn't works well. There must something wrong..
May be the calibration process is influential..

michinyon

Quote
If you keep if flat, it senses the magnetic north. No problem so far.


That isn't really so.   It is sensing the direction of the geomagnetic field at your location,   which is neither "flat",  nor is it pointing at magnetic north.  It is a 3-D vector field.

Erdin


Quote
If you keep if flat, it senses the magnetic north. No problem so far.


That isn't really so.   It is sensing the direction of the geomagnetic field at your location,   which is neither "flat",  nor is it pointing at magnetic north.  It is a 3-D vector field.


True.
I should refrase that: "If you keep if flat and ignore the Z-axis, it senses the magnetic north. No problem so far".

spokey

Sorry for digging up a dead topic, I found a library which claims auto calibration of HMC5883L, its given here http://hobbylogs.me.pn/?p=17, its simple an can be used in a project where very limited sources can be dedicated to the compass. But it only uses 2D plane for the calculation of magnetic north.
I was looking for some easy way to calibrate my HMC5883L and bumped into this

Go Up