To reliably power a Raspberry Pi 5 for full peripheral loads, you need a 27W (5V at 5A) USB-C Power Delivery (PD) 3.0 power supply. Unlike the Pi 4, which happily ran on a standard 15W (5V/3A) brick, the Pi 5 features a Renesas DA9091 Power Management IC (PMIC) that actively negotiates USB-C PD profiles. If the PMIC does not detect a 5A Power Data Object (PDO), it defaults to a 3A limit and restricts downstream USB ports to 600mA to prevent system collapse.
When a power delivery failure occurs, the first three things you must check are:
- Cable Wire Gauge & E-Marker: Standard 3A cables use 22 AWG or 24 AWG VBUS wires, which cause severe voltage drop at 5A. You must use a 5A-rated cable (typically 20 AWG) with an e-marker chip.
- PSU PDO Negotiation Profile: Many laptop chargers output 65W but only negotiate 5V/3A, stepping up to 9V, 12V, or 20V for higher wattages. The Pi 5 requires a supply that specifically advertises a 5V/5A PDO.
- Physical Connector Seating: The Pi 5 USB-C receptacle is surface-mounted; ensure the cable is fully seated and free of debris to prevent intermittent contact resistance on the VBUS pins.
Raspberry Pi Power Delivery Specifications
Before wiring up your project, you need to know exactly what your board demands. The table below maps the nominal and maximum power requirements across the current generation of Raspberry Pi boards. Note that the Pi 5's peripheral power limit is significantly higher, which is why the 27W supply is mandatory when attaching NVMe SSDs, active coolers, and USB peripherals.
| Board Variant | Nominal Voltage | Max Current | Total Wattage | USB-C PD Required | USB Peripheral Limit |
|---|---|---|---|---|---|
| Raspberry Pi 5 (8GB) | 5.0V DC | 5.0A | 27W | Yes (5V/5A PDO) | 1.6A (total across ports) |
| Raspberry Pi 4 Model B | 5.0V DC | 3.0A | 15W | Optional | 1.2A (total) |
| Raspberry Pi Zero 2 W | 5.0V DC | 1.2A | 6W | No | N/A (Single port) |
| Raspberry Pi 3 Model B+ | 5.1V DC | 2.5A | 12.5W | No | N/A |
Debugging the "Under-voltage detected" Error
When the Pi 5's PMIC detects that the input voltage has dropped below the safe threshold, the kernel logs a specific error and triggers hardware throttling to prevent data corruption on the microSD card or NVMe drive.
The exact error string you will see in dmesg or the serial console is:
Under-voltage detected! Current voltage: 4.650V.
If you query the VideoCore firmware directly using the terminal command vcgencmd get_throttled, you will receive a hexadecimal bitmask. A common failure state returns:
throttled=0x50005
Decoding the Throttled Hex Mask
The hex value 0x50005 is not random; it is a bitwise OR of specific fault flags. Understanding this mask is critical for debugging embedded deployments in the field.
- 0x1 (Bit 0): Under-voltage is currently active.
- 0x4 (Bit 2): ARM frequency is currently throttled (capped to reduce power draw).
- 0x10000 (Bit 16): Under-voltage has occurred since last boot.
- 0x40000 (Bit 18): Throttling has occurred since last boot.
Ranked Causes for 0x50005:
- Non-PD Cable/PSU Mismatch: The PMIC negotiated 5V/3A, but your attached peripherals (like an unpowered USB hub or 5V fan) are pulling 4A, dragging the rail down.
- Transient Inrush Current: Spinning up a mechanical USB hard drive or initializing an NVMe SSD causes a millisecond inrush spike that dips the voltage below 4.63V before the PSU's transient response can catch up.
- Thermal Throttling Confusion: Sometimes users see throttling and assume power, but if the hex is
0x8or0x80000, it's a soft temperature limit, not a power fault.
Hardware Build: Power Monitoring & Warning LED
Let's build a hardware watchdog that monitors the Pi 5's power state and triggers a physical warning LED if the system enters an under-voltage state. This is highly useful for headless kiosk or IoT deployments where you cannot easily SSH in to check vcgencmd.
Parts List
- Board: Raspberry Pi 5 (8GB variant, running Pi OS Bookworm)
- Power Supply: Official Raspberry Pi 27W USB-C PD Power Supply
- Indicator: 5mm Red LED (forward voltage ~2.0V)
- Current Limiting: 330Ω 1/4W Through-hole Resistor
- Wiring: 2x Male-to-Female Dupont jumper wires
Pin Mapping Table
We are targeting GPIO 17 (Physical Pin 11) for the LED output. This pin is safe to use, does not conflict with the primary I2C/SPI buses, and defaults to a safe input state on boot.
| Component | Pi 5 GPIO / Pin | Physical Pin # | Notes |
|---|---|---|---|
| Resistor (Lead 1) | GPIO 17 | Pin 11 | Connects directly to the GPIO header |
| Resistor (Lead 2) | N/A | N/A | Connects to LED Anode (Long leg) |
| LED Cathode | GND | Pin 9 | Short leg connects to Ground |
Python Power Monitoring Script
The following Python 3 script uses the gpiozero library (standard in Pi OS Bookworm) and the subprocess module to poll the firmware throttling state. It includes robust error handling for missing binaries and GPIO conflicts.
#!/usr/bin/env python3
"""
Raspberry Pi 5 Power Brownout Monitor
Targets: Raspberry Pi 5 (Bookworm OS)
Dependencies: gpiozero (pre-installed on Pi OS)
"""
import subprocess
import time
import sys
from gpiozero import LED
# Pin definition for the warning LED
WARNING_LED_PIN = 17
# Throttling bitmask constants
UNDERVOLTAGE_NOW = 0x1
THROTTLED_NOW = 0x4
def get_throttled_status():
"""Queries the VideoCore firmware for throttling status."""
try:
result = subprocess.run(
['vcgencmd', 'get_throttled'],
capture_output=True,
text=True,
check=True
)
# Output format is 'throttled=0x50005\n'
raw_output = result.stdout.strip()
hex_str = raw_output.split('=')[1]
return int(hex_str, 16)
except FileNotFoundError:
print("ERROR: 'vcgencmd' not found. Are you running on a Raspberry Pi?")
sys.exit(1)
except subprocess.CalledProcessError as e:
print(f"ERROR: vcgencmd failed with code {e.returncode}")
return 0
except (IndexError, ValueError):
print("ERROR: Failed to parse vcgencmd output.")
return 0
def main():
try:
warning_led = LED(WARNING_LED_PIN)
print(f"Monitoring power state on GPIO {WARNING_LED_PIN}...")
print("Press Ctrl+C to exit.\n")
while True:
status = get_throttled_status()
# Check if under-voltage or throttling is currently active
if (status & UNDERVOLTAGE_NOW) or (status & THROTTLED_NOW):
if not warning_led.is_lit:
print(f"[ALERT] Under-voltage/Throttling detected! Mask: {hex(status)}")
warning_led.on()
else:
if warning_led.is_lit:
print(f"[OK] Power stable. Mask: {hex(status)}")
warning_led.off()
# Poll every 2 seconds to avoid spamming the firmware mailbox
time.sleep(2)
except KeyboardInterrupt:
print("\nMonitor stopped by user.")
finally:
# Ensure GPIO is cleaned up safely
try:
warning_led.off()
warning_led.close()
except NameError:
pass
if __name__ == "__main__":
main()
Extending and Simplifying the Build
Depending on your deployment environment, you may need to scale this power architecture up for industrial reliability, or down for budget constraints.
How to Extend: PoE+ and UPS HATs
For remote deployments where running a 5V USB-C cable is impractical, extend the build using Power over Ethernet (PoE+). The official Raspberry Pi PoE+ HAT delivers up to 25.5W (5V / 5.1A) to the Pi 5 via the 4-pin PoE header. While slightly under the 27W ideal, it provides ample headroom for most sensor and relay arrays.
For battery backup, integrate a LiFePO4 UPS HAT. Unlike raw LiPo cells, LiFePO4 (Lithium Iron Phosphate) chemistry operates at a nominal 3.2V per cell, requiring a specialized BMS (Battery Management System) and a boost converter to step up to 5V. Ensure the UPS HAT supports I2C communication so your Python script can also monitor battery State of Charge (SoC) and trigger a graceful shutdown -h now before the battery depletes.
How to Simplify: Bypassing the USB-C PD Limit
If you are prototyping on a bench and only have a high-quality 5V/3A "dumb" power supply (like a repurposed Mean Well LRS-35-5), the Pi 5 will boot but limit the USB ports to 600mA. If your project doesn't use the USB ports (e.g., you are only using GPIO, I2C, and Ethernet), you can simplify the setup by forcing the Pi to ignore the PD negotiation failure.
Edit your boot configuration file:
sudo nano /boot/firmware/config.txt
Add the following line to the bottom of the file:
usb_max_current_enable=1
This tells the PMIC to allow up to 1.6A on the USB ports regardless of the PSU negotiation. Caution: If your 3A PSU is already powering the SoC and a heavy GPIO load, enabling this and plugging in a power-hungry USB device will cause an immediate brownout and system crash. Only use this simplification if you have calculated your total system wattage and verified it stays under 15W.






