The Classroom

Part 2: The Linear Power Supply

Bob Harper

Issue 9, March 2018

For almost as long as there has been electricity, there have been linear power supplies. So let’s make one!

Following on from last issue, where we talked about what a linear power supply requires in order to convert ac electricity into useful DC for a simple DC load. This issue we’ll deal with two final stages, not always required by simple DC projects. These stages are: a regulator, usually a voltage regulator; and some form of protection for the power supply as well as for the loads.

Since every good theory class should be followed with a practical element, this month we have a simple power supply, as well as some options, that might suit a range of projects.


Typically we think of regulators as meaning an IC that fixes the voltage available from it’s output at some pre-determined value, 5VDC for example. However, the term regulator refers to a control that reduces the potential output to a controlled value. For example the throttle on a car, or steam engine if we go back that far, is a regulator.

To regulate, the device requires an input source of power, an output of controlled power, and a reference value, usually the ground terminal for most electronic regulators. The output voltage is taken from between the output pin and the ground reference, and that value is used by the internal circuits to adjust the control element, usually a series transistor.

The circuit [1] shows a simple transistor regulator circuit, that pre-dates integrated circuits, but takes up more space for less functionality. The reason for sharing it is to show how the functions work. The series transistor passes power to the load, as long as it is turned on.

Fig 1

The load has a voltage drop that appears between ground and the emitter of the transistor. In this circuit it should be 10V, and is designed to meet that voltage across the load.

To design the circuit all that is needed, apart from Ohm’s Law and a little simple maths, is a basic understanding of how transistors work. The important knowledge about the transistor is that the base emitter junction will have (approximately) 0.6V across it, so the voltage on the base needs to be the load voltage plus 0.6V (i.e., 10.6V).

There is a device called a Zener diode, which you might have already read about in an earlier edition of DIYODE Magazine. The Zener diode can conduct a small current in reverse bias that causes a known voltage across the diode. Lucky for us, 10V is one of the possible voltages. Unlucky for us, 10.6V is not, but there are ways to make the output adjustable, or pre-settable. We could use the 11V Zener, and accept 0.4V over voltage, but in this case, to show one solution, we add a signal diode (D2) in series with the 10V Zener, but forward biased.

The Zener diode requires a resistor to limit the current through it, and also supply bias current to the transistor. That resistor, R1 in the circuit, must limit the current in the diode to its maximum current rating.

A common Zener diode today is rated at 1W, so the current needs to be less than 1W /10.6V, or about 95mA. The resistor is connected to the raw power, so the voltage across it is the difference between raw power voltage and regulated voltage; in this case 15V – 10.6V. So R= V/I = 4.4V/95mA = ~46 Ohms, round up to 47Ohms as a standard resistor value. Note that this is the minimum value resistance.

The cheat is that the transistor base current also comes from this resistor, but for a low power application we can get away with it. So that’s our circuit designed, at least hobby-style.

What if we want a voltage that doesn’t correspond to a suitable Zener diode? Although Zener diodes may be added in series, allowing a greater flexibility in values, another circuit allows a smaller value Zener diode to be used to create a variable output regulator [2].

Fig 2

In the second circuit, the Zener diode is connected between the base of the transistor and a voltage divider. So if the regulated voltage was required to be exactly 10V, and a 3.3V Zener was used, then remembering the 0.6V (VBE), the voltage on the voltage divider junction between R2 and R3 needs to be 3.3V + 0.6V = 3.9V.

The stability of the regulated voltage depends upon how much current flows through the Zener diode, and how much through the divider network. Can we afford to steal it from the regulated output? Yes, and it can all be calculated by Ohm’s Law, but we’re more interested seeing what goes on inside an IC than designing a much larger circuit that replicates the little IC, which also has many more features.

In the end, the IC uses an internal Op-Amp, or the integrated components of one, to measure the output with a very small drain on the output, and uses that to compare against a 1.2V internal voltage reference (i.e., an integrated and optimised Zener diode), to adjust the internal transistor. The internal voltage reference is fed current from a constant current source, making it an even better voltage reference.


Now we have a regulated output in our primitive regulator, it’s time to look at protection of the circuit and the load.

As long as the regulator is working, the load is protected against over-voltage. However, if the regulator has a meltdown, literally meaning that the internal heat energy causes the silicon to melt and mix the P and N parts into one lump, the regulator can become either a conductor, insulator, or occasionally, a crater.

Thermal protection shuts down the transistor drive circuits by using an integrated thermistor within the IC, in the gain control. If R2 in the previous circuit diagram was an NTC thermistor, it would have that effect but would be much less effective without the internal amplifier which the IC has.

A second form of protection is over-current protection, implemented by having a series resistor in line with the power flow used to measure current. The IC must have it in series with the output or input pin, as the ground is really a reference point that does not pass current.

Our next simulator circuit [3] has a series resistor, R4, placed in the negative current path, because we have a negative current path, and it suits our needs. It is more convenient for us to add an extra transistor (T2) and have the voltage across R2 applied between the base and the emitter of T2.

Fig 3

"Did you know that an ordinary diode will be destroyed if the peak reverse voltage is exceeded, yet the Zener diode is not. The PIV of an ordinary diode is almost the same as the operating voltage of the Zener Diode. The Zener voltage is also called the avalanche voltage."

If the current gets to 1A, the voltage across a suitable value of R4 will be 0.6V, thus turning T2 on, and pulling the reference voltage below the Zener voltage (i.e., turning T1 off and pulling the regulated voltage low).

To calculate the value of R4, simply apply Ohm’s Law again:

R4 = V/I = 0.6V/1A = 0.6Ω.

The circuit protection shown in this diagram is called “over-current roll-off” because the current doesn’t snap off as a fuse would; and when the load returns to normal so too does the voltage regulation. Of course, we could resort to using a common old fuse, but the electronic method is easier to fit inside an IC, and if an internal fuse blew you would have to replace the IC!

The LM78xx family are known to be very robust and well protected against failure. When they first came out in the late 1970s, my foreman and I did everything we could to kill one before we were confident in using it for an instrument power supply, replacing a 4” by 3” conventional regulator with a simple three-pin IC.


Electronics datasheets often feature a “SOA” or “Safe Area of Operation” chart, as we have just described. Transistors, as one example, have a maximum current, maximum voltage, and maximum power dissipation.

If you make a graph where the vertical axis represents the voltage, and the horizontal axis represents the current, then the maximum voltage would be a horizontal line, and the maximum current a vertical line, resulting in a rectangle.

The maximum power dissipation results from both voltage and current, and is always less than the maximum voltage multiplied by the maximum current. A load plot drawn on the V-I chart will be a diagonal line chopping off the corner of the rectangle. Any operation of the device within the three lines is considered safe.

A Classroom Practical: Simple Linear Power Supply

WARNING: In Australia, a person cannot legally work on voltages above 50Vac without a license. DIYODE Magazine has no intention of recommending that you break any law, and will not be held liable if you choose to do so. Any mistake made by any person working on lethal voltage equipment can lead to their own death, or that of another person.

There is a box full of discarded plug packs, wall warts, or whatever you call them, and they’re taking over my shed. Of course there is also a box of perfectly good power supplies right beside it, mostly from commercial products going back to my MicroBee 128k.

Yet we have all found ourselves in need of “yet another power supply”. Maybe we call it the “YAPS” power supply!

REF:Parts Required:JaycarAltronics
D14 1N5404ZR1015Z0109
D5 1N4004ZR1004Z0115
IC1LM7805 or as per applicationZV1505
R1 As per application
R2 As per application
VR1 10kΩ or as per application RP7510 R2204
C1 2200µF or as per applicationRE6240R5205
C2 100µF RE6140R5124
C3-C41µF or as per application


We probably all share a concept; as simple a supply as possible, yet as convenient and flexible as possible, having good output, but not too much required from the power source. Oh and really cheap! Yeah right!

Last issue I stated...”There are plenty of options for the home experimenter, such as plug packs, commercial transformer packs and even complete power supplies. Another option is to build your own circuit, and have it tested by a licensed electrician or technician. There are many traps for beginners when it comes to electrical safety.” I still believe any home brew equipment that plugs into the mains should be checked by an electrician, or engineer if you prefer.

We are going to start with an ac output from an undisclosed source. Let’s assume it is from a plug pack, or transformer pack. The idea is a 12Vac supply offering 1Aac to be converted to 5VDC, filtered and regulated.

The load is the defined target of the exercise, being the known requirement of the power, both voltage and current. So let’s work backwards from the DC terminals.


The terminals may be a pair of bolts through an insulated panel, and we have often used a couple of 3mm brass bolts as terminals for crimp lugs, sometimes even using M3 (3mm) wingnuts to lock the connections down, or twisted wire between two washers.

Alternatively, retailers like Jaycar or Altronics have an extensive set of shelves full of options, so go select whatever you want, preferably one red and one black, but you may want a USB socket, or Molex connector, for some special purpose. I still have a box of four-pin disk drive sockets, and even some plugs, but they are gradually going out of style, or supply.


Wire is your next decision, and one square millimetre of solid copper wire is approximately 1.7Ω per hundred metres, but double that, as it’s coming back again, and you’ll realise that 1A won’t get upset by the wire size unless you use something really small.

A 1mm cross-section wire can carry 10A with little loss over short distances. Of course the wire has to be insulated, and preferably flexible, and preferably come in red and black. It should also be easy to solder and/or crimp. You might like to pick up some crimp terminals as well depending upon your project.

Once again, the usual suppliers, and also automotive retailers, have a large supply of wire of various thicknesses. Most insulation is suitable to well above 12VDC, but remember it also has to act as a mechanical protection to your cable.


A simple solution to keeping your wiring tidy is adding a few zip ties. Even supermarket chains carry them nowadays. Heat shrink tubing looks nicer, or use spiral wrap, or, you guessed it, take a walk around our retailer friends such as Jaycar or Altronics.


The basic circuit can be soldered together, with or without a PCB, but it’s easier to forget what that purple wire was meant to be if it’s not neatly laid out. As an electrician I’ve seen industrial circuits made on red fibre that is better suited for plumbers to use as gaskets.

The concept doesn’t require a printed circuit board, but there is one anyway, available from the DIYODE website for download.

Remember that the term “breadboard” really does refer to a time when circuits were made on wooden boards, perhaps with sockets or tag strips nailed or screwed down, and sometimes components were soldered to copper or brass nails. The scary thing is those guys were playing with thermionic valves running on hundreds of volts DC!

I’m going to suggest you have a go at strip board. Remember that strip board isn’t intended for high current, and 1A is high for those thin strips full of holes. You can get around that by soldering a length of wire at one end of a strip and then soldering it to the other end. Components can then be soldered to the strip and the copper wire.

Perfboard may have the holes and no copper, or have isolated copper pads around each hole. The components are placed in as they might be on a PCB, and either soldered directly to one another by laying their leads together, or joined by soldering to a wire link between component leads.

Before we go to the regulator, notice two capacitors on the output side of the regulator. They act as a kind of final filter, one for current and one for voltage I was once told. They must be voltage rated for the output voltage, but should be high enough to suit the input for a little margin of safety (e.g., 16V). They really depend on the type of load you expect, and can be left out for a pure DC load, but 100uF for C2 and 1uF for C4 (and C3) would be a good start.

The suggested regulator for this supply is a LM7805, although other options exist, and they are listed in the catalogues. Remember, with the metal tag at the top and the writing facing you, the input is on the left and the output on the right. The middle leg and the metal tag are ground.

The circuit given here also has a diode, D5, wired in reverse bias between the output and input of the regulator. It is not needed if the load is resistive, but if there are inductors in the load, or even capacitors, a loss of input can cause a reverse voltage, which can destroy the regulator. The diode bypasses any such current.

Finally, although YAPS is working on 5V from a LM7805, optional resistors R1 and R2 are shown on the circuit, and PCB layout in case you want to experiment with other voltages, or even wire a potentiometer in their place for a variable output. If so, a 10kΩ pot should be suitable with the wiper going to the ground pin on the LM7805 (or LM317) [4].

Fig 4

If you don’t need the resistors, and only want a fixed value output, put a wire link in place of R2 and leave R1 out completely.

Now for 5V output at 1A, you need to have 2.5VDC head voltage (i.e., 5V + 2.5V = 7.5VDC input). The important part is the VDC! You can’t have 7.5V with 1V ripple because that will come through the regulator. The ripple must be on top of the head voltage.

The good part is with a 12Vac input you get 12V x √2 = 12 x 1.414 = 16.97V peak, so filtering 5V out of that isn’t so hard! You can almost get away with 10V ripple! Note however, that 16V-rated capacitors are a touch under 16.97V, and 25V capacitors should be used.

Also, as capacitors are temperature-rated, you should know what temperature you expect the circuit to get to. 85º capacitors may be okay, but 105º versions are only slightly more expensive.

Remember from last issue, the filter capacitance can be calculated using C = IT/V, where I is the load current, 1A; T is the time between charges, 10mS for full wave rectifier, and even then it will be less than half wave as it has to take some time to charge; and V is the value of ripple voltage you can accept, say 7V which sounds a lot. So then C = IT/V = 1 x 0.010 / 7 = 1439uF. Why not use 2000uF and damn the expense?

Finally the rectifier, 4 @ 1A diodes sounds okay for a 1A supply, but even at face value they are on the borderline. Added to that is the little considered fact that in order to maintain 1A to the load, the diodes must supply the load at the same time that the capacitor is being recharged. Some trigonometry finds that at 5V ripple, the capacitor charges for a quarter of the time, 2.5mS, and discharges at 1A for 7.5mS of the half cycle; so during the short charge period the capacitor draws a total of 4A from the supply.

So while the average is not 4A, it is more than 1A so 2A or even 3A diodes should be used – and we have selected 1N5404 3Amp diodes.

A bridge rectifier can be used if you prefer; the minimum being a “W04”, which is only rated at 1.2A, but maybe your power supply doesn’t need a whole 1A. The ZR1350 is a 2A, 800V bridge, or the next one up is a “BR64” which is rated for 6A, 400V. Of course, others may be available elsewhere.



The layout provided here is a guide only, but a suitable small PCB can be made by painting the copper side of a piece of blank PCB with a thin coat of enamel paint, and scratching a space between the tracks. Alternatively, mark the holes with a sharp scribe or even a wood screw, drill the holes and draw the tracks with an oil-based felt pen, such as a Sharpie or an Artline permanent marker.

To drill the PCB material you’ll need some 0.8mm and 1.2mm drills and a very steady hand. They do break easily. Keep the drill tip short, most of the way inside the chuck if you can. A PCB drill stand is a handy accessory, but not essential.

Dip the PCB in ferric chloride, or ammonium persulphate, until the excess copper is removed. All materials including oil pens are available from electronics stores advertising in DIYODE. You must read the instructions regarding safety and temperature of use, and remember, ferric chloride stains, clothing, bench tops, floor tiles, skin and pretty much anything else. We used the pcb overlay placed on a proto-board, and placed the parts through the holes. [5].

Fig 5
Fig 6

Finally, proof of the pudding is an Oscilloscope image of the output voltage, in yellow, showing the ripple content. For this test, a 500mA plug pack was used for the 12Vac. Mid-screen is zero volts and the scale is 10Volts per division. So the ripple is ~3Vp-p [6].

The blue trace shows the voltage across a 1Ohm resistor added in series with the filter capacitor. To exaggerate the effect, only a 1000uF was used. The trace shows the discharge as 200mA below the mid-line, (For 1Ω, 200mA = 200mV) but the charging current is shown as the 600mA bumps in the blue trace.

Part 1

Part 3