Decoupling Capacitors Explained: Why One Made Ben Eater's Breadboard Clock Oscillate

User Avatar Aswinth Raj
Author
Share
Ben Eater's Breadboard Clock Oscillating With Capacitor

Every datasheet tells you to put a 0.1 uF capacitor next to each chip, so it feels like a law of nature that more decoupling means a quieter supply. Ben Eater's new video, Why do decoupling capacitors make it worse?, published on 25 November and past 80,000 views within a day, shows a case where the opposite happened. A supporter building his breadboard digital clock reported that adding a decoupling capacitor to any power rail except the bottom one made the 5 V supply oscillate by about 700 mV at roughly 900 kHz, enough to upset the clock. Ben reproduced it: on his scope, adding the capacitor produced about half a volt of ringing at around 1 MHz.

What a decoupling capacitor actually does

A logic chip draws current in short, sharp bursts every time it switches. The wires and breadboard rails between the chip and the regulator have resistance and, more importantly, inductance, so the supply cannot respond instantly and the voltage at the chip dips. A small capacitor placed right at the chip's power pins acts as a local energy reservoir that supplies those bursts, so the rail stays flat. That is why it belongs on the pins of each chip, not scattered somewhere along the rail.

Why it can make things worse

A capacitor resists changes in voltage, while an inductor resists changes in current. Put the two together and energy sloshes back and forth between them, forming an LC tank that resonates at f = 1 / (2 x pi x sqrt(L x C)). Working backwards from a 0.1 uF capacitor and a 1 MHz oscillation gives about 253 nH of inductance. Ordinary hookup wire is around 10 to 15 nH per centimetre, so only about 20 cm of wire or rail loop is enough to build an accidental 1 MHz oscillator around a single decoupling capacitor.

Ben traced the culprit to the 7805 regulator's ground. The regulator's 5 V output is measured against its ground pin, and that pin reached the big filter capacitor through a long loop of breadboard rails. Moving the regulator ground to connect directly to the rectifier's negative output and the main filter capacitor shortened the loop, and after that, adding decoupling capacitors anywhere on the board left the clock stable.

What to take away for your own boards

Keep the loop from the regulator, through its ground, to the bulk capacitor as short and direct as possible. Put decoupling capacitors at each chip's power pins, not at random points on the rail. Avoid power and ground paths that form large loops, and if a rail rings after adding capacitance, suspect the wiring inductance before you blame the part. On a PCB, solid ground planes and short via connections do the same job. For the theory behind LC resonance, see our tutorial on RC, RL and RLC circuits.

Image credit: Ben Eater, frame from the YouTube video, cropped and resized.

About the author: Aswinth Raj is an electronics engineer and the editor of CircuitDigest, where he has published more than 150 hands-on projects and tutorials across Arduino, PIC, ESP32, Raspberry Pi and EV battery systems. He selects the stories on this page for what engineers and makers can actually learn or build from. Connect on LinkedIn

Have any question related to this Article?

Add a comment

No account needed. Your comment appears once a moderator has reviewed it.

Never shown publicly.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.