Introduction: Variable ATX Bench Powersupply - FabLab Edition

A good power supply is very useful when working with electronics, but it can be pricey. However, you could have one laying around in the form of an ATX PSU (Power Supply Unit). They are the most commonly used power supplies for computers. In this instructable I'll show how I converted my ATX PSU in a variable benchtop power supply. I have got some ideas from many similar projects:

I combined ideas of several of those projects I found, to give my PSU the most options as possible.

*As I mainly use breadboards for my projects, I added female headers to my powersupply. I also made crocodile clamps that fit in those headers. For appliances that draw more current, I added banana jack terminals. And for powering my arduino a USB port was added.
*For the powering of some DC motors I wanted a variable powersupply, so I added a variable output with an LM317 (a voltage regulator, ), controlled by a 10-turn potentiometer.

*Lastly I added fuses as safety measure. An ATX PSU should have a short-circuit protection built in, but this way we are completely sure we don't destroy it.

Wanting to add as many features as possible, I also made a case for it. I chose for plexiglass, as it is nice to see the cable management inside (I am a cable management freak). The plexiglass was laser-cut at FabLabXL, a FabLab ( in Brussels, Belgium.

As for heat management and safety I don't recommend installing everything in the PSU itself.

As we are dealing with a high voltage power supply, I recommend only attempting this if you have a basic knowledge of electricity, and its dangers. Inside the PSU there are some BIG capacitors, that - when charged - will kill you upon touch; even if the PSU is off! Always let them discharge for a few days before opening the PSU. As stated before this is why I don't recommend mounting everything inside the PSU, but making a seperate enclosure. I am not responsible for injuries or deaths.

Step 1: Basic Information + Parts

The ATX PSU has a lot of wires coming out of the back. They can be recognized by their color ( ).

  • Black: ground (GND)
  • Orange (+ brown): 3.3V
  • Red (+ pink): 5V
  • Yellow: 12V
  • Blue: -12V
  • Purple: 5V Standby.
  • The brown and pink wires are sensing wires (they verify if the output is 3.3V or 5V respectively).
  • The green should be connected to GND (black) to turn on the power supply.
  • The grey wire is "power good", and gives +5V if all wires are connected properly (i.e. green connected to black, borwn sensing wire to orange wires and pink sensing wire to red wires).

To give a stable output, the PSU needs a minimum load on its highest current wire, in my case the 5V line (see the label on the PSU). So a 10 Ohm 10W power resistor is added between 1 red and 1 black wire.

1) Basic parts

  • 10 Ohm 10W power resistor
  • 2x 220 Ohm resistor
  • Red & Green LED
  • Switch
  • Banana jack terminals (x6)
  • Female headers 1x4 (x7) (you can cut them from longer strips)
  • USB port
  • Screw terminals (optional)
  • Cable connectors (optional)
  • Fuse holder (x6)
  • Fuses (I choose 5A for the normal ones, 1.5A for the variable)
  • Crocodile clips and header pins (optional)

2) Variable circuit parts

  • LM317 (voltage regulator)
  • 1uF capacitor
  • 100nF capacitor
  • 1.2k Ohm resistor
  • 10k Ohm 10Turn potentiometer
  • 1N4007 (or similar) diode
  • Heatsink for LM317 (CAN NOT be mounted against the case!)
  • Screw terminals (x3)

3) Case

  • Plexiglass 4mm (about 0.5m x 0.5m)
  • Threaded rods M4 18cm (x6)
  • Washer M4 (x24)
  • Nut M4 (x24)
  • Handle
  • ATX screws (x4)

Step 2: Assemble the Basics

To make use of the fixed output voltages of the PSU (3.3V, 5v, 12v and -12V) we just need to connect some wires. Ofcourse we will add a switch, some indicator LED's and connectors to make it really useable.
Always make sure to use heat shrink tubing and tape where possible, we don't want short circuits.

* The first step is to cut off all connectors and bundle the wires of the same color. I recommend opening the case to blow out all the dust, but as mentioned before: be careful! Try not to touch the components and certainly don't touch the leads of the big capacitors!
* Take the switch and attach the green wire to one leg, and a black wire to the other leg. I used cable connectors, but you could just solder it.
* Now solder the resistors to the anode (long leg) of the LED's and add heath shrink tubing. Next, solder both cathodes (short legs) to a black wire. Solder the purple wire to the resistor coming from the red LED anode and the grey wire to the resistor coming from the green LED anode. (Look at the schematic)
* We also need to add a dummy load: a 10 Ohm 10 W power resistor. Simply solder it between a red and black wire coming from the PSU and make sure to insulate the connections. Attach it to a heatsink (or the PSU itself), because it gets hot!

* For the power wires, take a look at the schematic for a detailed overview. The basic idea is (“>” = 1 wire):

  • GND >>>> Banana >> Header
  • 3.3V >>> Fuse (5A) holder >> Banana > Header (2 orange wires and the brown sensing wire)
  • 5V >>> Fuse (5A) holder >> Banana > Header (2 red wires and the pink sensing wire)
  • 12V >> Fuse (5A) holder >> Banana > Header
  • -12V > Fuse (1.5A) holder > Banana > Header
  • Variable > Fuse (1.5A) holder > Banana > Header
  • 5V > Fuse (5A) holder > USB port positive side

* Add cable connectors to the 3.3V, 5V, 12V and -12V wires coming from the PSU and attach them to one side of the fuse holder. Again, you could just solder them together. Do the same with a short wire that will be connected to the variable circuit in the next step. 4 black wires can directly be connected to a banana terminal.
* Now we need wires that connect our fuses to the banana terminals. Take wires of about 5 cm and add cable connectors to both ends of the wire. You could also simply solder them together.
You can cut off pieces from the PSU wires, they should be long enough.
* Next we will prepare the header pins. Take a strip of perfboard (prototyping board) and place the headers on regular intervals. Take 2 header strips for ground. Now solder them to the perfboard. The perfboard makes it possible to easily mount them inside a case, and to ensure an even spacing.
* Now solder the banana terminals to the headers with a wire of about 5cm.
* Solder the usb port on some perfboard and add a screw terminal. Connect a black wire from the PSU to one side. Connect the other side to the fuse. Make sure to check your connection here before plugging in a USB device! Compare it (with a multimeter) to a USB wall adapter you have laying around.

I used 2 wires per color, which should give me enough current. If you want more current, use more powerful fuses and more wires. It is very important to attach the brown wire (3.3V sensing) to the orange wires (3.3V) you use! Also connect the pink wire (5V sensing) to the red wires (5V).

I also made some crocodile clips that fit in the headers. Simply connect a male header pin to the crocodile clip using a length of wire.

Now your PSU should be working. The only thing left to do is add the variable output and make a case for it!

Step 3: Make the Variable Circuit

For the variable output, we need some characteristics of the LM317 voltage regulator first. The output voltage is defined by this formula: Vout = 1.25*(1+(R2/R1)). The resistors are indicated on the schematic.
I used a 10 turn 10k Ohm potentiometer I had lying around, and adapted the other resistor to it. I really recommend a 10 turn potentiometer for an accurate setting of the output. Because we can only go as high as 12V (it will be a bit lower in reality), Vout should be 12V. Because R2 is 10k Ohm, we know: R1 = 10000/((12/1.25)-1) = 1162 Ohm. As the LM317 will not be able to give the full 12V I rounded it up to 1.2k Ohm, which will give us a theoretical maximum output of 11.7V. The lowest output will be 1.25V.
Now we can start building the circuit!

* Solder the small circuit (see schematic) together on a perfboard and replace the LM317 connections with screw terminals. Also add screw terminals for input 12V, variable output and ground wires. Make sure the polarity of the diode and electrolytic capacitors are right.
* Cover the bottom of the perfboard with hot glue and glue on another piece of perfboard.
* Solder a wire to each of the LM317 legs, and don't forget heat shrink tubing.
* Connect the wires coming from the LM317 to the screw terminals, do the same for input (+12V wire from PSU) and ground (PSU wire).
* The only terminal left - output - should be connected to the fuse for the variable output. Use the wire we made in the previous step. You could leave out the screw terminals and solder it directly.
* Now attach the LM317 to a separate heatsink! The exposed metal on the LM317 is not ground, but is Vout, so we need to make sure the heatsink doesn't come in contact with any wire that is not Vout. The enclosure of the PSU should be grounded, so that means we can not use it as a heatsink for the LM317.

The heatsink is important, as the LM317 can get pretty hot: P (power) = (Vin-Vout).I. This means that with an output of 1.25V and with a current draw of 1.5A it will give about 16 Watts of power. The reason I extended the leads of the LM317, is to keep it a further away from the rest of the circuit. This way, the heat that it produces, will not influence the resistance of the resistor R1, and the output will be stable.
An LM317 can output a maximum current of about 1.5A, so put a 1.5A fuse here.

Step 4: Make and Assemble the Case

For the case, I used plexiglass of 4mm, which I cut with a lasercutter from a FabLab. If you don't have access to a lasercutter, you could always use a saw (preferably a jigsaw) and a drill. Wood could be an alternative for the plexiglass. Because I used many components, it's not a good idea to cram everything inside the enclosure of the PSU. It will be nearly impossible to make all the holes, and air will not be able to circulate and cool the PSU.

* Start by designing everything on paper to make sure everything will fit. It is much easier to correct mistakes in cardboard than it is in wood or plexiglass. The design is up to you, but I added my design in svg format.
* Don't make the case too small, we want enough space for the wires. I made mine 10cm longer than the PSU.
* Once you have a design you like, draw it on the computer and export it as dxf files for the lasercutter. If you don't plan on using a lasercutter, you can skip this step.
* Cut your pieces using a lasercutter (or jigsaw).
* Now drill the holes for the threaded rods (M4) and for the handle. Put thread in the holes for the rods (optional) using a tap ( Remember to drill a smaller hole when using a tap.
* Cut 6 threaded rods of 18cm. Add washers and nuts. They will connect the both sides of the case.

Screw everything in place and add some hot glue if necessary (LED's, USB and switch).
Secure the PSU to the back panel with ATX screws (they were used to connect the PSU to the PC case).
The potentiometer is installed by removing the turn knob from the body and replacing it, once through the hole.
Also make sure the heatsink from the LM317 is not touching the PSU enclosure! I attached it to the plexiglass case using some velcro. I installed the small circuit board in the same way.
The big advantage of using cable connectors is the easy of connecting everything together in the case.
Finally, tape the unused wires together or cut them of. Make sure to add tape to the ends to avoid short circuits

Step 5: Test Your PSU & Enjoy!

We're done! The only thing left to do is to test the PSU. If everything works fine, you can securely tie the nuts.
Now you can enjoy your homemade variable benchtop power supply unit!