Automatic Smart Street Light System

Automatic Smart Street Light System

1. Introduction

Have you ever wondered how street lights automatically turn ON when the sun sets and turn OFF when the sun rises? No one goes around switching them manually! In this project, we replicate this smart technology using an Arduino and a Light Sensor. This model demonstrates the concept of Energy Automation and Smart Cities.

2. How It Works (The Logic)

The core of this project is the LDR (Light Dependent Resistor), which acts as the "eye" of the system.

  • Daytime Mode: When sunlight hits the LDR sensor, it sends a high signal to the Arduino. The system recognizes this as "Daytime" and keeps the street lights (LEDs) OFF to save electricity.
  • Nighttime Mode: As soon as the sensor detects darkness (simulated by covering the sensor or turning off room lights), the resistance changes. The Arduino instantly detects this drop in light and turns the 3-LED Array ON, illuminating the street model.

3. Key Features

  • Fully Automatic: No manual switches required; the lights react to the environment.
  • Energy Efficient: The system ensures lights are only active when needed (in the dark), preventing energy wastage.
  • Multi-Light Control: Controls a series of 3 LEDs simultaneously, simulating a real row of street lamps.
  • Real-Time Sensing: The LDR monitors light intensity continuously, ensuring an instant response to changing light conditions.

4. What Kids Will Learn (STEM Concepts)

  • Sensors: Understanding how electronic sensors (LDR) interact with the physical world (Light).
  • Automation: Learning how to program a machine to make decisions based on data.
  • Circuit Building: Practical experience with breadboards, resistors, and parallel LED connections.

Requirement

To build this Smart Motion Detector With sound and Light, we used the following parts from the Plzpapa Basic Robotic Kit:

  • Arduino Uno
  • BreadBoard
  • LDR Sensor (Andhera check karne ke liye)
  • 3 LEDs (White, Red, Green jo bhi hon)
  • 3 Resistor Blue (220 Ohm) (LED ke liye)
  • Jumper Wires 

Wiring (Taarein Jorna)

1. BreadBoard:

  • Breadboard + Connect with Arduino GND
  • Breadboard - Connect with Arduino A0

2. LDR Sensor Wiring:

  • LDR Leg 1: Seedha Breadboard + .
  • LDR Leg 2: Seedha Arduino A0 mein.

2. 3 LEDs Wiring: Hum Pin 11, 12, aur 13 use karein ge.

  • LED 1:
    • Bari Taang (+): Arduino Pin 13
    • Choti Taang (-): Resistor ke zariye Breadboard +.
  • LED 2:
    • Bari Taang (+): Arduino Pin 12
    • Choti Taang (-): Resistor ke zariye Breadboard +.
  • LED 3:
    • Bari Taang (+): Arduino Pin 11
    • Choti Taang (-): Resistor ke zariye Breadboard +.

 

💡 Note (Agar Resistors Kam hain): Agar aap ke paas har LED ke liye alag resistor nahi hai, to teeno LEDs ki Choti Taango (-) ko breadboard par mila lein, aur un sab ke agay aik hi 220 Ohm (Blue wala) resistor laga kar GND mein de dein.


🛒 Buy This Robotic Kit Now

Code

// Pins define ki hain
int ldrPin = A0;
int led1 = 13;
int led2 = 12;
int led3 = 11;

// Is threshold ko adjust karna par sakta hai
// Internal Pullup mein: ZYADA number = ANDHERA
int turnOnPoint = 500;

int lightValue = 0;

void setup() {
  // LEDs ko Output banaya
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(led3, OUTPUT);
 
  // LDR ke liye Internal Pull-up ON kiya
  pinMode(ldrPin, INPUT_PULLUP);
 
  Serial.begin(9600);
}

void loop() {
  lightValue = analogRead(ldrPin);
  Serial.print("Roshni ki Value: ");
  Serial.println(lightValue);

  // LOGIC: Agar reading 800 se ZYADA hai (Matlab Andhera ho gaya)
  if (lightValue > turnOnPoint) {
   
    // Andhera hai -> Street Lights ON
    digitalWrite(led1, HIGH);
    digitalWrite(led2, HIGH);
    digitalWrite(led3, HIGH);
   
  } else {
   
    // Roshni hai -> Street Lights OFF
    digitalWrite(led1, LOW);
    digitalWrite(led2, LOW);
    digitalWrite(led3, LOW);
  }
 
  delay(200);
}

 

 

Back to blog