loading

The concept is simple, whenever a vehicle passes the light above it and the in front of it starts to glow. As the vehicle moves forward the previous lights switches off. Hence saving power.

The IR sensor detects the vehicle and switches on the LED. I have used Arduino uno for controlling LED's.

*Do not use a black vehicle, the IR sensor won't work.

*I have make the model with 3 sensor and 4 LED. Larger model can be made using same method and few modification in code.

Step 1: Material Required

1. Cardboard, wood etc for road.

2. Arduino

3. breadboard

4. 3x IR sensor (with digital output)

5. 4x High light LED

6. connecting wires

7. straws (to elevate LED's)

Step 2: Design

Make a elevated road so you can make connections easily. See the images as an example.

Attach the 3 IR sensor on the road. Set the IR sonsors so that they cover the whole road. maintain the distance between the sensor as required.

With the IR sensor stick a straw and insert the LED at one end and wires coming from the other end.

Step 3: Connections

The LED have two ends. Connect all the LED's negative ends to ground. and the positive ends to arduino pins 4,5,6,7 resp.

For the IR sensor we have three ends. Connect all the power pin of sensor (Vcc) to arduino power and gnd to arduino Gnd. Connect the output pin of IR sensor to pin 0,1,2 resp.

*the given circuit diagram is for a single set of LED and sensor. Others are to be connected in same manner.

*make a common GND for LED and IR sensor.

Step 4: Coding

If you are using more than 3 sensor and 4 LED than you need to slightly change the code.

Download the code and upload it to your Arduino.

Step 5: Testing

I recommend to watch the video given first to understand the working.

Now everything is ready. Check the following :

--> Sensor 1 - LED 1 & 2 is on

--> When sensor 2 is activated - LED 1 turns off, 2 & 3 turns on.

--> When sensor 3 is activated - LED 2 turns off, 3 & 4 turns on for 2 second.

You can hold the last led if you add a 4th sensor. Also you can increase the delay time as required.

There no arduni code from where i have to download it
<p>View step 4</p>
Neat idea but what happens if the car turns off before it gets to the next light switch? Is there a timer to turn off the light?
<p>The lights turn off only when the next sensor is activated. if a car turns off, then the light will stay on till next sensor is hit. </p><p>I have added a timer for light to last sensor only. this can we removed if we add a 4th sensor.</p><p>This model is for a single car only. For high traffic we will need to use an array of IR sensor along the road.</p>
Bro please give me the code
<p>The code is given in step 4 above.</p>
<p>How is array possible with high volume traffic ? I can't think of any other way for high volume traffic besides using multi thread, but it's kinda complicated. May you explain the array method ? </p>
<p>Store the values of IR sensors output in an array. Like 1001010.....<br>Then according to that you can define the output of leds.</p><p>For example take the above circuit.. 3 IR and 4 leds.. <br>When IR output is :</p><p> <br>000 - no led </p><p>101 - all 4 led on </p><p>110 - first 3 led on </p><p>And so on..</p><p>You have to define each value so that there is margin of error. When you increase the number of sensors ie here for 3 led you use 8 IR then error would be reduced. More sensors = less error</p>
<p>The problem with array i'm facing is that from your 'single car traffic code', you controlled the on off street lights by using ir sensors. Eg. 2nd and 3rd street light will turn on while 1st street light will turn off when ir sensor 2 activated. But the case with more than 1 car is different. Imagine if there are 2 cars in region 1, the 1st and 2nd led will turn on, but if one of the cars drive faster and passes through ir sensor 2, the 1st street light is off, regardless of there are still cars there. </p>
<p>car at sensor 1, IR output will be 100. led 1 and 2 will be on.</p><p>now a second car passes at sensor 2, IR output will be 110. led 1,2 and 3 will glow.</p><p>You will have to change the code completely. </p>
<p>I'm doing the same project, but when 2 cars pass by the different ir sensors AT THE SAME TIME, the whole program and circuit is not working.</p>
What is the power of LED that you have used?
<p>I don't know the power of the led, but they are directly connected to 5v of the arduino.</p>
Pls. Apload the picture of arduino in complete connections. I can not understand by the written part as I am a middle school boy. Pls. help me.
<p>when a car will be coming at a speed of 80 kmph , it will pass the street in a blink of ab eye before even sensors can respond.</p>
<p>how to power up all 3 IR sensors. Only one Sensor gets activated and the remaining 2 dont function.</p>
<p>n the circuit diagram you see the blue power and ground wires. Connect the 2 and 3rd IR sensor power and ground cable to them. the output of IR's to Arduino pin 1, 2.</p><p>similarly for the LED's. Ground all 4 and attach the +ve side to pin 5,6,7.</p>
<p>Somehow, this seems like it would be a great idea for a more important use, but I just can't think of one right now, but it is a terrific novelty and I'm impressed.</p>
<p>This is a neat idea. Thank you for sharing your project!</p>

About This Instructable

6,751views

15favorites

License:

More by Sankalp Mahajan:Bi-directional Communication Robot Tracking System Smart street lighting 
Add instructable to: