All articles

    Buck vs Linear Regulators: When to Use a Switching Regulator

    Linear regulators vs buck and boost converters with real numbers: efficiency and heat, when a linear regulator is still better, how a buck works, inductor and capacitor equations with worked examples, popular modules, noise, and mistakes that burn circuits.

    Updated 7 min read

    If you want 5 V from a 12 V car battery, or 5 V from a 3.7 V lithium cell, a linear regulator will either waste more than half the energy as heat, or can't do it at all (because it can't raise voltage). This is where switching regulators come in: the buck steps voltage down and the boost steps it up.

    The comparison in numbers

    12 V to 5 V, with the load drawing 1 A (5 W):

    • Linear regulator (like the LM317): draws the same 1 A from the input, so 12 W. Of that, 5 W goes to the load and 7 W becomes heat. Efficiency is about 42%.
    • Buck at 90% efficiency: draws about 5.6 W from the input, which is less than half an amp from the 12 V. The heat is only about 0.6 W.
    Same load: the linear regulator burns 7 W, the buck about 0.6 W
    Same load: the linear regulator burns 7 W, the buck about 0.6 W

    And if the circuit runs on a battery, that difference means the battery lasts roughly twice as long.

    When is a linear regulator still better?

    A buck isn't always the answer. A linear regulator wins in many cases:

    • The voltage difference is small: a linear regulator's efficiency is roughly Vout ÷ Vin. From 3.6 V to 3.3 V that's about 92%, close to any buck, with no inductor and no noise. That's why an LDO is the natural choice for powering an ESP32 from a lithium cell.
    • The current is small: from 5 V to 3.3 V at 50 mA, the heat = 1.7 × 0.05 = 0.085 W. Nothing.
    • The circuit is noise-sensitive: audio, a precision ADC, or sensors with millivolt-level signals.
    • Cost and space: a 3-pin regulator and two capacitors, versus a chip, an inductor, a diode and capacitors.

    The practical rule: calculate the power dissipated = (Vin − Vout) × I. If it's under about half a watt and the voltage difference isn't large, a linear regulator is comfortable. If it's more than 1–2 W, or the circuit is on a battery with a big difference, go for a buck. The linear regulator heat calculator tells you whether you'll need a heatsink.

    How does a buck work?

    Instead of throwing the excess voltage away as heat, a buck switches a MOSFET on and off very fast, hundreds of thousands of times per second:

    1. Switch ON: current flows from the input through the inductor to the load, and the inductor stores energy in its magnetic field.
    2. Switch OFF: the inductor refuses to let its current stop suddenly, so it keeps pushing current to the load through the diode (or a second transistor in a synchronous buck).
    3. The output capacitor smooths the small ripple that results.
    In ON the current comes from the input and the inductor charges; in OFF the inductor keeps the current flowing through the diode
    In ON the current comes from the input and the inductor charges; in OFF the inductor keeps the current flowing through the diode

    The output voltage is set by the duty cycle: the fraction of each cycle the switch is on.

    The equations

    Buck

    D  ≈ Vout ÷ (Vin × η)
    ΔI = ripple ratio × Iout      (typically 20%–40%)
    L  = (Vin − Vout) × D ÷ (f × ΔI)
    C  = ΔI ÷ (8 × f × ΔVout)

    η is the efficiency (say 0.9), and f is the switching frequency.

    Example: 12 V to 5 V, 2 A, 500 kHz, 30% current ripple, 50 mV voltage ripple:

    • D ≈ 5 ÷ (12 × 0.9) ≈ 46%
    • ΔI = 0.3 × 2 = 0.6 A
    • L = (12 − 5) × 0.46 ÷ (500000 × 0.6) ≈ 10.8 µH → a 10 or 15 µH inductor
    • Peak inductor current = 2 + 0.3 = 2.3 A

    Boost

    D  = 1 − (Vin × η) ÷ Vout
    IL = Iout ÷ (1 − D)
    L  = Vin × D ÷ (f × ΔI)
    C  = Iout × D ÷ (f × ΔVout)

    Example: a 3.7 V battery to 5 V, 1 A, 1 MHz:

    • D ≈ 1 − (3.7 × 0.9) ÷ 5 ≈ 33%
    • Inductor current ≈ 1 ÷ 0.67 ≈ 1.5 A (so the battery supplies more current than the load draws!)
    • L ≈ 2.7 µH → a 3.3 µH inductor

    Choosing the inductor: what matters after its value

    • Saturation current (Isat): must be above the peak inductor current (IL + ΔI ÷ 2) with margin. If the inductor saturates, its inductance collapses and the current shoots up.
    • Resistance (DCR): the lower it is, the higher the efficiency and the cooler the inductor.
    • Shielded inductor: reduces noise on the rest of the circuit.

    Ready-made modules

    ModuleTypeNotes
    LM2596BuckThe most common and cheapest, input up to 40 V, practically about 2 A continuous without extra cooling
    MP1584BuckVery small, input up to about 28 V, suitable for about 2 A
    XL4015BuckFor higher currents (about 4–5 A), with a heatsink
    MT3608BoostSmall and cheap, suitable for small to medium currents
    XL6009BoostStronger than the MT3608 for bigger loads

    The figures in listings are usually the chip's momentary limits, not what the module can deliver all day without overheating. Take half the stated figure as a safe starting point. Practical details for each type are in the LM2596 module article and the boost converter modules article.

    What if the voltage crosses above and below?

    A lithium cell goes from 4.2 V to 3 V, and you want a steady 3.3 V: a buck alone won't work once the battery drops below 3.3 V, and a boost alone won't work while it's above. Here you need a buck-boost or SEPIC, or simply an LDO with a small dropout, accepting that the last bit of the battery won't be used.

    Noise: the price you pay

    Buck and boost converters chop the current hundreds of thousands of times per second, and that chopping shows up as:

    • Output ripple of tens of millivolts, which can show in ADC readings or as a whine in audio circuits.
    • Noise that travels along wires and through the air to the rest of the circuit.

    Solutions: ceramic capacitors right at the output (alongside the electrolytic), a small LC filter (a simple inductor and capacitor) after the module, or an LDO after it for the sensitive part. Causes are explained in detail in the EMI noise article.

    Mistakes that burn circuits

    • Adjusting the voltage with the load connected: many modules come out at maximum voltage when new. Set the potentiometer with a multimeter with no load first, then connect.
    • Reverse polarity: most cheap modules have no protection, and reversing the input for a second destroys the chip. Read about reverse polarity protection.
    • Input current in a boost: it's much higher than the output current. A cheap battery holder or thin wire can heat up or drop the voltage.
    • When a buck fails: its internal transistor may fail short, so the output equals the input voltage. If the load is expensive (such as an ESP32 on a 12 V input), a zener or TVS on the output plus a fuse protects it. See the zener diode article.

    Design tips

    • On the PCB: keep the loop containing the switch, the diode and the input capacitor as small as possible. The current in it is chopped fast, and any extra area turns into an antenna radiating noise. And check the trace width for high currents.
    • Ready-made modules (like the LM2596 or MP1584 for buck, and MT3608 for boost) are an excellent solution for projects, but check the real current they can handle, not the advertised figure.
    • If the voltage must be very clean (for audio or sensitive ADC circuits), you can put a low-dropout linear regulator after the buck: good efficiency and a clean output.

    Calculate it in a second

    The buck and boost calculator works out the duty cycle, inductor and capacitor values, peak inductor current and input current, for both types.

    Circuits Nerd
    © 2026 Circuits Nerd. All rights reserved.