MAG calibration - ISSUES
MAG calibration - ISSUES
Hi all,
I'm having problems with my MAG. I have a Crius AIO pro board (HMC5883 mag sensor).
The problem is that after calibration I have about 15-16 degrees error in North, 7-9 degrees error in West, 0-2 degrees in East, 0 error in South direction (compared to a real compass).
I can't figure out what is the problem, I tried many combinations of rotating the copter during calibration in the air. Without success, almost the same result (maximum 2-3 degrees in error).
There is not any magnet close to the sensor, even moved the beepers 15 cm away from it. (The whole frame is 30 cm so the farest point... )
Any ideas, suggestions?
BTW, what do you think of having a different, more accurate method of calibration? Like in mikrokopter code? (Rotating through all axes each after each, beep confirms once one axis is done).
BR
Adrian
I'm having problems with my MAG. I have a Crius AIO pro board (HMC5883 mag sensor).
The problem is that after calibration I have about 15-16 degrees error in North, 7-9 degrees error in West, 0-2 degrees in East, 0 error in South direction (compared to a real compass).
I can't figure out what is the problem, I tried many combinations of rotating the copter during calibration in the air. Without success, almost the same result (maximum 2-3 degrees in error).
There is not any magnet close to the sensor, even moved the beepers 15 cm away from it. (The whole frame is 30 cm so the farest point... )
Any ideas, suggestions?
BTW, what do you think of having a different, more accurate method of calibration? Like in mikrokopter code? (Rotating through all axes each after each, beep confirms once one axis is done).
BR
Adrian
Re: MAG calibration - ISSUES
What code version are you using?
I noticed the same when using the latest dev version.
But just thought the magnetic pole had changed in the mean time.
I noticed the same when using the latest dev version.
But just thought the magnetic pole had changed in the mean time.
Re: MAG calibration - ISSUES
Update. I found the solution. But not the origin...
I had the idea if there is something with either the sensor or the position of the snesor on the board (some magnetic influence?!?!?!)
So I removed the sensor from the board (soldered out), and connected a HMC5843 on a Brake out board (I had a spare).
It solved the issue, after recalibrating, all directions works fine. The BOB is placed onto the Crius aio extend board (somewhere instead of xbee module on the top).
I don't know if this issue was related to a damaged sensor, a bad position or a BUG in the code.
BR
Adrian
PS.: Code is r1177.
I had the idea if there is something with either the sensor or the position of the snesor on the board (some magnetic influence?!?!?!)
So I removed the sensor from the board (soldered out), and connected a HMC5843 on a Brake out board (I had a spare).
It solved the issue, after recalibrating, all directions works fine. The BOB is placed onto the Crius aio extend board (somewhere instead of xbee module on the top).
I don't know if this issue was related to a damaged sensor, a bad position or a BUG in the code.
BR
Adrian
PS.: Code is r1177.
Re: MAG calibration - ISSUES
Hi nhadrian! what's your MAG calibration order? Yaw, then Pitch and Roll, CW or CCW direction? Thanks!
Re: MAG calibration - ISSUES
A while ago someone posted an interesting and the optimum way to calibrate mag. It may even have been on rcgroups.
In brief it suggested lining up axis with magnetic field. in my case / location it means pointing slightly down to the ground. About 20 degrees or so. I do recall noticing an improvement so have carried on doing that.
Anyone have a link to the article?
In brief it suggested lining up axis with magnetic field. in my case / location it means pointing slightly down to the ground. About 20 degrees or so. I do recall noticing an improvement so have carried on doing that.
Anyone have a link to the article?
Re: MAG calibration - ISSUES
Found this, does it ring a bell? Or was something different?
http://paparazzi.enac.fr/wiki/ImuCalibr ... gnetometer
http://paparazzi.enac.fr/wiki/ImuCalibr ... gnetometer
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: MAG calibration - ISSUES
Correctly if I am mistaken here but having the Mag is basically good for Waypoints, Return to home and Navigation. I really don't understand the need to accuracy at this stage of the game.
Re: MAG calibration - ISSUES
copterrichie wrote:Correctly if I am mistaken here but having the Mag is basically good for Waypoints, Return to home and Navigation. I really don't understand the need to accuracy at this stage of the game.
What about Headhold and Headfree modes?
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: MAG calibration - ISSUES
fiendie wrote:copterrichie wrote:Correctly if I am mistaken here but having the Mag is basically good for Waypoints, Return to home and Navigation. I really don't understand the need to accuracy at this stage of the game.
What about Headhold and Headfree modes?
Heading Hold, I am not so sure about, I personally use the YAW PID and set the I value high, the Headfree mode is nice.
Re: MAG calibration - ISSUES
One of the features of the RTH is point the head/tail home. For that the MAG is needed no?
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: MAG calibration - ISSUES
IceWind wrote:One of the features of the RTH is point the head/tail home. For that the MAG is needed no?
Things may have changed recently but I thought on an Airplane(I think Eagle ODS), it used GPS for RTH. I really don't know how RTH on the MWC works.
Re: MAG calibration - ISSUES
I tried many variations of orders, yaw-pitch-roll; yaw-pitch-roll to north then pitch-roll to west, etc...
Also I can notice that the bad calibration caused strange behaviours in headfree mode and circlaing in position hold.
So proper mag calibration is really important for those features!!!
Yesterday I tested with the HMC5843 and all the strange behaviours disappeared.
Also I can notice that the bad calibration caused strange behaviours in headfree mode and circlaing in position hold.
So proper mag calibration is really important for those features!!!
Yesterday I tested with the HMC5843 and all the strange behaviours disappeared.
Re: MAG calibration - ISSUES
IceWind wrote:One of the features of the RTH is point the head/tail home. For that the MAG is needed no?
As I remember, it uses MAG. I'll check that when RTH with MAG disabled.
Re: MAG calibration - ISSUES
Thanks for link!
That wasn't the one - but it does point out that you have to line it up with magnetic axis at your location for best results. Plus there is link through to a magnetic calculator. 66 degrees down for me.
The post I saw before described it quite well. Thought I'd give it a try and I could notice the difference on the GUI straight away after calibrating with the method. Much more accurate.
I only use it for PH / RTH so not that worried, but if can make it more accurate my calibrating differently then might as well...
That wasn't the one - but it does point out that you have to line it up with magnetic axis at your location for best results. Plus there is link through to a magnetic calculator. 66 degrees down for me.
The post I saw before described it quite well. Thought I'd give it a try and I could notice the difference on the GUI straight away after calibrating with the method. Much more accurate.
I only use it for PH / RTH so not that worried, but if can make it more accurate my calibrating differently then might as well...
IceWind wrote:Found this, does it ring a bell? Or was something different?
http://paparazzi.enac.fr/wiki/ImuCalibr ... gnetometer
-
- Posts: 4
- Joined: Wed Nov 28, 2012 4:44 am
Re: MAG calibration - ISSUES
i've just bought a multiwii SE v2.0 from hobby king, there's an error on my magnetometer,
the south and north direction are reversed, is there anyone can help me about that problem?
thanks before..
the south and north direction are reversed, is there anyone can help me about that problem?
thanks before..
Re: MAG calibration - ISSUES
AgusSantoso wrote:i've just bought a multiwii SE v2.0 from hobby king, there's an error on my magnetometer,
the south and north direction are reversed, is there anyone can help me about that problem?
thanks before..
P agus,
What firmware version do u use?
Make sure :
1. You choose right board on config.h
2. Calibrate the mag
3. No steel or cable power near mag sensor.
Hope it help.
John
Re: MAG calibration - ISSUES
copterrichie wrote:fiendie wrote:copterrichie wrote:Correctly if I am mistaken here but having the Mag is basically good for Waypoints, Return to home and Navigation. I really don't understand the need to accuracy at this stage of the game.
What about Headhold and Headfree modes?
Heading Hold, I am not so sure about, I personally use the YAW PID and set the I value high, the Headfree mode is nice.
What is "high", mine is 0.250 and it's mostly holding YAW but still rotates clockwise from time to time. Headhold and headfree modes haven't been very successful either, too much magnetic interference from the motors I think.
Andrew
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: MAG calibration - ISSUES
doppler wrote:
Heading Hold, I am not so sure about, I personally use the YAW PID and set the I value high, the Headfree mode is nice.
What is "high", mine is 0.250 and it's mostly holding YAW but still rotates clockwise from time to time. Headhold and headfree modes haven't been very successful either, too much magnetic interference from the motors I think.
Andrew[/quote]
On my sweptback which is very close to a normal quad, I have P 9, I .030, D 6
Re: MAG calibration - ISSUES
using default PIDS on my paris board with GY-86 (includes HMC5883L compass) i use headlock and it completely removes any yaw drift, which i see most of the time during low altitude aggressive playing (which i do a lot up and down my street, generally between 5-15 feet in the air).
Re: MAG calibration - ISSUES
Heading hold would use very low p but higher i and d values.
The normal I becomes the P of heading hold
The normal D becomes the I of heading hold
We lack a D for heading hold so it is wobbly and not usable.
The normal I becomes the P of heading hold
The normal D becomes the I of heading hold
We lack a D for heading hold so it is wobbly and not usable.
Re: MAG calibration - ISSUES
I bought the the MultiWii Pro Flight controller from Hobbyking. The mag seems to be 90 degrees out. Anyone seen this and have a fix?
I tried offsetting it in the code but all efforts failed, due today being the first time I have looked at the code and not knowing exactly where an offset should be included.
Thanks for any help.
I tried offsetting it in the code but all efforts failed, due today being the first time I have looked at the code and not knowing exactly where an offset should be included.
Thanks for any help.
Re: MAG calibration - ISSUES
In sensors i guess.
#if defined(SENSORS_TILT_45DEG_LEFT)
int16_t temp = ((magADC[PITCH] - magADC[ROLL] )*7)/10;
magADC[ROLL] = ((magADC[ROLL] + magADC[PITCH])*7)/10;
magADC[PITCH] = temp;
#endif
#if defined(SENSORS_TILT_45DEG_RIGHT)
int16_t temp = ((magADC[PITCH] + magADC[ROLL] )*7)/10;
magADC[ROLL] = ((magADC[ROLL] - magADC[PITCH])*7)/10;
magADC[PITCH] = temp;
#endif
#if defined(SENSORS_TILT_45DEG_LEFT)
int16_t temp = ((magADC[PITCH] - magADC[ROLL] )*7)/10;
magADC[ROLL] = ((magADC[ROLL] + magADC[PITCH])*7)/10;
magADC[PITCH] = temp;
#endif
#if defined(SENSORS_TILT_45DEG_RIGHT)
int16_t temp = ((magADC[PITCH] + magADC[ROLL] )*7)/10;
magADC[ROLL] = ((magADC[ROLL] - magADC[PITCH])*7)/10;
magADC[PITCH] = temp;
#endif