💡 Want to build a light that automatically turns ON when it gets dark and OFF when there is enough light? In this beginner-friendly electronics project, we will build an Automatic Night Light Using an LDR Sensor and BC547 Transistor.
![]() |
| Automatic Night Light Using an LDR Sensor and BC547 Transistor. |
This circuit detects the surrounding light intensity and automatically controls an LED without requiring a manual switch.
1. How Does an LDR Sensor Work?
An LDR (Light Dependent Resistor), also known as a photoresistor, is an electronic component whose resistance changes according to the amount of light falling on its surface.
- Bright environment: LDR resistance decreases.
- Dark environment: LDR resistance increases.
This resistance change can be used to control a transistor and switch an LED automatically.
2. Components Required
| Component | Quantity |
|---|---|
| LDR (Photoresistor) | 1 |
| 10kΩ resistor (R1) | 1 |
| 1kΩ resistor (R2) | 1 |
| 220Ω resistor (LED resistor) | 1 |
| BC547 NPN transistor | 1 |
| LED | 1 |
| 5V DC power supply | 1 |
| Breadboard and jumper wires | As required |
3. Circuit Connections
The circuit uses an LDR and a fixed resistor as a voltage divider to control the base of a BC547 NPN transistor.
Correct connection for a night light (LED ON in darkness):
- Connect the 10kΩ resistor between the positive supply (VCC) and the voltage-divider junction.
- Connect the LDR between the voltage-divider junction and GND.
- Connect the junction through a 1kΩ resistor to the BC547 base.
- Connect the BC547 emitter to GND.
- Connect the LED and its current-limiting resistor in series between VCC and the BC547 collector.
- Connect the power supply negative terminal to GND.
How the circuit behaves:
- During daytime: The LDR resistance is low. The base voltage decreases, keeping the transistor OFF and the LED OFF.
- During nighttime: The LDR resistance increases. The base voltage rises, switching the transistor ON and lighting the LED.
Note: The original infographic's voltage-divider arrangement needs the LDR and 10kΩ resistor positions swapped to achieve this day/night operation.
4. Understanding the Circuit
What is the function of the LDR?
The LDR detects changes in surrounding light intensity. Its resistance changes depending on whether the environment is bright or dark.
What is the function of the BC547 transistor?
The BC547 is an NPN transistor used as an electronic switch. A suitable base current turns it ON, allowing current to flow through the LED circuit.
Why is a resistor connected to the LED?
The resistor limits the current flowing through the LED and helps prevent damage caused by excessive current.
5. How to Calculate the LED Resistor
Use the following formula:
R = (Vsupply − Vf) ÷ ILED
Example for a 5V supply:
- Supply voltage = 5V
- Red LED forward voltage = 2V
- Desired LED current = 10mA (0.01A)
R = (5 − 2) ÷ 0.01
R = 300Ω
A standard 330Ω resistor is a suitable choice for this example.
6. Applications
- Automatic night lights
- Garden and pathway lighting
- Room and corridor lighting
- Light-sensitive electronic switches
- DIY electronics and educational projects
7. Key Takeaways
- An LDR detects ambient light intensity.
- The LDR resistance decreases when light intensity increases.
- A BC547 transistor works as an electronic switch.
- A suitable resistor protects the LED from excessive current.
- The circuit can automatically control lighting based on surrounding light conditions.
8. Watch More Electronics Tutorials
Want to learn more about electronics, sensors, automation and DIY engineering projects?
Subscribe to our YouTube channel:
MY CREATIVE ENGINEERING
Practical Electronics Knowledge. Engineering Solutions.
👍 Like, share and comment if you have built this project!
Safety and Building Notes
- This is a low-voltage DC learning project. Do not connect this breadboard circuit directly to mains electricity.
- Check the BC547 transistor pinout using its datasheet before wiring. Pin arrangements can vary by manufacturer and package orientation.
- Verify resistor values and LED current before powering the circuit.
- The actual switching threshold depends on the LDR, resistor values and transistor characteristics.
MY CREATIVE ENGINEERING | Learn • Build • Create
#LDR #AutomaticNightLight #BC547 #DIYElectronics #ElectronicsProjects #CircuitDesign #ElectronicsTutorial

No comments:
Post a Comment