When building your own ESPHome sensors and nodes using the popular ESP8266 or ESP32, you will quickly come to realize that there are three main voltages used in such projects: 3.3 V, 5 V, and 12 V. Generally though, you will only be using a single power supply for the finished project, even if you’re working with multiple voltages. That is why DC-DC buck converters exist.


While there’s nothing wrong with wiring everything up while prototyping of your project, it’s much easier to use a bench power supply for testing purposes. That way you can exclude any power circuit until it is time to build the finished product. The downside of a bench power supply is that they are heavy, bulky, and can cost a pretty penny.

An ATX power supply usually used in a computer has been converted to a bench power supply
An ATX power supply, such as this one from Corsair, makes for a perfect bench PSU

It doesn’t have to be that way because you might already have the perfect bench power supply for your ESP8266 and ESP32 projects lying around and collecting dust somewhere in your home. Any old ATX computer power supply will do the job as they output 3.3 V, 5 V, and 12 V. You won’t have to modify the power supply at all for this to work and if you’re on a budget, all you need is a bit of wire to get started.

Why an ATX power supply is perfect for ESP32 and ESP8266 projects

There are a few reasons why I consider ATX power supplies to be perfect for projects using an ESP32 or ESP8266. For starters, you can buy them for relatively little money, especially if you scour the second-hand market. ATX power supplies generally have a large fan, keeping all the components cool while not being all too noisy. Bench power supplies will often use a miniscule fan which has to spin fast to keep up.

The output of an ATX power supply
The output of an ATX power supply

Finally, what might be a downside for more experienced makers, but, for me personally is an upside, you only get what you need. You don’t have to twist any knobs or adjust and levers. All you get is clean 3.3 V, 5 V, and 12 V. Nothing more and nothing less.

Decoding the 24-pin ATX power supply connector

The only connector needed for this ATX to bench power supply conversion is the largest one with 24 pins. The one you would usually be plugging it into the motherboard of your computer. You will notice that the wires leading in to the 24-pin connector are coloured differently. Orange cables carry a +3.3 V signal, red cables carry a +5 V signal, and yellow cables carry a 12 V signal. Which cable you choose has no influence on the outcome, as long as you make sure you have the right colour. The black wires all lead to ground.

You will notice a few more coloured cables (namely purple, grey, brown, and green) of which only the green one is of interest to us. Why that is so will be next.

The 24-pin connector on the ATX power supply is used for the bench power supply
The 24-pin connector is what is needed to convert the ATX power supply

How to power on an ATX power supply

At this point you might be liking the idea of using your old ATX power supply for your ESP8266 and ESP32 projects, but you might be asking yourself one thing: How does one turn on an ATX power supply without a motherboard being attached to it? The answer is, you simply bridge the green wire (there is only one) and any black wire (ground).

The on/off button on an ATX power supply
You can use the on/off switch on the back of the ATX power supply by bridging two pins

I suggest you leave the ATX power supply switch turned off or simply unplugging it from the wall. You can then insert a short wire in to the two pins. Make sure it sits there firmly, as you will want it to stay there. With the wire inserted, you will be able to turn the ATX power supply on and off using the switch on the back.

A more elegant solution

If fiddling around with wires isn’t your thing, there is a more elegant solution available. You can buy a board into which you plug in the 24-pin connector. You will often find these with the descriptor XH-M229, and they have some added benefits: A power indicator LED, an on/off switch, individual and easy-to-access connectors for the different voltages, and a fuse for each set of connectors which could potentially save your boards.

Oak-Pine XH-M229 24 Pins A T X Benchtop Power Adapter Board Computer A T X Power Supply Breakout Adapter Module 12V 5V 3.3V
  • 【 4 Output Voltages 】 Providing quick access to 4 sets of typical output voltages, which including: 3.3V, 5V, 12V and -12V.
  • 【 24 Pin 】 Standard 24pin ATX port.With power indicator for easy reading and power switch for turning on and off, ideal for DIY. Low voltage power supply suitable for developing physical computing projects (embedded systems).
  • 【 With Replaceable Glass Fuses 】 Each output channel has replaceable 20A glass fuse and corresponding ground binding posts for easy connection.

As you’d expect, there are plenty of 3D models to be found with which you can make your setup prettier and potentially saver by covering up exposed wires. The XH-M229 can also be found for sale on AliExpress where it will cost you less than $3.

A 3D-printed case for an ATX power-supply
ATX Bench Power Supply case by srmn
A 3D-printed case for the breakout PCB
ATX power supply breakout box by KI4LLF
Liam Alexander Colman, the author and maintainer of Home Assistant Guides.

About Liam Alexander Colman

Liam Alexander Colman has been using Home Assistant for various projects for quite some time. What started of with a Raspberry Pi quickly became three Raspberry Pis and eventually a full-blown server. I now use Unraid as my operating system and Home Assistant happily runs in a Docker container. My personal setup includes many Zigbee devices as well as integrations with existing products such as my Android TV box. Read on to find out more on how I got started with Home Assistant.

Leave a comment