Building a Simple Power Supply (28 Days of Hacking: Day 18)

One of the most important things in circuits is the rails. So how do we produce a plus and minus 15 Volt rails for our circuit from line voltage? Well first, we need to step down line voltage using a transformer. To choose the transformer, we need to determine the desired step down ratio. If we are running off line voltage, then we will be dealing with 120 RMS signal, or 170 volts peak voltage. If we want to generate a 15 volt output, we should step it down to around 20 volts to give us some wiggle room.

Once we have the transformer ratio, we want to rectify the signal. We can use a bridge rectifier to full wave rectify the sine wave. For the +15 rail, we want to ground the negative pin of the diode bridge, then use the positive pin to charge up a capacitor. We will observe a ripple once we attach a load to our circuit. So now we have an unregulated DC signal, and we have to add some sort of a regulator to it. We could use an LM7815 to regulate our circuit to 15 volts, or we can build a small circuit to give us an adjustable output.

If we take an NPN transistor and hook its collector to the capacitor, we can then attach the emitter to the +15 rail. From the +15 rail we can build a simple voltage divider to cut the voltage down to 5 volts. The ~5V signal can be fed into the negative pin of an op amp, and then we can put a 5 volt reference into the positive pin which we can realize with a Zener diode. We can use the op amp to determine if the ~5V signal is above or below the reference signal, and then turn the NPN transistor on and off accordingly to regulate the output voltage.

To generate the negative rail, we can do something similar, except ground the positive pin of the diode bridge and use a PNP transistor instead. This gives us:

This gives us the overall rough design of:

However, one practical issue arises: we use rails on the op amps for regulation! Well as it turns out, the output from the op amp is fairly independent of the rails in this case, so we can use the voltage across C1 to power both of the op amps.

So we can simulate our designs and we are really close. We may want to put a potentiometer into the design when we actually build it, so we can adjust the output to our liking.

So with the 100 ohm resistor connected, we don’t generate much of a ripple. So we can cut it back to 1 ohm and check out the voltage across the C1.

I built the circuit today using an AC to AC adapter I found in lab and it performed just like in simulation.