← How-Tos
raspberry-pi Jul 27, 2026 ◑ 8 views ◯ 5 min read

Powering a Raspberry Pi Right: PoE HATs, UPS HATs, and Safe Shutdown

raspberry pipower over ethernetpoe hatups hatsafe shutdownpower supplysd card corruption

A surprising fraction of "my Pi randomly corrupts its SD card" or "my Pi hangs and needs a hard reboot" problems trace back to power, not software — an underpowered supply, a cheap USB cable with too much voltage drop, or simply yanking power during a write instead of shutting down cleanly. This matters more, not less, once a Pi is doing something that runs 24/7 unattended — a home server, a NAS, a Frigate NVR, or a Pi-hole — where a bad power event corrupts a filesystem nobody's watching in real time. This guide covers the two power upgrades that solve most of these problems for good: Power over Ethernet, which eliminates a dedicated power cable entirely, and a UPS HAT, which keeps the Pi alive (or at least lets it shut down cleanly) through a power outage.

Stock Power Requirements First

Before adding PoE or a UPS, make sure baseline power is solid — this catches a real share of "flaky Pi" reports before any hardware upgrade is even needed.

BoardOfficial supplyNotes Pi 45V/3A USB-CCheap USB-C cables and chargers not rated for the full current are a common source of the "lightning bolt" undervoltage icon and random reboots under load Pi 55V/5A USB-C (PD)Needs a genuine USB-PD-capable supply — a standard 5V/3A phone charger under-delivers for the Pi 5 under load, especially with NVMe or USB peripherals attached Pi Zero 2 W5V/2.5A micro-USBLower draw, but still sensitive to cable quality

Check vcgencmd get_throttled (or the undervoltage icon on Pi OS with a display) to confirm the supply isn't already marginal before layering PoE or UPS hardware on top of a shaky baseline.

Power over Ethernet (PoE)

A PoE HAT taps power from the same Ethernet cable already carrying network traffic, which is genuinely useful for a Pi mounted somewhere without a convenient outlet — a network closet, a security camera location, a ceiling-mounted access point companion. It needs a PoE-capable switch or injector upstream (802.3af "PoE" delivers up to ~15W at the device, 802.3at "PoE+" up to ~30W — check the HAT's spec against what your switch or injector actually provides, since an underpowered PoE source causes the same undervoltage symptoms as a bad USB supply).

UPS HATs and Safe Shutdown

A UPS HAT sits between the power input and the Pi, backed by a small battery (typically 18650 Li-ion cells), so the Pi keeps running — or at minimum has time to shut down cleanly — through a brief power outage or an accidental cable disconnect. For anything running a real filesystem workload (a NAS, a database-backed home server, Frigate writing continuous video), this is one of the highest-value upgrades available, since it directly addresses the SD-card/SSD corruption risk that comes from power loss mid-write.

Safe Shutdown Without a UPS

Even without dedicated UPS hardware, a simple GPIO-triggered shutdown button (a momentary switch wired to a GPIO pin plus a short script watching for the press, or a dedicated shutdown HAT built around this exact pattern) is worth adding to any headless Pi that doesn't already have a reliable safe-shutdown path — it turns "unplug it to power it down" into "hold a button for two seconds," which matters enormously for filesystem integrity even on a Pi that isn't behind a UPS at all.

Filesystem Choices That Help

Independent of the power hardware, a Pi that's expected to survive occasional unclean shutdowns benefits from filesystem choices that limit corruption blast radius: journaling filesystems (ext4, the Pi OS default) recover far more gracefully from power loss than older filesystem types, and for anything write-heavy, moving the OS or working data off a microSD card and onto a USB SSD or, on Pi 4/5, NVMe storage substantially reduces both corruption risk and the everyday wear that kills cheap SD cards over months of continuous logging or database writes.

None of this is exciting compared to the actual project running on the Pi, but for anything meant to run unattended for months at a time — which describes most of the home server, NVR, and network-appliance builds on this site — solid power delivery and a real shutdown path are what separate a Pi that quietly runs for years from one that needs a re-flash every few months after another corrupted card.