4 Way Traffic Signal - Seminar Paper

4 Way Traffic Signal
The project aims to design a Traffic Light Controller using VHDL and implement the Traffic Light Controller in FPGA. The traffic in road crossings/junctions are controlled by switching ON/OFF Red, Green & Amber lights in a particular sequence.  The Traffic Light Controller is designed to generate a sequence of digital data called switching sequences that can be used to control the traffic lights of a junction in a fixed sequence using VHDL.

Traditionally traffic lights are controlled by microcontroller 89C51. The primitive mechanical traffic lights have no way of having a versatile delay. But using CPLD as a 16-bit μP and use it in the domestic application to improve the primitive mechanical traffic lights.This project attempts control the traffic lights using VHDL.
It is often useful to be able to sequence through an arbitrary number of states,staying in each state an arbitrary amount of time. For example, consider the set of traffic lights shown in Figure 8.13. The lights are assumed to be at a four-way intersection with one street going north-south and the other road going east-west.
 Being an electronic system it is reliable, compact and maintenance free. VHDL makes the system versatile as the on off times can be easily varied by changing the delay loops through software. Even the sequence of lights i.e. whether the yellow light has to glow or not can be programmed easily by modifying the software. This project is practically implemented and tested. Because Programmable Integrated Circuits provides repeatability and flexibility, we can program it more than 10,000 times. And this is not possible is fixed logic IC’s. The best part of using CPLD is we can easily reprogram it. We do not have need to remove the CPLD from the hardware we can program it by placing it into the same board.

Functional Block Design
It includes                                                                                                                                                                               

  • CPLD XC9572
  • Traffic Lights 
  • Clock Generator(Astable Multivibrator)
  • ULN2803 Driver
  • Power Supply(+5V,+12V)

A. CPLD XC9572 
In the world of digital electronic systems, there are three basic kinds of devices: memory microprocessors, and logic devices. Memory devices store random information such as the contents of a spreadsheet or database. Microprocessors execute software instructions to perform a wide variety of  tasks such as running a word processing program or video game. Logic devices provide specific functions, including device-todevice interfacing, data communication, signal processing, data display, timing and control operations, and almost every other function a system must perform. In case of CPLD, it has wiring among the logic in the IC. So, the wiring on the printed board can be made little.

Complex Programmable Logic Devices (CPLDs) are exactly what they claim to be. Essentially they are designed to appear just like a large number of PALs in a single chip, connected  to each other through a cross point switch They use the same
development tools and programmers, and are based on the same technologies, but they can handle much more complex logic and more of it. Xilinx is a vendor of CPLD products and manufactures a family known as the XC9500. Logic blocks, or function blocks in Xilinx’s terminology, each contain 18 macrocells, the outputs of which feed back into the switch matrix and drive I/O pins as well. XC9500 CPLDs contain multiples of 18 macrocells in densities from 36 to 288 macrocells. Each function block gets 54 input terms from the switch matrix. These input terms can be any combination of I/O pin inputs and feedback terms from other function blocks macrocells.

B. Traffic Lights
one of a set of coloured lights placed at crossroads, junctions, etc., to control the flow of traffic. A red light indicates that traffic must stop and a green light that it may go: usually an amber warning light is added between the red and the green.

C. Clock Generator
555 timer operates in modified astable multivibrator generating clock of 4MHz provides clock cycles to execute instructions of program load into CPLD.

D. ULN2803 
Driver A ULN2803 is an Integrated Circuit (IC) chip with a High Voltage/High Current Darlington Transistor Array. It allows us to interface TTL signals with higher voltage/current loads. The chip takes low level signals (TLL, CMOS, PMOS, NMOS - which operate at low voltages and low currents) and acts as a relay of sorts itself, switching on or off a higher level signal on the opposite side.
A TTL signal operates from 0-5V, with everything between 0.0 and 0.8V considered "low" or off, and 2.2 to 5.0V being considered "high" or on. The maximum power available on a TTL signal depends on the type , so it is not useful for providing power to something like a relay coil. Computers and other electronic devices frequently generate TTL signals. On the output side the ULN2803 is generally rated at 50V/500mA, so it can operate small loads directly. Alternatively, it is frequently used to power the coil of one or more relays, which in turn allow even higher voltages/currents to be controlled by the low level signal. In electrical terms, the ULN2803 uses the low level (TTL) signal to switch on/turn off the higher voltage/current signal on the output side.
The ULN2803 comes in an 18-pin IC configuration and includes eight (8) transistors. Pins 1-8 receive the low level signals, pin 9 is grounded (for the low level signal reference). Pin 10 is the common on the high side and would generally be connected to the positive of the voltage you are applying to the relay coil. Pins 11-18 are the outputs (Pin 1 drives Pin 18, Pin2drives17,etc.).

 E.Power supply-
A power supply is a device that supplies electric power to an electrical load. The term is most commonly applied to devices that convert one form of electrical energy to another, though it may also refer to devices that convert another form of energy (mechanical, chemical, solar) to electrical energy. A regulated power supply is one that controls the output voltage or current to a specific value; the controlled value is held nearly constant despite variations in either load current or the voltage supplied by the power supply's energy source.We use power supply of Power Supply (+5V,+12V)

Delays in Traffic 
The delay is defined by the amount of additional time a vehicle takes to complete its journey through the network because of traffic lights. Another interesting metric is the throughput which gives the number of vehicles that cross the intersection in a specified amount of time. One of the solutions to this problem would be to design controllers that use adaptive policies. Such adaptive systems could react to current perceptions of traffic conditions and select the best actions in order to optimize the traffic flow at the intersection. Moreover, these adaptive systems could even be equipped with communication networks that could enable adaptive coordination between different intersections in order to improve the traffic flow globally. Such coordination could help minimize the overall delay caused by traffic signals.

Traffic lights operate with the rising edge of the clock. This is generated by using the 555 timer (Astable Multivibrator).The Programming is done in VHDL language. Its working is similar to Normal traffic lights. But single CPLD chip can be used to control the traffic of number of road signals. Because it has large number of input and output pins . in its working +5V is given to the CPLD and as it receive the rising edge of clock, and it starts its sequence of traffic lights We can increase or decrease the delay between the transition of signals according to the requirement. 
 It reduces the complexity and have number of advantages of using CPLD instead of microcontroller.  LED’s are connected to CPLD pins through ULN2803(current driver) and Relays. The logic which will be one of the pin will be given to current driver. Current driver will invert the logic and will give this invert signal to the relay and the logic which will be High it will activate the coil and hence on the light and vice versa.+12 v supply is given to Relays. Relays are connected to zener diode to ULN2803 to avoid the back off current.
It is often useful to be able to sequence through an arbitrary number of states, staying in each state an arbitrary amount of time. For example, consider the set of traffic lights shown in Figure 8.13. The lights are assumed to be at a four-way intersection with one street going north-south and the other road going east-west.
To simulate these traffic lights we will use the red, yellow, and green LEDs and cycle through the six states. The red-red condition provides a bit of a safety margin. However, traffic controllers also have timing requirements. For example we can specify that a Green light is required to stay on for 5 seconds and the Yellow light for 1 seconds. 
If we add the requirement that both lights are Red for only one second, the timing for the traffic light controller is completely specified.Since the clock period for the controller is one second, one way to keep the green light on for 30 seconds would be to replace each of the two states that set the green light on with a linear sequence of 30 states, each of which has the same outputs as the state that was replaced. Similarly, we would replace each of the states that set a yellow light on with 4 equivalent states. Thus, with the two states that are responsible for Red-Red outputs, our controller would require a total of 70 states. While this only requires 7 flip-flops, it would be very difficult to design since it is next to impossible to use K-Map techniques to minimize functions of more than 6 variables.


  1. jose joseph ,jozpunnenz@gmail.com,BE 3RD SEM EEE

  2. jose joseph,jozpunnenz@gmail.com,be 3rd sem eee


leave your opinion