5. Capacitor: a soft fade-out
Step 5 of the automatic light: C1 1000 µF across the supply after the switch. Switch off and the LED fades over a second or so instead of snapping off: C1 empties through VR1, R1 and the LED. Component 5 of 14: the capacitor. A capacitor stores charge: Q = C·V. Across a supply it fills up, and when the supply goes away it gives the charge back. The bigger C and the larger the resistance it discharges through, the slower (time constant τ = R·C).

Build it in the labGuided build, test sheet and fault finding, free in your browser.
Parts list
Test procedure
Each test has an expected value and a pass range, like a factory test sheet:
- LED still glowing 0.2 s after switch-off
- C1 charged to the supply
How it works
The capacitor. A capacitor stores charge: Q = C·V. Across a supply it fills up, and when the supply goes away it gives the charge back. The bigger C and the larger the resistance it discharges through, the slower (time constant τ = R·C).
Reading it. Electrolytics are polarised: the stripe marks −, and they must see less than their rated voltage (pick about 1.5× the working voltage). Value and voltage are printed: 1000 µF 25 V. Ceramics are tiny, not polarised, coded 104 = 100 nF.
Testing it. A capacitance meter, or on Ω watch the reading climb as it charges. Discharge big ones before touching or measuring. A bulging top or a leaking base means replace it.
In the build. C1 1000 µF across the supply after the switch. Switch off and the LED fades over a second or so instead of snapping off: C1 empties through VR1, R1 and the LED.
Builds on lesson 4: everything from before is still there.
Next: lesson 6, ldr (photoresistor).
Things to try
- Switch SW1 off and watch the fade on the scope (put a probe on C1 +).
- Set C1 to 100 µF: the fade is ten times shorter.
Background
One circuit, built up one part at a time: by lesson 14 it is a solar-powered, dusk-sensing, motion-triggered timed lamp with an alarm.