← all projects

project

A 6-layer UPS board for the Raspberry Pi 5

Off-the-shelf UPS hats are single-cell and unintelligent. This one takes a 6S pack or USB-C PD and switches between them under Pico control.

Date
Jun 2025
Role
Solo build — schematic, 6-layer layout, Pico firmware
Status
shipped
Built with
EasyEDA Pro, BQ25750, TPS552882, CH224Q, RP2040, C/C++

Off-the-shelf UPS hats for the Pi disappoint if you need to run anything demanding. Almost all are single-cell, limited in capacity, and offer no intelligence beyond switching to battery when mains drops. We needed something that could sustain heavy workloads for our projects, which meant designing it properly.

The board takes two independent inputs; a 6S Li-ion or LiPo pack over XT30, and USB-C PD negotiated up to 20V/5A through a CH224Q sink controller and switches between them via a relay driven by an onboard Pico. The Pico watches both rails and sequences the transition to avoid glitching the Pi’s supply.

Charging runs through a TI BQ25750, a high-voltage multi-cell synchronous buck-boost. Charge current and voltage are set either by physical jumpers for set-and-forget installs or dynamically over I2C from the Pico. The 5V output comes from a TPS552882 4-switch buck-boost, stable whether the battery sits above or below 5V. Protection is layered: a TPS25942 eFuse on the output rail, SIR880BDP MOSFETs for switching, and 5mΩ and 7mΩ shunts for current monitoring.

The 6-layer stackup was non-negotiable because separating high-current power planes from signal layers was the only way to keep EMI manageable at these switching frequencies.

What I took away

Power path sequencing is the hardest part of a UPS. The order rails come up and go down matters as much as their steady-state voltages, and it has to be designed explicitly rather than left to chance.

Compensation networks for switching chargers like the BQ25750 cannot be estimated. Follow the datasheet equations exactly; component tolerances matter at this level.

Designing for the Pi 5 specifically means accounting for peak current during CPU boost, which is higher and faster than the Pi 4.

HardwareFirmware