Pages: [1]   Go Down
Author Topic: HMC5883L Calibration?  (Read 4606 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 72
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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..
« Last Edit: March 23, 2013, 07:08:51 am by mamette » Logged

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Texas
Offline Offline
Jr. Member
**
Karma: 1
Posts: 97
Eso es lo que es
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Explains declination adjustment, tilt compensation, etc.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 72
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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..
Logged

Offline Offline
Faraday Member
**
Karma: 62
Posts: 3077
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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".
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: