Regulated Power Supplies
Power supplies are the unloved stepchildren of the DIY electronics art. Although audiophiles are quite happy to modify existing power supplies — usually by adding capacitance — the idea of building a power supply from scratch is not most peoples' idea of fun. Face it, no one gets into audio electronics to build power supplies. They fantasize about building the amplification circuitry; the power supply is an unpleasant duty, not unlike having to eat vegetables before getting to have dessert. Nonetheless, power supplies are crucial, and a poorly executed one can ruin the performance of an otherwise wonderful circuit.
So Where Do You Start?
Maybe, maybe not. As always, the devil is in the details. The voltage, which behaved perfectly when you were bench testing the circuit, can sag if everyone on your block runs their air conditioning on a hot day. Your supposedly benign power lines can bring in all manner of radio frequency hash, and light dimmers and other such things can dump buzzing DC into your supposedly pure AC.
There are entire books devoted to power supply design, and you can spend weeks immersed in all manner of arcane things that aren't necessarily relevant to audio circuitry. Unfortunately, books that cover audio power supply design are close to nonexistent. Usually the best you can find is a single chapter at the back of a book on amplifiers, and that chapter only covers the basic capacitor-filtered supply like the ones you see in power amplifiers. Let's use that as a starting point, and then improve the performance one step at a time.
I am going to assume that you're familiar with the basics. Alternating current is provided to the transformer, which steps the voltage down (or up, in the case of tube gear) to something more appropriate to the needs of the amplification circuitry. That voltage is then fed to a diode bridge, which rectifies the AC, turning it into pulses of direct current. The pulsed DC is then applied to a capacitor, which smooths out the pulses leaving, in theory, pure DC that you can use to run your circuit. Schematic number 1 shows a power supply of this sort.
Unfortunately for the DIY electronics enthusiast, even that basic topology leads to questions which are difficult to answer. How big should the transformer be? What sort of diodes should you use? How much capacitance is enough? And a host of other niggling details that crop up when you're actually ready to start buying parts.
Begin by looking at the schematic you intend to build — note the rail voltage requirements. As an example, let's use the Difference Engine project, published last year. That circuit specified rails of +20Vdc. Assuming a capacitor filter on the power supply, the AC required from the transformer is going to be 0.7 * 20Vdc = 14Vac. For those who wish to be picky, the 0.7 is actually 0.707 (the inverse of the square root of 2), but in the real world the 0.007 is swamped by other variables, so 0.7 will do quite nicely. One of the variables to be accounted for is the voltage drop across the diodes, which is on the order of 0.6V. Add that in and you'll be looking for a dual 14.6V secondary transformer. Don't drive yourself crazy trying to find a transformer with fractional voltages on the secondaries — just round it off to 15V and be happy. Note that as a practical matter, many transformers actually deliver a little higher voltage than the specifications indicate. They do this on purpose. When a transformer is under load the voltage tends to sag a bit, so the overvoltage compensates for that loss at the secondaries.
How much current does the transformer need to be able to deliver? In round figures the Difference Engine draws something on the order of 100mA per channel. I would suggest buying a transformer rated for at least twice that amount, preferably three times. More won't hurt, and a curious factoid that annoys pedantic people to no end is that a too-large transformer can actually lead to better sound. Why? Because a higher current secondary is wound with larger gauge wire, which in turn reduces the DC resistance of the secondary, which lowers the impedance to ground by a small amount, thus making the power supply a better voltage source. It is one of those things that's not in the textbooks because it doesn't apply if you're designing something like a microwave oven. Transformer prices rise quickly, so it may not be worth the extra cost to you. It's just a trick to keep in the back of your mind.
After the transformer comes the diode bridge. In theory, you can get by with a single diode, but for audio purposes that's going to make things unnecessarily difficult so we'll assume the use of a bridge. Diode bridges are available in single packages, but they vary widely in characteristics and it would be tedious to try to cover all the permutations here. That shouldn't keep you from using one if you want to; it's just to keep this from turning into a book. If you build a bridge using discrete parts, the default choice is the 1N400x series of diodes, where x is a digit from 1 to 7 representing how much voltage the diode can withstand. Given that there's not a significant cost difference between the 1N4001 and the 1N4007, splurge and go with the 1N4007, which is rated at 1000 PIV. PIV stands for Peak Inverse Volts — a measure of how much voltage the part can hold back when the voltage attempts to flow "backwards." Clearly for a relatively low voltage circuit like the Difference Engine, 1000 volts is overkill, but if there's no cost penalty, why not? The 1N400x diodes are all rated for 1A, which neatly sidesteps any questions about current capacity for the Difference Engine…indeed, for nearly all preamp circuits. Should you want to explore a higher performance part, I'd suggest looking into the fast/soft recovery diodes. Diodes switch on and off depending on whether they're conducting or not, and the fast/soft diodes switch more gracefully than the ‘regular' sort. As you might expect, they also cost more, but the price increase isn't all that bad.
The next item on the agenda is capacitance. This is another area where audio circuits and textbook answers diverge. If you read up on power supplies, you'll quickly find formulas that tell you how much capacitance to use depending on how much power supply ripple you're willing to tolerate. But there's more to a power supply than simply filtering out the DC pulses coming from the diodes. The audio signal usually ends up being superimposed on the rail voltage and it needs a place to go so it won't modulate the rail and cause problems in the active circuitry. Where it needs to go is to ground and its path is through the power supply capacitors. The larger the capacitor, the lower the impedance the audio signal sees and the more easily it finds its way to ground. The pedants also regularly miss the idea that more capacitance means a lower roll off point, meaning that more of the lower frequencies are shunted to ground. So whereas a thousand microfarads of capacitance may satisfy your ripple requirements according to the formulas, using more will sound better. With that in mind, let's toss in 4700uF, maybe 10,000uF. If more is better, why not put a Farad in the circuit? Unfortunately, there's a sneaky thing that happens to the diodes. In normal operation, they switch on, conduct for a period of time, and then switch off again. All other things being equal, the shorter the period of time they conduct, the more current must flow during that time, and the closer they get to their current and heat dissipation ratings. Large amounts of capacitance shorten the amount of time that a diode conducts, so there are practical limits to how much capacitance you can put in a circuit. All this can be managed, of course, but you get to a point where you're making tradeoffs that you hadn't planned on making.
Schematics number 2 and 3 show PI filters (they're called that because the filter looks somewhat like the Greek letter PI) added to the initial power supply. It's an easy way to improve the performance of a simple capacitive filter, but it still doesn't address variations in line voltage and it gets bulky very quickly. Worse yet, inductors, particularly the sort that can handle more than a few mA of current, are uncommon and expensive.
Active regulation provides a way around some of the limitations of passive power supply design. For a dollar or two you can have active regulation that easily equals the performance of a much larger passive power supply and lock the rail voltage to a known value in the bargain — something passive power supplies cannot do.
The easiest way is to buy a chip regulator such as the LM317/LM339. They're inexpensive, easy to use, and require a minimum of external parts. Schematic number 4 shows a generic chip regulator circuit for comparison with the passive filter circuits. Suppose, however, you'd rather roll your own. Or perhaps you have a voltage or current requirement that is beyond what you can get from a chip.
A regulator can be as simple as a voltage reference and a pass device. Schematic number 5 shows MOSFET pass devices referenced to Zener diodes to set the voltage. Zener diodes exhibit a steady voltage drop that is ideal for our purposes. You can also use a stack of them in series and the voltages of the individual diodes add up in a nicely linear manner. In this example I used two Zeners in series, biased by a resistor. If, for instance, you were to series two 12V Zeners, you'd end up with rail voltages on the order of 20V…perfect for the Difference Engine. Yes, 12V + 12V = 24V, which at first glance seems high, but the Vgs of the MOSFET pass device (~3-4V) will drop that back down to something very close to 20V. If you wanted to substitute bipolar pass devices for the MOSFETs, you'd shoot for a reference voltage around 21V or so, the excess being offset by the Vbe (around 0.6V), again giving you 20V rails.
Schematic number 6 shows a modification of number 5. In this case, the Zener reference (only one diode shown this time, but feel free to use two or more if you want) is biased by a JFET current source. A current source is a neat way to provide a ‘shock absorber' that prevents variations in the incoming voltage from changing the bias current through the Zener. Feel free to experiment with these circuits. Look through your junk box and substitute freely. If you don't have a JFET, build a bipolar current source instead. If you don't have an IRF610 on hand, use a Zetex MOSFET or a bipolar pass device. There are only three requirements for the pass device:
Although you may be able to get away with TO-92 case pass devices for smallish circuits, you'll find that TO-220 cases provide a wider safety margin. I regularly run TO-220 devices up to 0.5W dissipation without a heat sink. If you intend to run them much hotter than that, use a heat sink.
The next step is to provide the regulator with a brain, in the guise of a differential circuit. Once the regulator circuit is smart enough to compare the voltage it's putting out with a reference voltage and generate an error-correcting signal, it opens entire worlds of possibilities.
Schematic number 7 is a fully fleshed-out discrete voltage regulator I built for the output stage of a power amp. I've made two small modifications for present use: I decreased the pass devices to the IRF610/IRF9610 and they now take their power from the same rail as the regulator itself. As built, the circuit used IRFP140/IRFP9140 MOSFETs and they regulated separate rails. There are numerous ways that this circuit can be modified to fit available parts and I'll suggest some possibilities as we go along.
Starting from the left, D1 (D2 in the negative voltage regulator) is a safety feature. It dumps the residual voltage on C1 (C2) as the circuit powers down. C1 (C2) acts as a slow start feature and also helps quiet the Zener diode. Bear in mind that Zener diodes have a fairly low impedance so if you intend to use a cap to reduce noise, make it a fairly big one.
Q1 (Q2) is a current source much like the one in Schematic number 6. Its output is set by R1 (R4) and must be selected according to the individual JFET. You could use a pot instead, to simplify things. That would allow for fine tuning the current source in situ. R2 (R3) is there to reduce the heat dissipated in the JFET. The Zener diodes are 9.1V parts. There's no reason you couldn't use another voltage if you wanted to.
Q7 (Q8) is another current source, used to bias the differential circuit. The bias current is set by R7 (R8). Q3 and Q11 (Q4 and Q12) comprise the differential itself — the brains that compare the reference voltage and the output voltage. If the output voltage is too high, the differential instructs the pass device to lower the voltage. If it's too low, it raises it. Q5 and Q9 (Q6 and Q10) make up a current mirror. The current mirror increases the gain of the differential, making it more sensitive to voltage changes. The differentials and current mirrors are great places to substitute parts. Good candidates would be the BC550/BC560 low noise transistors.
Q13 (Q14) is the pass device. In the circuit I designed this for, it's used with a heat sink. R13 and R14, along with V1 (R15, R16, and V2) set the voltage seen by the differential. This allows the actual output voltage to be changed a bit. Fixed resistors could be used here. It's a simple ratio of the output voltage, chosen such that the differential sees a voltage equivalent to the Zener reference when the output is at the proper value. Another option would be to use a Zener that gives the exact rail voltage you want. This would allow you to skip the resistor string entirely, feeding the output voltage directly into the differential.
Much more complicated circuits are possible and there are numerous variations you could build with just the elements presented here. Perhaps some other time I'll take up alternatives such as capacitance multipliers and current regulators, but that's the way books get written on this stuff — people get started and keep wanting to add "just one more thing" and before you know it, there's a twelve pound tome on the shelf that no one ever reads, simply because it's too unwieldy. With luck, I've suggested enough ideas to get your creative juices flowing without being overwhelming. Power supplies can be just as — okay…nearly as — interesting as the circuits they're intended to power. It's just a question of having some ideas to work with.