Hi all, 
I can't find a good description of how to calibrate your compass and I also have some problems with my compass' readings.

I have a Pixhawk autopilot module and a 3DR uBlox GPS/compass module. Connecting this module is simple (my compass is connected through the I2C splitter so not directly to the Pixhawk). In mission planner I want to set-up my compass so I did the following: 

1. Connect via COM to Pixhawk

2. Go to: 'Initial setup' -> 'Mandatory Hardware' -> 'Compass'. 

3. Choose the option: 'APM with External Compass' AND select 'rotation_none' from the drop down menu next to 'Manual'. I selected 'rotation_none' because my GPS/compass module is upside down and the arrow is pointing in the same direction as the arrow on the Pixhawk, so a belly-to-belly set-up. 

4. Click 'Live Calibration' and turn a bit with the Pixhawk.


But.... when I now check my compass readings in 'Flight Data' I get this very weird result: North is not were North is AND East and West are switched. So if I turn 90degrees clockwise starting from North my compass says he is looking to the West... 


Note: how do you know if the new settings "external compass" have been saved? Because when I open the compass tab a second time the checkbox is at 'Manual' again and not 'External'

Also, I've read that if you connect the uBlox module to Pixhawk, the internal compass is automatically turned off, although I have a fealing that both are turned on, because if you turn (yawing) either of the two modules seperately the measured heading in mission planner changes.

Can anyone help me?

Note to webdesigners: Is it possible to make a new category with 'Compass'? 

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Of course, you need to do this work with the pixhawk and the GPS both mounted on the same frame and not loose.

    I use the rotation selections in compass setup because the uBlox is sometimes upside down itself.  If this is a no name GPS or not, just keep changing the rotation settings until you get all points working.  Then do Compass Calibration and make sure and hit all the white squares.  If you don't have east as east and west as west, the calibration wont work very welll.  Once that is done, check to see if your motor is creating EMF and use the tool in Mission planner to calibrate and account for this.  Check your declination settings and make sure they are correct.  Either look it up or use automatic.  Lastly if you still have problems, you need to consider that your EMF is too high in the area of your mag compass.  DC power wires of high current have a magnetic field around them.  Don't worry about the AC motor wires.  They produce very little magnetic field interference.  You can plot the compass heading and see if it is stable.  

    I had to mount a second 3DR compass GPS unit on the bottom of my FireFLY6 to get away from the magnetic fields created by the power system.

  • I've found the problem. Apparently the compass was not in the right orientation. Now it is exactly alligned with the pixhawk board (tops up, arrows pointing in the same direction). 

    One remark though, I still need to figure out how to configure it if I do change their orientation.
    And I have to figure out how to disable the pixhawk internal compass, because he doesn't switch that off automatically upon detection of an external compass (as stated in several guides and discussions). It now mixes/filters the two readings. If that makes it more accurate or faster I don't know....

    This mixing was of course the reason why I had problems in the first place when the ublox was mounted 180degrees w.r.t. pixhawk....mixing misaligned compass' readings makes of course no sense at all.

    Menno,
    PS, how to close (but not delete) this discussion or mark it as 'solved' or something.

    • Hi Menno,

       What was the orientation of the GPG/Compass module prior to you fixing it  ? 

      were they 90 degrees out of phase ?

      After fixing the problem were you still mounting the GPS on the back of the pixhawk (with both arrows now pointing in the same direction) ?

      I intend to mount my system in the same way , hence the question 

      Cheers

    • This doesn't seem solved. There are 4 (smart) guys in my area struggling with this for weeks.

      1) "How to configure it if I do change their orientation"?
      2) "How to disable the pixhawk internal compass, because he doesn't switch that off automatically upon detection of an external compass".

      3) How do you tell the correct orientation of unmarked compasses?

      4) If you must Roll-180 and yaw-180, there is no option.

      We need some understanding/explanations from the developers. We have spent hours trying to figure this out. Have carefully swapped out hardware, reloaded software, and calibrated by the book .. no luck. We have no problems with our 2 APMs.

      • Two new updates to Mission planner in the last 24 hours.
        NOTE it shows two fixes to compass calibration!!
         
        This is the permanent link, if you want to bookmark it.
        • Hey OwlPic,

          did you solve your problem? Three (not so smart) guys in my area have the same problem.

          We got bad heading readings when set up "correctly". Yaw is 90° off both on internal and external compass. Changing compass_orient leads to a different Yaw error. 

          • do not use internal and external compass at the same time!!

    • Today I got the same problem with apm2.5( http://www.quadkopters.com/product/apm-2-52/) with an ublox external compass( http://www.quadkopters.com/product/ublox-6m-gps/). when I calibrate it shows offset of -23 -24 130 . In gauge I see north and south heading is ok but if I turn my quad to East it shows West and vice versa.i have placed the external compass module just beside of apm.One problem is that my compass module have no direction arrow but I have tried and calibrated the compass with all four orientation but still the problem exist..But one thing I see as I compare the compass gauge with a real analog compass the reading is looks very similar but in the apm mission planner(http://ardupilot.com/downloads/?did=82) the heading of uav shows wrong direction for east and west.Any body have got any solution of this problem or any advice is highly appreciable.   

      • finally got it..... If you use EO-6M Ublox u-blox GPS Module with on-board compass HMC5883l (compass) (mag) module with APM 2.5+ (in my case apm 2.6). calibrate the compus by selecting manual and the orientation should be ROTATION_NONE...otherwise you may get EAST is WEST and vice versa... Try it...

        • At last. I was desperate.

          Work fine!!!!.

          Thanks a lot.....................

This reply was deleted.

Activity

gotham liked gotham's profile
3 hours ago
Hiroki Tanaka liked Hiroki Tanaka's profile
Oct 13
Derrick Davies liked lisa TDrones's profile
Sep 23
More…