Light/Dark Detector Project
Create an automatic night light that turns on in the dark and off when there's light.
Required Components
Order your parts from Amazon or AliExpress and help support us.
- LDR (Light Dependent Resistor)x1
- Transistor (BC547)x1
- Potentiometer (10kΩ)x1
- LED (any color)x1
- Resistor (330Ω)x1
- 9V Battery & Connectorx1
Components Required
- LDR (Light Dependent Resistor)x1
- Transistor (BC547)x1
- Potentiometer (10kΩ)x1
- LED (any color)x1
- Resistor (330Ω)x1
- 9V Battery & Connectorx1
Instructions (Dark Detector)
This circuit acts as an automatic night light. The key component is the LDR, whose resistance changes with light intensity. We use this change to control a transistor that acts as a switch for the LED.
- Understand the Voltage Divider: The 10kΩ potentiometer and the LDR create an adjustable voltage divider. This allows you to fine-tune the light level at which the circuit activates.
- Assemble the Circuit:
- Connect one outer terminal of the 10kΩ potentiometer to the +9V supply.
- Connect the other outer terminal of the potentiometer to one lead of the LDR.
- Connect the other lead of the LDR to Ground (GND).
- Connect the center terminal (the wiper) of the potentiometer to the base of the BC547 transistor (Q1).
- Connect the emitter of the transistor to Ground.
- Connect the collector of the transistor to the 330Ω resistor (R1).
- Connect the other end of the resistor to the cathode (shorter lead) of the LED.
- Connect the anode (longer lead) of the LED to the +9V supply.
- Calibrate and Test: Power the circuit. By turning the potentiometer's knob, you adjust the voltage sent to the transistor's base. Find a position where the LED turns on when you cover the LDR and turns off when it's exposed to light.
To build a Light Detector (LED on in light): Simply swap the positions of the LDR and the potentiometer in the circuit.
About This Project
This project is a perfect introduction to sensors and analog electronics. By building it, you'll learn how voltage dividers work and how transistors can be used to amplify a small signal to control a larger load.