loading

Automatic street light control is used to control the street lights(Turn on and off based on the light).

Here we make use of LDR(Light Dependent Resistor) and LED(Light Emitting diode) and arduino.


Hard Ware Components Required:

1) LDR

2)LED

3)4.7k Resistor

4)Bread Board

5)Connecting wires

6)Arduino

LDR is used to detect the light, Arduino is used to on/off the Light.

For LDR Basics and Principles Please go through the below link.

http://www.electrical4u.com/light-dependent-resist...

For LED interfacing Please follow the below link.

https://www.instructables.com/id/LED-blinking-using...

Hardware Connections.-

Arduino 3rd pin connected to LED +ve

Arduino GND connected to LED -ve through 4.7k

Arduino +5v is connected to LDR One End

Arduino A0 pin is connected to LDR other end

Arduino GND is connected to LDR other end with 4.7k

Arduino

Step 1: Programming, Compiling and Uploading to Arduino

// Program related to LDR and LED interfacing to Arduino

#include <SoftwareSerial.h>

int sensorPin = A0; // select the input pin for the LDR

int sensorValue = 0; // variable to store the value coming from the sensor

int led = 3;

void setup() { // declare the ledPin as an OUTPUT:

pinMode(led, OUTPUT);

Serial.begin(9600); }

void loop()

{

Serial.println("Welcome to TechPonder LDR Tutorial");

sensorValue = analogRead(sensorPin);

Serial.println(sensorValue);

if (sensorValue < 100)

{

Serial.println("LED light on");

digitalWrite(led,HIGH);

delay(1000);

}

digitalWrite(led,LOW);

delay(sensorValue);

}

Copy and Paste the code in arduino new sketch folder later compile and upload the program as show in the images.

Please click on serial window, which is located top right corner of the Arduino IDE to view the results.

Step 2: Results

Results are displayed on the serial window.

When there is low amount of light the light automatically glows and when there is sufficient amount of light it automatically turns off the light.

Here based on our room condition the threshold value we took is 100 for the LDR sensor.

When we place a hand on LDR(Not allowing any light on LDR) arduino automatically turns on the LED.

When we remove our hand on LDR. Arduino automatically Turns Off LED.

Thanks,

TechPonder.

<p>GUYS CAN ANONE PLS TELL ME HOW TO MAKE A BUZZER RING WITH A ULTASONIC SENNSOR AND LDR TOGETHER. I MEAN BUZZER SHOULD RING WHEN TRIGGERED BY LDR OR ULTRASONIC SENSOR </p><p>ULTRASONIC SHOULD TRIGGER WITHIN 2 M </p><p>AND LDR WHEN LASER IS REMOVED </p><p>PLS PLSPLS CN U HELP ME WITH THIS THIS IS URGENT</p>
What if I have more than 1 streetlamp and will like to have delays in all ?
<p>I made it. Did some tweaking in it.</p>
<p>thankyou very much</p>
<p>Can you please explain the wiring for this project. The circuit diagram was a little confusing about the input/output jumpers</p>
<p>thanks Good JOB...Keep it up and shares such types of Project circuits..</p>
<p>A good idea although Is your circuit diagram correct?</p>
To my knowledge its correct, If u have any changes please let me know. <br><br>
<p>I think you need to know more about other electronic devices, i found site where i read about diodes etc.<br> http://911electronic.com </p>

About This Instructable

39,289views

33favorites

More by TechPonder:how to interface LCD (16X2) to arduino How to Interface Ultrasonic Sensor (HCSR04) to arduino uno Fire  detection  using Arduino and flame sensor 
Add instructable to: