Log #23 · Sep 27, 2026
Voltage Regulators Explained
Linear regulators, LDOs and buck and boost converters compared, with heat calculations and advice on choosing the right one for your supply.
Batteries rarely deliver exactly the voltage your electronics need. A 2S Li-ion pack gives 8.4 V when full and around 6 V when nearly empty, but your Arduino wants a steady 5 V and your ESP32 wants 3.3 V. A voltage regulator takes a varying input and produces a stable output. There are two families that work very differently, and picking the wrong one either wastes most of your battery or makes a regulator too hot to touch.
Linear regulators
A linear regulator works like a smart, automatically adjusting resistor in series with the load. It drops whatever voltage is needed to keep the output steady, and it turns that dropped voltage into heat.
Classic examples:
- 7805: 5 V output, up to about 1.5 A with a heatsink, needs at least about 7 V in.
- LM1117 / AMS1117-3.3: 3.3 V output, found on many boards.
The heat problem
The power wasted is simple to calculate:
heat (W) = (Vin − Vout) × current (A)
Powering a 5 V project drawing 300 mA from a 12 V supply:
(12 − 5) × 0.3 = 2.1 W of heat
A TO-220 package like the 7805 without a heatsink can shed only about 1 W before it gets dangerously hot. At 2.1 W it will overheat and shut down.
Efficiency is just as easy to estimate: Vout ÷ Vin. Here that is 5 ÷ 12 ≈ 42%. More than half the battery's energy becomes heat.
When linear is the right choice
- The input is only slightly above the output.
- The current is small, such as a sensor board drawing 20 mA.
- You need very clean, low-noise power, for example for precise analog measurements.
Dropout and LDOs
Every linear regulator needs the input to stay some amount above the output; that minimum difference is the dropout voltage. A 7805 needs about 2 V of headroom, so it stops regulating properly below roughly 7 V input.
A low-dropout regulator (LDO) needs much less, often 0.1 to 0.5 V. That matters with batteries. Powering a 3.3 V ESP32 from a single Li-ion cell, which ranges from 4.2 down to about 3.2 V, only works with a good LDO. The popular AMS1117, with around 1 V of dropout, would stop regulating once the cell falls below about 4.3 V; LDOs such as the HT7333 or MCP1700 handle it far better, as long as you respect their lower current limits.
Switching regulators
A switching regulator turns its input on and off hundreds of thousands of times per second and smooths the result with an inductor and capacitors. Because the switch is either fully on or fully off, very little energy is lost. Typical efficiency is 80–95%.
Buck converters (step down)
A buck converter lowers voltage. Modules based on the LM2596 or MP1584 are cheap and widely available. Many have a small adjustment screw: set the output with a multimeter before connecting your project.
Back to our example: 12 V to 5 V at 300 mA through a buck at 90% efficiency wastes only about 0.17 W. The module stays cool and the battery lasts far longer.
Boost converters (step up)
A boost converter raises voltage, for example from a single 3.7 V cell up to 5 V. The input current is higher than the output current, since power in must at least equal power out. Boosting 3.7 V to 5 V at 500 mA draws roughly 750 mA from the cell once you include losses.
Buck-boost
Buck-boost converters output a fixed voltage whether the input is above or below it. They are useful when a battery's range straddles the voltage you need.
Comparison
| Linear / LDO | Buck | Boost | |
|---|---|---|---|
| Direction | Down only | Down only | Up only |
| Efficiency | Vout ÷ Vin | 80–95% | 80–90% |
| Output noise | Very low | Some switching ripple | Some switching ripple |
| Cost and size | Tiny, cheap | Small module | Small module |
| Best for | Small currents, small drops, analog | Batteries to 5 V or 3.3 V | Single cell to 5 V |
Choosing in three questions
- Is the input higher than the output? If not, you need a boost or buck-boost.
- Is the difference large, or the current above about 100 mA? Use a buck converter.
- Is it a small drop at low current, or do you need clean analog power? A linear regulator or LDO is simpler and quieter.
The Arduino Uno's own regulator is linear, which is why feeding it 12 V while powering servos from its 5 V pin cooks it. The Arduino power guide shows how to combine a battery, a buck converter and the board safely, and the battery guide helps you pick the source.
— TheSolderBench · found a mistake? tell me