✨ Use RCAPP and get 5% off 👇
Skip to content
Free Delivery on Orders Above Rs 999/- Pan-India
Cash on Delivery Available for Orders above Rs.500/- and Upto Rs 3000/-
SAVE more when you BUY more. Upto 30% Off on BULK PURCHASE
GST Invoices for Your Business
Dedicated Technical Support Team
Safely Delivering Genuine Products PAN INDIA

Build a Smart Street Light System Using Arduino

Build a Smart Street Light System Using Arduino
-
Written By - Robocraze -
📅 Updated on 10 Jul 2026
Summarize with AI
✅ Prompt copied

Summary

Street lighting is an essential part of urban infrastructure, but traditional systems often waste electricity by remaining ON even when sufficient daylight is available. In smart cities, automated street lighting systems help reduce power consumption by switching lights ON only when required, improving energy efficiency while reducing operational costs. A Smart Street Light System is an excellent Arduino project because it combines sensor interfacing, digital outputs, and embedded decision-making into a practical real-world application. The project uses an LDR (Light Dependent Resistor) to detect ambient light levels and automatically controls an LED or street lamp based on the surrounding brightness. In this tutorial, we'll build a simple Smart Street Light System using an Arduino Uno, an LDR sensor, and an LED. By the end of this project, you'll understand how light sensing works and how Arduino can automate lighting systems used in homes, campuses, highways, and smart city applications.

Build a Smart Street Light System Using Arduino

How Does a Smart Street Light System Work?

The project uses an LDR to continuously measure the surrounding light intensity.

During the daytime, the LDR receives plenty of light, causing its resistance to decrease. The Arduino interprets this as daylight and keeps the street light OFF.

As evening approaches, the ambient light level decreases. The resistance of the LDR increases, changing the voltage supplied to the Arduino's analog input.

Once the measured light intensity falls below a predefined threshold, the Arduino switches ON the street light.

The working sequence is simple:

  • Bright daylight → Street light OFF

  • Low ambient light → Street light ON

  • Sunrise → Street light OFF again

This automatic operation eliminates manual switching and helps conserve electricity.

Components and Supplies

7Semi ESP32-S3-WROOM-1-N16R8 WiFi Bluetooth Module 16MB Flash 8MB PSRAM - Robocraze7Semi ESP32-S3-WROOM-1-N16R8 WiFi Bluetooth Module 16MB Flash 8MB PSRAM - Robocraze

7Semi ESP32-S3-WROOM-1-N16R8 WiFi Bluetooth Module 16MB Flash 8MB PSRAM

7Semi ESP32-S3-WROOM-1-N16R8 WiFi Bluetooth Module 16MB Flash 8MB PSRAM The 7Semi ESP32-S3-WROOM-1-N16R8 is a powerful wireless communication module designed for advanced IoT, embedded, and AI-enabled applications. Powered by the ESP32-S3 chipset, the module features integrated WiFi and Bluetooth connectivity along with 16MB Flash memory...
Rs 949/-
Rs 949/-
Rs 1,632/-
Save Rs 683/-
7Semi ESP32-DEVKIT-UE – ESP32 WiFi BLE Development Board with IPEX Antenna & USB-UART -Robocraze7Semi ESP32-DEVKIT-UE – ESP32 WiFi BLE Development Board with IPEX Antenna & USB-UART -Robocraze

    7Semi ESP32-DEVKIT-UE – ESP32 WiFi BLE Development Board with IPEX Antenna & USB-UART

    7Semi ESP32-DEVKIT-UE – ESP32 WiFi BLE Development Board with IPEX Antenna & USB-UART The 7Semi ESP32-DEVKIT-UE is a powerful and compact development board built around the ESP32-WROOM-32UE module, offering Wi-Fi and Bluetooth connectivity with an external IPEX antenna for enhanced wireless range and stability....
    Rs 686/-
    Rs 686/-
    Rs 899/-
    Save Rs 213/-
    CC3000 Wifi Shield for Arduino Uno-RobocrazeCC3000 Wifi Shield for Arduino Uno-Robocraze

    Arduino Uno CC3000 Wifi Shield

    This is a shield for the CC3000 WiFi Module. The CC3000 from TI (Texas Instruments) is a self-contained wireless network processor that makes incorporating internet connectivity into your project simple. Supply Voltage: 4.5V - 12V Host Interface: SPI @ 16MHZ Throughput (TCP): ~4Mbps IEEE...
    Rs 3,548/-
    Rs 3,548/-
    Rs 4,109/-
    Save Rs 561/-
    Arduino UNO Prototyping Shield – Expand Arduino projects with this prototyping shield. Electronic Components - RobocrazeArduino UNO Prototyping Shield – Expand Arduino projects with this prototyping shield. Electronic Components - Robocraze

      Arduino UNO Prototyping Shield

      UNO Prototyping Shield for Arduino UNO Prototype Shield is used in the cases where you want to build more applications without using any external Breadboard. This prototyping shield for Arduino helps in expanding the functionalities of UNO board and create extra connections for embedded...
      Rs 99/-
      Rs 99/-
      Rs 114/-
      Save Rs 15/-
      Jumper Wire Set - M2M, M2F, F2F (40 pcs each) – Ideal for Arduino & prototyping. Electronic Components - RobocrazeJumper Wire Set - M2M, M2F, F2F (40 pcs each) – Ideal for Arduino & prototyping. Electronic Components - Robocraze

        Jumper Wire Set - M2M, M2F, F2F (40 pcs each)

        Jumper Wire Set - M2M, M2F, F2F (40 pcs each) These DuPont jumper wires for electronics is a premium quality wire manufactured by using quality assured material and advanced techniques, which make them up to the standard in this highly challenging field. This 120pcs...
        Rs 139/-
        Rs 139/-
        Rs 169/-
        Save Rs 30/-
        170 Points Mini Breadboard – Compact solderless breadboard for quick prototyping. Electronic Components - Robocraze170 Points Mini Breadboard – Compact solderless breadboard for quick prototyping. Electronic Components - Robocraze

          170 Points Mini Breadboard

          170 Points Mini Breadboard This 170 Points Mini Breadboard is the ideal companion for seamless electronics prototyping, designed to provide a hassle-free experience. With a 2x17 row layout and a total of 170 pins, this prototyping breadboard offers abundant space to create and test...
          Rs 20/-
          Rs 20/-
          Rs 29/-
          Save Rs 9/-
          1660 Tie-Point Solderless Breadboard – Large breadboard for circuit prototyping. Electronic Components - Robocraze1660 Tie-Point Solderless Breadboard – Large breadboard for circuit prototyping. Electronic Components - Robocraze

          1660 tie-point Solderless Breadboard

          1660 tie-point Solderless Breadboard The 1660 Points Solderless Breadboard is an excellent size with more than enough room for more advanced prototyping. There are two terminal strips with 1260 tie-points and 4 distribution strips with 400 tie-points.  The breadboards accept a variety of wire sizes from 20 to...
          Rs 429/-
          Rs 429/-
          Rs 699/-
          Save Rs 270/-

          Components Required

          You'll need the following components.

          Electronics

          Optional Components

          • Relay Module

          • AC Street Lamp

          • ESP32 Development Board

          • Solar Panel

          • Rechargeable Battery

          • OLED Display

          Understanding the Components

          Arduino Uno

          The Arduino Uno acts as the controller of the project.

          It continuously reads the light intensity from the LDR and decides whether the street light should remain ON or OFF.

          LDR Sensor

          An LDR (Light Dependent Resistor) changes its resistance depending on the amount of light falling on its surface.

          • Bright Light → Low Resistance

          • Darkness → High Resistance

          Since Arduino measures voltage rather than resistance, the LDR is connected as a voltage divider using a 10kΩ resistor.

          The Arduino reads this voltage through one of its analog input pins.

          LED

          The LED represents the street light.

          When darkness is detected, the Arduino switches the LED ON.

          For real-world applications, the LED can be replaced with a relay controlling an actual AC street lamp.

          Circuit Connections

          LDR Connections

          Connection Arduino Pin
          LDR Terminal 1 5V
          LDR Terminal 2 A0
          10kΩ Resistor Terminal 1 A0
          10kΩ Resistor Terminal 2 GND

          The LDR and the 10kΩ resistor together form a voltage divider.

          LED Connections

          Component Arduino Pin
          LED Anode (via 220Ω Resistor) Pin 8
          LED Cathode GND

          Arduino Power Connections

          Connection Arduino Pin
          USB Cable USB Port
          DC Adapter (Optional) DC Barrel Jack (7V–12V)
          Breadboard Positive Rail 5V
          Breadboard Negative Rail GND

          Breadboard Connections (Optional)

          • Connect the Arduino 5V pin to the positive power rail of the breadboard.

          • Connect the Arduino GND pin to the negative power rail of the breadboard.

          • Connect the LDR and 10kΩ resistor using these power rails.

          • Connect the LED cathode to the negative rail (GND).

          • Connect the 220Ω resistor between Arduino Pin 8 and the LED anode.

          Building the Project

          Step 1: Assemble the Circuit

          • Place the Arduino Uno near the breadboard.

          • Insert the LDR and 10kΩ resistor to form the voltage divider.

          • Connect the LED through a 220Ω resistor to Pin 8.

          • Double-check all wiring before powering the circuit.

          Step 2: Position the LDR

          Place the LDR where it can receive ambient light naturally.

          Avoid placing it directly beneath the LED, as the LED's light may affect the sensor readings.

          Step 3: Upload the Program

          • Connect the Arduino to your computer using a USB cable.

          • Upload the Arduino sketch using the Arduino IDE.

          • Once uploaded, the Arduino begins monitoring the ambient light continuously.

          Step 4: Test Under Different Lighting Conditions

          • Cover the LDR with your hand or a dark object. The LED should turn ON.

          • Expose the LDR to room light or sunlight. The LED should switch OFF automatically.

          Arduino Code

          // Smart Street Light System Using Arduino
          
          const int ldrPin = A0;
          const int ledPin = 8;
          
          // Adjust this threshold during calibration
          const int threshold = 500;
          
          void setup() {
          
            pinMode(ledPin, OUTPUT);
            Serial.begin(9600);
          
          }
          
          void loop() {
          
            int lightValue = analogRead(ldrPin);
          
            Serial.print("LDR Value: ");
            Serial.println(lightValue);
          
            if(lightValue < threshold){
          
              digitalWrite(ledPin, HIGH);
          
            }
          
            else{
          
              digitalWrite(ledPin, LOW);
          
            }
          
            delay(200);
          
          }
          

          How the Code Works

          The Arduino continuously reads the analog voltage from the LDR using the analogRead() function.

          The measured value ranges from 0 to 1023.

          If the light intensity falls below the predefined threshold, the Arduino considers it to be dark and switches ON the LED.

          When the ambient light increases above the threshold, the LED is switched OFF.

          The LDR values are also printed to the Serial Monitor, making it easy to observe sensor readings and fine-tune the threshold for different environments.

          Calibrating the Sensor

          Every LDR behaves slightly differently, so calibration is important.

          Open the Serial Monitor and observe the sensor values under different lighting conditions.

          Example

          • Bright Room: 780

          • Evening: 520

          • Dark Room: 240

          Choose a threshold value somewhere between daylight and darkness.

          For example:

          Threshold = 500

          You may need to adjust this value depending on your surroundings.

          LDR Circuit

          Testing the Project

          After uploading the code, test the following conditions.

          Bright Light

          Expected Result:

          The LED remains OFF.

          Partial Shade

          Expected Result:

          The LED may remain OFF or begin switching depending on the selected threshold.

          Darkness

          Expected Result:

          The LED turns ON automatically.

          Moving Between Light and Dark

          Expected Result:

          The LED switches ON and OFF smoothly as the ambient light changes.

          Project Improvements

          Once the basic system is working, several enhancements can make it more practical.

          Some useful upgrades include:

          • Relay Module to control an actual AC street lamp

          • ESP32 Development Board for IoT monitoring

          • Motion Sensor for adaptive brightness

          • Solar charging system

          • OLED Display for light intensity

          • RTC Module for time-based operation

          • Multiple street lights connected in a network

          • Automatic fault detection

          These upgrades transform the project into a smart city lighting system capable of large-scale deployment.

          Final Thoughts

          A Smart Street Light System is one of the most practical beginner Arduino projects because it demonstrates how a microcontroller can sense changes in the environment and automate a real-world task. By combining an LDR with simple decision-making logic, the system automatically controls lighting based on ambient conditions, making it an excellent introduction to embedded systems and automation.

          For anyone interested in building a smart street light project India, this tutorial provides a strong foundation in sensor interfacing and Arduino programming. Once you've mastered this build, you can extend it with motion detection, IoT connectivity, or solar power to create a more advanced smart city lighting solution.

          Excerpt

          Learn how to build a smart street light system using Arduino with an LDR sensor for automatic light control, ideal for beginners, students, and DIY electronics projects.
          Prev Post
          Next Post

          Leave a comment

          Please note, comments need to be approved before they are published.

          Thanks for subscribing!

          This email has been registered!

          Shop the look

          Choose Options

          Edit Option
          Back In Stock Notification
          Compare
          Product SKU Description Collection Availability Product Type Other Details

          Choose Options

          this is just a warning
          Login
          Shopping Cart
          0 items
          FREE SHIPPING!
          ₹100 OFF
          ₹200 OFF
          ₹999
          ₹2500
          ₹4900
          WhatsApp Chat Chat