LearnTronics
LED Fade-Off
Recipe #24 — led fade-off
A large capacitor can make stored electrical energy visible. Charge it, remove the charging command, and let the capacitor keep a transistor conducting while its voltage slowly decays.
Press: the button charges C1 and turns Q1 on. Release: C1 keeps supplying base current for a while, then its voltage falls and the LED fades.
The capacitor is a temporary energy store
C1 stores charge while the button is pressed. After the charging path is opened, that stored charge has only the discharge path through RB and the transistor base, so the voltage falls gradually instead of instantly.
VC(t) = V0 e−t/RC
The fade is not perfectly linear
Exponential capacitor discharge, transistor base-emitter behavior, and LED brightness perception all make the visible fade non-linear. That is useful here: the circuit lets the eye see an RC transient directly.