Battery failsafe caused compass error and lead to crash?

Hello ,

I set a high batt_volt fail safe and lifted the drone waiting for the failsafe to kick in .

The moment the fail safe showed battery too low it blinked once and in second blink i see compass error and the drone hit a tree and landed in some bushes .

i never had a compass error before and it seems after the crash its working fine again.

Any ideas what went wrong ?

https://drive.google.com/file/d/1waNKDRxj8A2ZQHzvggBYqCdZUe0nGnyD/view?usp=sharing

Thank you,
Best!

The Mag health status aligns with System Power Flag messages so perhaps some kind of power glitch.


All those CAN messages probably point to a non-functioning unit.
Then there was an EKF failsafe and switch to Land mode.

Update the firmware to latest Stable regardless.

Hello @dkemxr ,

i was thinking the same, mag0 health and Nsatelites both plummet at the same time , so it must be the HERE3 unit which is iffy , i checked the cable, if it was clicked on the FC, that was ok .

If it was power glitch from the FC the rangefinders would have failed also ?

But what a coincidence; battery fail safe and the HERE3 at the same time?

Did the efk error because of no GPS? i tried switching to stabilize but on my panic i switched to loiter and then i thought its better to just tell it to land.

Best!

Sorry i didnt see the POWER.flags they go 33 and 41 , does that mean 33+ 8 ?

Yes, almost certainly that’s true.

Honestly I’m not sure of the power flag messaging. I was looking around for a common parameter to explain the drop outs and while looking at Vcc saw this parameter that was coincident with the mag health. I would be interested to know what it’s telling us also, perhaps @rmackay9 could comment?

So its either a faulty gps unit ? or power doesn’t flow correctly from the FC ? scary stuff, i would definitely need to understand what is going on before flying again,

i couldn’t find the Power.flags description in the docs .

Would it be a safe thing to add 2 gps units ? (a new here3 and an emlid)

Thank again for your replies @dkemxr much appreciated !

The best description that I found is on the MAVLink developer page.
https://mavlink.io/en/messages/common.html#MAV_POWER_STATUS
Search for MAV_POWER_STATUS.

33 = 1 + 32 ( MAV_POWER_STATUS_BRICK_VALID + MAV_POWER_STATUS_CHANGED)
41 = 1 + 32 + 8 ( 33 + MAV_POWER_STATUS_PERIPH_OVERCURRENT)

It seems that your GPS is shutting down with an overcurrent flag. It could be a faulty gps unit, or some problem on the controller.

You can try powering your gps from the TELEM1 power pin (It has a higher amp rating). If the gps works fine, then the problem is on the CAN power line. If the gps still fails, then the problem is the gps itself.

Hope this helps!

Hello @airton_dep ,

Thank you very much for all the info, it helps a lot .

So overcurrent would be too much current or a short circuit ? and from the two probably a short-circuit ? That flag means overcurrent somewhere in the system but since gps went down its probably that ?

Am not sure how to power it from TELEM1 (cut first pin cable and put it on an other connector that fits TELEM1? while the rest stay in original can connector?), its a can cable, should i just use CAN2 to test it?

Thanks again for your input,
Best wishes!

I didn’t find the exact reason of the problem. I don’t know if it’s a short circuit or some problem in a voltage regulator. The flag is generic, so we have to guess where it came from. The only thing that died was the gps, so it’s probably it.

The power lines are shared between the pins. So the same problem that you had in CAN1 will happen on CAN2. The only segregate pin is the TELEM1. You can find this info here:
https://docs.cubepilot.org/user-guides/autopilot/the-cube-module-overview

Yes. All the CAN pins should stay the same. You should cut the power pin (the last one from left to right) and connect on the TELEM1 port directly.


In this picture I have a telemetry connected on TELEM1 but powered externally. The last pin is from the CAN connector, that is missing its last pin.

Hello @airton_dep ,

Thank you for the detailed explanation i’ll do what you suggested and move the V pin from gps to the connector of TELEM1

All other peripherals share a 1A current limit and a single power switch. Peak power draw on this port should not exceed 1.5A. Each group is individually switched under software control.

The above got me thinking, i have an I2C 2 “strip” on which i have 2 TerraRanger Evo (40 and 60 m) maybe all those together drew more power ? would be safer to feed that strip a 5v directly from my PDB ?

Best !

Yes Terraranger should have their own 5V power supply.

Hello @amilcarlucas ,

Can i take a 5v + ground from PDB and plug it on the i2c strip board (with a jst connector) and leave the cables from terrabee units as they are (still taking power from i2c plug) ? would that work ?

Or i need to cut each cable from each terabee and connect data cables on i2c strip board and power from PDB?

Best!

You need to cut only the 5V wire from the strip bard to the terabees. Leave the other three i2c wires intact.

And after that connect the dangling 5V terabee input wires to a 5V power supply. Use a separate power supply, not the one integrated in the PDB, because the range finders are usually very sensitive to power voltage fluctuations. And connect the power supply GND wire to the i2c strip GND.

before you go cutting anything you need to investigate what else is running from the 5v rail along with its connectors, its very strange to have spikes like this on the 5v and its timing would mean its connected to your problems. it looks like an overload then the voltage is spiking when the load is removed. its possible the GPS and compass are showing errors because they are the most susceptible.

Hello @geofrancis ,

How can i do that ?

I have a smart AP PDB, the FC is connected from its AP power supply. from the PDB i have one 5Vcable going to an rfd900 and a 12v on herelink air unit.

Then from the FC i have

  • a I2C strip with 2 terrabee range finders (which didnt stop measuring distance)
  • the HERE3 gps (with its mag health & Nsats dropping to 0)
  • TELEM2 going to herelink air unit (which has its own 12v dirrectly from the PDB)
  • and the classic cube orange usb, arm button and buzzer

I checked all my cables i didnt see anything stripped or not “clicked” into place.

Best wishes!