Decoupling Capacitor Placement: Values, Loop Inductance and Layout
A microcontroller does not draw a smooth current. Each clock edge switches thousands of transistors at once, producing short current spikes lasting nanoseconds. The regulator that supplies the rail is too far away and too slow to respond, and the tracks between them have inductance that resists sudden changes in current. The result is voltage dips and ringing on the supply pins, which can cause resets, ADC noise and radiated interference.
Decoupling capacitors are small local energy stores that supply these spikes. Their value matters, but their placement and connection matter even more. This article explains both, with numbers you can check.
Why Inductance Is the Enemy
The voltage across an inductance is proportional to how fast the current changes. Even a small inductance gives a large voltage when the change is fast.
V = L x di/dt Example: a 50 mA current step in 2 ns through 10 nH V = 10e-9 x (0.05 / 2e-9) = 10e-9 x 25e6 = 0.25 V of supply noise
A common rule of thumb is that a thin PCB track has roughly 1 nH of inductance per millimetre. So 10 mm of track between a capacitor and an IC pin already adds about 10 nH, and the example above shows what that does. The capacitor must be electrically close, which means a short, wide connection with a small loop area, not just physically nearby.
Choosing Values
A real capacitor is a capacitance in series with a small inductance (ESL) and resistance (ESR). Above its self-resonant frequency it behaves as an inductor and stops decoupling.
f_SR = 1 / (2 x pi x sqrt(L x C))
100 nF with 1 nH total inductance:
f_SR = 1 / (2 x pi x sqrt(1e-9 x 100e-9))
= 1 / (2 x pi x 1e-8)
= about 15.9 MHz
The same capacitor mounted with 5 nH of track and via:
f_SR = 1 / (2 x pi x sqrt(5e-9 x 100e-9))
= about 7.1 MHzNotice that poor mounting lowered the useful frequency range by more than half. Track length can cost you more than any choice of capacitor value. In practice, a combination of values is used.
Package size matters too. A smaller package such as 0402 has a shorter current path inside the part than a 1206, so its own inductance is lower, and it fits closer to the IC pin. That is why modern boards use 0402 or 0603 for local decoupling even when a larger part would be easier to solder. Another trap is DC bias: the effective capacitance of a ceramic capacitor falls as the applied voltage approaches its rating, and the effect is stronger in small packages. Check the manufacturer's DC bias curve, and choose a voltage rating comfortably above the rail, for example a 10 V or 16 V part on a 3.3 V supply.
| Capacitor | Typical value and type | Job |
|---|---|---|
| Local decoupling | 100 nF X7R ceramic, 0402 or 0603, one per supply pin | Supplies fast edge currents |
| Bulk per IC or per rail | 1 uF to 10 uF ceramic | Covers slower load changes |
| Board bulk | 10 uF to 100 uF ceramic, tantalum or electrolytic near regulator | Handles low frequency demand and input transients |
| Analog supply filter | Ferrite bead plus 100 nF and 1 uF on VDDA | Keeps digital noise out of the ADC reference |
Placement and Connection Rules
- Place each 100 nF capacitor as close as possible to its supply pin, on the same side of the board as the IC.
- Route the supply from the source to the capacitor pad first, then to the IC pin, so the capacitor sits in the current path.
- Connect the capacitor's ground pad to the ground plane with a via placed right at the pad, not at the end of a long track.
- Use short, wide tracks between capacitor and pin; 0.3 mm or wider rather than minimum width.
- Keep the loop formed by IC power pin, capacitor and ground pin as small as possible. This loop area, not the distance alone, sets the inductance.
- Put the smallest value capacitor closest to the pin, and larger bulk capacitors slightly further away.
Good: Poor: VDD pin ---[C]--- via to GND VDD pin -----------------+ | | | IC IC [C] | | | GND pin --- via to GND GND pin --- long track --+
On a two-layer board where the bottom is a ground plane, the ideal footprint is a capacitor whose ground pad drops straight to the plane through a via, and whose supply pad connects to the IC pin with a track just a couple of millimetres long.
Doing It in KiCad
- Draw each decoupling capacitor next to its IC in the schematic so the association is clear in layout.
- After Update PCB from Schematic, select the IC in the schematic to highlight its capacitors in the PCB Editor, then place them immediately, before other parts.
- Start a track from the capacitor's ground pad and press V while routing to drop a via right at the pad onto the ground plane.
- Use the Measure tool (Ctrl+Shift+M) to check that no 100 nF capacitor is more than a few millimetres from the pin it serves.
Common Mistakes
- Placing all capacitors in a neat row beside the IC, far from the pins they serve.
- Sharing one ground via between several capacitors with long tracks to each.
- Putting capacitors on the opposite side of the board without considering the extra via inductance.
- Using Y5V or Z5U dielectric parts, whose capacitance drops heavily with DC bias and temperature; prefer X5R or X7R.
- Forgetting the analog supply pins, which then inject digital noise into ADC readings.
Summary
Decoupling capacitors supply fast current spikes that the regulator cannot. Inductance in their connection, roughly 1 nH per millimetre of thin track, limits how well they work and lowers their self-resonant frequency. Use 100 nF per supply pin plus bulk capacitance per rail, place the small capacitors right at the pins, route power through the capacitor, and connect ground with a via at the pad. Small loops make quiet supplies.