Pixhawk: can't calibrate external 3dr compass

Hi, I have problems to calibrate the external 3dr compass with my pixhawk.

Using Mission planner l select Pixhawk/PX4 and try live calibration.

I see for compass 1 and 2 error 99 and never more then 3 samples are collected.

The behavior is very similar to this one


A little bit more story.

First I bought a pixhawk together with an external 3dr GPS/Compass.

With this compass I could calibrate with no problem and GPS was also working.

But the compass seems to have an issue. When the pixhawk was running a while (e.g. > 10 minutes) the heading began to turn around faster and faster over time.

I calibrated the compass many times but this behavior always came back.

So I send it back and got a replacement.

Here I want to notice that the shipped 6 pin cable for this new GPS/compass for gps was a 6 to 5 pin cable.

I was a  little bit wondering and used instead a 6 to 6 pin cable.

With this new module live calibration isn't working.

I couldn't believe that this new module is not working and bough an additional module (which was shipped also with 6 to 5 pin cable).

Unfortunately this 3rd module is now also not able to be calibrated.

So what going on here???

I tried many things including flashing new firmware to the pixhawk, replace the I2C cable, replace the GPS cable but with no success. (calibrating the pixhawk internal compass works).

I also checked the pixhawk I2C supplied power and measure there around 4,7 V. Is that normal?

Could it have to do with a bad batch of these 3dr modules?

I bought them in Germany and because my both last modules were shipped with this wrong 6 to 5 this could be the case? Or it's me causing the problem? :)

Any hint what I can try to get it to work?

I'm really disappointed!



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

Join diydrones

Email me when people reply –


  • Have you solved this yet? I have the same problem with my Pixhawk and 3DR GPS/compass module.

    • same problem here

  • 3D Robotics

    I assume you've checked that you're selecting the right compass type in MP (Pixhawk/PX4).  If so, have you checked to see that the GPS/mag is not placed next to something magnetic on your vehicle, such as a magnetic hatch clasp?

    The compass uses the second cable, which is I2C and four wires. You have to connect both that and the the GPS cable (6 wire).  Have you checked your I2C cable and tried a different one?

    We've sold many tens of thousand of these and as far as I know there's never been a problem with the hardware. If you bought it directly from 3DR, you can contact the help desk there at help@3drobotics.com. If you bought it from a third-party, are you sure it's actually a 3DR product and not a clone?

    • Same thing with the PixHawk and GPS of a friend of mine.

      Even with the GPS/compass module plugged in, only the internal compass works. So there is no auto detection of the external compass module.

      Unfortunately I have a 3DR APM 2.5, so we could not try with a swap.

      Question: Does it matter how the compass is wired? Does it make sense swapping the two wires of the compass plug? Just wondering if its perhaps wrong?

    • Chris, yes I used compass type Pixhawk/PX4 with MP and there is and was on my side miles around no magnetic source near by the the compass.

      I also tried different cables and connected always both when trying to calibrate (compass and GPS). The GPS itself is working.

      AFAIK there are only two official 3DR sellers in germany and I assume that they are not selling clones (hopefully).

      I will check again the cables although I did that many times. But I fear that there isn't the problem.

      What I can't believe is that both brand new modules are not working.

      Couldn't it be another cause,e.g.  wrong parameter settings or whatever?

      Meanwhile I had 3 modules and every one with an issue. This is really strange. :(

      • 3D Robotics

        Which version of MP are you using and which version of flight code?  It's best to update the latest of each, if you haven't already. 

        Can you also check the pins in the connector on Pixhawk? One of them might be bent.

        • I'm using V3.2.1 for quad and MP 1.3.30.

          The i2c pins are not bent.

          I just tried again to calibrate and can observe that compass 2 error is changing but still no sample are collected and the frame isn't rotating if I rotate the compass.

          Please see the attachment.


          • 3D Robotics

            Are you connected via wireless or USB?  

            This is a weird one -- never seen it before with our gear. 

            Did you change any parameters? I wonder if somehow the second compass got set to the wrong type.

            Do you have another Pixhawk to try? Just going through the process of elimination. 

            I'd like to send you to customer support, who are trained to solve these issues.  Perhaps if you have an order number from an authorized reseller, they'll be able to accept your help request. 

            • I did the screenshot during connecion with USB. If using the radio it's the same behavior.

              Can't remember if I changed any parameter. I have the problem already a long time.

              This morning I flashed V3.2.1 hoping that all parameters are resetted but not sure if thats the case, (I assume that they are not resetted?).

              Unfortunately I have no other pixhawk for testing.

              I've attached the compass parameter setting, maybe this helps to investigate.

              If not I may have to contact the support.

This reply was deleted.


Mike Whitney liked Mike Whitney's profile
Jul 19
DIY Robocars via Twitter
Jul 2
DIY Robocars via Twitter
Jun 26
Abdulatif Tlaib liked Ryan's profile
Jun 24
DIY Robocars via Twitter
RT @SmallpixelCar: First time at @wsraceways. After tuning @HokuyoUsa lidar signal and camera sensor on @NVIDIAEmbedded, my car was able to…
Jun 20
DIY Robocars via Twitter
RT @breadcentric: The handy bit about racing with self-driving cars is that one can type while the car is racing. Report from #AWSDeepRacer…
Jun 18
DIY Robocars via Twitter
RT @chr1sa: Our Bay Area @DIYRobocars meetup is now at 2,700 members. Next in-person events (in Oakland) are training day on July 17 and…
Jun 18
DIY Robocars via Twitter
Videos from the ICRA autonomous racing workshop are now available: https://linklab-uva.github.io/icra-autonomous-racing/
Jun 10
DIY Robocars via Twitter
RT @SmallpixelCar: Prepared race track for Warm Spring Raceways @wsraceways and looking forward to test my new car at RAMS RC @ramsaicar fa…
Jun 6
DIY Robocars via Twitter
RT @f1tenth: Trying out some nasty blocking maneuvers 🏎️🤖 #f1tenth #autonomousracing https://t.co/nMTstsaogM
Jun 5
DIY Robocars via Twitter
May 27
DIY Robocars via Twitter
RT @araffin2: I will talk this Saturday from 18:00 to 19:00 Paris time for the @diyrobocars community about learning to race in hours using…
May 27
DIY Robocars via Twitter
RT @a1k0n: Luckily the infeasible hairpin problem was easily reproducible in simulation and I could test the fix before bringing the car ba…
May 26
DIY Robocars via Twitter
RT @a1k0n: Another problem was that I was over-constraining the car's allowed accelerations, so it didn't think it could turn as tight as i…
May 26
DIY Robocars via Twitter
RT @a1k0n: Breaking the map up into two halves worked, but I had to be more careful about separating the inner track from outer. There's se…
May 26
DIY Robocars via Twitter
RT @a1k0n: Here's a datalog for my fastest lap of the day. Lap timer is tiny window lower-left. https://t.co/myrlWWrKUY
May 26