Night-Light
A light that turns on automatically when the room gets dark.
What you’ll learn
- What an LDR (light-dependent resistor) does.
- How a sensor changes a circuit’s behaviour without you touching it.
- A gentle introduction to threshold-style automation.
What you need
| Item✓ | Qty | ~Cost | Where to buy | |
|---|---|---|---|---|
| 9V battery + snap clip | 9V battery + snap clip | 1 | GHS 23.00 | Any supermarket or hardware store. |
| 220 Ω resistor | 220 Ω resistor Look for red-red-brown stripes. | 1 | GHS 0.75 | Electronics shop or online (Amazon, Adafruit). Look for red-red-brown stripes. |
| Red 5 mm LED | Red 5 mm LED Any colour works; red is brightest. | 1 | GHS 1.50 | Electronics shop or online. Any colour works; red is brightest. |
| Half-size breadboard | Half-size breadboard | 1 | GHS 23.00 | Online (Amazon, Adafruit, AliExpress). |
| Jumper wires | Jumper wires | 4 | GHS 30.00 | Online — usually sold in packs of 30. |
| LDR / photoresistor | LDR / photoresistor | 1 | GHS 7.50 | Online — search "GL5528 photoresistor". |
| 10 kΩ resistor | 10 kΩ resistor Brown-black-orange stripes. | 1 | GHS 0.75 | Electronics shop or online. Brown-black-orange stripes. |
| TotalTotal | ~GHS 86.50 | |||
Build it step by step
Build the basic LED loop
Battery, 220 Ω resistor, LED. Same as Project 1.
Drop the LDR in series
Insert the LDR between the + rail and the 220 Ω resistor. In bright light it’s low resistance; in the dark it’s high.
Test in light
Snap on the battery. In a bright room the LED glows dimly — the LDR isn’t adding much resistance.
Cover the LDR
Cup your hand over it. The LED brightens noticeably as the LDR’s resistance drops away.
Hmm — backwards?
Right — this simple version brightens in light. To flip it, you need a transistor switch or comparator. Try Project 9 once you’re ready.
How it works
An LDR is a resistor whose value changes with light. In a dark room it can hit 1 MΩ; in bright sunlight it drops to a few hundred ohms. Wired in series with an LED, more light = lower resistance = more current = brighter LED. To make it work the other way (LED brightens in the dark), you add a transistor or comparator that flips the signal — the next-tier projects show how.
If something’s not working
LED is always on, never changes
- · LDR is wired in parallel instead of series — current flows around it.
No change between dark and light
- · LDR is shaded by your hand even in "bright" mode. Test with a flashlight beam vs covered.
Try this next
Swap the 220 Ω for a 100 Ω resistor — see how that changes the brightness range.
Tape a piece of clear plastic over the LDR. Does it still respond?