Level 3 · Sense · project 9 of 12 · 30 min · ●●●○○
Curfew Beeper
The Automatic Night Light's brain with a buzzer where the LED used to sit — beeps the moment the room goes dark, so you never miss sunset.
new here? Start with First Light — one battery, one resistor, one LED. It teaches the loop, LED direction, and why the 220 Ω resistor matters.
What you need
- 1× 3×AA battery pack (4.5 V) L1
- 1× Solderless breadboard L1
- 6× Jumper wires L1
- 1× Light sensor (LDR) the "eye" — sits on the BOTTOM of the divider (opposite of Cookie Jar Alarm)
- 1× 10 kΩ resistor top of the divider L1
- 1× 1 kΩ resistor protects the transistor base L1
- 1× NPN transistor (2N2222) flat face toward you: legs are E-B-C
- 1× Active buzzer (3–5 V) + leg toward the battery; no 220 Ω needed on this lane L2
you'll learn: Voltage dividers · Transistor switching · Ohm's law
Circuit map
The circuit you'll build, running on the Workbench right now — shown with the lights off.
simulating…
If it doesn't work
The boring ways this circuit actually breaks — check these first before you unwire everything.
- Buzzer stays silent even at dusk. Divider is upside down. In this project the LDR must sit on the BOTTOM (opposite of Cookie Jar Alarm). If it's on top, swap it with the 10 kΩ.
- Buzzer screams in daylight. You've built the Cookie Jar Alarm wiring. Swap the LDR and 10 kΩ so the LDR sits on the bottom.
- Doesn't switch at all. 2N2222 pins E-B-C, flat face toward you. Swap two and it won't switch. Then confirm the base 1 kΩ is between the divider midpoint and pin B.
- Buzzer very quiet. AA batteries low, or someone added a 220 Ω in the buzzer lane. Buzzers run raw — no series resistor.
- Triggers too early or too late for your evening. Your dusk brightness is different from the design's. Nudge the 10 kΩ up (later) or down (earlier), or graduate to Reading Light for a proper knob.
What you're building
Set it on the windowsill in the morning. It sits silent all day. The sun goes down. Beep. Time to come inside. That's it — a little curfew clock that runs on daylight.
By now you own all four ways to mix a sensor brain with an output mouth from what's already in your box. This project is the last of the four. Look at the grid:
| LED output | Buzzer output | |
|---|---|---|
| Dark triggers | Automatic Night Light | Curfew Beeper (this) |
| Bright triggers | Sunrise Alarm | Cookie Jar Alarm |
Every column is "same brain, different mouth." Every row is "same mouth, different brain." Four projects from two brains × two mouths. A small parts box can do a lot when you recombine the same pieces. This project finishes that set.
The big idea: same brain as Automatic Night Light
The sensing half is identical to the Automatic Night Light. Divider with 10 kΩ on top and the LDR on the bottom. When the room is bright, the LDR shrinks to about 1 kΩ, and the middle point sits low; when the room goes dark, the LDR balloons past 100 kΩ and the middle rushes up past the transistor's wake-up line.
- Bright room, LDR ≈ 1 kΩ: V_middle = 4.5 × (1 ÷ 11) ≈ 0.41 V. Well below the 0.7 V wake-up line. Transistor off, buzzer silent.
- Dark room, LDR ≈ 100 kΩ: V_middle tries to climb toward 4.5 × (100 ÷ 110) ≈ 4.1 V. The base clamps it at 0.7 V and drinks the extra push as current. Transistor on, hard.
If any of that is unfamiliar, go back to Automatic Night Light. This uses the same math, the same divider, and the same reasoning.
The new part: same mouth as Cookie Jar Alarm
Now the output. You've done the LED lane many times. Here you're using the buzzer lane, exactly as it lived in Cookie Jar Alarm — and for the same reason: the active buzzer already limits its own current at about 150 Ω-equivalent, so no 220 Ω is needed on this lane. The buzzer just hangs from the top rail down into the transistor's collector.
When the transistor is fully on, the buzzer sees 4.5 − 0.2 = 4.3 V (that 0.2 V is the transistor's saturation drop, V_CE(sat)). By Ohm's law:
I_buzzer = 4.3 V ÷ 150 Ω ≈ 29 mA
Comfortably inside the buzzer's 3–5 V happy zone, so it sounds normal — same volume as Door Buzzer and Cookie Jar Alarm.
Do the math (all together now)
For the dark-room case, working it top to bottom:
- Divider push after the base clamps: V_middle ≈ 1.0 V (the base drinks enough current to hold the middle just above 0.7 V — a classic saturation signature)
- Base current: (1.0 − 0.7) ÷ 1 kΩ = 0.3 mA
- With β ≈ 200, the transistor could push up to 60 mA through the collector. The buzzer only asks for ~29 mA. That's plenty of headroom, so the transistor saturates and the buzzer runs at full tone.
For the bright-room case:
- V_middle ≈ 0.4 V, below the 0.7 V wake-up
- Base current: essentially zero (a few µA of leakage)
- Buzzer current: essentially zero (the transistor is open like a broken switch)
Battery drain when it's quiet: microamps. You could leave this on the windowsill all week and barely dent the AAs — the alarm only sips power when it's actually firing.
Build it
If your Automatic Night Light is still standing on the breadboard, this is a 30-second swap: pull out the 220 Ω and the LED, drop the buzzer between the top rail and the transistor's collector, done.
Fresh build:
- Power rails: battery + to a top row, battery − to a bottom row.
- The sensing half (LDR on bottom): battery + → 10 kΩ → middle row → LDR → battery −.
- The base link: middle row → 1 kΩ → transistor Base (middle leg with the flat face toward you).
- The output half: battery + → buzzer + leg; buzzer − leg → transistor Collector (right leg). Emitter (left leg) → battery −.
- Point it at a lamp: silence. Cup your hands over the LDR: after a heartbeat, beeeep.
You'll hear the buzzer fade in as your hand closes over the sensor — same in-between region the Automatic Night Light introduced. Between transistor-off and transistor-fully-on, there's a mushy analog zone where the buzzer scratches before it commits to a tone. Level 6's 555-timer chips will turn that mush into a crisp snap; for now, hearing the transition is part of the lesson.
Deploy your curfew clock
- Put the whole breadboard on a west-facing windowsill (or east, if you want an alarm clock instead of a curfew). The LDR needs a clear view of the sky.
- Do a daytime test with the room lights off and the curtains drawn to simulate dusk — if it beeps in that state, the trigger is where you want it. Then leave it running and listen for the real sunset.
- If the buzzer chatters on-and-off around dusk (mushy transition), that's the analog zone above. It'll settle into steady beeping within a few minutes as the sky darkens more.
Where the "brain × mouth" grid leads next
At Level 4 you'll add a motor. That's a third mouth for the same sensing brains you've already built. Automatic Night Light brain + motor = a fan that spins when the room goes dark. Cookie Jar Alarm brain + motor = a paper barrier that slams down when the lid opens. Six projects from two brains × three mouths. Then Level 7's Arduino replaces the transistor + resistor + divider altogether. You still use the brain-vs-mouth split to think about the circuit.
🧠 Your challenge
No single right answer. That's the point.
- Flip the brain, keep the mouth. Swap the 10 kΩ and the LDR back to Cookie Jar Alarm positions (LDR on top, 10 kΩ on bottom). Predict what the buzzer now does before you power it up. (Answer: you just rebuilt Cookie Jar Alarm on the same breadboard. Bright triggers now.)
- Beeper + light. Put a 220 Ω + red LED in parallel with the buzzer, both hanging off the collector. Now the alarm blinks as well as beeps. Roughly how much total current is the battery supplying when it fires? (Add the buzzer lane (~29 mA) and the LED lane (~11 mA) — same "lanes add in parallel" trick as the Door Buzzer.)
- Less jumpy at dusk. The alarm as built triggers on the first hint of shadow. Add a 1 kΩ in series with the LDR (on the bottom of the divider). Work out on paper: with the LDR at 100 kΩ (proper dark), what's V_middle now? Does the alarm still trigger? What about at LDR = 10 kΩ (dusk)? (You're making the alarm wait for real darkness — the same "less nervous" craft from the Cookie Jar challenge.)
- Ultrasonic curfew? The buzzer's tone is fixed at about 2 kHz, which is easy for a human to hear but also easy for a parent to sleep through. If you had a passive buzzer instead of an active one — the kind you meet at Level 7 — how would you make the beep pattern more attention-grabbing (fast pulses vs steady tone)? Sketch what would need to change in the circuit.
For grown-ups: safety notes
- Battery-safe throughout — the LDR, buzzer, and transistor together don't change that. Even a fully-firing alarm pulls only ~30 mA.
- Active buzzers are loud at close range. When you first power up with the LDR covered, hold the buzzer away from your ear and anyone else's — a 2 kHz tone six inches from a face is startling. Point it out of any enclosure you build it into.
- If you're deploying on a windowsill, don't leave it in direct sun for hours. Sun through window glass can warm a black breadboard surprisingly hot; the parts are fine but the plastic case of your AA holder can soften. Set it back a few inches from the glass or under a small shade.
- If the transistor is warm to the touch, disconnect the battery and re-check the E-B-C leg order. Backwards transistors are always the first suspect, still.
- The buzzer will chatter on-and-off around dusk — that's the analog mushy zone in the transistor's transition, not a fault. If it's annoying, put the whole thing in a drawer at bedtime and redeploy in the morning.
- Don't seal this in an airtight box on a hot day. Not because it's electrically unsafe (it isn't), but because the LDR and the buzzer both work better with air around them, and hot batteries vent slightly faster than warm ones.
Checked against
Keep building
You might also like
shares ideas with this one