This Waveshare UPS HAT is an interesting option, supplied with a 3.7 V 1000 mAh LiPo battery. Fitting onto a sticky strip on the board, the battery has a short cable that plugs into the board’s mini JST socket.
With the battery installed, the board connects to a Raspberry Pi WH in a novel way: six springy pogo pins connect to the solder on the underside of the GPIO header for power, ground, and I2C pins. This leaves the GPIO header free for connecting other HATs on top.
Note that the UPS HAT will also work with any Raspberry Pi Zero with a soldered header – so long as your soldering isn’t too messy and has regular peaks to make good connections.
Once fitted to a Raspberry Pi Zero with I2C enabled, you can power the HAT via its micro USB socket, then flick its on-board switch to power up Raspberry Pi – or just leave it off to charge up the battery for a while.
If the mains power goes off, it’ll instantly switch to battery power. A fully charged battery should provide power for up to seven hours, depending on the Raspberry Pi Zero’s workload. Naturally, the addition of any connected devices will reduce that time.
You can monitor the battery level by installing a simple Python program. This shows the real-time load voltage, current (negative if battery power is being used), power, and percentage. While we’ve seen more sophisticated power management features, such as on the PiJuice, it’s a handy tool.
With a LiPo battery included, it represents very good value for money if you need to keep your Raspberry Pi Zero running during a power outage.