Powering Raspberry Pis from Router UPS

With the unwelcome return of load shedding to KZN (thank you stage 4+) it was time to power my Raspberry Pis from the UPS.

There are numerous stories online regarding SD card corruption occurring when Raspberry Pis have their power removed without shutting down. Luckily, I’ve had no issues of this type thus far but as my Pis run the lights and cameras (for now), better safe than sorry.

The Router UPS has multiple 12V outputs that currently power the ONT and Main Deco. Lets get the Pis hooked up to it as well.

Mathematics Time

First, lets make sure the UPS can also power the Pis:

Deco (12V & 1A) + ONT (12V & 1.5A) + Pi 3B+ (5V & 1.34A Max – Link) + Pi Zero W (5V & 300mA Max – Link)

= 12V x 1A + 12V x 1.5A + 5V x 1.34A + 5V * 0.3A

= 38.2W (Well under the UPS’s 60W output limit)

Note: The Raspberry Pis need 5V so I’ll need a 12V to 5V buck converter that provides at least 2A output (3B+ 1.34A + Zero W 300mA).

Shopping List

Everything was purchased from Mantech’s KZN Branch.

  1. DC Socket 2.5×5.5×0.9 – Link
  2. Twin Flex Black/Red Cable – Link
  3. DC-DC Buck Converter (2x USB outputs) – Link
  4. USB-A to Micro-USB x 2 – Link

Assembly Time

All the components with an unused project box (noodles for scale):

Regarding that project box, it was supposed to be the home for the buck converter until I saw how much empty space was available in the Pi 3’s current home:

So I modified it..

…so that all the components will fit:

To assemble the plug that goes into the UPS, I soldered the leads (red to centre positive):

Then I screwed the other ends of the cable into the terminals and plugged it into the UPS to test. After a loud overcurrent beep from the UPS and a pop, here’s what the inside of an LM2576S looks like:

Spot the mistake

For a technical explanation, imagine Raiden is the current provided from the UPS and Scorpion is an LM2576S connected with the polarity reversed:

After learning that lesson, I purchased another DC-DC Buck Converter and finished the assembly:

And here’s it all closed up, with some friends:


Yay, the Pis now won’t have to suffer the ignominy of load shedding.

The Future

The somewhat janky wiring setup is thanks to me needing to power 2 Raspberry Pis right now. The 3B+ handles Scrypted and the Zero W handles Homebridge. Ideally I’ll be moving these services (and the UPS connection) onto a single Pi 4 running Docker but that’s left for when I can actually buy one

If you have any questions/would like to share your experience with powering Raspberry Pis, leave a reply below. To receive an email when I publish a post, subscribe here.

(Featured image remixed from this photo)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑