Purpose

This is a simple, low-cost, adjustable DC-DC converter designed to power a Raspberry Pi from a 12V source. As built, it’s configured for a Raspberry Pi 4B, but with a different output cable it could power any Raspberry Pi 3 or 4 — or other 5V devices — instead.

Running at roughly 91% efficiency, the converter is a great match for 12V battery power. In my case, I’m using it to run a Raspberry Pi 4B (running INDI on Stellarmate) from a 12V LiFePO4 battery.

The converter supplies up to 4A at 5V. Output voltage is adjustable both up and down, though the wiring differs depending on which direction you need. This build is wired to adjust upward, since the Raspberry Pi is notoriously sensitive to under-voltage. Mine is set to 5.1V, though the converter specified here can go as high as 5.25V if needed.

Converter options

I’ve used two different DC-DC converters for this build. I started with the MeanWell version in my Power Boxes, but later switched to a Hi-Link model that performs better:

Given its lower cost and wider adjustment range, the Hi-Link is now my preferred option. Both converters are pin-compatible and use an industry-standard footprint, so they can be swapped directly.

There’s also a 25W version of the Hi-Link that outputs 5A at 5V, otherwise identical to this one — it should comfortably run a Raspberry Pi 5. It does cost more than twice as much as the 20W module, but it could be worth it if you have to run a Raspberry Pi 5 on 12V. To give a big picture view, the power output is 20W, and the power input is 22W. The draw on the 12V line is 22W/12V = 1.8A. With a linear regulator, the current draw would be 4A. The converter saves 2.2A on your current budget.

Schematic Diagram

PCB Layout

The PCB is shown larger than life. It is only 2.4″ x 2.1″ actual size. I designed the PC board so it could handle 5A+ with the 25W modules.

Build

IMPORTANT: This board uses the short pin sockets. Don’t get the tall ones! They won’t work.

Building the board is straightforward — it would be hard to install a part in the wrong position. The one tricky part is placing the sockets for the converter module. Do them first.

The easiest method: put the sockets onto the module’s pins, then insert the module (with sockets attached) into the board. Flip it over and solder the sockets lightly while the module is in place, remove the module, flip it over on its top again and finish soldering. The 5V and 12V pads may be difficult, since they have, in some cases, full-contact pads, rather than thermal relief pads. Once the sockets are soldered into the board, the module will be hard to pull out — the sockets require a little force to insert the module, but more force to remove it. 

You can also get the sockets from Mouser: Harwin H3183-05. This particular socket is nearly flush with the PCB to keep the height as low as possible. You’ll need 6 sockets to hold all the module’s pins. Grab a few extras in case you drop one on the floor. They’re tiny. Our kit has 7 sockets, in case you, like I, drop one.

Pay close attention to the 2 electrolytic capacitors. If you put one in backwards it will, more than likely, pop like a firecracker as soon as you apply 12V to the input.

Adjusting the Output

Adjusting the output voltage takes several passes, since the voltage may droop slightly as you add load.

Pass 1 – Unloaded output: Place your voltmeter probes on the output screw terminals and adjust RV1 until you get 5.0 volts with nothing connected.

Pass 2 – Connected to the Pi: Connect the output cable from the screw terminals to the front panel connector that goes to the Raspberry Pi. Put a stiff cable between the front panel connector and the Raspberry Pi. Measure across the Raspberry Pi’s GPIO header, between pin 2 (5V) and pin 6 (GND), and re-adjust RV1 until you get a solid 5.0 volts.

Pass 3 – With peripherals attached: Plug in all peripherals (SSD, USB devices, etc.), then adjust the voltage between pins 2 and 6 to your target — 5.0V or so. Because the peripherals draw additional current, they’ll cause the voltage to droop slightly, which is why this final adjustment is done with everything connected: you’re compensating for that droop.

Why this works: The Pi regulates the 5V line down to 3.3V internally, so the only requirement for the 5V rail itself is staying within the USB spec (5.25V max). The goal is to set the unloaded voltage high enough that it droops down to right around 5.0V once everything is drawing current. The load regulation on the DC-to-DC converter is good enough to keep the droop to a minimum. If you want to see how much droop there is, unplug the cable from the Raspberry Pi and measure the voltage on the screw terminals again. The voltage may be higher than you set it on pass 3. The difference between the voltage you set in pass 3 and the current voltage is the amount of droop in the whole path. It’s just FYI, since it doesn’t really matter at all.

This project is available as a kit of all parts, just the module, or a bare printed circuit board.

 

Leave a Reply