This circuit stays quiet when it’s in a reasonably dark place. But once you have a bright light shining directly onto the sensor, such as the sun, the circuit turns on the buzzer that creates an alarm sound that hopefully should wake you up.
The sensor you'll use here is a photoresistor, also called Light-Dependent Resistor (LDR). The resistance of the photoresistor is high when there is little to low light, or low when there is a lot of light.
The photoresistor and the resistor R2 make up a voltage divider. So when the resistance of the photoresistor is high, the voltage on the base of the resistor becomes low and turns off the transistor. When the resistance of the photoresistor is low, the voltage on the base becomes high and turns on the transistor.
When the transistor is on, the alarm goes off.Part list:
- Jumper wires
- Active Buzzer
- NPN Transistor (Ex: BC547)
- Resistor 1 kΩ