Projects

Feel The Power

Mike Hansell

Issue 7, January 2018

This article includes additional downloadable resources.
Please log in to access.

Log in

Like most makers, we need a good bench power supply. With loads of computer power supplies hanging around the DIYODE office, we decided to put them to use.

It's entirely possible (perhaps even probable) that you have an old computer lying around somewhere. There's also a very good chance that this old computer didn't fail because of the power supply. Often it has simply become a little old, the hard drive crashed and you decided to purchase a new one, or some other unrelated problem.

That being said, due to the millions of computer power supplies around the world, they're cheap. Sure, 1,000W gaming power supplies are the top tier of power supply performance and capacity, but even a "generic" computer power supply is usually capable of at least a few hundred watts of power, while still providing exceptionally stable power, and we've picked them up for as little as $10 brand new!

It's also highly likely that you could find one kerbside on clean-up day. Providing it hasn't rained and it's corrosion-free, it's likely that such a find will contain a reasonably reliable power supply.

THE BROAD OVERVIEW

Previously we have "hacked" our own computer power supplies to provide power for various projects. While it does work, any time anything is temporarily connected, there's always a possibility of accidental short circuits, reverse polarity, or something else which could cause catastrophic damage to the project you're powering.

With several PC power supplies available in our "spares pile", we picked a 550W unit and considered its specs. It can supply 3.3V @ 22A, 5V @ 20A, and there are also two 12V supplies available for a total of 39A.

That's a HUGE amount of power. After some quick planning, we determined we could create an enviable multi-rail bench power supply. With a tidy 3D printed case, and a handful of hardware to make it look great and function perfectly.

FIRST, SOME HISTORY

In the early days of modern electronics, DC power supplies were heavy and less efficient than today’s switched mode power supplies (SMPS). This was mainly due to the use of a power transformer that is basically a big chunk of iron and copper wire. Both of these are heavy, and depending on the amount of power required, they could be quite heavy indeed. Consider the part MM2015 from Jaycar Electronics. It provides an output of about 100W and weighs 1.6kg. If you have a decent stereo at home (let’s say a 50W RMS or better), pick it up gently. It’ll be heavy-ish and you may well find the weight on one side. This will be where the power transformer is located.

So if 100W needs a transformer weighing 1.6kg what about 500W? It doesn’t necessarily follow in direct proportion, but that could be 8kg - that's HEAVY! In addition to the weight, copper and iron is rather expensive. This is why those heavy gauge copper cables used for high power inverters and car audio installations etc, can cost $25/m (for 0-gauge 200A cable).

THE SWITCHED MODE POWER SUPPLY (SMPS)

A SMPS gets around the limitations of weight, size and efficiency very neatly. This is basically because it doesn’t operate at 50Hz like the conventional power transformer does; instead, it operates at 50kHz or a lot higher.

So let’s start at the start. A SMPS will typically filter noise from the mains, then rectify it to give a high DC voltage. This is then switched (turned off and on), or as it’s often called “chopped” at a high frequency, hence the name, “switched mode power supply”. At high frequencies the traditional iron cored transformers are not suitable; rather, much smaller and lighter ferrite transformers are typically used.

The ferrite-based transformer still does a job similar to an iron cored transformer. It provides a range of output voltages that can be rectified, filtered and then made available to power a load. Because the transformer is running at a high frequency the ripple on the raw DC output is also at a high frequency. It is more easily filtered with smaller capacitors than 50/100Hz ripple.

So you can see there are power and weight savings in many areas: the transformer(s) are smaller and lighter, the filter capacitors are small and lighter, and the thinner gauge copper wire used also provides further benefits.

Efficiency of 30-40% is typical of a regulated supply built with a traditional transformer. SMPS supplies have a typical efficiency of 60-70%, and with optimised design can reach as high as 95%.

What about regulation?

What if the mains goes up or down a bit, or more likely the load increases or decreases? The switching side of things uses a rectangular waveform. Looking at the diagram below, you can see that the waveform has an on (or positive) side and an off (or negative) side. During the positive part of the waveform, the switch will be on to allow current to flow into the primary of the transformer, and a corresponding amount of energy will be produced in the secondary windings. More current into the primary will give more on the output side. If the load increases, we put more energy into the primary. If the load decreases we put less energy into the primary. This is done with a technique that may be familiar to you, called “pulse width modulation” (PWM). PWM, can vary the ratio of the on to off period of the rectangular waveform. This is a very effective mode of operation. Those of you familiar with the Arduino may have experimented with dimming an LED via an analog pin and PWM.

diagram

At the heart of the “switch” are one or more switching transistors. These are either fully on or fully off. They don’t perform like an audio amplifier, which will be "on" in degrees. The switching action means that these transistors don’t have to waste energy as heat. They are quite efficient but still get warm, hence you will see heatsinks.

We should note that the SMPS principle is often used in smaller power supplies too, like your mobile phone, laptop charger, and those other small power supplies we tend to accumulate. Another common format is the Open Frame PSU, which is generally installed in other equipment. It has exposed mains terminals, so isn't something an untrained person should be using.

FERRITE

As mentioned, SMPS' operate at high frequencies where iron cored transformers are ineffective. They use ferrite in transformers and other inductors, but what is ferrite? Ferrite is a ceramic material with a dull grey surface. It is made from iron oxides combined with nickel, zinc, and/or manganese compounds. The ferrites produced with manganese are generally used in RF applications.

Ferrites were first produced in 1930. This led to the TDK company. The oldies among us will have (not fond) memories of cassette tapes in which TDK was a lead producer.

THE ATX STANDARD

There’s an old saying in electronics: “Standards are a wonderful thing. Everybody should have one.” So let’s examine the ATX standard(s). There have been four versions of the ATX12V 1.x standard and eight of the ATX12V V2.x standard.

The initial ATX specification was issued by Intel in 1995. It goes much further than the power supply to define motherboard dimensions, mounting points, the I/O panel (the metal plate with all those connectors for audio, etc), and especially power provisions and the corresponding connectors.

The latest ATX specification - ATX12V v2.4 - was published in April 2013. It seems we’re well overdue for another.

Several ATX derivatives exist also, mainly to handle smaller form factors, for applications generally outside of "standard computer tower" territory.

Looking at the various specifications you can see that many small changes have occurred. Some major ones like enforcing efficiency and dramatic changes to current limits, have been forced by the energy conservation movement and the major advances in horsepower that is now available. Consider that some video cards draw 78A from the 12V rail and it is recommended to use a minimum 1000W PSU. Wow! These are, of course, incredibly dense chips, performing staggering levels of computation.

A high-end Core i7 CPU can use upwards of 130W, but when I was a young fellow this was completely unheard of. When you consider though, that these CPUs have 2.5 billion (!) transistors or a heck of a lot more, then you get the idea where the current goes. The main IC in an Xbox One X has 7 billion transistors! The Nvidia Pascal 1 GPU has 21 billion transistors!

The Intel 8080 that powered early S100 systems had 4,000 transistors and the 8088 that powered the first PCs had 29,000 transistors. The first microprocessor I used was the SC/MP. Although I can’t find any confirming information, I suspect it had about 6.5 transistors. The odd half being available to rectify any internal faults. Well, it performed like that anyway!

HOW IT WORKS

When IBM introduced their PC (personal computer), it’s power supply was rated at just 63W and it had an integrated mains power switch. Things have changed since those dark ages and now we routinely have 300W or a lot more available with soft power control.

Like so much electronics these days, when you turn equipment “off”, it actually may not be fully off. For example, if you see an LED when your TV is “off”, it’s not fully off; it’s in standby mode. Our lounge room at night is like a Christmas tree; the lounge has two green LEDs, the TV for some odd reason has two LEDs, the Foxtel box has another, the amplifier has another, and not far away is the microwave oven with a bright clock display. There’s enough light generated to move around without bumping into things.

Modern PC power supplies have a single wire that when connected to ground (0V) enables the power supply to start. When open circuit it turns off again. In a PC application it allows the motherboard to control the power supply. In our application, we can use a small switch to perform the same function. We did consider using momentary pushbutton switch for power control, but it would require additional control circuitry and seemed to be unnessessary hardware for no significant benefit.

There is some discussion on the internet about whether you need to have a load on the power supply for it to start. I have never seen this - period! But if the power supply you would like to use won’t turn on, then this may be the case. You could put a high power (10W or more) resistor across the 5V or 12V rail to load it, but it will generate a lot of heat. Heat melts stuff, causes fires and can burn your skin. Next to putting the palm of your hand on a hot soldering iron, the burn from a hot power resistor is the worst, and an experience you won’t ever forget - so don’t go there!

Specific organisations have standardised the colours of each output voltage. You will find several orange wires. These supply 3.3V. The red wires supply 5V. The yellow (and lots of them) supply 12V. There will be lots of black wires which are ground, and there will be one single blue wire that provides -12V.

It would be prudent to verify these voltages before you connect any equipment. It’s extremely unlikely that they will be incorrect but it’s better to take no chances. Some "generic" power supplies may cut a few corners somewhere along the line.

THE CASE

front view of case
back view of case

First and foremost, it's important to recognise that you don't have to use our case at all. Virtually any box large enough could be made to work, then just follow the wiring information and terminate everything how you see fit. However if you're using our case design, read on.

Firstly it's important to note that the case is reasonably large. ATX power supplies themselves aren't all that small, but we need room to wire everything in too. As a result, the footprint is 244mm long and 156mm wide. sadly not printable on a small 3D printer. However you may be able to split the file and join to get the output from a smaller printer.

We have designed the case with an open-back, to leverage the build-in ventilation of most ATX power supplies. We have designed vents into the upper portion of the case too. Since ATX power supplies follow standard hole patterns, you shouldn't have too much difficulty aligning the four mounting-holes in the back of the case with the holes on your ATX supply.

With our case design shown, we break out each rail with multiple binding posts for each rail, as well as a bunch of common ground connections. This is mainly for ease of connection. It's entirely feasible to simply bridge them all together to provide a single output for each voltage rail. We have also included the -12V rail, which can be useful for various applications, but you can omit it if preferrred.

Lastly, we have integrated LED mounting for power indication on each rail. One of our first concepts had a single power indication LED, but if you have a power-short on the 3.3V rail (for argument's sake), and the LED is on the 12V rail, the 12V rail may be unaffected and show power when indeed there's a problem. An LED on each rail keeps this independent, so you have better feedback. When it comes to power feedback, we did consider adding voltage / current metering. However since this project was designed as a cheap power supply, the cost quickly escalated to include metering. Perhaps we'll do so in the future though. Since there is no voltage adjustment in an ATX supply, we decided there was little benefit too.There are a few notes for printing.

  1. You need to use supports. We really dislike supports. They waste material, don't always remove as well as they should, and increase print time. Whenever we design something for 3D print, we'll usually try and design it in such a way that we don't have to use supports. Unfortunately in this instance it's simply not possible. The major issue is the span above the ATX supply on the rear. It's over 10cm, and even the best 3D printers can't really plant a 10cm row in thin air, and have it stay nice and straight. For this reason, supports are a must. It does mean you'll get supports on some of the front holes for binding posts, when you don't really need them. Depending on your printer software, you may get some other supports in strange locations too. But - it's all for the good of the rear panel.
  2. Quality matters. When you have a lot of mounting holes, sizing them for 3D printing can be a challenge. Too small and you have a lot of after-print work to do. Too large, and things rattle around a lot. We have set them to what we feel is a good mid-point. This should allow you to get things mounted with minimal effort and post-print work. However using a quality print setting helps reduce errors in the print substantially too, regardless of your usage of supports.
  3. It's a big print. The volume of filament required will be determined by your settings and printer, especially infill and composition of the supports, but make sure you have plenty of filament on the roll.
printed case
The print is large, but makes for a great case, with pre-placed holes to match the ATX standard, simplifying mounting.

THE BUILD

If you are using a power supply you have on hand, check it for dust and fluff as this stuff will block the air circulation and may cause premature failure, or additional noise while the fan runs ever faster trying to keep things cool. If necessary clean it up with a small paint brush. We definitely recommend that you do NOT open the case. Residual power can remain in the supply even when it has been disconnected, so it’s just not worth the risk.

Parts Required:JaycarAltronics
4 x Green Binding Post PT0455 P9250
4 x Red Binding Post PT0453 P9252
4 x Yellow Binding Post PT0451 P9255
8 x Black Binding Post PT0454 P9254
1 x Blue Binding Post PT0450 -
3 x Red 5mm LEDs ZD0150 Z0800
1 x Blue 5mm LED ZD0185 -
1 x SPST Switch ST0335 S1040
25 x Solder Lugs † HP1350 H1503
1 x 100Ω Resistor † RR0548 R7534
1 x 220Ω Resistor † RR0556 R7542
2 x 270Ω Resistor † RR0558 R7544
Actual quantity indicated, but may be sold in packs.

We should note that you don't have to follow our colour selections either. If you have a different preference for the binding post or LED colours, change them to suit your preferences.

From a practical standpoint, the colour selections should help to identify each rail easily. It's also probably useful to modify the bias of power rails. If you find yourself wanting to use this more as a 12V supply, with a little use for the other rails, then you can easily modify and wire it up to suit.

We have simply made a versatile selection, with a clear layout. Since 3.3V, 5V, and 12V rails are all fairly common and useful in maker type electronics (actually, make that any electronics), it made sense to keep it. The same can be said for the -12V rail. If you don't have a use, you can omit it. But our concept was to make it versatile, and expand all the usefulness of the ATX supply as it exists.

The switch can also be replaced by a rocker switch or some other type - this was just our selection (and what our case was designed around). Creating a nice rectangular hole is now much easier when you're designing a 3D printed case, than it used to be with only hand tools, and tough ABS plastic.

CONSTRUCTION

schematic
Use as many wires as available to each binding post. That includes the ground (black) wires. Pay special attention to the -12V Blue LED, which is wired differently.

To start, put the power supply aside. We need to mount the binding posts and hardware into the case first.

First up are the binding posts. Start at the bottom and work up one row at a time, making sure each is really tight.

Note: if the binding post is too tight for the hole size in the 3D print, take a minute to file the hole out a little. You could also use a drill bit to do this too.

binding posts
Be careful not to cross-thread the binding posts.
back view of case
Mounting holes in our case match ATX specifications.

If you force the binding post through the holes you may find that the thread will get damaged. Also take care tightening the nut as it can also cross-thread rather easily, and damage the thread. Once you have multiple layers of binding posts, getting in amongst them to tighten or adjust gets a little more difficult.

It may seem obvious but with each binding post take off the large hex nut and the split washer before mounting it in the case. Insert the binding post from the front of the case, then on the inside, install the split washer then the hex nut and tighten it firmly. They're only a plastic thread, so don't overdo it either.

While you can certainly solder to the end of the binding post (as we tried with an early prototype), you will find it easier to use solder lugs and solder the wires to those. Soldering to the post itself needs a lot of heat, which is not required with the solder lugs. Overall you'll end up with a more reliable connection using the lugs, and won't risk heat-damaging the binding posts.

We found that during construction of the prototype it was (generally) convenient to install all of the binding posts, but definitely do them one row at a time. Remember, it is much better to have every post tight now, than try to tighten one later with all the wiring installed.

GATHERING OUR WIRING

A standard PC power supply has a number of connectors that plug into the motherboard, probably the graphics card, and various types of disk drives. We had initially considered integrating suitable connectors for these so no cutting of the ATX supply was required. However the cost for mating connectors was quite high. It's also unlikely that you'll want this to be a temporary fixture on your bench anyway!

Outside of a computer, these connectors are probably of no use to us. You can cut them off and discard them. If you can foresee a future re-use for these then maybe cut them off with a little cable length on them, otherwise cut the cables close to the connector to give maximum cable length in your bench supply.

It’s a good idea to sort the available cables so that all of the like colours are close together. Grab all of the orange wires together into a bundle, with their ends togther. Use some insulation tape to tape them into a bundle, around 10-15cm from the end of the wires. This will keep them together as a group, but still allow you to wire them up into the case. Then proceed to do the same for the reds, yellows and blacks.

There will be one blue cable and we want to single out the green wire too. We'll use those soon. You may find a purple wire, and a grey wire. These can be separated and taped up safely. We're not using those. Tape any others back on the main cable bunch, taking care to wrap each in a different winding of insulating tape. We must ensure that these can’t short circuit together or to anything else.

Since there are so many wires with the same voltage, you'll need to plan a little based on your supply too. Assuming you have used our case, which has four binding posts for the 3.3V, 5V, and 12V rails, you want to evenly divide the wires you have amongst the posts.

If you have 12 wires, allocate 3 wires to each binding post. If you don't have an even division, use your own judgement. This means you (theoretically) have the same current available to each binding post, without risk of overheating or significant voltage drop in the cable itself.

connectors
The connectors are no longer useful.
wiring close up
Wiring is fairly straight forward.

Once you have the cables bunched, strip 5-10mm from each one. Take care not to cut the copper wires inside the insulation because they will carry the current, and depending on the load (what you will power from them) you may need every one. After this is complete, twist the copper ends together and tin the exposed wires with some solder. Depending on your preference, you can solder the lugs to the wires now, or attach the lugs to the binding posts and then solder them.

Now we solder the orange, red, yellow and black wire (bunches) one layer at a time, from the bottom up. Don’t forget the single blue wire (-12V) at the end. Even if you think you won’t use -12V now, there may be an occasion in the future where you may like to experiment with op-amps, or have other uses for the negative rail (you can also use the -12V rail and the +12V rail to provide you with 24V, of course, which can also be rather handy).

ADDITIONAL HARDWARE

Install the power switch. There is minimal current flowing through the switch as it's basically a signal wire for the power supply. As a result, there's no critical requirements for the switch, so we have selected a simple mini toggle switch. You can use whatever you prefer. The power switch has three pins, however we need to use only two; one being the centre pin.

We want it orientated so that when the switch lever is up, the power supply is off. This implies that the top pin will connect to the centre pin when turned on. Verify this with a multimeter. If this is the case with your switch, connect the top pin to the green wire from your power supply, and connect the centre pin to ground (black).

The next step is to mount the LEDs. They should fit fairly snug into the provisioned holes within the case, but ream out the holes if required. If they're a little loose (or you would like to make sure they won't go anywhere), a few drops of superglue will ensure they're not keen to come out.

Each of the three red LEDs is then connected to its respective power rail. Note, the current-limiting resistor is different for each voltage, so be sure to use the correct one. While it doesn't matter which leg of the LED you attach the resistor to, we have attached them to the anode (long leg). It's important to be consistent, as it helps with fault finding and replacements in future if it's ever required. The anode, soldered to the current limiting resistor, then connects to the binding post. We wrapped one end of each resistor around the binding post between the two small hex nuts. This avoids trying to solder it to where the cables are connected, and having them come off the binding post.

For each of the LEDs, you then need to connect the cathode (short leg) to ground. If you have surplus ground wires (black) from your power supply, you can solder one directly to each LED. Otherwise, some wire off-cuts to provide ground as required will suffice. As with most of these small LEDs, current draw is of little concern, so you can do what's most convenient.

Next, we'll wire up the LED for the -12V rail. Since this is a negative rail, we decided another red LED wasn't really suitable here, and went with blue as an additional reminder that this rail is different. Since our -12V rail is in fact, negative to ground, our ground actually connects to our LEDs anode (long leg), which is the reverse of the standard power rail LEDs. For consistency, we'll still solder our current-limiting resistor to the anode. However this time the anode/resistor series goes to ground/black. The cathode then connects to the binding post for the -12V rail.

putting the unit in
Leave your wires long enough to put the unit in last.
Unused cables
Unused cables should be cut and taped or heatshrunk.

TESTING

First, make a visual inspection of everything. Check for loose wires, obvious shorts, anything else that looks out of place. Make sure any unused wires are safely taped and bundled away. If you're satisfied everything looks ok, connect the power supply to mains power, and switch the mains on (and the main power switch on the ATX supply if fitted).

Flick your toggle switch to the on position, and your four LEDs should illuminate. Even if your LEDs don't all come on, you should grab your multimeter and test voltages on your binding posts.

You should be able to measure very accurate voltages of 3.3V, 5V, 12V, and -12V respectively, relative to ground. If one or more of your rails doesn't match with a margin of about 0.1V, you may have a problem somewhere in your wiring.

If your voltages on the binding posts are as expected, check the wiring and polarity of any LEDs which failed to illuminate.

If you have no power at all, check the functionality of your on/off switch. We don't need to explain how to do that... but if nothing changes, with the switch in the on position, check you have ground on both active terminals of the switch. Without that wire pulled to ground, the supply will remain in standby mode.

WHERE TO FROM HERE?

We have opted for no metering, in order to keep things really simple. At its core, the power supply is already very well regulated (with a varying degree in line with the quality of the ATX supply of course), as well as the usual safety features such as short circuit protection and overload protection. Really, these provide a huge amount of power and this project provides massive bang for buck.

However, who doesn't like a few gauges?

We know our voltage is going to be fairly stable, so it seems somewhat pointless to monitor voltage. Current, on the other hand, could be rather useful. With a few current meters we would have useful feedback about the current requirements for various projects we may be attaching to this supply. Perhaps you have an old multimeter that you can upcycle too!

Of course, we would need to modify the case to accommodate any new additions and improvements, but it wouldn't be a massive undertaking and the results would be great.