Decoupling capacitor
On this page
A tall building has a small water tank on its roof. When many taps open at once, the water comes from that tank, not from the town reservoir far away at the end of a long pipe. A decoupling capacitor is that tank for a chip: a small store of charge beside its power pin, which supplies the sudden pulses of current that the regulator is too far away to give in time.
See it
You can fit one capacitor to decouple a microcontroller. Which one keeps the supply at its pin steadier?
Each pulse is 50 mA in 5 ns. The pulse comes from the nearest store of charge: the capacitor, or the regulator when the capacitor is removed. The track is taken as about 1 nH for each millimetre, and the dip is that inductance times how fast the current changes.
The idea
A digital chip does not take a steady current. Each time its logic switches, it takes a pulse that rises in nanoseconds. Every wire and every copper track has inductance: it opposes a fast change of current. So when the pulse has to come along a track, the voltage at the pin falls for a moment:
Vdip is the fall at the pin, L the inductance of the track in henries, ΔI the size of the current pulse, Δt how fast it rises, in seconds
A capacitor beside the pin gives the pulse from its own charge, so the pulse does not travel along the long track. One pulse takes so little charge that a 100 nF capacitor falls by only 2.5 mV. Its distance from the pin decides the dip.
The rule of about 1 nH for each millimetre is rough: the real value depends on the width of the track and how close the ground is.
One worked number
A microcontroller on a 3.3 V supply takes a pulse of 50 mA that rises in 5 ns. Its decoupling capacitor is 10 mm of track away, about 10 nH. How far does the voltage at the pin dip? What if the capacitor is moved to 2 mm?
Show the worked solution, 3 steps
- How fast the current changes
ΔI ÷ Δt = 0.05 A ÷ 0.000000005 s = 10,000,000 A per second.
- The dip at 10 mm
Vdip = 0.000000010 H × 10,000,000 = 0.10 V. The pin falls to 3.20 V at each pulse.
- The dip at 2 mm
2 nH × 10,000,000 = 0.02 V, five times smaller. The figure opens at 10 mm: move the slider to 2 mm.
The mistake to avoid
A second trap: an electrolytic capacitor reacts too slowly for pulses of a few nanoseconds. Always put a ceramic capacitor beside the chip.
Check yourself
A chip takes a pulse of 100 mA that rises in 10 ns. Its nearest decoupling capacitor is 30 mm of track away, about 30 nH. How large is the dip?
A controller board resets now and then. Someone adds a 1,000 µF capacitor at the power input, and the resets continue. The chip has no capacitor at its own pins. What is the fix?
The pressure reading on a data logger jumps each time its radio sends. The pressure sensor itself is steady. What is the most likely cause?
Where you meet it
- Data loggers with a cellular modemThe modem takes bursts of up to about 2 A when it sends, so it needs a large capacitor beside it as well as the small ones.
- Energy metersThe measuring chip needs a quiet supply, or its readings move when the processor beside it switches.
- Controllers in pump and cold room panelsRandom resets when a relay operates are often a decoupling fault on the board.
- Sensor nodesThe processor, the radio and the sensor each have their own capacitor.
- A chip takes its current in very fast pulses, and a track opposes fast changes.
- The dip is the track inductance times how fast the current changes.
- A 100 nF ceramic capacitor at each pair of VCC and GND pins gives the pulse from beside the chip.
- Distance matters more than size.
Discussion
No comments yet. Questions, results from your own build, a better way to explain it: all welcome.
My notes on this page
Kept on this device only. Nothing is sent anywhere.
Tip: select words in the lesson, or tap a figure or an equation, to put a note right there.
Notes on earlier wording
The lesson has changed and these words are no longer in it. Your notes are kept, with the words you chose.