LDR Controlled Street Light Using Arduino UNO – Step by Step Tutorial

 LDR Controlled street light

Circuit diagram:

Introduction

The LDR Controlled Street Light using Arduino UNO is a simple and energy-efficient automation project. This system automatically turns ON a street light (LED or bulb) when it gets dark and turns it OFF during daylight.

This project demonstrates a smart lighting solution using an LDR (Light Dependent Resistor) and Arduino Uno. The circuit can be designed and simulated using Tinkercad, making it perfect for beginners and students learning Arduino.


 Objective of the Project

  • Automatically control street lights based on ambient light

  • Save electrical energy

  • Learn how to use LDR with Arduino

  • Understand voltage divider circuits


 Components Required

  • Arduino Uno

  • LDR (Light Dependent Resistor)

  • 10kΩ Resistor (for voltage divider)

  • LED or Bulb (Street Light)

  • 220Ω Resistor (for LED protection)

  • Breadboard

  • Jumper Wires


 Working Principle of LDR Controlled Street Light

The LDR (Light Dependent Resistor) changes its resistance based on light intensity.

How It Works:

  1. In bright light:

    • LDR resistance decreases.

    • Voltage at analog pin increases.

    • Arduino turns OFF the LED.

  2. In darkness:

    • LDR resistance increases.

    • Voltage at analog pin decreases.

    • Arduino turns ON the LED (street light).

The LDR and 10kΩ resistor form a voltage divider circuit. The Arduino reads this varying voltage through analog pin A0 (range 0–1023).

When the value drops below a set threshold (indicating darkness), the LED turns ON automatically.


 Step-by-Step Circuit Connections

Step 1: Connect LDR

  • One leg of LDR → 5V

  • Other leg of LDR → Analog Pin A0

  • Connect a 10kΩ resistor between A0 and GND

This forms a voltage divider.

Step 2: Connect LED (Street Light)

  • LED Anode (Long leg) → Digital Pin 7 (via 220Ω resistor)

  • LED Cathode (Short leg) → GND

Arduino Code for LDR Street Light

int ldrPin = A0;
int ledPin = 7;
int threshold = 500; // Adjust based on testing

void setup() {
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}

void loop() {
int ldrValue = analogRead(ldrPin);
Serial.println(ldrValue);

if (ldrValue < threshold) {
digitalWrite(ledPin, HIGH); // Turn ON light
} else {
digitalWrite(ledPin, LOW); // Turn OFF light
}

delay(500);
}

You can adjust the threshold value depending on your environment.

 How to Simulate in Tinkercad

  1. Open Tinkercad

  2. Click Circuits → Create New Circuit

  3. Add:

    • Arduino UNO

    • LDR

    • Resistors

    • LED

  4. Complete wiring

  5. Paste the Arduino code

  6. Click Start Simulation

  7. Adjust the light level to test


 Real-World Applications

  • Automatic street lighting systems

  • Garden lights

  • Highway lighting

  • Smart city projects

  • Energy-efficient home lighting


 Advantages of Arduino Automatic Street Light

  • Saves electricity

  • Reduces human effort

  • Low cost and simple design

  • Beginner friendly

  • Can be upgraded to IoT-based monitoring


 Conclusion

The LDR Controlled Street Light using Arduino UNO is a simple yet powerful automation project. It automatically controls lighting based on environmental brightness, helping reduce power consumption and improve efficiency.

This project is ideal for students, beginners, and anyone interested in smart lighting systems and Arduino automation projects.

Code:




Try this using tinker cad:



LDR controlled street light

BEGINNER PROJECTS (Foundation Skills)

  1. Ultrasonic Distance Measurement
  2. Traffic Light Simulation with 7-Segment Display
  3. 7-Segment Display Counter
  4. Kids Piano Circuit (8-Key Version)
  5. 16×2 LCD Display with Text Output
  6. LCD I2C to Arduino UNO
  7. Temperature Measurement using Arduino UNO
  8. LDR Controlled Street Light

INTERMEDIATE PROJECTS (Build Your Skills)

  1. Servo Motor Control Using Potentiometer
  2. DC Motor Speed Control
  3. Temperature Controlled Fan
  4. PIR Based Theft Alert System
  5. LPG Gas Leakage Detection System
  6. Automatic Door Locking System
  7. Soil Moisture Based Automatic Watering System
  8. Simple Digital Clock using Arduino UNO
  9. Automatic Voting Machine (EVM)
  10. Joystick Control using Arduino Uno
  11. RGB Lamp Control using Arduino Uno

    ADVANCED PROJECTS (Master Level)

    1. Home Automation Using Arduino UNO
    2. Bluetooth RC Car using Arduino Uno
    3. Obstacle Avoiding Robot
    4. Line Follower Robot
    5. Radar System Using Arduino UNO
    6. Automatic Parking System
    7. Bi-Directional People Counter using Arduino Uno 
    8. Automatic Plant Watering System
    9. NeoPixel LED Ring Control using Arduino Uno
    10. Smart Gloves for Bedridden People

      ROBOTICS & MOTION PROJECTS

      1. RC Car Using L293D Motor Driver
      2. Robot Arm and Leg Control Using Servo
      3. Smart Irrigation System using Arduino Uno

      Comments