Diagnosing my new 3DR hexa, I noticed in the CLI, it reports COMPASS INIT ERROR.

Running CLI's compass test prints out  "not healthy". I also built a second APM1.x today, no issues and it too reports the same error. The 3DR magnetometer came with the kit. The other was pruchased a few months ago.

Checked my Y6 and coworker's hexa which I built and no issues, compass works fine and the test pass.

Do I have 2 defective magnetometers? Is there a way I can check it with the volt meter or some other tool? Both I received from the 3DR store.

Views: 1658

Reply to This

Replies to This Discussion

I'm not seeing any issues here. Did you solder on your compass yourself? If so, check those connections. 

No dice.  Checked connection and everything.

I found one APM isn't getting 5V (??) on the Vcc input, but I desoldered and retried and both on the working board (that gets 5V) and both do not work.

UPDATE: I know why 5V was not working on the 2nd APM--pad pulled when I removed the compass.

ok. On my 2 boards:

Old APM: fix the 5V pad, going through the I2C cable now, the compass shows data--but I got damaged pads so how I mount it is going to be a challenge. 

3DR hexa: Compass is defective--it gets power and I threw a logic analyzer at it--garbage data (well hardly any data). Ordered a new compass (and a backup). Somewhat disappointed--are the boards checked before they leave the factory? Don't see how I could have kill it, I've built 8+ APMs already and those work fine.

Just got 2 new magnetometers. Tried one via i2C cable port (voltmeter shows power, continuity on i2c pins).

Still get a compass init error in the CLI, test show 'not healthy'... on both APMs

Everything else on both oil pan checks out. Is there anything else I can check? I cannot accept I had 2 bad APMs--one from the 3DR hexa kit and one purchase months ago.... Running APM firmware 2.5.3 on both. Now makes me think my original compasses were fine(!). 


Got my old APM 1.x to work with the new compass--loose solder joint on APM board at the SDA connection... go figure.

3DR still not working with same compass (so I know it's ok). Still tracing.

hey!  excellent news!

OK, now here's a possible board issue... but good thing is I got the second APM to work!

Here's the story:

I noticed the altitude was printing out -2147483648 for a value in MP, though GPS lat-long looked fine.

Running the CLI test on compass--it showed not healthy (ok been there done that). But now, showing alt: it was the same as in MP: the alt was the large number (i.e. null, signed 2^32 basically), temp was 0, raw temp and press were 0. Weird I thought, so off I go to desolder the compass again to the point I just say s'd it just buy a new oil pan.

Instead of a glob of solder on all 4 pins, the compass was still lightly soldered at this stage. By chance I hooked it back up to the USB and started the CLI and viola the compass initialized successfully and the baro was working fine!

I re-soldered the 4 compass pins and bang: compass init error! slightly desoldered and success! Resoldered the gnd and Vcc and still works, so something is leaking voltage into the SDA/SCL pins. I did wiggle and probe tests and I'm pretty sure it's not a mechanical connection issue. Makes me want to use the i2c cable for all my compasses in the future rather than soldering directly.

(barely soldered at the top of SCL/SDA pins, noticed the amount of solder on Vcc/Gnd--having the same amount on the SDA/SCL pins caused the compass to fail initialization and likely shorted something out such that the baro stop working too)

After more investigation, looks like a possible trace issue--maybe from flexing or too hot an iron...


     Both the Barometer and the compass use the same I2C bus so it's very possible to break both if you accidentally created a connection between any of the four pins (vcc, gnd, sda, scl).  Looks like you figured it out but just adding a little extra to the possible explanation.


Thanks for the tip. I looked up the baro specs afterwards and didn't realize we're on i2c as well. Does explain the garbage data. Ah, i2c has bitten me many times (on the Mikrokopters)...

Bypassed the pads and used the i2c port to ease debugging in the future. Both boards work fine now. I figured a pad must been burnt & released from soldering.

Reply to Discussion


© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service