# Smart Street Light Using Ir Sensor With Arduino

21,364

46

2

Published

## Introduction: Smart Street Light Using Ir Sensor With Arduino

Please SUBSCRIBEto my channel for more projects.

This project is about Smart street light, street light will turn on while vehicle is passing through it.
here we are using 4 IR sensors that senses the position of the vehicle,each IR sensor controls 3 LED's. When vehicle passes by a particular IR sensor it senses the position of vehicle and gives its signal to the arduino board and it will turn on the LED's.

If we uses this idea and implement to it in our society it will be helpful in saving enough amount of electricity and off-course money.

## Step 1: Components Required

1. arduino uno
2. ir sensor (4)
3. 10mm LEDs (6)
4. connecting wire
5. foam board

## Step 3: Connect the Circuit

Connect all the components as given in the circuit diagram.

ir sensor 1 ---> 2

ir sensor 2 ---> 3

ir sensor 3 ---> 4

ir sensor 4 ---> 5

connect all ir sensor's to +5v and ground.

the positive pin of leds are connected to these pins of arduino.

led 1 ------> 6

led 2 ------> 7

led 3 ------> 8
led 4 ------> 9

led 5 ------> 10

led 6 ------> 11

and finally all ground pins of led connect to the ground of arduino.

## Step 4: Build Suitable Structure

To make these poles as given in above picture, use foam board and glue.

and you may also use black chart to make a road and wooden board for the base of pole.

## Recommendations

• ### Large Motors Class

9,088 Enrolled

## 2 Discussions

Sir im having a problem! The led is on all the time and when something is in fromt of the ir sensor the led switches off! What should i do

use this code

int ir1=2;

int ir2=3;

int ir3=4;

int ir4=5;

int led1=6;

int led2=7;

int led3=8;

int led4=9;

int led5=10;

int led6=11;

int proxy1=0;

int proxy2=0;

int proxy3=0;

int proxy4=0;

void setup()

{

pinMode(ir1,INPUT);

pinMode(ir2,INPUT);

pinMode(ir3,INPUT);

pinMode(ir4,INPUT);

pinMode(led1,OUTPUT);

pinMode(led2,OUTPUT);

pinMode(led3,OUTPUT);

pinMode(led4,OUTPUT);

pinMode(led5,OUTPUT);

pinMode(led6,OUTPUT);

}

void loop(){

if(proxy1==HIGH)

{

digitalWrite(led1,LOW);

digitalWrite(led2,LOW);

digitalWrite(led3,LOW);

}

else

{

digitalWrite(led1,HIGH);

digitalWrite(led2,HIGH);

digitalWrite(led3,HIGH);

}

if(proxy2==HIGH)

{

digitalWrite(led2,LOW);

digitalWrite(led3,LOW);

digitalWrite(led4,LOW);

}

else

{

digitalWrite(led2,HIGH);

digitalWrite(led3,HIGH);

digitalWrite(led4,HIGH);

}

if(proxy3==HIGH)

{

digitalWrite(led3,LOW);

digitalWrite(led4,LOW);

digitalWrite(led5,LOW);

}

else

{

digitalWrite(led3,HIGH);

digitalWrite(led4,HIGH);

digitalWrite(led5,HIGH);

}

if(proxy4==HIGH)

{

digitalWrite(led4,LOW);

digitalWrite(led5,LOW);

digitalWrite(led6,LOW);

}

else

{

digitalWrite(led4,HIGH);

digitalWrite(led5,HIGH);

digitalWrite(led6,HIGH);

}

}