Back to projects
Tier 2 · Timer MagicmediumAge 10+50 min

Light-Triggered Alarm

When a beam of light hits the sensor, the buzzer screams.

What you’ll learn

  • Using an LDR as a switch input.
  • Threshold-based triggering — the 555 fires only above a certain light level.
  • How a small sensor change drives a big audible reaction.

What you need

ItemQty~CostWhere to buy
9V battery + snap clip1GHS 23.00
Any supermarket or hardware store.
220 Ω resistor1GHS 0.75
Electronics shop or online (Amazon, Adafruit).
Look for red-red-brown stripes.
Red 5 mm LED1GHS 1.50
Electronics shop or online.
Any colour works; red is brightest.
Half-size breadboard1GHS 23.00
Online (Amazon, Adafruit, AliExpress).
Jumper wires4GHS 30.00
Online — usually sold in packs of 30.
555 timer IC (NE555 / TLC555)1GHS 7.50
Electronics shop or online.
Bargain even by the bag of 10.
10 kΩ resistor1GHS 0.75
Electronics shop or online.
Brown-black-orange.
100 kΩ resistor1GHS 0.75
Electronics shop or online.
Brown-black-yellow.
10 µF capacitor (electrolytic)1GHS 1.50
Electronics shop or online.
100 nF capacitor (ceramic)1GHS 0.75
Electronics shop or online.
LDR / photoresistor1GHS 7.50
Online.
Piezo buzzer (passive)1GHS 15.00
Online.
Total~GHS 112.00

Build it step by step

  1. Astable 555 from Project 6

    Same circuit, audio-rate (R = 10 k + 47 k, C = 100 nF). Output drives the buzzer.

  2. Hook the LDR to pin 4

    LDR between + rail and pin 4 (reset). 47 kΩ between pin 4 and −. In the dark, pin 4 stays low → chip is held in reset → silent.

  3. Shine a flashlight on the LDR

    Resistance drops, pin 4 rises above ~1 V, the 555 starts oscillating, the buzzer screams.

How it works

Pin 4 of the 555 is the "reset" pin — when it’s pulled low, the chip is forced silent regardless of what the rest of the circuit is doing. We use the LDR + 47 kΩ as a voltage divider that keeps pin 4 low in the dark and high in the light. Cross the threshold, the chip wakes up, the buzzer beeps.

If something’s not working

Buzzer never goes off
  • · LDR is wired in parallel with the divider, not in series.
  • · Pin 4 isn’t pulled to + when the LDR is lit — try a 22 kΩ pull-down instead.
Buzzer screams all the time
  • · Pin 4 is wired straight to + — there’s nothing to gate it.

Try this next

Flip the divider so the alarm fires in the dark instead.

Add an LED in parallel with the buzzer — visual + audible alarm.