Home / Learn Chip Programming / Power Supplies: Linear and Switching Regulators

Power Supplies: Linear and Switching Regulators

Every chip needs stable power. Learn how an LDO and a buck converter differ and how to pick one.

In shortEvery chip needs stable power. Learn how an LDO and a buck converter differ and how to pick one.

Theory in plain words

LDO vs buck converterLinear (LDO), e.g. AMS1117Simple, quiet, cheapEfficiency = Vout / VinHeat = (Vin - Vout) x IGood for small current or small voltage dropBuck converter, e.g. LM2596, MP1584Efficient 85 to 95 percentNeeds inductor and layout careLittle heatGood for large drop or current
LDO vs buck converter

What it is

A linear regulator (LDO) burns the extra voltage as heat. A switching regulator (buck/boost) chops the input and uses an inductor, wasting much less.

Why we use it

A bad supply causes random resets, noisy ADC readings and burnt boards. Heat in a linear regulator is the number one hidden problem.

How it works

Linear: Pdiss = (Vin - Vout) x I. Switching efficiency is often 85 to 95 percent. Add input and output capacitors as the datasheet says and keep the loop short.

Where it is used

  • Powering 3.3 V chips from 5 V, 9 V or 12 V
  • Battery powered devices
  • USB power (5 V) input protection

Heat calculator

LDO vs buck: how much heat?Try it Yourself

From 12 V to 3.3 V at 300 mA an LDO wastes 2.6 W, enough to burn your finger. A buck converter wastes about 0.1 W.

Typical supply chain

SourceVoltageNotes
USB5 V, 0.5 to 3 Aadd a polyfuse and a TVS diode
Li-ion / LiPo3.0 to 4.2 Vneeds a charger chip and protection
AA x 33.0 to 4.5 Vworks with 3.3 V LDO or boost
12 V adapter12 Vuse a buck to 5 V then LDO for clean 3.3 V
Solar + batteryvariesMPPT charger, boost or buck
Careful:Never take a motor or servo supply from the same regulator as the microcontroller without a big capacitor and good ground routing. Motor current spikes cause resets and noisy analog readings.

Quick quiz

1. Heat in an LDO from 12 V to 3.3 V at 0.5 A?

2. Which regulator wastes less power for a big voltage drop?

Common questions

Heat in an LDO from 12 V to 3.3 V at 0.5 A?

4.35 W. (12 - 3.3) x 0.5 = 4.35 W.

Which regulator wastes less power for a big voltage drop?

Buck converter. A buck converter is much more efficient.