JOVANA
Explore Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Switching Regulators: Buck, Boost, and Efficiency

The linear regulator was honest but wasteful — it burns the leftover voltage as heat. The switching regulator refuses to pay that bill: instead of throttling the flow with a half-open tap, it chops the power on and off thousands of times a second and lets an inductor coast through the gaps. The reward is efficiency near 90 percent; the price is noise. Here is how a buck steps down, how a boost steps up, and exactly where the trade lives.

Why a switch beats a half-open tap

Guide 2 left us with an uncomfortable truth about the linear regulator: it works like a smart, self-adjusting resistor in series with the load, and a resistor that drops voltage while passing current must turn the difference into heat. Feed a 5 V, 1 A load from a 12 V rail and the pass element burns (12 - 5) times 1 = 7 watts as heat while delivering only 5 watts — about 42 percent efficiency. The bigger the gap between input and output, the worse the waste. There is no way around it, because a series resistance can only ever throw energy away.

Now picture a different device: a perfect switch. When it is fully closed there is no voltage across it (so power, which is V times I, is zero), and when it is fully open there is no current through it (so power is again zero). An ideal switch dissipates nothing in either state — it only ever loses a sliver during the brief flick between them. So if we could deliver power by flicking a switch fully on and fully off, rather than by half-throttling it, we would waste almost nothing. That single idea is the whole reason the switching regulator exists.

But a raw switch gives you a chopped mess: the output snaps between full Vin and zero, a brutal square wave, not the smooth DC a circuit wants. We need something that can absorb the bursts and coast through the gaps — a flywheel for current. That is the inductor. Recall from the AC rung that an inductor resists sudden changes in current the way a heavy flywheel resists sudden changes in speed: shove energy into its magnetic field while the switch is on, and it keeps that current flowing into the load when the switch turns off. Pair the chopping switch with an inductor and a smoothing capacitor, and the violent square wave becomes a calm, efficient DC output.

The buck converter: stepping down

The buck converter is the workhorse step-down topology — it turns a higher voltage into a lower one efficiently, exactly the job the linear regulator did wastefully. Its parts are few: a high-side switch (usually a MOSFET), an inductor, a flyback diode (or a second MOSFET, more on that later), and an output capacitor. The trick is what happens at the switching node — the point between the switch and the inductor — as the switch chops on and off.

  BUCK  (step-down)              switching node (SW)
                                    |
   Vin --+----[ S ]----------+------+----[ L ]----+---- Vout
         |   (MOSFET)        |                    |
        === Cin            (D) flyback           === Cout   [ load ]
         |                   |                     |
        GND ----------------+---------------------+---- GND

  PHASE 1  S closed: Vin -> L -> load.  I_L ramps UP, energy stored in L
  PHASE 2  S open:   L keeps current going, D conducts, I_L ramps DOWN
           Cout smooths the chopped current into a steady Vout

  Ideal (continuous conduction):   Vout = D x Vin
      where D = on-time / period = duty cycle  (between 0 and 1)

  Example:  Vin = 12 V, want 5 V  ->  D = 5 / 12 ~ 0.42  (on 42% of the time)
A buck converter. The output is the input scaled by the duty cycle D. Drop D and the output drops with it — that is the whole control knob.
  1. Switch ON: the switch connects Vin to the inductor. With Vin on one end and Vout on the other, the voltage across the inductor is (Vin - Vout), so its current ramps steadily upward, storing energy in the magnetic field while also feeding the load.
  2. Switch OFF: the switch opens. The inductor refuses to let its current stop suddenly, so it pulls the switching node below ground until the flyback diode turns on and offers the current a path. Now the inductor's current free-wheels through the diode and load, ramping back down as it gives up its stored energy.
  3. Repeat fast: do this tens of thousands to millions of times a second. The inductor current never collapses to zero (continuous conduction); it ripples gently around the load's average current, and the output capacitor mops up that ripple into a smooth DC level.
  4. Regulate: a feedback loop watches Vout and nudges D up or down to hold it on target as the load or input changes — the same thermostat idea as the linear regulator, just steering a duty cycle instead of a pass transistor.

Now the payoff in numbers. Power in roughly equals power out, so when a buck steps voltage down, it steps current up: that same 5 V, 1 A (5 W) load drawn from 12 V needs only about 5 W / 12 V ~ 0.46 A from the source if the converter were perfect. Compare that with the linear regulator, which drew the full 1 A from the 12 V rail. The buck quietly trades surplus voltage for current instead of burning it. A real buck reaches 85 to 95 percent efficiency, so it wastes well under a watt where the linear wasted seven.

Boost and buck-boost: stepping up

A linear regulator can only ever step down — it cannot create voltage it does not have. A switcher can step up, and this is where the inductor's flywheel nature turns almost magical. In the boost converter the inductor sits in series with the input, and a switch to ground sits after it. When the switch closes, current builds in the inductor, pumping energy into its field — the output is disconnected from this, fed for the moment only by the output capacitor. When the switch opens, the inductor's current cannot stop, so its magnetic field collapses and generates whatever voltage it must to keep the current flowing. That induced voltage adds on top of Vin and shoves charge through a diode into the output — at a voltage higher than the input.

The ideal boost relation is Vout = Vin / (1 - D). It is the buck's law turned inside out: as the duty cycle D climbs toward 1, the denominator shrinks and the output soars. Say you want to run a 5 V USB device from a single 3.7 V lithium cell — a step up. Then 1 - D = Vin / Vout = 3.7 / 5 = 0.74, so D ~ 0.26: the switch is on only about a quarter of the time, yet the output lands above the input. There is also the buck-boost converter, which can produce an output either higher or lower than the input (the classic version inverts the polarity too). It earns its keep with a battery: a fresh lithium cell at 4.2 V can be bucked down to a 3.3 V rail, and the same converter boosts that rail back up as the cell sags to 3.0 V near empty.

PWM: the thermostat that steers the duty cycle

How does the converter actually hold its output steady? With the same trick that runs through this whole rung: negative feedback against a stable yardstick. A resistor divider samples the output, a comparator weighs that sample against the chip's internal bandgap reference from guide 3, and the error steers the pulse-width modulation that opens and closes the switch. If the output sags, the controller widens the on-time (raises the duty cycle); if it rises, the controller narrows it. The switch only ever lives in two efficient states — fully on or fully off — and the ratio between them, not a half-open throttle, is what sets the output.

The switching frequency is a design choice with a real trade. Run faster — say 500 kHz or 2 MHz instead of 100 kHz — and the inductor and capacitor barely have time to droop between cycles, so you can use a physically tiny inductor and a small cap. But every on-off transition costs a little energy: the MOSFET spends a few nanoseconds in the half-on no-man's-land where both voltage and current are nonzero, dissipating a pulse of heat, and its gate capacitance must be charged and dumped every cycle. These are switching losses, and they grow in direct proportion to frequency. So high frequency buys small parts at the cost of efficiency — the classic engineer's seesaw.

The price you pay: noise, and being honest about it

Nothing is free, and the switcher's bill is noise. The whole machine works by slamming the switching node between Vin and ground hundreds of thousands of times a second, with sharp edges full of high-frequency energy. That energy escapes two ways: as ripple riding on the DC output at the switching frequency (typically a few to a few tens of millivolts, plus brief spikes at each edge), and as radiated interference that can couple into nearby circuits — an electromagnetic compatibility headache. A linear regulator, by contrast, is whisper-quiet. This is the central trade of the whole subject: the linear regulator is clean but wasteful; the switcher is efficient but noisy. Neither is simply better.

So the seasoned move is often both. Use a switcher to do the heavy lifting — say, drop 12 V to 3.5 V at high efficiency — then follow it with a small low-dropout regulator that drops the last 0.2 V to a clean 3.3 V and scrubs off the switching ripple. You pay a tiny linear loss only on that last fraction of a volt, and you get a quiet rail for sensitive analog, a reference, or an ADC. Knowing when each tool fits is the real skill: a switcher for power and battery life, a linear post-regulator where noise would ruin the measurement.

Two more honest cautions before you build one. First, that Vout = D times Vin is the ideal relation; real losses in the inductor's winding resistance, the switch's on-resistance, and the diode mean the controller must use a slightly larger duty cycle than the formula predicts — and at very light load a converter can slip into discontinuous conduction, where the simple relation breaks entirely. Second, the layout is a circuit element here: the loop carrying the chopped current (input cap, switch, diode) must be physically tiny, because fast-changing current through even a centimetre of stray inductance makes voltage spikes and radiated noise. A switcher that simulates perfectly can still misbehave on a sloppy board — which is exactly where guide 5 picks up, with heat, ripple, and protecting the supply you have built.