Everything works fine until I get to the compass offsets. It displays scrolling data but everything is zero and never changes as I move the quad. I did run the CLI "a" command and made sure that the mag was activated.


Any Ideas what to check?


This Quad was flying fine with the RC_1 release, this happened when I upgraded to NG.I know that Rc_1 didn't use the compass.

Views: 547

Reply to This

Replies to This Discussion

Sounds like the magnetometer isn't connected right. How are connecting it?

(I'm assuming you have a magnetometer--they don't come with the base ArduCopter or APM)

I have a Compass. I cut a GPS cable and wired it to the Compass. I also triple checked the wiring visually and with a ohm meter. Plugged it into the "No GPS" connector on the front of the IMU board.

It it the DIY Drones one? If so, have you checked your power selection jumper (shown here)? If all that checks out, it may be a defective magnetometer and you should return it for a replacement.

It is a DIY drones compass and it came with the solder jumper in the 5v position. I do have a second one but I'm a little nervous about hooking it up till I can find out what the problem is.

I don't think it can do any harm to hook up the second one and it would help with diagnostics.

I may try that after I troubleshoot some more. I don't have access to my logic analyzer right now but I did put my oscilloscope on it and I do see a signal on the SDA and SCL pins and 5v on Vcc pin.

You can test your maggy too by opening example sketch from Arduino IDE. Just look under examples AP_Compass and AP_Compass_test

I'm at the exact same point in the process and I'm having the exact same problem. (I'm using the DIY magnetometer with #define MAGORIENTATION  AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD)



Thanks Jani,

I'll try that tomorrow.

Having right or wrong orientation for maggy does not break output of it, wrong orientation only affects on final calculations so make check that it is according your physical installation.


If you have soldered your maggy directly to IMU board as in APM wiki shows, yes then you should use Comp down, pins forward.


If you don't see any change on readings while moving your quad, then check all maggy cablings and especially polarity of SDA/SCL lines. Also make sure that you are using correct voltage setting on your maggy to ensure proper operation.


Jani: Yes, I've soldered the DIY magnetometer directly to the IMU board as in the wiki. The SDA/SCL pins match up correctly. Before doing so, I did set the voltage from 3 to 5v. I had trouble with that soldering at first, but did get it eventually, and then checked it with a VOM, and it appeared to be jumped correctly (to 5v). I'll try the tests you mention above.


I ran the AP_Compass_Test sketch. I'm getting 0's across the board.

Reply to Discussion


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service