Home        Store        Learn        Blog

Raspberry and pixhawk shutdown problem

Hello, I connected 8 thrusters to the pixhawk and connected the pixhawk to Raspberry Pi 3 via USB. After a while, after starting to give the last gas to the engines, all the lights of the raspberry go out and it restarts itself. I power the Raspberry via 5V and GND pins. Also, I got this error when I fed the raspberry through its own adapter. Tried on two different raspberry but still gave the same error. What is the reason for this error?

Hi @Furkan,

The Pixhawk should be powered directly, not via its USB connection to the Raspberry Pi. We recommend using a 5V 6A Supply connected to the 5V and GND pins of the Raspberry Pi, and to the 5V and GND rails of the Pixhawk. There’s an example connection setup in our Connection Diagram, but note that only one 5V 6A supply is needed (the diagram shows one at each board just to display the connections clearly).

More generally, 8 thrusters can draw a significant amount of current, especially if used at the same time. If your 5V regulator is powered from the same supply as the thrusters then large bursts of thrust can cause the supply voltage to drop enough that the 5V output can’t be maintained, which causes the Raspberry Pi to lose power and restart. To avoid there are a few different options:

  • Limit thrust by
    • avoiding applying too large controls via the joystick,
    • limiting max joystick gain (doesn’t apply to stabilisation),
    • creating a custom frame with all the numbers scaled down (applies everywhere, but more effort to do and to change), or
    • possibly setting a meaningful value for MOT_BAT_CURR_MAX (I’m not sure if this requires ESCs with current-sensing, so have asked internally and will get back to you see next comment for details), or with the development firmware (currently 4.2.0) it seems like it should be possible to set BATT_WATT_MAX
    • Setting SERVOn_MIN and SERVOn_MAX closer to 1500 for all your thruster outputs (n=1-8) Doesn’t apply to motors, apparently - see next point:
    • Setting RC3_MIN* and RC3_MAX in current firmware, or MOT_PWM_MIN and MOT_PWM_MAX in ArduSub >= 4.2 (the MOT_... parameters exist in current firmware but there’s a bug which means they’re not used)
  • Use a battery/power supply with a higher output capacity
  • Have smoothing circuitry between your main power supply and your 5V regulator
  • Isolate your thruster vs 5V electronics power supplies

*Note: apparently RC3_TRIM also needs to be set or it complains that it’s below the minimum - it seemed to work for me to just set it to the same as RC3_MIN.


Quick video for setting the RC3_* parameters in QGC:

1 Like

Following up on this, apparently it does operate just off the battery current measurements from the Power Sense Module, so should be usable with a standard BlueROV2 setup. That said, I’m told it can take a little while to kick in after a peak, so it’s likely relevant to specify a short time-constant (using MOT_BAT_CURR_TC).

More generally, since it’s a reactive strategy it still relies on the system being able to handle at least brief peaks above the specified limit, so if that’s not possible for your system then one of the other approaches will still be necessary.

1 Like

Hello,

I had a similar issu this weekend and assume it was cause by my 5v BEC. I troubleshoot my system yesterday and find out that my pixhawk still work when:
1- I remove the 5V connector on the SB rail
2- I remove the power sense cable
3- but stop when I disconnect 1, 2 and the USB.

Also, when the USB is disconnected but the power sense and Rail are connected, the Pixhawk still work. If I disconnect the rail, and USB, the Pixhawk stop. This confirm that the power sense cable do not power the pixhawk (as mention in the BR assembly documentation).

One weird thing I found is that my BEC output and supply 5.1 V and the RPI USB supply is also near 5v. Thus the Pixhawk is powered at 5V. Nevertheless, in QGC Mavlink Inspector for the parameter HWstate and on the 5v power pin of the GPS port, I read 4.6volts which is rather low knowing my power supply is close to 5v. I did not find why yet. Maybe there is a diode drop somewhere in the loop.

Hi Charles,

The Pixhawk is capable of being powered from the USB port, the servo rails, and/or the Power port. Our Power Sense Module is used only for detecting battery power, so no power is provided through its connection to the Pixhawk’s Power port. The servo rails require external powering for the camera servo to operate, and act as a backup power source should the powering over the USB connection to the Raspberry Pi fail/drop too low.

That seems odd. I checked my GPS port’s power vs ground pins with a multimeter and it read 5.1V, which matches my HWSTATUS value. That’s with nothing connected to the GPS port though - if you have a GPS connected it may affect that voltage (depending on the strength/capacity of your power supplies).

My reading on the GPS port also match the “HWstatus”. But both don’t correspind to the 5.1V I read directly on the RPI usb plug (measured with a DMM directly on the pin of the usb cable) and on the BEC (measured on the rail pin or directly on the BEC connector).