Documente Academic
Documente Profesional
Documente Cultură
CHAPTER 1
INTRODUCTION
INTRODUCTION
A traffic light is a collection of two or more coloured lights found at some junctions and
pedestrian crossings which indicates whether it is safe and/or legal to continue across the
path of other road users. In the United Kingdom, traffic lights are widely used both on
major roads and in built-up areas. Their numbers have increased exponentially since they
The operation of standard traffic lights which are currently deployed in many junctions,
are based on predetermined timing schemes, which are fixed during the installation and
remain until further resetting. The timing is no more than a default setup to control what
may be considered as normal traffic. Although every road junction by necessity requires
different traffic light timing setup, many existing systems operate with an over-simplified
sequence. This has instigated various ideas and scenarios to solve the traffic problem.
To design an intelligent and efficient traffic control system, a number of parameters that
represent the status of the road conditions must be identified and taken into consideration.
The first traffic lights actually had their roots in the railway signals used at the time,where
two gas lamps, one red and one green, would be alternately hidden by a semaphore arm
depending on whether the arm was in a horizontal position or at a 30 angle. The first
lights were installed outside the Houses of Parliament in London on 10 December, 1868 to
control the increasing number of vehicles there. However, according to some sources, they
The first electric lights were developed in the USA in the early 20th Century. Various
people lay claim to the invention of the modern traffic light. These include:
(i) Lester Wire, a Salt Lake City policeman who set up the first red-green electric
(ii) James Hoge, from Cleveland, who in 1914 designed some red-green electric lights
(iii) William Potts from Detroit, who designed the first three-colour electric traffic
lights in 1920.
(iv) John Harriss, a Police Commissioner from New York who developed the first
(v) Garrett Morgan, from Cleveland, who in 1923 designed a cross-shaped signalling
Once the USA had finished reinventing the traffic light, it was adopted in the UK. The first
lights are often operated by complex computer software designed to optimise traffic flow
[1]. This optimization is done using the Programmable Logic Controller (PLC).
The aim of this project is to design a program for Programmable Logic Controller(PLC)
that could minimize the waiting time of the cars at intersections, when the trafficvolume is
significantly high. Besides that, it can prevent the emergency car stuck in thetraffic jam at
4. To design a program that works together with a model of four- junction traffic light and
sensors.
5. To build the model of four-junctions of intelligent traffic light that can overcome some
3. Combine the software part and the hardware part to simulate a traffic light system.
Chapter 1 is the introduction to traffic light systems. This chapter also explains about
Chapter 2 will describe all techniques, the theory and concepts behind Traffic Lights and
PLC automation. All requirements and preliminary design details will be explained in this
Chapter 3 focuses on hardware development and configuration. This chapter explain every
detail about PLC FESTO FEC FC34and traffic light model. The wiring diagram forthis
Chapter 4 deals with the software development using FESTO Software Tools FST 4.10
Programmer. These chapters also discuss the flowchart and development programfor
Chapter 5 presents all the results obtained and the configuration of doing simulation in the
real world.
Chapter 6 discusses the conclusion of this project, the development of traffic lightcontrol
system using Programmable Logic Controller. This chapter also explains theproblem and
the recommendation for this project and for the future development orsystemmodification.
CHAPTER 2
REVIEW OF PROJECT
LITERATURE REVIEW
2.1 Introduction
Traffic signals are the most convenient method of controlling traffic in a busy
junction.But, we can see that these signals fail to control the traffic effectively when a
particular lane has got more traffic than the other lanes. This situation makes that
particular lane more crowdy than the other lanes. If the traffic signals can allot different
time slots to different lanes according to the traffic present in each lane, then, this problem
The most basic traffic light consists of three bulbs with different coloured lenses, which
from top to bottom are red, amber and green. In the UK, the lights commonly use a
1. Red this indicates that traffic must stop behind the line. It is compulsory for all
road users to do so. Some traffic lights even have cameras to catch drivers breaking this
law.
2. Red and Amber this combination of bulbs indicates that the lights are about to
change to green, and gives drivers time to release their handbrake and prepare to drive off
as soon as they are allowed to do so. This phase was first introduced in 1958.
3. Green this indicates that traffic may pass through the junction, provided that it is
safe to do so and the way is clear. Some junctions are marked with a hash of yellow lines
forming a box, which indicates that drivers must not stop on the box unless they are
4. Amber this warns traffic that it should stop unless it is unsafe to do so. In the
UK it is legal to pass through an amber light, as the phase exists to warn drivers not yet at
Traffic lights at junctions will always follow this pattern, with conflicting flows of traffic
being forced to take turns. Often the green bulb is replaced with two or more green arrows
or filter lights, which indicate that traffic turning left or right may go, while a red light
remains to instruct oncoming traffic to wait. It is now quite common for vehicles turning
right to have to wait for a separate filter light, even if the way is clear. Despite being
relatively simple, filter arrows are often 'mistaken' for an instruction to go by drivers who
want to turn a different way to that shown. Problems are also known to arise from
motorists watching the other lights at junctions and anticipating their own movement, and
so shades are used to hide the lights from both drivers and from the sun, which would
It is interesting to note that the UK is one of only a few countries not to have a 'left on red'
rule, where cars are allowed to pass through a red light if it is safe to turn left; in the UK,
red lights and filter lights must always be obeyed.A recent improvement in traffic light
technology has come with the development of red, amber and green light-emitting diodes
(LEDs). Arrays of these tiny bulbs can be used to replace the existing light bulbs in traffic
lights and are clearer and more energy-efficient. It is estimated that replacing all the traffic
light bulbs in the UK with LEDs would save enough energy to power the city of Norwich.
Many junctions also have pedestrian crossings built into them, where red and green signals
in the shape of a walking (green) or standing (red) figure indicate to pedestrians whether it
is safe to cross. There is also a blank phase where both signals are unlit; indicating that it
is still safe to continue crossing but there is not enough time for the average 90-year-old to
make it in time if they start now. These crossings often have associated push-buttons for
use by pedestrians, but their only apparent action is to display the word WAIT in large,
friendly letters. Some of these boxes do, however, have a small knob underneath which
revolves when it is safe to cross, which can be useful for the visually impaired. It is
important to note that in the UK, although it is not illegal to jaywalk, doing so violates the
Highway Code and those responsible are liable for any resulting accident. Those using
pedestrian crossings on side roads have right of way over vehicles once they have begun to
cross [1].
A different sequence to the one mentioned above is used at pelican crossings, where the
crossing is not associated with a junction, but is designed purely to allow pedestrians to
cross busy roads. The push buttons at these crossings actually stop the traffic after a short
delay, and the green figure is often accompanied by a beeping sound. The red and amber
phase is replaced by a flashing one, indicating that drivers may continue if there are no
pedestrians on the crossing; at the same time the beeping stops and a flashing green figure
indicates to pedestrians still waiting to step out onto the crossing that they should wait for
the next green man signal to give them right of way. Pedestrians already on the crossing
Similar crossings are provided for cyclists (toucan crossings) and for horse riders (pegasus
crossings). These crossings sometimes feature red and green cycles or horses. Another
development on the theme of the pelican crossing is the puffin crossing, where a sensor
detects if there are pedestrians on the crossing, making the flashing phase used on pelican
crossings obsolete. These crossings do, however, cause confusion, as the red and green
men are sighted above the push button and not on the opposite side of the road. There are
some crossings that do not involve any coloured light sequences. The zebra crossing
features a pair of flashing amber Belisha Beacons, while badger crossings do not have any
lights at all.
detectionsystem.For the last two decades most traffic lights at busy intersections and
pedestrian crossings have been controlled by inductive loop sensors. Normally seen as
dark square outlines on the road surface, they detect a passing vehicle by using a magnetic
field to detect the metal components in the passing vehicle. They then send information on
The inductive loop system however has a number of important drawbacks, firstly is that
they are often easily damaged by road degradation, utility works or road maintenance and
secondly the need to close a section of road to install the system and its associated wiring,
Although the main purpose is to control traffic at junctions and to allow pedestrians to
Traffic control at road works, where pair of three-bulb traffic lights has replaced
Lights at level crossings and drawbridges, where a single steady amber light
precedes a pair of flashing red lights indicating that traffic must stop. These are also used
to allow emergency services vehicles out of depots on busy roads, and to allow animals to
Lane control on motorways, where white arrows instruct drivers to change lane or
Lane control on busy roads where the middle lane is used by rush-hour traffic
heading one way in the morning and the other in the afternoon. Here, green arrows
driving, where red usually means 'bad' or 'unavailable' and green means 'good' or 'in
plentiful supply'. Applications can range from rating the severity of an emergency to use at
'traffic light parties', where the colours give an indication of one's availability to the
proposition of a relationship.
At the cheesy discos of the 1970s, where actual traffic lights were used as disco
In traffic-light jelly.
Traffic signals are used to control the flow of vehicles through an intersection, which can
have devices that detect the presence of vehicles in a traffic lane. Detection increases the
intersections, there are all sorts of technologies for detecting vehicles. Some of these
technologies are microwave and millimetre-wave radar, active LED infrared radar, video
image detection system (VIDS) and loop detector among others [2]. Because the traffic
flow rates change from time to time, it is often desirable to adapt the detector to the actual
offered traffic light controller. Detectors that indicate the presence or absence of vehicles
are necessary for this type of control. With the information from these detectors, the
Loop Detectors
Loop detectors are strands of wire embedded into the pavement in a rectangular or round
or below the road surface. When energized, the loop creates a magnetic field. When a
vehicle passes over the loop, the frequency of the magnetic field changes. A device in the
traffic signal controller cabinet detects this change in frequency and signals the traffic
signal controller to provide that vehicle with a green indication during the traffic signal
cycle. The loop is attached to a signal amplifier and a power source, creating an
electromagnetic field in the area of the loop. The wire loop is excited at frequencies from
10 kHz to 200 kHz. In conjunction with pull box electronics, the loop becomes an
inductor, whose inductance decreases whenever a vehicle or other larger metallic object
passes over it or stops on it. The resulting inductance change generates a signal to a
controller [2].
Figure 2.0: Loop detector installed beneath the asphalt of a road intersection.
Video Detection
Video detection uses cameras mounted on poles over the travel lanes. Machine vision
technology analyzes the video images and sends an electronic signal to the traffic signal
Radar Detection
Radar detection uses microwave radar sensors mounted over the travel lanes. Energy is
sent from the radar unit to the traffic lane and the reflected energy is measured by a sensor.
A defined change in the reflected energy is used to signal the controller to serve that
vehicle.
Infrared (IR) detectors operate on the same principles as microwave radars, but transmit
low power energy from light emitting diodes (LEDs) or from laser diodes. The detector
senses a portion of the reflected energy in its field of view. The distance of an object from
the detector is found by measuring the two-way travel time of the infrared pulse, from the
detector to the target and back. The IR detector then focuses the rebound energy from
vehicles and translates it into electrical pulses. IR detectors can be used for passage of
moving objects, presence or absence of objects and detecting speed of objects. Active IR
detectors can be mounted on bridge overpasses or on existing poles. More than one IR unit
can be mounted to a pole without signal interference degrading performance. Units are
Public agencies consider a range of factors in selecting the most appropriate vehicle
detection technology for a given location, including initial cost, accuracy, reliability and
mounted on a concrete pad. Traffic controllers use the concept of phases, which are
directions of movement lumped together. For instance, a simple intersection may have two
phases: North/South, and East/West and these phases are either controlled by controllers
fixed time mode or detector which is through the use of transducers. Although some
miniature circuit breaker, power panel, programmable logic controller and the dimming
transformer[3].
figure 2.3: Functional block diagram of a traffic lights intersection system [3].
The pedestrian push button assembly has a rigid frame having a piezoelectric material of a
solid state switch positioned across a central aperture, and an elastic sealing ring
rigid frame such that a seal contact portion of the button sealable rests against the elastic
sealing ring. A very small space separates an abutment surface of the button and a stopper
surface of the rigid frame, and an elastic pressure portion of the button contacts the
piezoelectric material. When operated, the elastic sealing ring is sufficiently biased to urge
the elastic pressure portion against the piezoelectric material to generate a pulse signal
which travels through wires to the controller to announce the presence of a pedestrian at
the junction. The pedestrians push button is installed about 1.2 m from the surface of the
ground on a traffic light pole with the help of bolts and nuts [3].
The miniature circuit-breaker provides efficient and reliable protection for traffic light
cables and the controller cabinet in traffic light installations. Three different tripping
characteristics provide the ideal solution for all applications from cable protection up to
the protection of controller cabinet [3]. The power supply module takes 240 V ac and
distributes 5 V dc power to the PLCs Central Processing Unit, 24V dc to the transducers
and 240 V ac to both the dimming transformer and output devices. The dimming
transformer is a single phase 240/110 V transformer, which in conjunction with the PLC
reduces the illumination of the signal heads in the evening. This usually affects the vision
of drivers.
CHAPTER 3
that performs discrete or continuous control functions in a variety of processing plant and
for use in an industrial environment, which uses a programmable memory for the integral
sequencing, timing, counting, and arithmetic to control through digital oranalog inputs and
In the late 1960's PLCs were first introduced. The primary reason for designing such a
device was eliminating the large cost involved in replacing the complicated relay based
machine control systems. It was invented to replace the necessary sequential relay circuits
for machine control. The PLC works by looking at its inputs and depending upon their
state, turning on/off its outputs. The user enters a program, usually via software, that gives
the desired results. Bedford Associates (Bedford, MA) proposed something called a
companies at the time proposed computer based schemes, one of which was based upon
the PDP-8. The MODICON 084 brought the world's first PLC into commercial
production.
When production requirements changed so did the control system. This becomes very
expensive when the change is frequent. Since relays are mechanical devices they also have
Troubleshooting was also quite tedious when so many relays are involved. Now picture a
machine control panel that included many, possibly hundreds or thousands, of individual
relays. The size could be mind boggling. How about the complicated initial wiring of so
many individual devices! These relays would be individually wired together in a manner
that would yield the desired outcome. Were there problems? You bet!
These "new controllers" also had to be easily programmed by maintenance and plant
engineers. The lifetime had to be long and programming changes easily performed. They
also had to survive the harsh industrial environment. That's a lot to ask! The answers were
to use a programming technique most people were already familiar with and replace
In the mid 70's the dominant PLC technologies were sequencer state-machines and the bit-
slice based CPU. The AMD 2901 and 2903 were quite popular in Modicon and A-B PLCs.
Conventional microprocessors lacked the power to quickly solve PLC logic in all but the
smallest PLCs. As conventional microprocessors evolved, larger and larger PLCs were
being based upon them. However, even today some are still based upon the 2903. (Ref A-
B's PLC-3) Modicon has yet to build a faster PLC than their 984A/B/X which was based
Communications abilities began to appear in approximately 1973. The first such system
was Modicon's Modbus. The PLC could now talk to other PLCs and they could be far
away from the actual machine they were controlling. They could also now be used to send
and receive varying voltages to allow them to enter the analog world. Unfortunately, the
lack of standardization coupled with continually changing technology has made PLC
manufacturing automation protocol (MAP). It was also a time for reducing the size of the
programmers. Today the world's smallest PLC is about the size of a single control relay!
The 90's have seen a gradual reduction in the introduction of new protocols, and the
modernization of the physical layers of some of the more popular protocols that survived
the 1980's. The latest standard (IEC 1131-3) has tried to merge plc programming
languages under one international standard. We now have PLCs that are programmable in
function block diagrams, instruction lists, C and structured text all at the same time! PC's
are also being used to replace PLCs in some applications. The original company who
commissioned the MODICON 084 has actually switched to a PC based control system.
What will the 00's bring? Only time will tell [4]. Compared with electromechanical relay
Rugged construction
Modular design
PLCs are used in many real world applications like machining, packaging, material
handling and automated assembly industries. PLCs can be employed in almost all
For example, lets assume that when a switch turns on, we want to turn a solenoid on for 5
seconds and then turn it off regardless of how long the switch is on for. We can do this
with a simple external timer. But what if the process included 10 switches and solenoids?
Traffic Control System
23
We would require 10 external timers. What if the process also needed to count how many
times the switches individually turned on? We need a lot of external counters. As you can
see, the bigger the process, the more of a need we have for a PLC.
Programmable logic controllers are used throughout industry to control and monitor a
wide range of machines and other movable components and systems. PLC is used to
monitor input signals from a variety of input points (input sensors) which report events
typically found in factory type settings. PLCs are used to control robots, assembly lines
and various other applications that require a large amount of data monitoring and control.
The basic PLC schema include CPU, power supply, memory, Input block, output
CPU modules - The Central Processing Unit (CPU) Module is the brain ofthe PLC.
Primary role to read inputs, execute the control program, update outputs.The CPU consists
memory containingthe PLCs operating system, driver programs and application programs
and theRAM memory. PLC manufacturer offer various types of retentive memory to
saveuser programs and data while power is removed, so that the PLC can resumeexecution
vii. Compact Flash Can store complete program information, read & write textfiles.
viii. I/O Modules - Input and output (I/O) modules connect the PLC to sensorsand
actuators. Provide isolation for the low-voltage, low-current signals thatthe PLC uses
internally from the higher-power electrical circuits required bymost sensors and actuators.
Wide range of I/O modules available including:digital (logical) I/O modules and analogue
Many PLC configurations are available, even from a single vendor. But eachof thesehas
i. Power Supply This can be built into the PLC or be an external unit.Common voltage
ii. CPU (central Processing Unit) This is a computer where ladder logic isstored and
processed.
iii. I/O (Input/output) A number of input/output terminals must be provided sothat the
PLC can monitor the process and initiate actions. Inputs to, andoutputs from, a PLC is
necessary to monitor and control a process. Bothinputs and outputs can be categorized into
two basic types: logical orcontinuous. Consider the example of a light bulb. If it can only
be turned onor off, it is logical control. If the light can be dimmed to different levels, it
iscontinuous.
iv. Indicator lights These indicate the status of the PLC including power on,program is
vi. Mini: These are similar in function to PLC racks, but about the half size.Dedicated
Backplanes can be used to support the cards OR DIN railmountable with incorporated I/O
bus in module.
vii. Shoebox: A compact, all-in-one unit that has limited expansion capabilities.Lower cost
and compactness make these ideal for small applications. DINrail mountable.
viii. Micro: These units can be as small as a deck of cards. They tend to havefixed
quantities of I/O and limited abilities, but costs will be lowest. DIN railmountable
reconfigured to meet the demands of the particular process being controlled. The processor
and I/O circuitry are normally constructed as separate modules that maybe inserted in a
The PLC mainly consists of a CPU, memory areas, and appropriate circuits to receive
input/output data. We can actually consider the PLC to be a box full of hundreds or
thousands of separate relays, counters, timers and data storage locations. Do these
counters, timers, etc. really exist? No, they don't "physically" exist but rather they are
simulated and can be considered software counters, timers, etc. These internal relays are
physically exist and receive signals from switches, sensors, etc. Typically they are not
outside world nor do they physically exist. They are simulated relays and are what enables
a PLC to eliminate external relays. There are also some special relays that are dedicated to
performing only one task. Some are always on while some are always off. Some are on
only once during power-on and are typically used for initializing data that was stored.
COUNTERS: These again do not physically exist. They are simulated counters and
they can be programmed to count pulses. Typically these counters can count up, down or
both up and down. Since they are simulated they are limited in their counting speed. Some
manufacturers also include high-speed counters that are hardware based. We can think of
these as physically existing. Most times these counters can count up, down or up and
down.
TIMERS: These also do not physically exist. They come in many varieties and
increments. The most common type is an on-delay type. Others include off-delay and both
retentive and non-retentive types. Increments vary from 1ms through 1s.
physically exist and send on/off signals to solenoids, lights, etc. They can be transistors,
DATA STORAGE: Typically there are registers assigned to simply store data. They
are usually used as temporary storage for math or data manipulation. They can also
typically be used to store data when power is removed from the PLC. Upon power-up they
will still have the same contents as before power was removed. Very convenient and
necessary!
A PLC works by continually scanning a program. We can think of this scan cycle as
consisting of 3 important steps. There are typically more than 3 but we can focus on the
important parts and not worry about the others. Typically the others are checking the
system and updating the current internal counter and timer values.
Step 1-CHECK INPUT STATUS-First the PLC takes a look at each input to determine if
it is on or off. In other words, is the sensor connected to the first input on? How about the
second input? How about the third... It records this data into its memory to be used during
Step 2-EXECUTE PROGRAM-Next the PLC executes your program one instruction at a
time. Maybe your program said that if the first input was on then it should turn on the first
output. Since it already knows which inputs are on/off from the previous step it will be
able to decide whether the first output should be turned on based on the state of the first
input. It will store the execution results for use later during the next step.
Step 3-UPDATE OUTPUT STATUS-Finally the PLC updates the status of the outputs. It
updates the outputs based on which inputs were on during the first step and the results of
executing your program during the second step. Based on the example in step 2 it would
now turn on the first output because the first input was on and your program said to turn
After the third step the PLC goes back to step one and repeats the steps continuously. One
scan time is defined as the time it takes to execute the 3 steps listed above.
There are different types of Programming language which support people with different
backgrounds. There are five programming languages that are supported by various
PLCs are well-adapted to a range of automation tasks. These are typically industrial
processes in manufacturing where the cost of developing and maintaining the automation
system is high relative to the total cost of the automation, and where changes to the system
would be expected during its operational life. PLCs contain input and output devices
compatible with industrial pilot devices and controls; little electrical design is required,
and the design problem centres on expressing the desired sequence of operations in ladder
logic (or function chart) notation. PLC applications are typically highly customized
systems so the cost of a packaged PLC is low compared to the cost of a specific custom-
built controller design. On the other hand, in the case of mass-produced goods, customized
control systems are economic due to the lower cost of the components, which can be
optimally chosen instead of a generic solution, and where the non-recurring engineering
For high volume or very simple fixed automation tasks, different techniques are used. For
units will be produced and so the development cost can be spread over many sales, and
where the end-user would not need to alter the control. Automotive applications are an
example; millions of units are built each year, and very few end-users alter the
programming of these controllers. However, some specialty vehicles such as transit buses
economically use PLCs instead of custom-designed controls, because the volumes are low
Very complex process control, such as used in the chemical industry, may require
algorithms and performance beyond the capability of even high-performance PLCs. Very
high-speed or precision controls may also require customized solutions; for example,
PLCs may include logic for single-variable feedback analog control loop, a "proportional,
integral, derivative" or "PID controller." A PID loop could be used to control the
configured with only a few analog control loops; where processes required hundreds or
thousands of loops, a distributed control system (DCS) would instead be used. However,
as PLCs have become more powerful, the boundary between DCS and PLC applications
PLCs have similar functionality as Remote Terminal Units (RTU). An RTU, however,
usually does not support control algorithms or control loops. As hardware rapidly becomes
more powerful and cheaper, RTUs, PLCs and DCSs are increasingly beginning to overlap
in responsibilities, and many vendors sell RTUs with PLC-like features and vice versa.
The industry has standardized on the IEC 61131-3 functional block language for creating
programs to run on RTUs and PLCs, although nearly all vendors also offer proprietary
This sensor provides the system with ability to detect the presence of object position. The
theory is the IR emitter emits infrared light. If an object presence the signal will be
reflected back to the receiver. Then, the IR detector implemented will detect the reflected
light. Then, the correspondence signal sends to the PLC for being analyze. Based on the
measurement of the intensity of the reflected light from the target area such a bottle, it has
a light source sending light to the moving target and a light sensor receiving the light. The
output signal from the sensor decreases exponentially with the increase of the distance to
the measured object. Infrared light-emitting diodes (LED's) and photosensitive diodes are
used in this transducer. The sensor output is inversely proportional to the amount of
technique determines and qualifies the shape of the measured object by processing data
CHAPTER 4
SYSTEM HARDWARE
SYSTEM HARDWARE
The hardware part of this project is Programmable logic controller (PLC), Power Pack,a
traffic light model and pairs of Infra-Red Sensors. Festo FEC FC34 is the type of PLC
used in this project as the processor to control the traffic light. The four ways traffic light
model was constructed to display how this trafficlight control system is running. This
traffic light model has a complete set of trafficlight signal which are red, yellow and green
as well as pedestrian red and green lights, for traffic signal on each lane. Each lane also
has one limit switches represent as a sensor on the road. The sensors are placed on each
lane to detect the presence of a car at the junction. The right connection between PLC and
traffic light model is veryimportant in order to avoid problem or conflict when the
Figure 3.1 shows the Festo FEC FC34 PLC configuration. The main body ofthis PLC is
power supply unit, Central processor unit and input/output slot. Thepower supply unit
receive the required PLC voltage which is 24Vdc. For safety thevoltage to PLC must be
connected to the earth. The CPU covered by Analog input/outputslot, RS232 port, and
processor. The inputs/outputs slots used for the system are usingdigital input and output.
There are limited slot for input and output portand can be used for multiple inputs/outputs
cards.
The four ways junction is developed using Woods, Steel, Bolts, Screws, Light Emitting
Diodes, Resistors and paints. In order to display the simulation of the traffic light control
system, each traffic light lane has a set of traffic light signal Red, Yellow, and Green.
This traffic light signal operates similar like common traffic light signal in the UK. It
changes from red to red and amber to green and then yellow and after that back to red
signal. Each lane also has one limit switches represent as a sensor on the road.The sensor
used for the design of these traffic light system is an infra-red detector which as an infra-
red diode and transistor as a pair. The sensors are placed on each lane to detect and count
the number of cars through that lane. From this combination of sensor, we will know the
expected time for green signal on when each lane change to the green signal.
Once hardware is designed ladder diagrams are constructed to document thewiring. For
this project, existed PLC cabinet box are use and connect with the trafficlight model. The
wiring of the PLC is as shown in figure 3.4. The PLC and I/O card would be supplied with
DC Power Supply of 24V.The common for input card is 24Vdc and for output card is
0Vdc. The PLC is connected to earth in order to avoid risk, hazards and damage to the
The PLC input wiring address start with number I0.0 to I0.7 for every input card. The
other input card which is installed to the PLC socket will carry the address for this input
card as I1.0 to I1.3. The PLC outputs wiring address start with number O0.0 to O0.7 for
Four infra-red sensors (detectors) are placed on 4 lanes coming to a junction, one per lane.
The sensor is placed at a distance away from the junction so that it doesnt get disturbed
by the vehicles stopping at the signal. These sensors are connected to the PLC, which
CHAPTER 5
SYSTEM SOFTWARE
SYSTEM SOFTWARE
FST-Programmer (Software) is a PLC programming tool for the creation, testing and
maintenance of programs associated FESTO PLCs. The FST software package supports
FEC Compact
FEC Standard
PS1 Professional
The FST software package is set-up on a Personal Computer (PC) in line with specific
de-install FST.
When FST is started, the FST program window appears. First, a logo appears in the
foreground which is then automatically hidden after a few seconds. Click on the logo
The Tip of the Day window is then shown. In the bottom section of the window you will
see the Show Tips after on StartUp checkbox. Tick to stop the tips appearing.
FST uses what is referred to as the multiple document interface (MDI). A separate window
within the FST program window opens for each document. The document window can be
activated and arranged using the commands in the Window menu.The size and position
of the windows is saved between the FST sessions. If the screen resolution is changed,
Windows adjusts the size and position of the windows. The FST software package is an
application for the Windows operating system. As such, the program interface and
operation are consistent with the usual Windows standard. The buttons, menu bar, picture
scroll bars etc. of the FST software therefore behave as they do in most other Windows-
based programs.
The project workspace can display a ladder program, the symbol table of that program or
the Statement List view. The details displayed depend upon the selection made in the
project workspace. When a new project is created or a new PLC added to a project, an
empty ladder is automatically displayed on the right-hand side to the project workspace.
The symbol table and Mnemonics view must be explicitly selected to be displayed. All
views can be opened at the same time and can be selected via options associated with the
ladder form. Programs can be created, edited, and monitored in the ladder diagram view.
[1] Title bar [2] Menu bar [3] Toolbar [4] Project window [5] Program editor window
Prior to the construction of a ladder logic diagram, program flowchart is ideal for aprocess
that has sequential steps. The steps will be executed in a simple order that may change as
the result of some simple decisions. The block symbol is connected using arrow to indicate
the sequence of the steps and different types of program actions. The other functions may
be used but are not necessary for most PLC applications. The concept of controlling a
traffic light control system is introduced, which is the systematic approach of control
system design using a PLC. The operation procedure of the systemapproach is shown in
The Festo FEC FC34 PLC is programmed according to the different variants using the
following programming software: FST FEC/IPC in Statement List and Ladder diagram,
which is largely based on the FST software for the FPC 100 or Multiprogwt in accordance
with IEC 1131-3. An RS232 cable is required in order to connect the PLC to the serial port
at the PC. A new project is created when a program is about to be written to the controller
task. Once created, it is saved to the current project directory. Before creating a new
project, the required project directory is set-up. When a new project is created, any project
In practice, programming is mostly started by entering the inputs and outputs into the
allocation list. The allocation list can be found in the Project Window below:
The allocation list consists of operands that match the physical input and output addresses
or configurations of the PLC to the names of the devices attached to it. Note each symbol
from the circuit diagram. The diagram of a LDR program is therefore similar to the
diagram of a circuit diagram in relation to the diagram of logical links. However, for the
LDR diagram, new symbols have been introduced for contacts and coils that are better
suited for displaying on a monitor. Due to the similarities with circuit diagrams, the LDR
technology. If a circuit diagram already exists for a control task, it can usually be
transferred to a LDR program. A LDR diagram is based on two vertical lines. In the
transfer sense, the left line is linked to the voltage source and the right is earthed. Between
them, the LDR diagram is compiled in the form of horizontally arranged rungs with
contacts, coils and other LDR symbols.Rungs consist of a condition part and an executive
part. The left side of a rung represents the condition part, which contains the logical and/or
arithmetical links, e.g. in the form of contacts and parallel branches. The right side of a
rung represents the executive part. This is where the action to be executedis programmed,
e.g. in the form of coils. A rung in the LDR therefore usually reads from left to right.As an
example, the diagram below shows a small section of a LDR program in the online
display.When the FST software is in online mode, contacts and coils and all lines that
report 1 signal are highlighted in blue. Operands that report 1 signal are tagged with ON,
[1] Condition part [2] Executive part [3] Operand [4] Coil symbols
When the LDR program is ready, clicking on the Build Project iconwill compile the
program. The FST software does not always agree with everything written down. A syntax
check, which searches the program for formal errors, is performed during compilation.
Any error which requires debugging will be displayed in the status bar. If there is no error,
you may proceed to go online and communicate with your PLC. This is
set automatically if the PLC can communicate effectively with the PC using the RS232
port. The next step would be to transfer the program to the PLC. Click on Download
Project icon. The message Download Complete must be given in the message window.
The controller after download is set to RUN status or configured to run automatically. In
any case, if the RUN LED is green, then the controller is already operating in the RUN
mode. If the LED is orange, then the controller must be set to RUN using the RUN/STOP
slide switch. If it is red, that indicates an error in the program. Then, the devices could be
CHAPTER 6
As mentioned in Chapter 3 and Chapter 4, all the system of the desired project was
implemented and the results of the systems illustrated in this Chapter. During the
operation, all activities that occur can be observed by the PC using FST software. The
system needs to debug along the way and fine tune if necessary. The system is test run
The prototype was mainly built by combining the wood design, steel design and the
electrical designs. The main power supply is in built into the FESTO didactic power
supply unit to supply 24V direct current needed by the PLC and other Devices.
The operation of the traffic lights starts when the program is downloaded into the PLC.The
traffic signal operation will start by the traffic lights illuminating in red for the
North/South (NS) lane and green for the East/ West (EW) lane for the period of 20 seconds
for the first timer (TON1). Then this timer operates the next timer and so on, in a way that
a sequential system is formed. The second timer (TON2) makes the NS to stay at red and
EW to change to amber (yellow), and is on for 5 seconds. The third timer (TON3) keeps
the NS at red and changes EW to red for a period of 2 seconds. The fourth timer (TON4)
changes the NS to red and amber, keeps the EW at red for 5 seconds. The fifth timer
(TON5) changes the NS to green and keeps the EW at red for 20 seconds. The sixth timer
(TON6) changes the NS to amber and held the EW at red for 5 seconds. The seventh timer
(TON7) changes the NS back to red and held the EW at red for 2 seconds. The eighth
timer (TON8) keeps the NS at red and changes the EW to red and amber for a period of 5
seconds. When the eighth timer (TON8) is off, it restarts the sequence, by restarting the
first timer (TON1) which held the NS at red and EW changes to green. The whole process
is that if one timer finishes, it starts the other, and this is a continuous process, only if there
The Pedestrian Lights for the EW only are illuminated during the sequential process of the
traffic lights due to the shortage of outputs on the PLC. The Pedestrian red light is
illuminated during the timing period of the first, second and third timer and changes to
green for the rest of the timing periods. The timing period for the eight timers is supposed
to make the pedestrian green light to flash but this was not possible due to the limitation in
the PLC operations. When the pedestrian button is pressed, it resets the third timer and
The inclusion of monitoring devices such as infra-red sensors will give a rough indication
of the traffic conditions, i.e., whether there is a high volume of traffic waiting to cross at a
particular junction. With this information, we will be able to fine tune the traffic control
system to change the traffic light timing to adapt to the traffic conditions. When the
vehicular traffic is low, the traffic light can change more frequently to minimize waiting
time. When the vehicular traffic is high, the traffic light can remain green for a longer
1. There is one counter for the North/South lane and one counter East/West lane; so that
the counters can compare the count with 2 different preset values (5 for each).
2. If the count is less than 5, the time allotted to that lane for the green light is 20s. If the
count gets to 5, the time allotted will become longer because the timer resets and the
The sensors on the NS and EW lane are programmed check the each lane condition. It will
check whether the sensors are triggered or not. In this project, four infrared sensors were
used to detect the presence of vehicles in all four directions. This functions as when a
vehicle blocks the sensor at a certain distance, the sensor is triggered and this will inform
the PLC that there is a vehicle in the specific lane and the counter counts 1. The current
instrumentationaspects take full advantage of the application of sensors in the real life
situation of traffic flow by optimizing the time between light changes. If there are no
vehicles on the road in all four directions, then the lights will change as pre-programmed
from red, to red-amber, to green, to amber, and back to red in both directions. This is a
5.3 Advantages
The traffic light system that had been developed presents several advantages. Since the
waiting time of the vehicles for the lights to change is optimal, the emission of carbon
monoxide from the vehicles is reduced. This will give a positive effect to the greenhouse
The traffic light system will also save the motorists time and reduce their frustration while
waiting for the lights to change since it helps in reducing congestion at the traffic
intersections. Another advantage is that there is no interference between the sensor rays
and there is no redundant signal triggering. By being able to interface with the FST
software, the PLC based traffic light system will easily accept feedback. Therefore there
CHAPTER 7
CONCLUSIONS
&
RECOMMENDATIONS
6.1 Conclusion
A traffic light system had successfully been designed and developed with proper
integration of both the hardware and the software. The pedestrian light for North/South
was not included due to insufficient output cards on the PLC, reasons stated in the next
section below. The infra-red sensors were interfaced with the Festo FEC FC34 PLC. This
interface is synchronized with the whole process of the traffic system. It could be seen
from the objectives of this project, that knowledge and skills were combined together in
order to complete this task. For this project, the knowledge of sequential systems,
electrical and electronics applications had been proven. The skill involved in this project is
the programming skills which makes you to think more as a student. The system will
encounter problems without proper integration of both the hardware and software related
to this project. Besides, this project, gave a challenge of having to learn some other craft
related work like painting, drilling, cutting of metals and woodwork. Automatically, this
project could be programmed in any way to control the traffic light model and will be
The Programmable Logic Controller that was originally chosen for this project was
FESTO FEC Edutrainer FC34 which has enough inputs and outputs cards to cater for the
whole outputs adjudged to the traffic light model but unfortunately it could not
communicate with the computer. Due to this and unavailability of enough PLCs, FEC
FC34 FST with less output was used and also the project progress was really affected.The
available space on the model could not cater for two sensors on each lane, in which one
will be detecting and the other will be counting. Also, having to learn another ladder logic
program for the FST software really took time and more challenging because what I have
simulated could no longer be used, since that was based on Allan Bradley Software.
The FESTO FEC FC34 PLC also has less functionality, unlike other PLC such as FEC
standard; FPC 405; FESTO CPX/IPC etc. It does not have a flashing mode, the CFM that
contains 4 flashing bits does not work with it. As a result, the pedestrian flashing mode is
6.3 Recommendation
The efficient operation can be achieved when there are enough Input/output cards for the
entire component used in this system. A more sophisticated and flexible PLC with enough
input/output cards should be used to provide enough functionality for the traffic light
system.
The traffic light system should be programmed and necessary circuitry added to operate in
three modes namely: Day, Emergency and Night modes. A wider area board should be
This prototype can easily be implemented in real life situations. Increasing the number of
sensors to detect the presence of vehicles can further enhance the design of the traffic light
system. Another room for improvement is to have the infrared sensors replaced with an
imaging system/camera system so that it has a wide range of detection capabilities, which
can be enhanced and ventured into a perfect traffic system. Different sensors should be
Bibliography/REFERENCES
[2] Huang Q. and Miller R., 2003. The Design of Reliable Protocols for Wireless Traffic
[5] Douglas Lewin& David Protheroe (1992), Design of Logic Systems, 2 nd Edition,
[6] Pallas-Areny, R., Webster, J., 2001, Sensors and Signal Conditioning,John Wiley &
[7] A. Albagul et al, 2006.Design and Development of Sensor Based Traffic Light System,
American Journal of Applied Sciences 3 (3): 1745-1749, ISSN 1546-9239. Accessed 23-
01-2011.
[8] Ryan G. Rosandich (1996), What to Know About PLC Ladder Diagram
[9] FESTO Software package FST, 2004. Programming in Statement List and Ladder
[10]WEBSITES: www.google.com;www.wikipedia.org;www.thelearningpit.com;
www.emeraldinsight.com/learning/index.htm?;www.festo.com;www.ieeexplore.org;