Jul 27, 2016

Traffic Light System with Pedestrian Crossing lights

How To Make Traffic Light System with Pedestrian Crossing lights 

How To Make Traffic Light System with Pedestrian Crossing lights

Traffic lights, also known as traffic signals, traffic lamps, traffic semaphore, signal lights, stop lights and (in technical parlance) traffic control signals,are signalling devices positioned at road intersections, pedestrian crossings, and other locations to control flows of traffic.I hope you all know the importance of Traffic Light System.And if you want to know more about its Working and mechanism then best way is to build a very simple and working modal at home with some basic knowledge and electric/electronics components. So today in this post i am going to show you that How To Make Traffic Light System with Pedestrian Crossing lights .Now days Pedestrian crossing lights is also added with the normal Traffic lights so to make a up-to-date traffic light system I added two more Led for Pedestrian crossing system because traffic lights are very basic and there are many posts available on the web.I also Modified glow of led with code and i will explain it latter.

Requirements to Make Traffic Light System with Pedestrian Crossing light:-

How To Make Traffic Light System with Pedestrian Crossing lights

  1. Arduino UNO r3 or any other Arduino Board
  2. Breadboard/Mini Bread board
  3. 2 x Red Led
  4. 2 x Green Led
  5. 1 x Yellow Led
  6. 5 x 220ohm or 150 ohm  resistors
  7. Male-to-Male jumper wires
  8. Desktop or lappy with Arduino IDE Software installed in it with some basic information about how to use it.

Basic Information About Parts and links to Buy -


Arduino UNO board


How To Make Traffic Light System with Pedestrian Crossing lights




The Arduino Uno is a micro controller board based on the ATmega328. It contains everything needed to support the micro controller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs ,a 16 MHz ceramic resonator ,a USB connection ,a power jack ,an ICSP header and a reset button.



  • It contains everything needed to support the micro controller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.
  • Micro-controller ATmega328 Operating Voltage 5V Input Voltage (recommended) 7-12V Input Voltage (limits) 6-20V
  • Digital I/O Pins 14 (of which 6 provide PWM output)
  • Analog Input Pins 6
  • DC Current per I/O Pin 40 mA
  • DC Current for 3.3V Pin 50 mA
  • Flash Memory 32 KB (ATmega328) of which 0.5 KB used by bootloader
  • SRAM 2 KB (ATmega328)
  • EEPROM 1 KB (ATmega328)
  • Clock Speed 16 MHz


Buy Arduino Board from here-


Arduino Uno R3 ATmega328P ATMEGA16U2 Compatible with USB Cable


LEDs:-
How To Make Traffic Light System with Pedestrian Crossing lights


A light-emitting diode (LED) is a two-lead semiconductor light source. It is a p–n junction diode, which emits light when activated.When a suitable voltage is applied to the leads, electrons are able to recombine with electron holes within the device, releasing energy in the form of photons. This effect is called electroluminescence, and the color of the light (corresponding to the energy of the photon) is determined by the energy band gap of the semiconductor.
An LED is often small in area (less than 1 mm2) and integrated optical components may be used to shape its radiation pattern
Simple LED have two terminal one is Anode (+) and other is cathode (-).Two identify them just check the size of legs/terminal the shorter one will be cathode (-) and longer one is Anode (+).




Circuit diagram To Make Traffic Light System with Pedestrian Crossing light:-

How To Make Traffic Light System with Pedestrian Crossing lights


Assembly:-
Assembly is very simple in this project Just Make sure that All the short legs will be connected to the ground(GND) pin of Arduino.



Code for Arduino board to Make Traffic Light System with Pedestrian Crossing light:-

How To Make Traffic Light System with Pedestrian Crossing lights

/* Andro Root "www.androroot.com" -Traffic Lights with pedestrian crossing
By Sourabh Kumar @ www.androroot.com */
int greenled = 8; //Traffic light Led's and pins
int yellowled = 9;
int redled = 10;
int pedgreenled = 7;//Pedestrian crossing Led's and pins
int pedredled = 6;
void setup(){
pinMode(greenled, OUTPUT); //Pinmodes of the leds
pinMode(yellowled, OUTPUT);
pinMode(redled, OUTPUT);
pinMode(pedredled, OUTPUT);
pinMode(pedgreenled, OUTPUT);
}
void loop(){
digitalWrite(greenled, HIGH); //Green on for 7 seconds
digitalWrite(pedredled, HIGH); // ped red on
delay(7000);
// flash the ped green
for (int x=0; x<8; x++) {
digitalWrite(greenled, HIGH);
delay(250);
digitalWrite(greenled, LOW);
delay(250);
}
digitalWrite(greenled, LOW); //Green off,
digitalWrite(pedredled, LOW);// ped.red off
digitalWrite(redled, HIGH); // red on
digitalWrite(pedgreenled, HIGH); // ped green on
delay(7000);
// flash the green
for (int x=0; x<10; x++) {
digitalWrite(pedgreenled, HIGH);
delay(250);
digitalWrite(pedgreenled, LOW);
delay(250);
}
digitalWrite(redled, LOW);//red off,yellow on,ped red on,
digitalWrite(yellowled, HIGH);
digitalWrite(pedredled, HIGH);
delay(3000);
digitalWrite(yellowled, LOW);//yellow off,pedgreen off
digitalWrite(pedgreenled, LOW);
}

As you can see and observe in the code that the both Green LED blinks/Flashes some times.i added it to show the pedestrian and the traffic that Now the Red Led will be on very quickly so just cross the road quickly.



Now burn this code on the arduino board.And enjoy.......



Also Read:-
Final Result:-

How To Make Traffic Light System with Pedestrian Crossing lights How To Make Traffic Light System with Pedestrian Crossing lights


I hope That After Reading and follow all the steps and guide you can make a Traffic Light System with Pedestrian Crossing lights without any difficulty. Thank you for reading And Keep Visiting.Follow us on Andro Root's Facebook Page  and if you have any confusion please use the comment section.

0 comments:

Post a Comment

Join Us on Facebook