Linux

Best UPS HATs for Raspberry Pi 5: Clean Shutdown on Power Loss

This post contains affiliate links. If you buy through them, we may earn a small commission at no extra cost to you. Learn more.

Pull the plug on a Raspberry Pi 5 halfway through a database write and the damage rarely shows up straight away. It shows up a week later as a filesystem that won’t mount or a Home Assistant history that stops at the outage. A UPS HAT bridges that gap: it holds the board up on battery, tells the operating system that mains power is gone, and gives it time to shut down on its own terms.

Original content from computingforgeeks.com - post 190613

We compared the Raspberry Pi UPS HAT options that their makers actually state Pi 5 support for, and ranked them on cell count, sustained output, how they feed the board and what shutdown software ships with them. Specs come from each maker’s product page, wiki or GitHub repository, and the prices and stock were checked on Amazon in November 2026. Boards whose documentation never names the Pi 5 are listed near the end so you can rule them out quickly.

Quick picks: the best UPS HAT for each Pi 5 job

Five boards cover the realistic Pi 5 builds, from a Pi-hole on a shelf to an NVMe server that has to ride out a long outage. The order follows sustained output and battery capacity first, then size and price.

Longest runtime, Waveshare UPS HAT (E): four 21700 cells, 5V 6A output, USB-C PD charging up to 40W and a fuel gauge on I2C. About $45 before cells, check the live price.

Waveshare UPS HAT (E) with four 21700 cells on a standoff base for Raspberry Pi 5
Waveshare UPS HAT (E): four 21700 cells, 5V 6A output, USB-C PD in and out. Image: Waveshare.

Most inputs and outputs, Geekworm X1202: four 18650 cells, 5.1V 5A output, a 6 to 18V barrel jack beside USB-C and two USB-A power ports. About $55 before cells, check the live price.

Geekworm X1202 UPS board for Raspberry Pi 5 with four empty 18650 holders
Geekworm X1202: four 18650 holders, USB-C or 6 to 18V DC input, 5.1V 5A output. Image: Geekworm.

Same footprint as the Pi, Geekworm X1200: two 18650 cells on an 85×56 mm board that mounts underneath, 5.1V 5A output. About $57 bundled with a 27W supply, check the delivery date.

Geekworm X1200 UPS board mounted under a Raspberry Pi 5 with two 18650 cells fitted, underside view
Geekworm X1200 under a Raspberry Pi 5, shown flipped (underside view) with two cells fitted. Cells and the Pi are sold separately. Image: Geekworm.

Best budget pick, SunFounder PiPower 5: a HAT+ that sits on top, 5V 5A output, 45W USB-C PD input and a web dashboard with power-loss alerts. About $35, check the live price.

SunFounder PiPower 5 UPS HAT stacked on a Raspberry Pi 5 with the battery pack underneath
SunFounder PiPower 5: HAT+ on the 40-pin header, 5V 5A output, 2S battery pack below the Pi. Image: SunFounder.

Battery in the box, PiSugar 3 Plus: a 5000 mAh pouch cell included, real-time clock, watchdog and a web UI, but only 3A of output. About $50, check the live price.

PiSugar 3 Plus UPS board with its 5000 mAh battery pouch
PiSugar 3 Plus: board plus 5000 mAh pouch cell, 5V 3A output, DS3231 real-time clock. Image: PiSugar.

Cells are extra for the Waveshare and both Geekworm boards, so budget roughly another $15 to $40 for a matched set of 18650 or 21700 cells from a reputable brand. The PiSugar comes with its pouch. CNX Software found a 7.4V pack in its PiPower 5 kit, but confirm on the Amazon listing that yours includes one.

How we picked and where the specs come from

Our ranking is built from published specifications. Every rating is attributed to the place it was published, and three kinds of source carry it:

  • Platform limits: the Raspberry Pi power supply documentation for the 5A recommendation, the 800 mA typical bare-board draw and the USB current limits.
  • Board specs: the Waveshare wiki and register manual, geekworm.com product pages and the geekworm-com/x120x GitHub repository, SunFounder’s PiPower 5 documentation, and the PiSugar docs and wiki.
  • Prices and stock: the Amazon listings linked in each section, read on the same day, quoted as bands because they move weekly.

Where a runtime appears, it’s arithmetic from the published cell capacity and the Pi’s documented typical draw, labelled as a ceiling. Real runtime lands lower once you add conversion losses, an SSD and a busy CPU, which is why we rank on stored energy rather than promise hours. A maker’s own claim of Pi 5 support was the entry ticket; inference never was.

How the Raspberry Pi 5 UPS HATs compare

Output current is the column that decides whether the Pi 5 runs at full USB power on battery. Stored energy decides how long it keeps going:

BoardCellsMax outputMountsStored energy (example cells)Runtime ceiling at 4 WShutdown softwarePrice band
Waveshare UPS HAT (E)4x 21700, not included5V 6AUnder the Pi, pogo pinsabout 72 Wh with 5000 mAh cells18 hPython demo over I2Cabout $45
Geekworm X12024x 18650, not included5.1V 5AUnder the Pi, pogo pinsabout 43 Wh with 3000 mAh cells10.8 hx120x scripts on GitHubabout $55
Geekworm X12002x 18650, not included5.1V 5AUnder the Pi, pogo pinsabout 22 Wh with 3000 mAh cells5.4 hx120x scripts on GitHubabout $57 with PSU
SunFounder PiPower 57.4V 2S Li-ion or LiPo pack5V 5AOn top, 40-pin header14.8 Wh with SunFounder’s 2000 mAh pack3.7 hpipower5 service and dashboardabout $35
PiSugar 3 Plus5000 mAh pouch, included5V 3AUnder the Pi, pogo pins18.5 Wh (cell label)4.6 hpisugar-server and web UIabout $50

The example cell capacities are ours, picked to compare like with like at 3.6V nominal, so swap in the rating printed on the cells you actually buy. Divide stored energy by the Pi’s 4W typical bare-board draw and you get the ceiling, for instance 18 hours for the Waveshare (E) and about 5 hours for the X1200. SunFounder sizes a busy Pi 5 at 20 to 25W for supply planning, and at that worst case the same 72 Wh lasts about three hours. Treat the 4 W column as a ceiling, not a forecast: CNX Software’s loaded Pi 5 drained a PiPower 5 from 89% to 37% in about an hour, against a ceiling of 3.7 hours for the whole pack.

1. Waveshare UPS HAT (E): longest runtime on a Pi 5

The UPS HAT (E) is the board to buy when the outage you are worried about lasts hours rather than minutes. Waveshare lists four 21700 cells, a 5V 6A output and Pi 5, 4B and 3B+ compatibility through a pogo-pin connector, so the Pi sits on top and the 40-pin header stays free. CNX Software’s write-up of the UPS HAT (E) lists the same four 21700 cells, 5V 6A output and Pi 5 support.

Waveshare UPS HAT (E) board layout with charge chip, buck converter and the four pogo pins labelled
Waveshare’s board diagram: the four pogo pins at the front carry 5V, GND and the I2C lines to the Pi. Image: Waveshare.

Charging runs through the HAT’s own USB-C port, which speaks PD 3.0 in both directions at up to 40W, and Waveshare tells you to plug the supply there rather than into the Pi. An MCU at I2C address 0x2D reports per-cell voltage, and the wiki demo shuts the Pi down after a minute of low battery. The board is 56×88 mm, and a register setting makes it restart the Pi automatically when power returns.

Two cautions from the wiki are worth reading before the cells arrive. A reversed cell can damage the protection chip, and cells fitted out of V1 to V4 order trip the warning indicator. After a cell swap you press BOOT or connect the charger before the output comes back. Waveshare also says the module can push more current than its rating, but asks you to stay under 6A unless you add active cooling.

Pick it for a Home Assistant box, a Pi-hole that also runs DHCP, or any Pi that should outlast the router on the same circuit. Skip it if the Pi lives in a tight case, because four 21700 cells make a tall stack. About $45 for the board alone, check the live price.

2. Geekworm X1202: four 18650 cells and a barrel jack

The X1202 is Geekworm’s four-cell board for the Pi 5, and its strength is the inputs. Besides a 5V 5A USB-C port, it takes 6 to 18V on a DC5521 barrel jack, so a spare 12V adapter can feed it instead of a second USB-C brick. CNX Software’s coverage of the X1202 gives the same four 18650 cells, 5.1V 5A output and Pi 5 target.

Geekworm X1202 port map showing the DC jack, USB-C input, USB outputs and four 18650 holders
Geekworm’s X1202 port map: the 6 to 18V barrel jack (1), USB-C input (3) and the four 18650 holders on the underside (12). Image: Geekworm.

Geekworm rates the output at 5.1V ±5% and 5A, with a charge current between 2.3 and 3.2A. The board mounts under the Pi 5 and reaches it through pogo pins, and two USB-A ports plus two XH2.54 headers hand 5V to a fan or a small switch. At 97.4×85 mm it overhangs the Pi, so a standard Pi case will not close over it.

Software comes from Geekworm’s x120x repository on GitHub. One script watches GPIO 6, which drops to 0 when mains power fails, and another reads the fuel gauge at I2C address 0x36 and shuts the Pi down below 3.20V. The board also turns itself off within three seconds if it can’t detect a Pi 5, so a loose pogo contact shows up as no power at all.

There is one compatibility trap. Geekworm says the X1202 does not work with its X1002 bottom-mounted NVMe board, while the top-mounted X1001, X1000 and X1003 are fine. Plan the NVMe HAT before you buy. About $55 before cells and in stock on the day we checked, check the live price.

3. Geekworm X1200: the compact two-cell option

If the four-cell boards are too big for the shelf, the X1200 keeps the same 85×56 mm footprint as the Pi itself. Geekworm mounts it on the bottom of the Pi with two 18650 cells, so the stack grows in height but not width.

Geekworm X1200 top and bottom views with the two 18650 holders, USB-C input and status LEDs labelled
Both faces of the X1200 V1.2 on their own: the two 18650 holders on one side, the USB-C input and status LEDs on the other. Image: Geekworm.

Electrically it matches the X1202: a 5V 5A USB-C input, 5.1V 5A output, the same 4.23V charge termination and the same pogo-pin connection with the 40-pin header left free. It shares the x120x scripts too, so the power-loss pin and the fuel gauge behave identically. The box holds the board and four screws, nothing else, so cells and standoffs are on you.

We couldn’t find the bare X1200 as its own Amazon listing. The closest is a bundle with a PD 27W USB-C supply at about $57, which is fair value if you need the supply anyway. On the day we checked it was orderable with a later ship date, so look at the delivery estimate before relying on it for a deadline, check the delivery date.

Pick it when you want a UPS that fits inside the Pi’s outline and you only need to ride out short dips and a clean shutdown. Skip it if your outages run long, since two cells hold roughly half what the X1202 does with the same cells.

4. SunFounder PiPower 5: budget HAT+ with a dashboard

The PiPower 5 is the cheapest board here that still promises 5V 5A, and SunFounder says its HAT+ configuration guarantees Pi 5 compatibility. Unlike the others it sits on top of the Pi through the 40-pin header and passes the pins through to a male breakout for further HATs.

SunFounder PiPower 5 board diagram with numbered callouts for the GPIO header, USB-C input and battery terminal
SunFounder’s PiPower 5 board diagram, with the 40-pin header along the top and USB-C input bottom right; the numbers are keyed in SunFounder’s online docs. Image: SunFounder.

Power comes in at 5 to 15V over USB-C PD at up to 45W or on screw terminals, and a DIP switch sets battery charging between 5 and 20W. SunFounder estimates a Pi 5 at 20 to 25W and recommends at least a 32W supply, or the battery can drain while plugged in. The pack is a 7.4V two-cell Li-ion or LiPo, and the docs rule out LiFePO4.

SunFounder ships a full service with a dashboard rather than sample scripts, though it says the service needs a 64-bit OS. A Cortex-M23 MCU at I2C address 0x5C reports input, output and battery figures, and the pipower5 service adds a web dashboard backed by InfluxDB with power-loss and power-restore alerts by email. A shutdown-signal jumper lets the board cut power once the Pi has halted, and a default-on jumper restarts it when mains returns.

Skip it if your Pi already wears a HAT that needs pin 26 or sits at I2C address 0x5C, since the PiPower 5 claims both. In CNX Software’s hands-on review, the kit shipped with a 7.4V 2000 mAh pack (14.8 Wh). A Pi 5 inside a Pironman 5 Pro Max case, with its display, fans, an NVMe SSD and a Hailo-8 running, lasted about an hour from an 89% charge before a clean shutdown. That shutdown came early, with the gauge still reading 37% against a 10% threshold. Read the Amazon listing for what is in the box. About $35, check the live price.

5. PiSugar 3 Plus: pogo-pin UPS with the battery included

PiSugar’s docs list the 3 Plus as the model for the Raspberry Pi 5, and its maker lists the battery as part of the kit. A 5000 mAh pouch sits flat beside a board that screws underneath the Pi and touches its 5V and ground pads through pogo pins. We found no independent review of the 3 Plus yet, so every figure in this section is PiSugar’s own.

PiSugar 3 Plus board on its own, showing the pogo pins, USB-C port, power button and battery LEDs
The PiSugar 3 Plus board without its battery, showing the pogo pins, the USB-C port, the buttons and the charge LEDs. Image: PiSugar.

For the size, the feature list is generous: a DS3231 real-time clock, a programmable tap button, a software watchdog and automatic power-on when the charger returns. The pisugar-server daemon serves a web UI on port 8421 and exposes a safe shutdown level and delay, so the Pi halts at a battery percentage you choose. It uses I2C addresses 0x57 and 0x68.

The catch is output. PiSugar rates the 3 Plus at 5V 3A, and the Raspberry Pi docs say a Pi 5 on anything short of a 5A supply limits its USB ports to 600 mA in total. PiSugar also warns that its charging chip runs at 50 to 60°C at 2A and up to 80°C at 3A, so give it airflow.

Pick it for a Pi 5 running headless services with no USB drives, where the RTC and the watchdog earn their keep. Skip it for anything with an SSD on USB. PiSugar’s own Buy on Amazon page links to this listing, and its web store sells the same board. Both price it at about $50, check the live price.

Why the Pi 5’s 5A rule matters for a UPS HAT

Raspberry Pi recommends its 27W supply for the Pi 5 and gives the board’s USB ports 1.6A only when the supply can deliver 5A at 5V. On anything else the ports drop to 600 mA. A wall adapter proves its rating over USB PD, but a UPS HAT feeding the board through pogo pins or the GPIO header has no PD conversation to offer.

Waveshare’s wiki for the UPS HAT (E) tells Pi 5 owners to set usb_max_current_enable=1 in config.txt or PSU_MAX_CURRENT=5000 in the bootloader EEPROM. The Raspberry Pi docs describe the EEPROM setting as skipping USB PD negotiation and assuming the stated current. Expect the same question with any board that bypasses the Pi’s USB-C port. The Pi also logs a warning when its input falls below about 4.63V, which is the first thing to check when a HAT struggles under load.

The practical rule is simple. A board rated for 5A or more, like the Waveshare (E), the Geekworm pair and the PiPower 5, can carry a Pi 5 with USB storage once the limit is lifted. A 3A board cannot, whatever setting you change, so the PiSugar belongs on a Pi with nothing hungry on its USB ports.

What NUT support looks like on a Raspberry Pi UPS HAT

Network UPS Tools is the standard way to make several machines shut down on one UPS’s signal, and it’s what our homelab and NAS UPS guide uses with a real tower UPS. On Pi HATs the story is thinner than search results suggest. None of the five boards above has a NUT driver, and each relies on its maker’s own daemon or script for shutdown.

The one NUT driver aimed at Pi power boards is hwmon_ina219. It reads an INA219 current sensor through the kernel’s hwmon interface and guesses the battery state from voltage and charge current. Its man page says it was built against one setup, a Compute Module 4 on the Waveshare CM4-POE-UPS-BASE, and lists its shutdown function as not implemented. It also arrived in a NUT release newer than the one Debian trixie packages.

So plan the Pi’s own shutdown around the vendor tool, and treat NUT as a separate layer. A Pi can still act as the NUT server for a proper USB UPS that protects your switch and NAS, which is often the better design. If you are weighing a battery box against a conventional UPS for that job, our power station versus UPS comparison covers the switchover times.

Which UPS HATs don’t support the Pi 5

Plenty of UPS boards still sell in Pi 5 searches because the listing says “Raspberry Pi”. These are the ones whose own documentation never names the Pi 5, or rules it out:

  • Geekworm X728: Geekworm lists the Pi 4B, the 3 series, 2B and B+ on the 40-pin header, with no Pi 5.
  • PiSugar S, S Plus and 2: the PiSugar wiki marks all three “Not Support” for the Pi 5 and points to the 3 series.
  • Waveshare UPS HAT, (B) and (D): the wikis name the Pi 3 and 4 or “Raspberry Pi series” with no Pi 5 statement, and the original board tops out at 2.5A.
  • Waveshare UPS HAT (C): built for the Pi Zero, with a 1000 mAh cell.

Two Geekworm boards sit between the lists. The X1209 is rated 5.1V 6A and supports the Pi 5, but it feeds power through the 40-pin header with external cells on XH2.54 connectors, and Geekworm says the H505 and H509 coolers don’t fit. The X1207 combines PoE+ with one unprotected flat-top 21700 cell no longer than 70.3 mm, which suits a Pi powered from a PoE switch.

How to choose between the five

Start from the outage you expect rather than the spec sheet. If power cuts in your area last seconds, any board here covers the dip, and the question becomes size and software. If they last hours, cell count wins, and the Waveshare (E) with good 21700 cells is the strongest candidate to carry a Pi 5 through an evening, with the X1202 next.

Next, check what already occupies the Pi. A bottom-mounted UPS clashes with a bottom NVMe board, a top HAT+ clashes with an AI HAT or a top NVMe adapter that wants the same header, and a tall cell stack will not fit most of the shells in our Raspberry Pi 5 case guide. Pick the mounting style first, then the board.

Finally, cells age. A pack that held three hours this winter holds less in two years, the same slow fade our guide to replacing UPS batteries tracks in tower units. Buy cells as a matched set, date them, and test a pull-the-plug shutdown every few months rather than trusting the gauge.

Where a UPS HAT stops protecting the Pi

A UPS HAT keeps one board alive, and that is narrower than it sounds. When mains drops, the router, the switch and the NAS the Pi talks to drop with it. A Pi-hole on battery with a dead router answers nobody, so the HAT buys a clean shutdown more than real uptime for network services.

It also will not save a card that was already failing. Most of the corruption people blame on power cuts happens on cheap microSD cards, and a better card or an SSD fixes more of it than any battery; our microSD card guide for the Raspberry Pi covers the endurance ratings. Shutdown software only helps if it is installed, running and tested.

For a Pi that runs the whole house, such as a Home Assistant host, the honest setup is a small conventional UPS behind the network gear and the Pi together. A HAT then becomes the second layer that guarantees the Pi shuts down cleanly when that UPS finally runs out. If you’re still choosing the board, our Pi 5 kit guide lists which bundles include the 27W supply.

Keep reading

How to Upgrade Fedora 44 to Fedora 45 (GUI, CLI and Rollback) Fedora How to Upgrade Fedora 44 to Fedora 45 (GUI, CLI and Rollback) Things to Do After Installing Fedora 45 Workstation Fedora Things to Do After Installing Fedora 45 Workstation Enable RPM Fusion and Multimedia Codecs on Fedora 45 / 44 / 43 Fedora Enable RPM Fusion and Multimedia Codecs on Fedora 45 / 44 / 43 Offshore development center services: what a full-service ODC actually covers Dev Offshore development center services: what a full-service ODC actually covers NVIDIA Kernel Module Missing, Falling Back to Nouveau on Fedora Fedora NVIDIA Kernel Module Missing, Falling Back to Nouveau on Fedora How To Install Podman on Ubuntu 24.04 (Noble Numbat) Containers How To Install Podman on Ubuntu 24.04 (Noble Numbat)

Leave a Comment

Press ESC to close