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 aluminum 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.
|3||22uF||CAP1210||C2, C5, C6||Capacitor|
|1||DMG2305UX||P-CH-MOSFET||T1||P-Channel MOSFET Mode Field Effect Transistor|
|1||DMMT5401||DMMT5401||U8||Matched BJT pair|
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 2.5A, 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!
UPDATE: As of May 2020, the Texas Instrument TPS54202 has been replaced with a TPS54302, increasing the current output limit from 1.7A to 2.5A in order to work with the Raspberry Pi 4.