Switch-Mode Power Supplies Explained: Small, Cool and Everywhere

Almost every device you own is powered by a switch-mode power supply, or SMPS. Phone chargers, laptop adapters, LED drivers, industrial control panels and telecom racks all use them, and the reason is simple: they are far smaller, lighter and more efficient than the older linear supplies they replaced. This guide explains how they work, the three basic converter topologies, buck, boost and buck-boost, how pulse-width modulation controls the output, why they beat linear supplies on efficiency, and the electromagnetic interference (EMI) problem that comes with fast switching, plus the safety rules that matter when you work around mains-powered supplies.

The ideas here build directly on the fundamentals in our electronics circuits basics guide, especially inductors and capacitors, and on the switching devices in transistors explained. The control loops that keep an SMPS output steady use the same feedback thinking as op-amp basics, and the timing chips that sometimes drive simple converters are covered in 555 timer circuits. One safety note up front: this guide explains principles. Opening or modifying a mains-powered supply is dangerous work for qualified persons only, because its input capacitors can stay charged at lethal voltages long after it is unplugged.

Why linear supplies lost: the heat problem

A linear regulator works like a variable resistor in series with the load. If you need 5 V from a 12 V input at 1 A, the regulator drops 7 V at 1 A, and that 7 W turns entirely into heat. The efficiency is simply output voltage divided by input voltage, about 42% in that example, and the rest must be got rid of with a heatsink. That is acceptable for tiny currents, and linear regulators are still used where ultra-clean, low-noise output matters, but it is hopeless for a laptop charger or a 100 W industrial supply. A switch-mode supply attacks the problem differently: instead of burning off the excess voltage, it transfers energy in short pulses and controls how much energy each pulse carries.

The trick is that a switch, a transistor driven fully on or fully off, dissipates very little power in either state. Fully on, the voltage across it is small, so power (voltage times current) is small. Fully off, the current is zero, so power is zero again. Losses happen mainly during the brief transitions between states, and in the resistance of the switch while on. Keep the transitions fast and the switch resistance low, and efficiency of 85–95% becomes routine. The switch does not deliver steady power by itself, though: an inductor or transformer stores energy during the on-time and releases it during the off-time, and a capacitor smooths the result into steady DC. That energy-storage dance is the heart of every SMPS.

Buck converters: stepping voltage down

The buck converter is the most common SMPS topology, and the one you will meet first. Its output is always lower than its input. The circuit is a switch, a diode (or a second switch), an inductor and an output capacitor. When the switch is on, current flows from the input through the inductor to the load, and the inductor stores energy in its magnetic field while its current ramps up. When the switch turns off, the inductor keeps current flowing in the same direction, now through the diode, and its stored energy feeds the load while its current ramps down. The output capacitor averages out the ripple, so the load sees steady DC.

Control comes from duty cycle: the fraction of each switching period that the switch is on. For an ideal buck converter, output voltage equals duty cycle times input voltage. A 50% duty cycle on a 12 V input gives about 6 V out; 25% gives about 3 V. A feedback loop measures the output, compares it with a reference, and adjusts the duty cycle continuously to hold the output steady as the input voltage or the load changes. This pulse-width modulation (PWM) control is the same idea behind motor speed control and LED dimming: vary the on-time, vary the average. Real buck converters include refinements such as synchronous rectification, replacing the diode with a second transistor to cut diode losses, and current-mode control for faster response, but the inductor-energy story stays the same.

Boost converters: stepping voltage up

A boost converter does the opposite: its output is always higher than its input. The arrangement looks similar but the inductor sits in series with the input. When the switch is on, the inductor charges directly from the input while the output capacitor alone feeds the load. When the switch turns off, the inductor voltage adds to the input voltage, and the combined voltage pushes current through the diode into the output capacitor and load. The output voltage for an ideal boost converter is input voltage divided by one minus the duty cycle, so higher duty cycles give higher outputs, with practical limits set by losses and component ratings.

Boost converters are everywhere once you start looking: a single-cell battery stepped up to 5 V for USB, LED strings driven from a low-voltage rail, and power-factor correction stages in larger supplies, which are essentially boost converters shaped to draw current in step with the mains voltage. One quirk worth knowing: a boost converter cannot limit its output current if the switch fails short or if the input is connected with no switching, because there is a direct path from input to output through the inductor and diode. Protection design has to account for that, which is one reason boost stages in commercial products carry fuses and overvoltage protection.

Buck-boost, flyback and forward converters

When the output must sometimes be above and sometimes below the input, for example a battery whose voltage falls as it discharges while the load needs a fixed voltage, buck-boost topologies take over. The classic buck-boost inverts the output polarity, which suits some applications and rules out others. The four-switch buck-boost avoids inversion by combining buck and boost operation in one circuit and is common in USB power delivery and battery chargers. The SEPIC and Ćuk topologies are related circuits that also avoid inversion and add useful properties such as input-output isolation from DC or reduced ripple.

For mains-powered supplies, isolation between input and output is usually mandatory for safety, and that is where transformer-based topologies come in. The flyback converter, essentially a buck-boost with a transformer, dominates low-power mains adapters: it stores energy in the transformer during the switch on-time and releases it to the secondary during the off-time, giving isolation and multiple outputs almost for free. The forward converter transfers energy directly through the transformer during the on-time and suits higher powers. Both add transformer design, leakage inductance and snubber circuits to the story, which is why mains supply design is a specialist discipline rather than a beginner project.

Efficiency: where the losses actually go

An SMPS efficiency figure quoted on a datasheet is measured at a specific load, and efficiency falls off at light load, which matters because many devices spend most of their lives lightly loaded. The main loss sources are conduction losses in the switch and inductor winding resistance, switching losses during the on-off transitions, core losses in the inductor or transformer, diode forward-voltage losses where diodes are used, and the power consumed by the control circuitry itself. Higher switching frequency shrinks the inductor and capacitor, which is why modern chargers are so small, but it also increases switching losses and EMI, so frequency is a trade-off, not a free win.

Two techniques illustrate how designers chase the last few percent. Synchronous rectification replaces output diodes with transistors whose on-state voltage drop is far lower than a diode's forward voltage, a big win at low output voltages where a 0.7 V diode drop on a 3.3 V rail would waste a fifth of the output. Soft switching, in resonant topologies, arranges for the switch to change state when voltage or current is near zero, slashing transition losses. These are the reasons a good modern supply can exceed 90% efficiency across a wide load range, while a cheap one may manage 75% and run noticeably warm.

EMI and filtering: the price of fast switching

Fast switching is the SMPS's greatest strength and its greatest nuisance. The sharp edges of the switch waveform are rich in harmonics reaching into the megahertz range, and those harmonics escape in two ways: conducted EMI, travelling along the input and output cables, and radiated EMI, broadcast from circuit loops and cables acting as antennas. Without control, an SMPS can interfere with radio reception, disturb nearby sensitive circuits, and fail the emissions limits that products must meet before sale.

Control starts with layout: keep high-current switching loops small, because a loop's radiated field grows with its area. Input filters, typically a common-mode choke plus X and Y capacitors, block conducted noise from reaching the mains. Shielding contains radiated noise, and careful grounding gives noise currents a controlled return path instead of letting them wander through the system. Some controllers add spread-spectrum switching, deliberately jittering the switching frequency so the noise energy spreads over a band instead of concentrating at sharp peaks. If you ever build a switching circuit and a nearby radio starts buzzing, or an analogue measurement suddenly looks noisy, EMI is the first suspect, and the fix is almost always layout and filtering, not a different chip.

Safety: what not to touch

Mains-powered switch-mode supplies deserve respect. The input side contains a bridge rectifier and a large capacitor charged to the peak of the mains voltage, hundreds of volts, and that capacitor can hold its charge for a long time after unplugging. The isolation barrier between primary and secondary, provided by the transformer and by specially rated Y capacitors and optocouplers, is a safety-critical part of the design, not a detail: bridging it with an ordinary component, or with a probe ground clip in the wrong place, defeats the protection and can be lethal. Work on mains supplies belongs to qualified persons with proper isolation, discharge procedures and test equipment.

For learning, stick to low-voltage DC-DC converter modules and kits, which let you experiment with buck and boost behaviour at safe voltages from a battery or bench supply. Measure input and output voltage and current, work out the efficiency yourself, and watch the inductor current waveform on an oscilloscope if one is available: seeing the ramp up and ramp down makes the whole energy-storage story concrete in a way no diagram can. That hands-on loop, predict, measure, compare, is the same approach used throughout the guides on this site.

Frequently asked questions

Why are switch-mode supplies more efficient than linear supplies?

A linear regulator burns off excess voltage as heat, while a switch-mode supply transfers energy in pulses through an inductor or transformer and spends most of its time either fully on or fully off, where losses are low. That is why switch-mode supplies stay cool where a linear regulator would need a large heatsink.

What is the difference between buck and boost converters?

A buck converter steps voltage down: its output is always lower than its input. A boost converter steps voltage up: its output is always higher than its input. Buck-boost topologies can do either, at the cost of an inverted output or extra complexity.

Why do switch-mode supplies cause interference?

Fast switching creates sharp voltage and current edges rich in harmonics, which radiate and conduct as electromagnetic interference. Filtering, shielding, layout and sometimes spread-spectrum switching keep that interference within limits.

Next steps: understand the switching devices themselves in transistors explained, the feedback thinking behind output regulation in op-amp basics, and the timing circuits that drive simple converters in 555 timer circuits. For the passive fundamentals, see electronics circuits basics.