Automatic Night Lamp Using LDR | Simple DIY Electronics Project
Automatic Night Lamp Using LDR
An Automatic Night Lamp Using LDR is a simple and useful DIY electronics project that automatically turns ON a light when it becomes dark and turns OFF the light when there is enough brightness. This project is perfect for beginners who want to learn about LDR sensors, transistors, resistors, and automatic light control circuits.

What is an Automatic Night Lamp?
An automatic night lamp is a light control circuit that works according to surrounding light. It uses an LDR (Light Dependent Resistor) to detect brightness. When the room becomes dark, the circuit switches ON the LED or lamp automatically. When light falls on the LDR, the circuit turns OFF the lamp.
How Does an LDR Work?
An LDR is a light-sensitive resistor. Its resistance changes according to the amount of light falling on it.
- In bright light: LDR resistance becomes low.
- In darkness: LDR resistance becomes high.
This property makes the LDR very useful in automatic street lights, night lamps, garden lights, alarm systems, and light-sensing projects.
Components Required
| Component | Quantity | Use |
|---|---|---|
| LDR | 1 | Detects light intensity |
| BC547 Transistor | 1 | Works as a switch |
| LED | 1 | Output light |
| 10kΩ Resistor | 1 | Voltage divider with LDR |
| 220Ω Resistor | 1 | Limits LED current |
| 9V Battery | 1 | Power supply |
| Breadboard | 1 | For circuit connection |
| Jumper Wires | As required | For wiring |
Circuit Working of Automatic Night Lamp Using LDR
The working of this circuit is based on a voltage divider made using an LDR and a resistor. The transistor is used as an electronic switch to control the LED.
When Light Falls on LDR
When light falls on the LDR, its resistance becomes low. Due to this, the transistor does not get enough base voltage to turn ON. So, the LED remains OFF.
When It Becomes Dark
When the surrounding area becomes dark, the resistance of the LDR increases. This gives enough voltage to the base of the transistor. The transistor turns ON and allows current to flow through the LED. As a result, the LED glows automatically.
Circuit Connections
- Connect the collector of BC547 transistor to the negative side of the LED.
- Connect the positive side of the LED to the positive supply through a 220Ω resistor.
- Connect the emitter of the transistor to the negative terminal of the battery.
- Connect the LDR and 10kΩ resistor as a voltage divider.
- Connect the center point of the voltage divider to the base of the transistor.
- Connect the 9V battery to power the circuit.
Step-by-Step Procedure
Step 1: Place Components on Breadboard
First, place the LDR, BC547 transistor, LED, and resistors on the breadboard properly. Make sure the transistor pins are correctly identified as collector, base, and emitter.
Step 2: Connect the LED
Connect the LED with a 220Ω resistor to protect it from high current. Without a current-limiting resistor, the LED may get damaged.
Step 3: Connect the LDR Circuit
Connect the LDR with a 10kΩ resistor to create a voltage divider. This part of the circuit senses light and darkness.
Step 4: Connect the Transistor
Connect the output of the LDR voltage divider to the base of the transistor. The transistor will act like a switch for the LED.
Step 5: Power the Circuit
Connect the 9V battery and test the circuit. Cover the LDR with your hand. The LED should turn ON. When you expose the LDR to light, the LED should turn OFF.
Applications of Automatic Night Lamp
- Automatic night lamps
- Automatic street lights
- Garden lighting systems
- Bedroom night lights
- Security light circuits
- Light-sensitive alarm systems
- Smart home automation projects
Advantages of This Project
- Simple and beginner-friendly circuit
- Low-cost components
- No microcontroller required
- Automatically saves electricity
- Useful for real-life applications
- Easy to build on a breadboard
Common Mistakes to Avoid
- Connecting the transistor pins incorrectly
- Using LED without a current-limiting resistor
- Reversing LED polarity
- Loose breadboard connections
- Using the wrong resistor value
- Placing the LDR too close to the LED
Tips for Better Performance
- Use a variable resistor instead of a fixed 10kΩ resistor to adjust sensitivity.
- Keep the LDR away from the LED light to avoid false triggering.
- Use a relay module if you want to control a high-power AC lamp.
- Use a proper enclosure for long-term use.
- For AC mains projects, always follow electrical safety precautions.
Safety Note
This project is safe for beginners when using a battery-powered LED circuit. However, if you want to control a 220V AC bulb, do not connect it directly without proper knowledge. Use a relay module, insulation, fuse protection, and follow electrical safety rules. If you are a beginner, start with the low-voltage LED version first.
Automatic Night Lamp Using LDR Project Summary
| Project Name | Automatic Night Lamp Using LDR |
| Difficulty Level | Beginner |
| Main Component | LDR |
| Output Device | LED |
| Power Supply | 9V Battery |
| Best For | DIY electronics beginners |
FAQs on Automatic Night Lamp Using LDR
What is the use of LDR in an automatic night lamp?
The LDR detects the amount of light in the surrounding area. It helps the circuit decide when to turn the lamp ON or OFF.
Why does the LED turn ON in darkness?
In darkness, the resistance of the LDR increases. This allows the transistor to turn ON and the LED starts glowing.
Can I use this circuit for a 220V bulb?
Yes, but you need to use a relay module or proper switching circuit. Directly connecting AC mains is dangerous and should be done only with proper safety knowledge.
Can I use Arduino in this project?
Yes, you can use Arduino with an LDR to make a more advanced automatic night lamp with adjustable brightness and sensor-based control.
Which transistor is best for this circuit?
BC547 is commonly used for this beginner project. You can also use similar NPN transistors depending on your circuit requirement.
Conclusion
An Automatic Night Lamp Using LDR is one of the best beginner electronics projects to understand light sensors and transistor switching. It is simple, low-cost, and useful in real life. By making this project, you can learn how automatic street lights and smart lighting systems work.
If you are learning DIY electronics, this project is a great starting point before moving to advanced Arduino-based automation projects.