The Classroom

The Linear Power Supply

Bob Harper

Issue 8, February 2018

For almost as long as there has been electricity, there have been linear power supplies.

There are two main classes of power supply: “linear”, which can be equated to “analog” and “switch mode”, which can be equated to “digital” technology. Of the two, linear power supplies offer beginners with the easiest path for home design and manufacture.

CAVEAT: In Australia, a person cannot legally work on voltages above 50Vac without a licence. DIYODE 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 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. Be aware: there are many traps for beginners when it comes to electrical safety.

FEATURES OF A LINEAR POWER SUPPLY

Every ac-DC linear power supply [1] takes an ac input and provides a DC output, by a conversion process as follows:

  • Power from an ac source, such as a 240Vac power point
  • Protection from contact electrocution by suitable case, earthing or insulation
  • Isolation from the supply by a suitably rated switch
  • Protection from overload by a suitably rated fuse
  • Protection from over-temperature by a thermal fuse embedded in the transformer
  • Voltage conversion usually by a transformer
  • Rectification by diodes or diode bridge
  • Filtering by capacitance or inductance

Power supplies may also feature:

  • Regulation, either fixed or variable voltage or current
  • Protection against over-voltage, over-current or power overload
1
linear power supply

Other special purpose power supplies may have even more stages to perform specific needs. For example, dual rail power supplies are often used for audio and communications circuits, and are popular in instrumentation and operational-amplifier circuits.

We intend covering these listed sections one by one. The complete treatment will take more than a single installment though, so please stick with us.

Historically, the quality of the ac wave form was calculated as what was called the 'Form Factor' which was the RMS value divided by the Average value, which for a pure sine wave is 0.707/0.637 = 1.11. However, a more modern measure is Total Harmonic Distortion (THD). THD is a value of harmonics, or energy of higher frequencies than the 50 Hz caused by electronic loads and switching power supplies, even from light dimmers.

POWER FROM AC

In Australia, New Zealand, South Africa and the UK, the supply voltage was 240Vac, but in recent times a move has been made toward 230Vac, and eventually toward 220Vac to align us with the most common power supply voltage in the world. Another standard is the frequency of 50Hz which is the most common power supply standard used worldwide, although 60Hz is the most commonly used standard in the US world.

Lesser known is that the sine wave is the standard waveform, and all of these standards, and more, are to be maintained by supply authorities to within tolerances set in the Australian New Zealand Standards Association, and other standards worldwide [2].

2
figure 2

This presents the first issue for our power supply. If the 240Vac is converted to DC what voltage will it have? 240V is what is called an RMS value, which in easy terms means 240Vac does the same work as 240VDC, but you need to measure it with an “RMS calibrated” or “True RMS" voltmeter. In fact, if the ac voltage is measured on an oscilloscope, a value known as “peak to peak” is taken, which may surprise you to be almost 680Vp-p. This is the voltage from the positive peak to the negative peak, so the next more convenient reading is 340V peak voltage; above or below ground.

Obviously handling 240Vac should be left to those trained to do so, as safely as possible!

The wall socket that electricians refer to as the “general purpose outlet” or “GPO” supplies 10A by design, but as several are wired onto one circuit, more than 10A could flow before any protection operates. Any appliance plugged into a 10A outlet is required to be limited to 10A in design and manufacture. Therefore, all commercially manufactured appliances are required to undergo “compliance testing” to ensure they adhere to Australian/New Zealand standards.

Unfortunately, imported electrical goods, especially those imported directly, may not comply. The person importing these items risks the possibility of “failure, fire or electrocution”. In some cases, hobbyists have changed the plug to an Australian-style power plug, only to find that the appliance was designed for 110V/60Hz.

Appliances designed for overseas power supplies are NOT compliant with Australian design rules, even though some will operate acceptably. Importers like Altronics and Jaycar spend a lot of money each year testing to ensure their electrical appliances do comply, and are branded with a compliance number for each of their products. You will find this information on the compliance plate on any product that is designed for connection to an Australian GPO [3].

3
figure 3

PROTECTION FROM CONTACT

To avoid the average person from contacting the lethal voltages, the wires are double-insulated within a tough PVC sheath, and attached to a moulded PVC plug that is designed to avoid accidental contact with any live pins. It also enters the insulated or earthed power supply case via a correctly installed and suitable grommet opening.

The wires are connected into specifically designed connectors, with provisions to withstand being accidentally pulled out. Adding to that are specifications for earthing the case, and testing for an effective earth.

The case itself has many requirements including how the parts are joined, how and where the case screws are placed, how contact with live parts are avoided, and even how big a hole can be before there is a possibility of contact. Plastic cases must be fire resistant, impact resistant, heat tolerant, and structurally sound (i.e., not just a tin or plastic box!).

Hobbyists unknowingly ignore or bypass many of the safety provisions demanded by the standards. An Australian scientist, John Moyle, was unfortunately electrocuted in the 1930s while experimenting with television. This brilliant man accidentally came into contact with the live power supply of his homemade valve TV, and he was lost to science in a tragic display of self-trust.

ISOLATION SWITCH

Every electrical device should have a switch to isolate the device from the power supply, rather than having to pull the cord out of the wall! What many hobbyists forget is that the switch must be rated for the voltage and current that the device will be using (see Figure 4). For something plugged into a wall socket in Australia or New Zealand, it should be rated as 250Vac, 10A minimum. How many times have you seen an automotive switch used on a DVD player? Hopefully never! Yet some hobbyists tend to use any “switch” that still works.

For any device built by an amateur, I seriously suggest the switch should also be double-pole, switching both the active and neutral wires. If you don’t know what these terms mean, and are thinking positive and negative, or red and black wires, you shouldn’t be exposing yourself to the risk!

isolation switch
protection fuse

PROTECTION FUSE

A little known fact is that the fuse in equipment is there to protect the wiring, not the person using it. Anything plugged into the wall socket can draw in excess of 10A, and perhaps up to 20A before a fuse blows. You, or vital parts of your body, will blow at something a little over 30mA. So any device that takes less than 10A usually has it’s own fuse. DVD players can use a 2A to 5A fuse, and probably less. The fuse is there to help prevent fires in the equipment.

My own electronics workbench is protected by a 30mA safety switch, as well as it’s own 10A circuit breaker – and I trust myself, most of the time! Honestly, we all make mistakes, and if you are unlucky, that may well be your very last mistake!

The Earth Connection

There are many ideas about what the Earth Wire, or Earth Pin/Socket in a GPO actually does. The power supply we use in Australia, and most of the world has three phases, which means there are three sets of 240 Vac power supplies, and each shares a common connection, called the neutral. The voltage between each pair of these three supplies is 415 Vac for reasons that mostly involve more maths, so please just believe me. To reduce the risk of a person coming between the phases, and coping a 415 Vac 'ZAP!' the neutral is connected to the actual Earth, or Ground, yes, the ground that you stand on. As a result, theoretically you should never be exposed to more than 240 Vac.

THERMAL FUSE

Relatively recently, transformers and coils have been required to have a thermal fuse embedded within the coil winding, or in intimate contact to the windings. Often the thermal fuse will be rated at 133°C (Jaycar part number ST3804 – see Figure 6), and 10A, but other values are also used. The thermal rating may be even lower if the insulation is plastic. When a coil fails, it will often begin to melt the insulation on the coil wire internally, and can cause a fire if not shut down. Modern safety standards recognise this and therefore require the thermal fuse.

thermal fuse

VOLTAGE CONVERSION

This article refers to linear power supplies, but voltage conversion can be by switched mode power supplies (SMPS) as well (we will cover SMPS another time). The linear power supply typically uses a transformer, although capacitive or inductive power supplies are at times used on very low currents.

TRANSFORMERS

transformers

In 1831, Michael Faraday succeeded in proving a concept we now know as Mutual Induction. At the time he was a university student, but from common parantage, he was having difficulty securing a tutor position at his university. He was set the task to prove whether electrical current in one wire had any effect on another conductor. Faraday made a coil out of soft iron wire, as iron had already proven to increase the strength of a magnetic field. He then wound a coil of insulated copper wire on one side of what we now call the magnetic core, and made a second coil on the other side of the core, making sure there could be no connection between the two. Applying a voltage on one coil caused a needle deflection in the Galvanometer attached across the second coil. Removing the voltage caused a second deflection, in the other direction. Faraday demonstrated his device to the College, and was granted a seat at the university.

Note: Remember, you need an electrical licence to legally work on electrical circuits above 50Vac. That being said, there are plenty of options to build your own power supply using a commercially available, and hopefully approved transformer, working only on the low voltage side of the transformer.

transformer

A small power supply can be provided by a small ac plug pack, keeping all of the licensed stuff inside the plug pack itself. If the plug pack is too small, many places sell “power packs” for garden lighting and such. Self-contained, switched and protected 12Vac or 24Vac lighting transformers, intended for garden lighting and other outdoor purposes, pool pumps or similar, are all good ways to obtain all the licensed stuff in one box.

A third option is to DIY the box and transformer, wiring, switch, thermal and current fuses, supply lead and the like, all according to Australian/New Zealand standards, and have it inspected and tested by a licensed electrician. You will probably find at least one issue among that lot – unless your mate is the electrician – but it is better to be sure that your power supply is safe.

The conversion will provide an ac voltage to suit the needs of your load. We will show you how to calculate the values in the following theory section.

The first option is a single winding, providing two terminals with an ac voltage present across them, and a limited current available from them. The second option is for a centre-tapped transformer output, which is really just a single winding with a connection, called a tap, at the centre; or two separate windings connected in series, such that the outside two terminals have the same voltages at opposite polarities, either side of the centre common, which is usually grounded.

It is common for a transformer to be provided with two identical windings. For example two 12V 1A windings allow the user to opt for two 12V supplies, each with 1A, one 12V supply with 2A available, by connecting the windings in parallel, or 24V 1A by connecting the windings in series.

The danger here is in connecting the windings together incorrectly. The series connection is the less dramatic, as connecting either winding in reverse polarity to the other cancels out the terminal voltage (i.e., 12V + (-12V) = 0V)! The more dramatic error however, is to connect the two windings in parallel with one in reverse polarity. In correct polarity you get double the current, but in reverse polarity they are actually a dead short in series, and the winding may burn out before you figure out what out you have done.

Never parallel two transformers on the one supply in an attempt to double the voltage or current. Although it is common practice in the power industry, the guys who do it know exactly what the dangers are. There have been too many electrocutions caused by hobbyists, and even electricians, doing this wrong!

EMF

Transformers work because of an energy transfer that occurs in every conductor, but at low frequencies, i.e. 50 Hz, it is only large enough to be useful when the conductors are wound into a coil.

Current is a bulk movement of electrons in a particular direction. That movement caused by an electric field aligns the magnetic fields of the electrons so the bulk migration we call current has a much larger magnetic field than individual electrons have. By itself the magnetic field doesn't do much, but when the field passes through another conductor, electrons in that conductor are forced to move, and in a complete circuit, a current will flow. All Generators and Alternators work on the same principle, as do many other devices.

The force that moves electrons is called the Electro-Motive Force, EMF. Magnetism is only one of six common means to cause a voltage or current in a device.

When a current changes, such as when electricity is first connected to a coil, the expanding magnetic field cuts other turns of the same conductor, but the voltage generated is opposite in polarity to the voltage that causes the initial current flow. There's a whole other article on Lenz's Law for another day.

In a DC coil Lenz's Law means the current can only increase slowly as it's own increase opposes itself. The more interesting effect occurs when the voltage is removed. The collapsing field continues to generate that reverse voltage, but the energy is dumped much quicker generating a much higher voltage, which is why relays can kill electronics if not protected.

In ac circuits the effect is that the ac current peaks come after the ac voltage peaks, and that also opens a whole other subject on how inductors work on ac, or even at RF frequencies.

In a simple transformer, two windings are present on a common magnetic core. One winding called the ‘Primary’ is connected via an appropriate fuse and switch to an ac electricity supply. The voltage and current will be, in theory, 90 degrees out of phase, meaning the current sine wave will come a quarter cycle after the voltage.

One or more secondary windings on the same magnetic core, also generate an EMF causing a current to flow if the secondary coil is a part of another circuit. So the magnetic field passes through all windings, sharing the same magnetic field, in a special condition known as mutual inductance.

The secondary EMF or voltage is proportional to the number of turns of each winding. The voltage generated in the secondary is proportional to the Primary Voltage, VP, and the Turns Ratio TP/TS.

e.g. if a certain transformer has 1000 turns on the primary winding, and only 50 turns on the secondary winding, the output voltage will be 50/1000 of the Primary Voltage. A 240/12 volt transformer will have 240:12 or 20:1 turns ratio, but the actual turns may be 1000:50.

Unfortunately, it isn’t simple to calculate how many turns are required. The number of turns depend upon the Voltage, Current, Frequency, and Weight of Iron in the core.

RECTIFICATION

HALF WAVE RECTIFIER

Due to the sine wave reversing direction (i.e., polarity) every half cycle, and DC requiring a single polarity, one option is to use a single diode to stop the negative current flow [4].

4
figure 4

This produces a half wave output of 0.45 x VRMS (as calculated by calculus). Note that this ignores the voltage drop across the diode, so the output of the halfwave rectifier circuit is actually Vo = 0.45 x VRMS – 0.6V; not very satisfactory except for low power, simple circuits that are not affected by large ripple voltages. The voltage across the diode when reverse biased, is the peak value of the RMS voltage, so: √2 x VRMS, or 1.414 x VRMS.

FULL WAVE RECTIFIER-BRIDGE

To increase the output voltage and reduce ripple voltage, the sine wave can be “full wave rectified” from a single phase output using a bridge rectifier. During the first halfwave the supply current flows through the odd numbered diodes, D1 and D3 [5].

5
figure 5

During the negative halfwave, the current flows through the even numbered diodes, D2 and D4 [5]. The result is the current always flows through the load in the same direction, so the voltage across the load is always the same polarity.

The advantage of the bridge rectifier is double the output, increasing to 0.9 x VRMS. The disadvantage is using four diodes, and having two diode voltage drops in each half cycle, so the output becomes: Vo = 0.9 x VRMS. - 2 x 0.6V.

Note: as current increases, the 0.6V rule of thumb value may increase to over 1V per diode.

FULL WAVE – CENTRE TAP

Another option is to use a centre tap transformer giving a centre common, and two opposite polarity windings, so each winding can provide a halfwave via one diode, thus only requiring two diodes total [6].

6
figure 6

The disadvantages are a special transformer must be used, with a centre-tapped winding, and higher reverse voltage rating diodes. When one winding conducts via one diode, the peak voltage of both windings appears, briefly, across the other diode; therefore the Peak Inverse Voltage (PIV) of the diodes must be twice that required by the bridge circuit [7].

7
figure 7

FILTERING (SMOOTHING)

The rectified sine wave has pulses of voltage, and therefore delivers pulses of current because it is still made up of the half waves. The gap between the pulses must be supplied using energy, which is stored either in inductors or capacitors.

Inductors work better for low voltages and high current that flows continuously, but capacitors work best for high voltages and low current. In fact, capacitors don’t mind having no load at all.

Most filter circuits that makers build will have capacitive filters, also called “smoothing capacitors”.

In a perfect DC supply the capacitor must supply the whole load current for the whole period of every half cycle, and still find some time to recharge every half cycle. This is not only impossible but would require an infinite capacitance. Therefore there will always be some ripple voltage, and the size of the capacitance is inversely proportional to that ripple voltage [8].

8
Figure 8

Without teaching you all about capacitors, storage in a capacitor is called “the charge” and is given the symbol “Q” for quantity of charge. Q can be calculated two ways:

Q = CV, the capacity of the capacitor, multiplied by the voltage it is charged to;

or Q = IT, the current flowing into a capacitor multiplied by the time it flows.

Put them together and you get: Q = CV = IT.

Ignoring Q and transposing for C, C = IT/V.

The most important part now is understanding which values to use:

I = the load current in Amps.

T = the period of current flow.

At frequency = 50Hz, the period of one half cycle = 10mS

V = ripple voltage, the change in capacitor voltage.

C = capacitance in Farads (Note: NOT microFarads)

For example:

For a full wave rectified circuit supplying 1A at 1V ripple:

C = 1 x 0.01/1 = 10,000μF

Note: This is still a fudge, or rule of thumb, but more of an estimate than a guesstimate (you guessed it, mate!).

The period of the capacitor discharge will be less than a halfwave as the capacitor requires time to recharge. During that time the load current is taken from the transformer, but so is the capacitor charge current. As the capacitor is charged at several times the discharge current, a diode forward current of several times the load current should be used (e.g., for a 1A load current at least a 3A diode should be used).

The capacitor value is not critical and less than 10,000μF is acceptable if a greater ripple is allowable, or more capacitance will reduce the ripple voltage. High current power supplies have large banks of large capacitors in parallel as capacitance in parallel simply adds up.

Try it yourself by changing the values. Transpose it to see what ripple voltage a certain capacitor will allow for your circuit.

The old wives’ tale of 1000μF per amp is not reliable, oversimplifies the “guesstimate” and underestimates the storage requirements. The capacitance depends on current, agreed, but it also depends on the discharge period, which is different for 60Hz versus 50Hz, and halfwave versus full wave.

Finally, it depends on the level of ripple voltage you are prepared to accept, as the inverse relationship between ripple and capacitance means that zero ripple requires infinite capacitance.

You may note that we have not addressed regulators yet, but we need to leave something for next month!

Voltage Peak value from the RMS value: √2VRMS i.e. 1.414VRMS.

VRMS from Vpeak: Vpeak/√2, i.e. 0.707Vpeak.

Note: √2 is easy to remember.

Voltage drop across bridge rectifiers: allow 2 volts increasing with load.

Ripple voltage of a capacitor-filtered power supply: VR = IT/C.

Smoothing Capacitance: C = IT/VR.

Allow for a Regulator Head voltage: 2.5 Volts.

Calculate and add these voltage drops to your Load Voltage and multiply by 0.707 to find the minimum supply voltage.

"RMS" stands for "Root Mean Squared" !!!

While the term “Root Mean Squared” is also used in statistics, in Electrical Engineering, RMS values for waveforms are calculated by calculus. Thankfully for most of you, the RMS value for a sine wave is well known as 0.707 of peak value. The derivation of this value is outside of this article, but perhaps some explanation of how it is found.

Calculus enables a mathematician to find the area under a curve which for electricity usually means the voltage or current for a period of one cycle. The ac Voltage and Current are positive for one half cycle and negative for the next half cycle, so an average is very likely to be Zero!

However the term “Root Mean Squared” suggests that we must square the number. In maths any squared number becomes positive. 2 x 2 = 4, (-2) x (-2) = 4.

So should we take the mean of a number of “instantaneous values” found from the formula for a sine wave, Vi = Vmax(Sin(Ot)), which are first “squared”, then then added and divided by the number of sample values, we have a mean value, but one which is still squared. Finally the square root of the mean value is calculated to come up with a positive number, the “RMS” value.

The accuracy of the RMS value found depends upon the number of samples used in the maths. A square wave requires only two values to produce an accurate RMS value of '1'. Just four equi-spaced samples will give an RMS value of 0.5 for a triangle wave. The RMS value for a sine wave gets more accurate as more samples are used but always closes in on the value 0.707, which is the value of 1/(√2).

What calculus does is use maths to make the number of samples effectively infinite. The formula is worked by calculus methods to produce a new formula that doesn't require calculus.

The Effective Voltage or Current

This can be shown by experiment that any resistive load supplied with a DC Voltage will use twice the power of the same load supplied with an ac sine wave of the same peak voltage.

Therefore to produce the same heat from either a DC source, or an ac source, the ac needed to have a value other than the peak value, that was effectively the same as the DC voltage would produce.

The old term “Effective Voltage” was used before “RMS” was calculated by the RMS method. In effect proving that the experimentally derived Effective Voltage was correct.

For the mathematicians among you:

Power

= VDC x IDC

= Vef x Ief

= (Vpeak x Ipeak)/2

= Vpeak/√2 x Ipeak/√2

Therefore Vef (i.e. VRMS) = Vpeak/√2, and Ief (i.e. IRMS) = Ipeak/√2.

Finally, 1/√2 = 0.707

Calculus will produce the same value after a lot more effort at mathematics, but please try it if you're up for it. Two suggestions, integrate CosO instead of SinO, in radians from -π to +π.

If you don't end up with 1/√2, as they say in the classics, you're not doing it right!

Part 2

Part 3