In a previous article, I described the construction of a HAT that enables you to power a Raspberry Pi with voltage inputs ranging from 7V to 28V, as provided by a car battery for example. This HAT was an accidental byproduct of the Omzlo PiMaster HAT, which typically provides 12V or 24V to a network of IoT modules connected through CAN bus, and powers a Raspberry Pi using a similar circuit. Some readers asked us if we were selling this HAT, so we started looking at producing a small batch.

A cheaper circuit

The circuit is a simple buck switching regulator based on the Texas Instrument TPS54202, which steps down the input voltage to 5V for the Raspberry Pi. As a protection, the 5V output goes through an "ideal" diode following the recommendation of the Raspberry Pi Foundation.

It turns out that the 330uF polymer aluminium electrolytic capacitor I used in the first design is quite expensive (2 to 3 euros) and annoying to solder. So I went back to Texas Instrument's online power supply design tool, WEBENCH, and found an alternative approach that uses three 22uF ceramic capacitors instead, as shown on the schematic below:

The resulting circuit exhibits a voltage ripple of approximately 20mV pp. This is similar to the original circuit, but it has a more pronounced "sawtooth" wave shape on the oscilloscope. It is perfectly fine for a Raspberry Pi.

Open hardware: design files

The final soldered PCB looks like this:

You can find the EagleCAD files here and the BOM in the table below.

Qty Value Device Parts Description
1 LED 0805 LED1 LED
2 100K R0603 R5, R6 Resistor
1 100nF/50V CAP0603 C3 Capacitor
1 10K R0805 R24 Resistor
2 10uF/50v CAP1206 C1, C12 Capacitor
1 13.7K R0603 R16 Resistor
1 1K R0805 R1 Resistor
3 22uF CAP1210 C2, C5, C6 Capacitor
1 47K R0805 R22 Resistor
1 91pF CAP0603 C4 Capacitor
1 DMG2305UX P-CH-MOSFET T1 P-Channel MOSFET Mode Field Effect Transistor
1 DMMT5401 DMMT5401 U8 Matched BJT pair
1 SRU1048-150Y SRU1048-150Y L2 Inductor
1 TPS54202DDCR TPS54202DDCR U2 Buck converter


As shown in the very first picture of this article, this HAT was designed to fit on top of a Raspberry Pi Zero. However, it works just as well on any Raspberry Pi with a 40pin GPIO header, like the Raspberry Pi 3, as illustrated below.

This circuit was successfully tested to power the Raspberry Pi 2, Pi 3 and Pi Zero W. It is theoretically comfortable providing up to 1.7A, with inputs ranging from 6V to 28V (the first version of this article erroneously gave a lower range of 7V).

If you don't feel like building your own, we have produced a first batch of 30 PiPower HATs that are now for sale on Tindie!

If you liked this article, follow us on twitter or on our facebook page.