Sub topic 9
Input and output capacitors for stable regulation
This chapter assumes you know how a linear regulator drops voltage and turns the difference into heat. It also assumes you can read a datasheet's electrical characteristics table and place parts on a breadboard or perfboard. Regulators need capacitors to work properly. Without them, a regulator that looks fine on paper can oscillate, reset your board, or output a noisy rail.
What the capacitors do
A regulator controls its output with a feedback loop. The loop takes time to react, and the wires between the battery and the regulator have inductance and resistance. Capacitors cover both gaps.
- Input capacitor: supplies the regulator's fast current demands locally, so the battery and its leads don't have to. It also keeps the regulator's input voltage steady, so the loop is not disturbed by ripple or ringing on long wires.
- Output capacitor: supplies current to the load during the instant before the regulator loop responds. In many linear regulators it also sets the loop's stability, because its value and its equivalent series resistance (ESR) shape the feedback response.
ESR is the small resistance every real capacitor has in series with its capacitance. A capacitor behaves like an ideal capacitor plus a small resistor, and that resistor matters in regulator circuits.
Follow the datasheet first
Every regulator datasheet lists the capacitor values it was designed and tested with. Treat those as requirements, not suggestions. Typical examples:
- A classic 7805 asks for about 0.33 µF on the input if the regulator is far from the supply filter, and 0.1 µF on the output.
- The AMS1117 family asks for at least 10 µF to 22 µF on the output, and older versions expect a tantalum capacitor with some ESR.
- A modern LDO such as the MCP1700 is designed for a 1 µF ceramic capacitor on both sides.
The ESR point is the most common trap. Older LDOs, including the LM2940 and some AMS1117 parts, need the output capacitor's ESR to fall inside a window. A very low-ESR ceramic capacitor can push those regulators into oscillation. Many newer LDOs are designed to be stable with ceramics. Check whether your part says "ceramic stable" or lists an ESR range.
Choosing capacitor types
| Type | Strengths | Weaknesses | Typical use |
|---|---|---|---|
| Ceramic (X5R, X7R) | Very low ESR, small, cheap, good at high frequency | Capacitance drops under DC bias, microphonic, can oscillate with older LDOs | Bypass, modern LDOs, switching converters |
| Aluminum electrolytic | Large values, cheap | Higher ESR, wears out, poor in the cold, large | Bulk capacitance, input filtering |
| Tantalum | Stable value, moderate ESR | Can fail short, sensitive to inrush, needs voltage margin | Older LDOs that require ESR |
| Polymer | Low ESR, long life | More expensive | Switching converter outputs |
Avoid Y5V and Z5U ceramics for power rails. Their capacitance can fall by more than half with temperature and bias.
Ceramic DC bias derating
A ceramic capacitor's real capacitance shrinks as the voltage across it rises. A 10 µF X5R part rated 6.3 V in a small package can drop to 3 to 5 µF at 5 V. To compensate:
- Pick a voltage rating at least twice the rail voltage.
- Use a larger package, because bias loss is worse in small packages.
- Read the manufacturer's DC bias curve, not just the nominal value.
- If the datasheet sets a minimum capacitance, size to the effective value.
Estimating the droop
When the load current jumps, the output capacitor supplies the difference until the regulator catches up. A first estimate of the voltage dip is:
ΔV ≈ ΔI × ESR + ΔI × t / C
Here ΔI is the current step, t is the regulator's response time, and C is the effective capacitance. The first term is the immediate drop across the ESR. The second is the capacitor discharging while it waits for the loop.
def droop_v(step_a, response_s, cap_f, esr_ohm):
"""Rough output dip after a load step, before the regulator catches up."""
return step_a * esr_ohm + step_a * response_s / cap_f
# 100 mA step, 10 microsecond response, 50 milliohm ESR
print(f"10 uF nominal: {droop_v(0.100, 10e-6, 10e-6, 0.05):.3f} V")
print(f"4 uF effective: {droop_v(0.100, 10e-6, 4e-6, 0.05):.3f} V")The first line prints 0.105 V and the second prints 0.255 V. The same capacitor loses most of its protection once bias derating cuts it from 10 µF to 4 µF. Treat the result as an upper-bound sketch. A real regulator limits the dip, and the actual response time comes from the datasheet's load transient plots.
This matters for radio modules. An ESP8266 or ESP32 can pull 300 mA or more in short bursts when it transmits. A rail with too little capacitance will dip, and the chip may brown out and reset even though the battery is fine.
Input capacitor details
The input capacitor does more than keep the regulator happy.
- Battery lead inductance: a pair of 20 cm jumper wires has enough inductance to cause voltage spikes when current changes quickly. The input capacitor absorbs them.
- Battery internal resistance: an aged or cold battery has high internal resistance, so its voltage sags when the load steps up. A local capacitor reduces how much of that sag reaches the regulator.
- Switching regulators: a buck converter draws current from its input in pulses. The input capacitor must supply those pulses and handle the ripple current, so the datasheet often specifies a minimum value, a ceramic type, and a maximum distance from the pins.
- Hot-plugging: connecting a battery to a ceramic-capacitor input can cause a voltage overshoot. The cable inductance and the capacitor form a resonant circuit that can ring to nearly twice the supply voltage. A small amount of ESR, such as an electrolytic in parallel, damps it. This matters most with higher-voltage packs near the regulator's absolute maximum input rating.
Output capacitor details
For a linear regulator, follow the datasheet's minimum capacitance and ESR range. A larger value usually improves transient response, but there are two limits to know.
- Some LDOs become unstable if the output capacitance is too large, because it moves the loop's pole. The datasheet lists a maximum.
- A very large output capacitor increases inrush current at startup and slows the output ramp. This can trip a battery protection circuit or a current limit.
For switching regulators, the output capacitor and inductor set the ripple voltage and loop stability. Use the values from the datasheet's application circuit unless you can run the loop calculations. Changing an output capacitor on a converter board by a large factor can make it unstable.
Placement and layout
Capacitors only work if the path to them is short.
- Put the input capacitor within a centimeter of the regulator's input and ground pins.
- Put the output capacitor equally close to the output pin.
- Connect the ground legs of both capacitors and the regulator to the same ground point, with short, wide traces.
- Add a 100 nF ceramic bypass capacitor at each IC's power pin, as close as possible, and a larger bulk capacitor (10 µF to 100 µF) near the loads that pull bursts of current.
On a breadboard, the long strips and jumper wires add inductance. A circuit that is stable on a PCB may misbehave on a breadboard. Keep the capacitor leads short and plug them directly into the same rows as the regulator pins.
Common errors
- Omitting the capacitors because the board "worked on the bench" at low load.
- Using a ceramic output capacitor on an LDO that requires ESR, which causes high-frequency oscillation that a multimeter will not show.
- Ignoring DC bias, so the effective capacitance is far below what the datasheet requires.
- Placing capacitors far from the pins, which cancels most of their benefit.
- Using only the bulk capacitor and forgetting the 100 nF bypass at the chip, which handles the fast edges the bulk part is too slow to supply.
Exercise
A 3.3 V LDO's datasheet requires at least 4.7 µF effective output capacitance. You fit a 4.7 µF X5R ceramic rated at 6.3 V, and the manufacturer's curve shows it loses about 50% of its capacitance at 3.3 V. Does the design meet the requirement? What would you change?
Show answer
No. The effective capacitance is about 2.35 µF, below the 4.7 µF minimum. Choose a larger value, such as 10 µF, so that roughly 5 µF remains after derating, or move to a larger package or a higher voltage rating with less bias loss. Check the datasheet's maximum capacitance and ESR range as well.
Exercise
A load steps by 200 mA. The regulator responds in 20 µs, the output capacitor has an effective value of 10 µF, and its ESR is 20 milliohms. Estimate the dip using ΔV ≈ ΔI × ESR + ΔI × t / C.
Show answer
The ESR term is 0.2 A × 0.02 Ω = 0.004 V. The discharge term is 0.2 A × 20 µs / 10 µF = 0.4 V. The total is about 0.404 V. Doubling the effective capacitance would cut the discharge term to 0.2 V.