The Classroom

Part 1: The Switchmode Power Supply

Bob Harper

Issue 11, May 2018

Due to their many advantages, switch mode power supplies (SMPS) have effectively taken over from linear supplies.

The Model ‘T’ Ford used a switch mode power supply as its ignition source. A ‘trembler coil’ attracted an armature, causing a set of switch contacts to open, thus turning the magnet off. The collapsing field caused a spark across the ‘sparking plug’, which ignited the fuel/air mix in the cylinder. The basis of the trembler coil however, goes back even further to 1836. Marconi even used a switched coil to generate his “wireless telegraphy”… but you can look that up yourself.

In the 1960s the US/Russia space race required smaller and more efficient power supplies and power conversion which, most likely, was the turning point for the change from linear power supplies to switch mode power supplies.

WHY CHANGE?

The space race is considered to be one of the greatest incentives to improve power supplies, as everything on a spacecraft has to be lifted and accelerated to a very high velocity to escape the earth. Batteries are heavy, so reducing battery weight quickly reduces the energy required to launch the vehicle. In fact, the whole “going digital” revolution was driven by a need for miniaturisation, and the SMPS was probably the first step in the process.

While linear power supplies (LPS) are simple, relatively cheap and easy to build, they have one major drawback — they are typically big and heavy. A second issue arises when a small output is required from a high voltage input. Linear voltage regulation is wasteful; for example, a 3.3V supply for a small micro-controller operated from a 12V supply would waste 72.5% of the total energy used.

An even greater incentive however, is made clear when the output voltage is required to be higher than the input voltage. Linear power supplies cannot generate a higher voltage, and in most circuits cannot even match the input voltage.

The reason for the linear supply efficiency issue is that it has a series element – usually a transistor or similar semiconductor device – acting in linear mode as a resistor, to burn up the excess voltage, and therefore energy.

Linear Regulator = Series Resistor

Linear Power Supplies working off the mains power supply have one other disadvantage, and that cannot be changed easily. The power supply works at 50Hz, or slightly faster in the US system of 60Hz. Transformers working off the mains power supply must be designed to work at 50Hz

Using an old formula from my apprenticeship, almost 50 years ago, Wt = 3VA/f, meaning that the weight of the Iron core for a transformer using the common 'EI' construction of the day, is equal to three times the maximum power, calculated from the maximum voltage and maximum current, divided by the frequency of the mains.

Therefore a 12 Volt power supply supplying 20 Amps would require 3 x 12 x 20 /50 = ~14.5lbs, or 6.5kg, of iron alone, and probably the same in copper windings.

A good example of the effect of changing to SMPS can be made if you have ever moved an old welder, which was a great lump of transformer, compared to a modern welder which is mostly electronics

HOW IS THE SMPS DIFFERENT?

Instead of the series element being resistive, the SMPS uses a switch – which seems obvious from its title! If the series element is simply replaced by a faster and more efficient switch, most of the original regulator circuit could still be used. Figure 2 shows a circuit based on a switch element, rather than a resistor element.

Series Switching Power Supply

Note: We’re being a little clever here. The general layout is the same but the difference lies in how we control the switching element. The controller circuitry is shown as a block only, but the main difference is in how we control the series element (i.e., the transistor). We’ll get to its details later; for now, let’s consider what it does in a basic sense. It switches the switching element on and off, and the switched supply needs to be smoothed by a capacitor, so the switching doesn’t affect the load.

SMOOTHING CAPACITOR

You may remember from The Classroom in Issue 8, where we detailed the LPS, that the size of the smoothing capacitor is calculated from C = IT/V, where I is the load current, T is the charging time of the capacitor, and V is the ripple voltage.

Working on a 1A load, mainly for comparison to our previous linear supply, and asking for a very low ripple content of 0.1V, let’s begin calculating for a 50Hz switching rate:

C = 1A x 10E-3s / 0.1V = 100E-3F, or 100,000µF

That’s a problem! Luckily, the capacitor size goes down as the switching speed goes up. That’s why SMPSs were considered “noisy” when they first became common, before they were properly designed and filtered.

So instead of 50Hz, let’s try 50kHz, and expect that the capacitor will be 1000 times smaller. All other values remaining unchanged, of course:

C = 1A x 10E-6s / 0.1V = 100E-6F, or 100µF

So there’s your first saving, in the capacitor value, and therefore size and weight, reducing the overall size and weight of the power supply.

Purists will recognise the corners I have cut, but the scale of the effect is the same:

1000 times the frequency reduces the capacitor size by 1000.

You may realise that as frequency increases, inductors also become suitable for use as a smoothing filter. Even at low frequencies, inductors work to smooth the current in a load, but unfortunately the size required is often too large to be chosen.

SMPS smoothing inductors are also possible due to the material in their core. Ferrite, for example, when used has very low losses compared to iron cores.

Remember, capacitors work best at smoothing the voltage while inductors work best at smoothing the current.

SWITCHING ELEMENT

The switching element does not intentionally waste power as the series element did, but it still has limitations, most of which have been improved dramatically since SMPSs were first used. Instead of BJTs (bipolar junction transistors) – the original devices – MOSFETs (metal oxide semiconductor field effect transistors) are now the most commonly used device, along with IGFET (insulated gate field effect transistors) and some less common devices.

Using a mechanical switch to show the areas of losses, consider Figure 3 and the switching waveform.

3
A Mechanically Switched Power Supply

OPEN CIRCUIT (Toff)

To begin, when the switch is in the off position, leakage current may not be noticeable but some leakage is possible. In almost all cases, the leakage is insignificant, as long as the voltage is below the arc-over voltage. If the arc-over is exceeded, then the switch becomes either a fuse or a link, depending on its construction (or destruction!).

On DC supplies, arcing is difficult to stop and the output voltage can be at maximum until circuit protection operates.

Both BJTs and MOSFETs can have high voltage ratings, but recently, MOSFETs have had the advantage in voltage, current and frequency

SWITCH ON (Son)

Look next at the period when the switch turns on (Son). For a mechanical switch there should be no delay, but there may be some switch bounce which can cause several spikes before the circuit is completely on.

Switching Trace

For the BJT or MOSFET, there is a period during which the voltage across the device drops from the open circuit value to the closed circuit value, and the current increases from zero to load current. Assuming both are linear, the power wasted can be calculated using the following formula, as the average values would be half of the maximum values:

P = (Vce x Iload)/2 or (Vds x Iv)/2

In reality they are only estimated as linear, but the calculated value is useful for evaluating switching losses of comparable devices.

The energy lost depends on the switching time as well, whereby faster switching time wastes less energy. Less switching also reduces switching losses, but increases storage capacitance size and weight, and as such is a compromise.

BJTs are faster for smaller size devices, but MOSFETs become faster as load capacity increases. This results in arguments over speed advantage of the various technologies. IGFETs are essentially a BJT driven by a MOSFET, in a configuration similar to a Darlington transistor.

CLOSED CIRCUIT (Ton)

The circuit remains on for a period while the capacitor is charged.

Note: Later we will also work with inductors. During the ‘on time’ when the circuit is closed, energy losses occur due to the voltage drop across the switch element, and the load current, so: P = VI.

As the load current is unavoidable, switch elements with a lower ‘on voltage’ will produce the least losses. Therefore, especially as load current increases, designers will be drawn to the BJTs with the least Vce (voltage), and MOSFETS with the lowest Rds (resistance).

SWITCH OFF (Soff)

Switching off has the same issues as switching on. BJTs take time to dissipate the junction charge, and MOSFETs take time to discharge the insulated layer capacitance. Of the two, BJTs require much more current to turn on or off, again, especially at higher load currents.

CONTROL CIRCUITRY

BJTs are current-driven, and so require a current to flow to remain on. That current may be a significant proportion of the load current with larger BJTs having a beta as low as 5. Therefore, the driving circuit for larger power supplies may use a series of several driving stages, all of which have to be driven on, and off sequentially, increasing the time taken to turn on or off.

The base-emitter voltage of a BJT is about 0.7V, but this can be more as base current increases, because the base current is related to the load current. It can also be a significant proportion of it, which means the BE junction losses can be significant. All losses result in heat generation, and cooling requirements.

MOSFETs are voltage-driven, and although larger devices can have a significant gate capacitance, MOSFETs can often be driven directly from a simple driver, although the driver usually needs to be a 10V or higher voltage device.

Logic level MOSFETs are available, but can be slower to switch on or off.

DISSIPATION

For all of the above-mentioned losses, heat will be generated, and that heat must be dissipated. Heat and electric circuits can be seen as very similar. Heat flows from a higher temperature to a lower temperature, just like current flowing from a higher voltage to a lower voltage. Thermal resistance is like electric resistance. Heat flows more easily in materials of better conductivity, and aluminium or copper are also great conductors of heat.

What this means however, is that a greater energy loss is actually greater heat generation, which requires larger aluminium heat sinks or airflow, to draw the heat away from the supply. Of course, linear power supplies require even larger heat sinks, but the aim is to have no heat sink, if possible, and to use ambient ventilation to remove the heat. In effect, all the energy losses need to be reduced to a minimum, in order to reduce the technology required to deal with the heat generated.

Figure 5
Heat flows from transistor case through the insulator, through the heat sink body, and fins to the air. Heat also flows directly from the case to air, equivalent to ground in electrical.

IGFETs

A final word on IGFETs from somebody with little design experience with them: IGFETs are prone to “hotspot” failure at slower switching speeds. They are more complex than either the BJT or MOSFET technology that they are made of, and to me at least, seem much more complex to design with. They can also be expensive and static-sensitive.

TOPOLOGY

Circuit connections are at times categorised into groups called “topologies”. BJT amplifiers, for example, are categorised into “common emitter”, “common collector”, and “common base “circuits, and voltage multipliers are also possible.

Note: at this point, we do not intend to design any values.

PWM

So far we have been looking at the simplest SMPS – a PWM (pulse width modulation) circuit; although we have simply switched the load supply on and off without controlling the output voltage with a regulator.

What we could have done, for a variable voltage but non-regulated DC power supply, such as you might use to control a small motor, would be to use a 555 integrated circuit or an Arduino/Pi/PIC to create a PWM square wave, and switch a BJT on and off.

The motor would be the load connected to the collector. Changing the pulse width would vary the “mark/space” ratio, the percentage of “on” verses “off” time, therefore controlling how much current flows in the motor, and thereby controlling the speed.

Note: there doesn’t need to be any smoothing capacitor or inductor, as the motor itself acts as an inductor. However this presents another problem, and a reminder for those using motors on their Arduino, and such: motors generate spikes, and as such the circuit should be protected by adding a “flyback” diode across the motor terminals, as well as one or more capacitors of about 1µF, to avoid the EMI that can be generated. Refer to the following circuit for a possible speed controller.

PWM Fan (Motor) Speed Controller.

BUCK

The “buck” SMPS uses a switch and inductor in series with the load as shown in the following Figure. A capacitor is typically used across the load as the capacitance charges and attempts to maintain a voltage even when there is no load. This is necessary as the inductor – being a current device – cannot smooth the voltage, so the voltage would fluctuate at the switching frequency without any load.

Buck SMPS

Some designs require a minimum load current to allow regulation, and therefore a resistor may be required across the terminals to provide that minimum load.

The diode protects the switching element, but also allows current to continue when the switch is open. If you know about inductors, then you will remember that the current comes after the voltage. That is a long discussion in itself, but electricians might have been taught the mnemonic “CIVIL”, which stands for:

Capacitance-current(I)-Voltage-current(I)-Inductance.

The mnemonic means that capacitors need a current before voltage changes, but inductor current changes after the voltage changes. So when our inductor is turned on by the series switch, the current begins to build up to a maximum value controlled by the load and time.

At some point, the switch turns off but the current continues as the magnetic field collapses. If there were no diode, the field would collapse immediately, generating a very high voltage. So the diode performs two very necessary tasks: it maintains the current when the switch is off, and it prevents voltage spikes.

As long as the load is not too great, the current will not only continue, but will be relatively stable, except for some ripple current, similar to the ripple voltage you learned about in Issue 8.

The output smoothing capacitor helps reduce the voltage ripple to the load, while also smoothing the current. If both capacitor and inductor are matched by good design, the load voltage will have a very low ripple content.

The buck topology is a very common form of SMPS with few components and simple operation, at least for the power components.

BOOST

The “boost” convertor uses the same basic components, no doubt of different values requiring a separate design, but in a different set of connections; (i.e., a different “topology”) see the diagram below.

Boost SMPS

Using the boost topology, with the switch off, the load should have approximately the same voltage as the supply. The inductor will have some resistance, and the diode will lose about 0.7V. If a regulated control is used, these values can often be ignored, unless the circuit operates near its limits.

Capacitors C2 and C3 will charge to the supply voltage, and would stay that way if the switch were not used. However, when the switch is closed (i.e., the transistor is turned on by the controller circuit), the capacitor supplies all the load current to the load.

The voltage across the inductor will be the full supply voltage, and the current will build toward maximum current, which in a DC circuit is limited only by the series resistance within the inductor, and the limitation of current due to charging the magnetic field. Therefore, should the switch become shorted, the inductor will most likely also burn out as the series resistance is, by design, kept low.

Once the switch opens, current from the inductor (i.e., the coil) flows to the load and to the capacitor. The voltage across the coil will raise the voltage on capacitors C2 and C3, as well as the load. If the switching is fast enough, and the load current low enough (both factors involved in the design process), then the voltage across the load will remain at a value above the supply voltage.

Effectively, the inductor and the capacitor are in series with the supply voltage, and assuming the supply voltage is DC, and therefore does not change, then according to Kirchhoff’s Laws the remaining voltages must “add up” to the supply voltage.

Current in the supply and the inductor flow in the same direction, therefore the voltages add up to equal the voltage across capacitors C2 and C3.

The boost topology is a very common form of SMPS used to generate a voltage above the supply voltage.

BUCK-BOOST

The buck-boost converter is commonly mistaken as meaning the output voltage will be above or below the supply voltage. In the simplest terms it is, but the output is of negative polarity, which you must remember if you don’t want to build a perfectly good buck-boost circuit of the wrong polarity!

Buck-Boost SMPS

The diagram shows that while the same components are used, it also uses values not yet considered.

This is our third topology, so you may notice both similarities and differences to the earlier two topologies.

This time, we need to start with the switch turned on. Current will flow into the inductor, with the voltage increasing toward a maximum value. No voltage will be available to the load or the capacitor at this point, due to the reverse biased diode.

When the switch turns off, the current in the inductor attempts to continue by flowing through the capacitor and the diode. Noting the polarity of both the diode and capacitor, you will see that the voltage across the capacitor will be negative (i.e., the “ground” of the supply is connected to the positive terminal of the capacitor, and the negative terminal of the capacitor is attached to the top of the load). Therefore the voltage across the load will be negative with respect to ground.

As the capacitor voltage is gained purely from the inductor discharge, the voltage value can be almost any value above or below the supply voltage. Most importantly, you need to remember that this circuit generates a voltage opposite to the supply voltage.

The boost topology is a less commonly used form of SMPS to generate a negative voltage above or below the supply voltage.

REALITY CHECK

These are three of the most common topologies, but more importantly the simplest and easiest to use. We have dealt only with the component purposes and common topologies, but there are many more topologies, and no doubt, even more to be developed in the future.

In order to understand these circuits, and analyse or design them, the maker requires an understanding of both capacitance and inductance as an energy storage device.

The value of the inductance can be calculated, as the capacitance has been in past articles, and the appropriate value of inductance may be bought if you can find a supplier, but the core, frequency of the application, the turns of copper wire and the thickness of the wire must all be considered, before a suitable design for the inductor alone can be settled upon.

Thankfully, most manufacturers of specialised controller chips,have an application note for engineers to follow. However, the Linear Power Supply has the advantage of simplicity!

Switchmode Charging
Wihtout development of Switchmode Power Supplies, your humble phone charger would be about 10 times heavier, many times larger and probably more expensive too.

PART 2