Power & Energy
Build a battery LED camp lamp with a fade-out
To build a battery LED camp lamp, chain four 1.5 V cells into a 6 V pack, run each white LED through its own 150 Ω resistor, and put a big capacitor across the lamps. The resistors hold each LED at about 20 mA; the capacitor keeps the light glowing for a few seconds after the switch opens, fading out instead of snapping off.
Parts
- Four AA cells in a holder, wired in series: 6 V
- A switch, S1
- Two white LEDs, D1 and D2
- Two 150 Ω resistors, one per LED
- One 10,000 µF electrolytic capacitor, rated 10 V or more
Size the resistors
A white LED drops about 3 V and wants about 20 mA. The resistor takes the rest of the pack's voltage:
Real cells have a little resistance inside, about 3 Ω each here, so with both LEDs on the pack sags and each LED gets nearer 16 mA. That's fine: a few milliamps either way makes little difference to brightness.
Wire it
- Pack + to the switch.
- From the switch's far side, a 150 Ω resistor to each LED's anode.
- Both LED cathodes to the pack's −.
- The capacitor from the switch's far side to −, + pin on the switch side.
Live experiment
Test the lamp first
Four 1.5 V cells, a switch and two white LEDs. Pick the resistors and the capacitor, then test: switch on, off at 1 s. A 150 Ω resistor each with 10,000 µF passes every check. One shared resistor splits one current between both LEDs, no resistor overdrives them, and 1000 µF fades out too soon.
“Project: Camp lamp” is the project that ends Watt Harbour, Power & Energy World 1. Free with an account. Lessons unlock in order, so you’ll do the 6 before it first.
One resistor each, not one shared
A single 150 Ω resistor feeding both LEDs sets one current, 20 mA in total, and the two LEDs share it: about 10 mA each, and unevenly if their forward voltages differ. The LED with the slightly lower voltage takes more and glows brighter. One resistor per LED gives each its own current.
The fade
While S1 is closed, the capacitor charges to the pack's voltage. Open S1 and it becomes the lamp's battery, draining through the resistors and LEDs. As its voltage falls toward the LEDs' 3 V the current shrinks and the light fades. With 10,000 µF the glow lasts about three seconds; with 1000 µF, a tenth of the charge, it's gone in a blink. A bigger capacitor, or bigger resistors, makes the fade longer.
Free lesson
Now build it yourself
Each lesson comes in three short parts: see the idea, try it on a live board, then build it yourself, with quick checks as you go.
“Project: Camp lamp” is the project that ends Watt Harbour, Power & Energy World 1. Free with an account. Lessons unlock in order, so you’ll do the 6 before it first.
Or start from the very first lesson, no account neededPractice questions
Three quick questions from the lessons. Pick an answer to check it.
Show the answer
Answer: About 10 mA: they share the 20. One resistor sets one current, 20 mA, and the two LEDs split it, unevenly if they don't match. A resistor per LED gives each its own 20.
- Why not “Nothing”? Current still flows through the shared resistor and splits between the LEDs, so both light, dimly.
- Why not “20 mA each”? One 150 Ω resistor sets one current of about 20 mA in total, and the two LEDs have to share it.
- Why not “40 mA each”? Nothing raises the current. The single resistor still limits the total to about 20 mA.
Show the answer
Answer: The switch side, where the voltage is higher. Polarised capacitors have a + and a − and must be charged the right way round. + goes to the higher voltage: the switch side.
- Why not “Either way”? A polarised capacitor must sit with its + pin at the higher voltage. Only unpolarised capacitors go either way.
- Why not “The battery's −”? The − pin goes to the battery's −, the lower voltage. Reversed, a polarised capacitor can fail.
- Why not “The LED's cathode”? The LED's cathode is on the pack's −, the low side. The + pin belongs on the high side, by the switch.
Show the answer
Answer: Use a bigger capacitor. The glow lasts about R × C. A bigger C holds more charge and drains more slowly through the same R.
- Why not “Use a smaller resistor”? A smaller resistor lets the charge drain faster, so the glow ends sooner.
- Why not “Use a smaller capacitor”? A smaller capacitor stores less charge, so the glow fades sooner.
- Why not “Close the switch faster”? How quickly the switch moves makes no difference. The fade depends on how much charge is stored and how fast it drains.
“Project: Camp lamp” is the project that ends Watt Harbour, Power & Energy World 1. Free with an account. Lessons unlock in order, so you’ll do the 6 before it first.
Questions people ask
What resistor do I need for a white LED on 6 V?
Subtract the LED's forward voltage, about 3 V for white, from the supply and divide by the current you want: (6 − 3) ÷ 0.02 A = 150 Ω. Use the next standard value up if yours isn't stocked, and check the forward voltage on the LED's datasheet.
Can two LEDs share one resistor?
Not well. One resistor sets one current, and the LEDs split it, unevenly if their forward voltages differ slightly, so one glows brighter and can take most of it. Give each LED its own resistor and each gets its own 20 mA.
How long will the lamp run on AA cells?
Two LEDs at 20 mA draw about 40 mA. Alkaline AAs hold roughly 2000 mAh at that current, so about 50 hours, dimming as the cells sag. The cells are in series, so their capacity doesn't add, only their voltage.
Related topics
- Batteries in series vs parallelChain cells for more volts, put them side by side for more hours, and never mix a tired one with a fresh one.
- Energy stored in a capacitorE = ½ × C × V²: how many joules a capacitor holds, why voltage counts double, and how much you can use.
- How does a diode work?A one-way valve for current: anode, cathode, the 0.7 V forward drop and Schottky diodes.
- RC time constant explainedτ = R × C: how long a capacitor takes to charge through a resistor, and the 63% rule.