Properly feeding your Raspberry Pi 5 - slgrobotics/articubot_one GitHub Wiki
Back to Wiki
Properly feeding your Raspberry Pi 5
Here is a video explaining why our Pi5's on the robots (off the batteries) don't perform properly.
The video describes settings that help to fix the problem (use caution).
Here is a "distilled transcript" of the video, made by Ross Lunan (full credits to him and Josh Newans, autor of the video):
Note: you need to sudo usermod -a -G video $(whoami) to be added to the video group, or the vcgencmd command would require 'sudo'.
Remove USB Current Restriction 600 to 1600 ma:
/boot/firmware/config.txt usb_max_current_enable=1
If have a custom 5A Supply manually edit eeprom on a booted up RPi:
sudo rpi-eeprom-config --edit > Add PSU_MAX_CURRENT=5000
To determine Current Restriction Enable Status:
sudo vcgencnd get_config usb_max_current_enable
Boot without an SD Card which Displays a Diagnostic Screen.
Observe the 5th line down,
for regular USB-A to USB-C power supply:
power: supply: USB-C 900 ma CC PMIC: reset normal 0x0 usb_over_current=0
for Official USB-C power supply:
power: supply: RPI USB-PD 5000 ma CC1 PMIC: reset normal 0x0 usb_over_current=0
Note: The added line PSU_MAX_CURRENT=5000 is telling the RPi5 firmware that you are using a
NON-PD (non-power-delivery) power supply and that it should not
attempt USB-PD negotiation. The Pi should assume that your power supply is 5A capable (or else... magic gray smoke).
Here is a $30 "easy solution" - a power expansion board from 52pi:
- https://52pi.com/collections/hat-addons/products/52pi-pd-power-extension-adapter-board-for-raspberry-pi-5
- https://www.amazon.com/GeeekPi-Expansion-Raspberry-Automatic-Function/dp/B0CYPRDY9Q
Useful commands:
Display power available on USB devices:
lsusb -v 2>&- | grep -E 'Bus 00|MaxPower'
See if maximum (5A) current is available from the power supply:
sudo vcgencmd get_config usb_max_current_enable
See if CPU has been throttled:
vcgencmd get_throttled
See internal currents and voltages:
vcgencmd pmic_read_adc
vcgencmd pmic_read_adc EXT5V_V
In my experience, the 52Pi Expansion Board works very well, negotiates the usb_max_current_enable=1 fine.
I feed it from a generic 12V 20A power supply on a test bench, or from a 13.5V LiFePo4 battery on Seggy.
Note:
- The "DC 9-24V Power INPUT" requires a VERY uncommon male 4.2 x 1.3mm pug (not to be confused with common 5.5 x 2.5/2.1 mm connectors). I cut a plug from an old power supply, so I don't know its exact specs (likely 3.5x1.35mm). You can probably just solder wires to the PCB, not hard to do. If you find an exact match online, let me know. This one seems to fit too somehow.
- I don't feed the board via the "USB PD INPUT". If you have a reliable 30+ Watt PD-capable wall charger, it might fit. Feeding it from a powerbank on a robot feels sketchy. There’s the obvious capacity limitation, battery monitoring ability and then the less obvious circuitry gremlins, which come with the exciting possibility of sudden power loss and the release of magic gray smoke. Keep your fire extinguishers — and backup SD cards — close at hand.
Back to Wiki or Docs Folder