Page 1 of 1
Problem with HMC5883L
Posted: Mon Feb 06, 2012 4:05 pm
by Scotth72
I am trying to get my compass reading correctly. I have the readings going in the proper direction per the sensor position directions. The problem is when I turn the quad upside down. The N/S axis does not flip like it should when its flipped on its pitch axis. If I flip the quad on the roll axis, the compass readings do flip. Is this a problem? I'm preparing for GPS, I need to make sure the compass is working properly.
Re: Problem with HMC5883L
Posted: Mon Feb 06, 2012 4:57 pm
by kalle123
I think you don't want to fly upside down with MAG on.
Re: Problem with HMC5883L
Posted: Mon Feb 06, 2012 6:18 pm
by Scotth72
Understood. It does show that the Mag is not always showing where north is, which could cause problems with navigation.
Re: Problem with HMC5883L
Posted: Mon Feb 06, 2012 7:00 pm
by mr.rc-cam
It does show that the Mag is not always showing where north is, which could cause problems with navigation.
If the Mag sensor is not accurate then there is a chance that the "3D" calibration was not performed correctly or the sensor is too close to metal objects or magnets.
BTW, you should also check the mag sensor's accuracy *under all throttle settings* to ensure that magnetic fields from the nearby high current wiring does not affect it.
- Thomas
Re: Problem with HMC5883L
Posted: Tue Feb 07, 2012 1:59 pm
by kalle123
Working with multiwii is is always a good idea to have a standard arduino (like UNO etc.) around to directly check those sensors.
You can find sketches for the sensors in the web.
MAG ->
https://www.loveelectronics.co.uk/Tutor ... no-libraryThen you know, it is not the sensor but the software.
BR
Re: Problem with HMC5883L
Posted: Tue Feb 07, 2012 2:24 pm
by Noctaro
Did you assign the right axis definition in config.h?
Does it behave like descirbed in the FAQ? ->
http://www.multiwii.com/faqHow should be the sensor axis directions
TILT the MULTI to the RIGHT (left side up):
MAG_ROLL, ACC_ROLL and GYRO_ROLL goes up
MAG_Z and ACC_Z goes down
TILT the MULTI forward (tail up):
MAG_PITCH, ACC_PITCH and GYRO_PITCH goes up
MAG_Z and ACC_Z goes down
Rotating the copter clockwise (YAW):
GYRO_YAW goes up
The copter stays level:
MAG_Z is positive ; ACC_Z is positive
greetz
noctaro
Re: Problem with HMC5883L
Posted: Tue Feb 07, 2012 4:08 pm
by Scotth72
Yes, the sensors move according to the FAQ. It just seems that it should always point north, even when its inverted, and it does not currently. I did find that the roll and pitch axis do NOT correspond to the silkscreening on the sensor bob. Silkscreen says y is roll, but I had to tell software x is roll to get proper values in GUI.
Re: Problem with HMC5883L
Posted: Tue Feb 07, 2012 4:39 pm
by Noctaro
hmmm....got weird with the axis definition of mag since the beginning......
i know anywhere around here was a threat about an alternative compass calibration....wasnt it EOSBandi who talked about?
i will have a look if i can find it.
edit:
here we go ->
viewtopic.php?f=8&t=1068&p=7329&hilit=compass+calibration#p7329maybe this will help you out?
...just guessing...as i did not prepare for gps right now

greetz
Noc