project report44
TRANSCRIPT
INTELLIGENT AMBULANCE FOR TRAFFIC CITY AND CONTROL TRAFFIC BASED ON
ITS DENSITY
Faculty of Electronics & Communication Engineering
B.TECH (Electronics & Communication Engineering)
PRIST UNIVERSITYTHANJAVUR
COORDINATOR DEAN
INTELLIGENT AMBULANCE FOR TRAFFIC CITY AND CONTROL TRAFFIC BASED ON
ITS DENSITY
Submitted as partial fulfillment of the requirements for the award of the Degree of Bachelor of Technology in Electronics & Communication
Engineering
Submitted ByAbhishek Kunal 21082210041Ravi Kumar 20182210231Pravin Kumar 21082210200Nawjeet Kumar 21082210171
Under the Guidance ofR.Ramya Devi M.Tech
FACULTY OF ENGINEERING AND TECHNOLOGY
DEPARTMENT OF ELECTRONICS & COMMINICATION ENGINEERING
PRIST UNIVERSITY
THANJAVUR - 613 403.
March – 2012
FACULTY OF ENGINEERING AND TECHNOLOGYDEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING
PRIST UNIVERSITYTHANJAVUR - 613 403.
BONAFIDE CERTIFICATE
This is to certify that the project titled “INTELLIGENT AMBULANCE FOR
TRAFFIC CITY AND CONTROL TRAFFIC BASED ON ITS DENSITY” is a bonafide
record of work done by Abhishek Kunal 21082210041, Ravi Kumar
21082210231 , Pravin Kumar 21082210200 , Nawjeet Kumar
21082210171 in partial fulfilment of the requirements for the award of the
degree of Bachelor of Technology in Electronics & Communication
Engineering of PRIST University, Thanjavur.
Internal Guide Head of the Department
Submitted for the University Viva-Voce examination held on -------------
External Examiner Internal Examiner
ACKNOWLEDGEMENT
The joy and sense of fulfilment that comes along with the successful completion
of any task is complete with the thanking of all those people who made it possible with
their guidance and constant word of encouragement.
We thank our God Almighty for giving us such a excellent facilities and support
through the way of PRIST UNIVERSITY and its Chief Administrator our beloved
Founder & Honorable Chancellor Mr.P.MURUGESAN, for giving us the opportunity
and facilities for completion of this project.
We thank our Vice Chancellor Prof.Dr.N.Ethirajalu, who has always served as a
inspiration for us to perform our institutes name and recognition. We would like to express
our faithful thanks to our Pro Chancellor Prof. Dr.P.S.M Kannan and Dean Prof.
Dr.Willson H.Vincent for having extended all the department facilities without hesitation.
We would like to express our heart-felt gratitude to Associate Dean.
Prof.G.kannan and Head of the Department Prof.A.Rijuvana Begum for the interest
shown by him in this project and for having extended his impartial suggestions
We thank specially MS. R.Ramya Devi, our Internal Guide for giving extremely
valuable guidance and supported us throughout the course of project.
We also thank all the staff members of Electronics and Communication
Engineering Department for their kind cooperation and timely help.
i
SYNOPSIS
Day by day increasing population increases traffic and vehicles also which causes
problems in transportation and management of traffic. Mainly traffic controls at the
crossings required smart traffic signalling system which have high degree of flexibility
according to the flow of traffic in auxiliary roads, on the crossing some roads have a
high density of traffic required rapid release of traffic to maintain the smooth flow of
traffic on busy roads.
In this project we develop a system which sense the traffic density on the particular road
and change the red signal duration accordingly. Here we use IR/Ultrasonic sensors fitted
along the road side to detect the presence of vehicles and change the value of resistance to
change the frequency of the oscillator built around the timer IC which feed to the Johnson
counter and change the cycle rate to control the red/green signals according to the traffic
density. This a simple and effective solution for traffic busy crossings to control
automatically the flow of traffic without disturbing the auxiliary roads.
LIST OF FIGURES
FIGURE NAME PAGE NO.
1.1 Traffic light 1
4.1 Pin Diagram 15
4.2 LCD 19
4.3 Timming Diagram of LCD 21
4.4 Character Display in LCD 22
4.5 Package Dimension Of LED 23
4.6 LED 29
4.7 Micro Vision 33
4.8 D Scope 34
5.1 Model Of Traffic junction 35
5.2 Time Based 36
5.3 Sensor Based 37
6.1 Traffic Control Unit 41
6.2 Microcontroller 43
6.3 Driver Circuit 44
6.4 LCD 45
6.5 LED 46
10.1 Traffic Control Unit 58
10.2 Ambulance Section 59
iii
TABLE OF CONTENTS
TITLE PAGE NO
ACKNOWLEDGEMENT i
SYNOPSIS ii
LIST OF FIGURES iii
CHAPTER 1: INTRODUCTION 1
1.1 Overview of traffic light system 1
1.2 History 2
1.3 Standard 4
1.3.1 European Standard 4
1.3.2 British Standard 4
1.3.3 North American Standard 5
1.3.4 Asian Standard 5
1.4 Technology 51.4.1 Optical and Lightning 5
1.4.2 Programmable Visibility Signals 6
CHAPTER 2: EXISTING SYSTEM 7
2.1 Pre-Timed Controllers 7
2.2 Traffic Acutated 8
CHAPTER 3: PROPOSED SYSTEM 10
3.1 Traffic Control Based on Density 10
3.2 Intelligent Ambulance 11
CHAPTER 4: SOFTWARE AND HARDWARE REQUIREMENTS 12
4.1 Hardware 12
4.1.1 Microcontroller AT89S52 12
4.1.1.1 Architecture 12
4.1.1.2 Instruction Type 13
4.1.1.3 8-Bit Controller 13
4.1.1.4 Features 14
4.1.1.5 Pin Diagram 15
4.1.1.6 Advantages 18
4.1.2 Liquid Crystal Display 19
4.1.2.1 Circuit Diagram 19
4.1.2.2 Circuit Description 20
4.1.3 IR Transmitter 23
4.1.3.1 Output Graphs 24
4.1.3.2 Features 27
4.1.4 IR Receiver 27
4.1.4.1 Diagram 27
4.1.4.2 Features 28
4.1.5 Light Emitting Diode 29
4.1.5.1 Diagram 29
4.1.5.2 Features 30
4.1.6 RF Transmitter & Receiver 31
4.1.6.1 RF Transmitter Receiver 31
4.1.6.2 Special Properties of RF Electrical Signals 31
4.2 Software 32
4.2.1 Keil Cross Compiler 32
4.2.1.1 Features 32
4.2.2 D Scope 33
CHAPTER 5: DATA FLOW DIAGRAM 35
5.1 Traffic Junction Situation 35
5.2 State of Traffic Light 36
5.2.1 Time Based 36
5.2.2 Sensor Based 37
5.3 Traffic Light Simulation Model 38
5.3.1 Time Based 38
5.3.2 Sensor Based 39
CHAPTER 6: MODULES DESCRIPTION 41
6.1 Traffic Control Unit 41
6.1.1 IR Transmitter 41
6.1.2 IR Receiver 42
6.1.3 Microcontroller 42
6.1.4 Driver Circuit 44
6.1.5 Signal Conditioning Unit 45
6.1.6 LCD 45
6.1.7 LED 46
6.2 Ambulance Section 47
6.2.1 Keypad 48
6.2.2 Encoder 48
6.2.3 Transmitter 49
CHAPTER 7: IMPLEMENTATION RESULT 50
CHAPTER 8: CONCLUSION 52
CHAPTER 9: FUTURE ENHANCEMENT 53
9.1 Implementation of GSM 53
9.1.1 GSM 54
9.1.2 Heart Rate Sensor 54
9.1.3 Temperature Sensor 56
9.1.3.1 Feature 56
CHAPTER 10: OUTPUT SCREENSHOT 58
10.1 Traffic Light Control 58
10.2 Ambulance Section 59
CHAPTER 12: REFERENCES 60
1 INTRODUCTION
1.1 OVERVIEW OF TRAFFIC LIGHT SYSTEM
Ever since Roman times, society has tried to control traffic. Even the fabled Roman road
system created a conflict between pedestrian and equine travellers. However, a practical
solution was not developed until the mid-nineteenth century, when J. P. Knight, a railway
signalling engineer, created the first traffic signal, which was installed near Westminster
Abbey in London, England in 1868. Unfortunately, the device exploded, killing a police
officer, and its use was discontinued after being in operation for only a short time.
The modern traffic light was invented in America. New York had a three colour system in
1918 that was operated manually from a tower in the middle of the street. Other cities soon
adopted the idea of having someone on the scene to control the lights. Garrett Morgan,
inventor of the gas mask, also developed traffic signalling devices. Having witnessed an
accident between a car and a carriage, Morgan felt compelled to devise a system to prevent
such collisions at street intersections. In 1923 he patented an electric traffic light system
using a pole with a cross section on which the words STOP and GO were illuminated.
These basic designs were soon improved. In 1926 the first automatic signals were installed
in London; they depended on a timer to activate them. In the 1930s vehicle-activated lights
were created in which cars rolled over half-buried rubber tubes. Air in the tubes was
displaced by the weight of the car rolling over them, and the increased pressure operated an
electric contact, activating the lights. But these tubes wore out quickly. A better idea was
the inductive-loop device: a loop of wire was imbedded in the road itself and connected to
a box controlling the lights; a current of electricity passed through the loop, and when the
steel body of a car passed overhead, it produced a signal that activated the light.
1
Today, traffic is automatically routed onto limited access highways courtesy of a computer
activated guidance system that determines traffic volume on the highway. Global
positioning satellite systems (GPS) are installed in many cars.
These systems connect with a satellite and inform drivers where they are and
possible routes to their destination. Such systems will eventually enable a drive to
determine the best route to a destination given prevailing traffic conditions.
FIGURE 1.1 Traffic Light
1.2 HISTORY
On December 10, 1868, the first traffic lights were installed outside the British Houses of
Parliament in London, by the railway engineer J. P. Knight. They resembled railway
signals of the time, with semaphore arms and red and green gas lamps for night use. The
gas lantern was turned with a lever at its base so that the appropriate light faced traffic. It
exploded on 2 January 1869, injuring or killing the policeman who was operating it.
The modern electric traffic light is an American invention. As early as 1912 in Salt Lake
City, Utah, policeman Lester Wire invented the first red-green electric traffic lights. On
August 5, 1914, the American Traffic Signal Company installed a traffic signal system on
the corner of East 105th Street and Euclid Avenue in Cleveland, Ohio. It had two colours,
red and green, and a buzzer, based on the design of James Hoge, to provide a warning for
colour changes. The designed by James Hoge allowed police and fire stations to control
the signals in case of emergency.
2
The first four-way, three-colour traffic light was created by police officer William Potts in
Detroit, Michigan in 1920. In 1922, T.E. Hayes patented his "Combination traffic guide
and traffic regulating signal" (Patent # 1447659). Ashville, Ohio claims to be the location
of the oldest working traffic light in the United States, used at an intersection of public
roads until 1982 when it was moved to a local museum.
The first interconnected traffic signal system was installed in Salt Lake City in 1917 with
six connected intersections controlled simultaneously from a manual switch. Automatic
control of interconnected traffic lights was introduced March 1922 in Houston, Texas. The
first automatic experimental traffic lights in England were deployed in Wolverhampton in
1927. In 1923, Garrett Morgan patented his own version. The Morgan traffic signal was a
T-shaped pole unit that featured three hand-cranked positions: Stop, go, and an all -
directional stop position. This third position halted traffic in all directions to give drivers
more time to stop before opposing traffic started. Its one "advantage" over others of its
type was the ability to operate it from a distance using a mechanical linkage. Toronto was
the first city to computerize its entire traffic signal system, which it accomplished in 1963.
The colour of the traffic lights representing stop and go might be derived from those used
to identify port (red) and starboard (green) in maritime rules governing right of way, where
the vessel on the left must stop for the one crossing on the right.
Countdown timers on traffic lights were introduced in the 1990s. Though uncommon in
most American urban areas, timers are used in some other Western Hemisphere countries.
Timers are useful for drivers/pedestrians to plan if there is enough time to attempt to cross
the intersection before the light turns red and conversely, the amount of time before the
light turns green.
3
1.3 STANDARDS
1.3.1 EUROPEAN STANDARD
The European approach to a signalized crossing is use dual or more rarely, a triple aspect.
with a blackened out lens of a Pictogram pedestrian. For cyclist, the same approach is used
with the lens blackened out for a bicycle frame. It is not uncommon to see lenses with both
symbols on them.
Green: Cross
Yellow: Continue to cross only if unable to stop safely
Flashing Yellow: Cross with caution, usually used when lights are out of order or
shut down for the night, for low traffic
Red: Do not cross
1.3.2 BRITISH STANDARD
In the United Kingdom, British crown dependencies and dependent territories, and former
possessions like Hong Kong, the light sequence is as follows:
Green: Cross.
Flashing green: Continue to cross only if unable to stop safely.
Red: Do not cross.
The light is blackened out with a pedestrian pictogram.
The same system is used also in Macau, a former Portuguese overseas province near Hong
Kong.
4
1.3.3 NORTH AMERICAN STANDARD
In North America, the most common aspects found are text-only lenses (WALK/DON'T
WALK), the pictogram stop hand (in red/orange) and a walking person (in green or white).
Increasingly for retrofits of dual aspects and newer installations, the lower aspect formerly
used for the "walk" signal (walking person) is being replaced with a timer countdown.
Light sequence:
Green or White (Walking Human or WALK)
Flashing Red/Orange (Stop hand or DON'T WALK)
Red/Orange; Do not cross
1.3.4 ASIAN STANDARD
Green: Cross
Amber: Cross if already in intersection, otherwise do not (however by law, you are
allowed to cross)
Red: Do not cross
1.4 TECHNOLOGY
1.4.1 OPTICS AND LIGHTING
Traditionally, incandescent and halogen bulbs were used. Because of the low efficiency of
light output and a single point of failure (filament burnout) municipalities are increasingly
retrofitting traffic signals with LED arrays that consume less power, have increased light
output, last significantly longer, and in the event of an individual LED failure, still operate
albeit with a reduced light output. With the use of optics, the light pattern of an LED array
can be comparable to the pattern of an incandescent or halogen bulb.
5
Due to the low energy usage aspects of LED lights, these lights can pose a driving risk in
some areas during winter. Incandescent and halogen bulbs are generally warm enough to
melt away snow that cover individual lights but as LED lights use a fraction of the energy
as a result they are not warm enough to melt snow that may overlay the lights during
winter.
1.4.2 PROGRAMMABLE VISIBILITY SIGNALS
Signals such as the 3M High Visibility Signal and McCain Programmable Visibility signal
utilize light-diffusing optics and a powerful fresnel lens to create the signal indication. Lit
via a powerful 150W PAR46 sealed-beam lamp, the light from the lamp in these
"programmable visibility" signals passes through a set of two glass lenses at the back of the
signal. The first lens, a frosted glass diffusing lens, diffuses the light into a uniform ball of
light around five inches in diameter. The light then passes through a nearly identical lens
known as an optical limiter (3M's definition of the lens itself), also known as a
"programming lens", also five inches in diameter.
6
2. EXISTING SYSTEM
Traffic signals alternately assign the right of way to different traffic movements at an
intersection. Vehicular traffic is permitted to flow in a strictly controlled manner. A
controller is used to switch the signal displays. The signal sequence at intersections is red,
green, yellow, and red. The standard period during which a yellow signal is displayed is
fixed at three seconds. The duration of the green signal will depend on the method of
control. It is not recommended the signal sequence cycle be in excess of 120 seconds. Two
basic kinds of controllers are used: Pre-timed and Traffic actuated.
2.1 PRE-TIMED CONTROLLERS
Pre-timed controllers represent traffic control in its most basic form. They operate on a
predetermined, regularly repeated sequence of signal indications. For example, in one
complete phase of the cycle, one street-the primary street-may be assigned 40 seconds of
green time, and the other street may be assigned 15 seconds of green time. Several seconds
per minute are assigned to the yellow, or clearance, interval. The signal rotates through this
defined cycle in a constant fashion, as determined by the controller’s settings. Pre-timed
controllers are best suited for intersections where traffic volumes are predictable, stable,
and fairly constant. They may also be preferable where pedestrian volumes are large and
fairly constant. Depending on the equipment, several timing sequences may be preset to
accommodate variations in traffic volume during the day. The timing of pre-timed signals
is typically determined from visual observations and traffic counts. Once the timing
programs are set, they remain fixed until they are changed manually, in the field.
Generally, pre-timed controllers are cheaper to purchase, install, and maintain than traffic-
actuated controllers.
7
Their repetitive nature facilitates coordination with adjacent signals, and they are useful
where progression is desired. Progression refers to the nonstop movement of vehicles
along a signalized street system. Properly timed signal systems facilitate progression.
2.2 TRAFFIC ACCUTATED
Traffic-actuated controllers differ from pre-timed controllers in that their signal indications
are not of fixed length, but rather change in response to variations in the level and speed of
traffic. Traffic-actuated controllers are typically used where traffic volumes fluctuate
irregularly or where it is desirable to minimize interruptions to traffic flow on the street
carrying the greater volume of traffic. A simple traffic-actuated signal installation consists
of four basic components: detectors, the controller unit, signal heads (the traffic lights), and
connecting cables. The detectors are usually placed in the pavement, but they are
sometimes positioned on signal poles. Commonly used types include the inductive loop
detector, magnetic detector, magnetometer, and microwave detector. The inductive loop
detector is by far the most common. A loop of metal wire is embedded in a saw-cut slot in
the pavement and then covered with a protective epoxy sealant. As a vehicle travels over
the detector, its metallic mass changes the inductance of the loop. The detector processes
this change and notifies the controller unit of the presence of a vehicle. There are three
basic types of traffic actuated controllers: Semi-actuated controllers, fully actuated
controllers, and volume-density controllers.
Semi-actuated controllers assign a continuous green indication to the major street except
when a detector signals that a vehicle on the minor street is waiting to enter the
intersection. Traffic detectors are thus only needed on the minor street approaches. If a
vehicle is detected on the minor street, a demand for a green is registered and stored in the
controller unit. Once a green signal is displayed on the minor street, the duration may be
extended by vehicles detected moving towards the signal to a preset maximum period after
the demand has been received.
8
On expiry of the last extension and with no more vehicles detected, the minor street lights
transition from green to yellow to red, allowing the major street lights to return to green.
Even if vehicles are waiting to cross the major street, the major street should remain green
for a preset minimum period after returning to green.
Fully actuated controllers require detectors on all lanes approaching an intersection. They
are most useful when vehicle volumes vary over the course of the day, making frequent
timing changes necessary. Fully actuated controllers are often preferred because of their
responsiveness to actual traffic conditions.
Volume-density controllers are a more advanced type of fully actuated controllers. They
record and retain actual traffic information, such as volumes. Using the recorded
information, they can calculate-and recalculate as necessary-the duration of the minimum
green time based on actual traffic demand. The efficiency of a traffic-actuated signal
installation depends on the programming of the unit
and the location of the detectors.
Another type of actuated control uses a computer to control, operate, and supervise a traffic
control signal system. Computer-controlled systems basically consist of a central
computer, communication media (cable, telephone, radio, etc.), and field equipment (local
controllers, detectors, etc.). Both pre-timed control and actuated control have application
today. In Howard County, Maryland, for example, pre-timed controllers are used to
coordinate the flow of traffic on main streets during the day, with semi-actuated control on
minor streets. At night, when traffic volumes drop, fully actuated control is used on all
streets.
Timing adjustments should be made by trained technicians and should be based on the
traffic periods. When adjusting a controller, the technician should observe the effect on
traffic and then fine-tune the settings as necessary. Intersections should be periodically
monitored to ensure the signals are operating efficiently. As traffic volumes and other
conditions change, the controller settings will need to be changed accordingly.
9
3 PROPOSED SYSTEM
3.1 TRAFFIC CONTROL BASED ON DENSITY
In this system IR sensors are used to measure the density of the vehicles which are
fixed with in a fixed distance. All the sensors are interfaced with the microcontroller
which in turn controls the traffic signal system according to density by the sensor.
If the traffic density is high in particular side more priority is given for that side. The
sensor continuously keeps sensing density on all sides and the green signal is given to
the side in priority basis, where the sensor detects high density. The side with next
priority level follows the first priority level.
By using this system traffic can cleared without irregularities and time delays even
though there is no traffic on the other side can be avoided.
3.1.1 DESCRIPTION
We have three pairs of sensors across the roads marking as low, medium and high
density zones respectively.
There will be a infrared transmitter and infrared receiver opposite to each other .
We will place sensors at some distance apart from another pair.
When vehicles are filled and cross the first pair of sensors , then there will be an
obstacle between transmitter and receiver and this lead to a digital signal (low or
high) and the microcontroller assumes that there is low density traffic
When the vehicle crosses second sensor ten it assumes medium density and for
third sensor pair high density traffic respectively.
Depending on the above process a digital data is sent to microcontroller whether
it’s low or high and the microcontroller will allot the time for the traffic to pass on.
10
For high density traffic there will be more allotment of the time and for low density
low time respectively. Program written to the microcontroller will make it to do the
operation.
So the microcontroller will send its timing signal output by comparing with the
adjacent road’s traffic.
3.2 INTELLIGENT AMBULANCE
Most of the time the traffic will be at least for 100meters .In this distance the traffics
police can’t hear the siren form the ambulance. Then the ambulance has to wait till the
traffic is cleared. Some times to free the traffic it takes at least 30 minutes .So by this time
anything can happen to the patient .So this project avoid these disadvantages. The second
feature is the information system in the Ambulance. The system will inform the status of
the patient to the hospital as the command giving to the system in the ambulance.
According to this project if any ambulance at emergency comes to any traffic post the
traffic signals automatically stop the signals and give green signal for this ambulance.
Normally, we will have the traffic signal lights programmed for a particular time intervals.
But, here we will generate the traffic light signals based on the traffic, on the particular
time.
3.2.1 DESCRIPTION
When the ambulance at emergency comes to any traffic post the traffic signals
automatically stop the signals and give green signal for this ambulance.
The ambulance carries an IR transmitter and IR receiver will be there at few meters
at the signal. The receiver will receive the signal and the module will send the
command to turn on green through the RF and every traffic post will have an RF
receiver. So whenever the ambulance comes near the traffic, the ambulance will
transmit a code say “emergency” the receiver will receive this signal .Then it
immediately switch off the other signals i.e. it make all the signals red and later
make way for ambulance by signalling green. So by doing this the ambulance can
go without any problem.
11
4 SOFTWARE AND HARDWARE REQUIREMENT
4.1 HARDWARE
4.1.1 MICROCONTROLLER AT89S52
A microcontroller is an integrated chip that is often part of an embedded system. The
microcontroller includes a CPU, RAM, ROM,I/O ports, and timers like a standard
computer, but because they are designed to execute only a single specific task to
control a single system ,they are much smaller and simplified.
4.1.1.1 ARCHITECTURE
Architecture of Microcontroller is classified into two types: Data Flow and Instruction.
Data Flow
There are two types of architecture in data flow. They are :
Von Neumann Architecture
Harvard Architecture
One shared memory is only available for instructions (program) and data
instructions and data have to be fetched in sequential order in case of Von Neumann
architecture. The Harvard architecture on the other hand uses physically separate
memories for their instructions and data, requiring dedicated buses for each of them.
Instructions and Operands can therefore be fetched simultaneously.
12
4.1.1.2 INSTRUCTION TYPE
There are two types of architecture in instruction type. They are
CISC
RISC
CISC
CISC architecture supports as many as 200 instructions. A CISC microprocessor
contains a more complex set of instructions that it responds to and some of these
instructions cannot be completed in one machine cycle
RISC
This is a type of architecture that recognizes a relatively limited number of
instructions. Until the mid-1980s, the tendency among computer manufacturers was to
build increasingly complex CPUs that had ever-larger sets of instructions . At that time,
however, a number of computer manufacturers decided to reverse this trend by
building CPUs capable of executing only a very limited set of instructions. One
advantage of reduced instruction set computers is that they can execute their
instructions very fast because the instructions are so simple.
4.1.1.3 8 BIT- CONTROLLER
Application volumes for the 8-bit microcontrollers may be as high as the 4-bit
models, or they may be very low. Application sophistication can also range from
simple application control to high-speed machine control and data collection. For these
reasons, the microcontroller vendors have established extensive “families “of similar
models.
13
All features a common language, but differ in the amount of internal ROM, RAM, and
other cost-sensitive features. Often the memory can be expanded to include off-chip
ROM and RAM; in some cases, the microcontroller has no on-board ROM at all, or the
ROM is an electrically reprogrammable read only memory (EPROM).
Manufacture: Intel 8051
Pins/I/O : 40/32
Counter : 2
RAM : 256bytes
ROM : 8K
4.1.1.4 FEATURES OF AT89S52
8 bit Microcontroller
8K bytes of Flash Programmable and Erasable ROM
Fully Static Operation: 0 Hz to 24 MHz
256* 8-bit Internal RAM
32 Programmable I/O Lines
Six Interrupt Sources
Two 16 bit Timer/Counters
Programmable Serial Channel
Low Power Idle and Power-down modes
Three level Program Memory Lock
14
4.1.1.5 PIN DIAGRAM AND DESCRIPTION
PIN DIAGRAM
FIGURE-4.1 Pin Diagram
PIN DESCRIPTION
VCC: Supply Voltage (Pin 40)
GND: Ground (Pin 20)
Port 0:
It occupies a total of 8 pins (32-39) which can be used as both input and
output. To use the pins of port 0 as both input and output ports, each pin must be
connected externally to a 10KΩ pull-up resistor .
15
This is due to the fact that P0 is an open drain, unlike P1,P2,P3. When 1s are written to
port 0 pins, they can be used as high impedance inputs. Port 0 may also be configured
to be a multiplexed low order address/data bus during accesses to external program and
data memory. It receives code bytes during flash programming.
Port 1:
It occupies a total of 8 pins(1-8). It is bidirectional port with internal pull ups.
When 1’s are written to port 1, they can be used as inputs. It receives low order address
bytes during flash programming and verification.
Port 2:
It occupies a total of 8 pins (21-28). It is a bidirectional port with internal pull
ups. When 1s are written to port 1, they can be used as inputs. It emits higher order
address bytes during fetches from external program memory and during accesses to
external data memory that uses 16 bit address. It receives higher order address bits and
control signals during flash programming and verification.
Port 3:
It occupies a total of 8 pins (10-17). It is a bidirectional port with internal pull
ups.When 1s are written to port 3, they are used as inputs. It also receives control
signals during flash programming and verification. Port 3 has the additional function of
providing some extremely important signals such as interrupts. P3.0 and P3.1 are used
for RxD and TxD serial communication signals. Bits 3.2 and 3.3 are set for external
interrupts. Bits 3.3 and 3.4 are used for timers 0 and 1. Pins 3.6 and 3.7 are used to
provide the read and write signals( active- low) of external memories.
16
TABLE-1- Pin details of Port 3
RST :
Reset Input (Pin 9). A high on this pin (normally low) for two machine cycles
while the oscillator is running resets the device. This is often referred to as Power-On
reset. Activating a power-on reset will cause all values in the registers to be lost. It will
set Program Counter to all 0s.
XTAL1:
Input to the inverting oscillator amplifier and input to the internal clock
operating circuit. (Pin 19)
17
XTAL2:
Output from the inverting oscillator amplifier (Pin 20).
ALE/PROG:
Address Latch Enable output pulse (Pin 30) for latching the low byte of
the address during accesses to external memory. This pin is also the program pulse
input (PROG) during flash programming.
PSEN:
Program Store Enable is the read strobe to external program memory (Pin 29).
EA/VPP:
External Access Enable (Pin 31). EA must be strapped to ground in order to
enable the device to fetch code from external program memory locations. EA should be
strapped to VCC for internal program executions. It also receives the 12V
programming enable voltage during flash programming.
4.1.1.6 ADVANTAGES OF AT89S52
Cost effective
Low Power
Highly flexible
High performance
18
4.1.2 LCD (LIQUID CRYSTAL DISPLAY)
A liquid crystal display (LCD) is a thin, flat display device made up of any number of color or
monochrome pixels arrayed in front of a light source or reflector. It is utilized in battery-
powered electronic devices as it uses very small amounts of electric power. LCDs with a small
number of segments, such as those used in digital watches and pocket calculators have
individual electrical contacts for each segment. An external dedicated circuit supplies an
electric charge to control each segment.
FIGURE 4.2 LCD
4.1.2.1 CIRCUIT DIAGRAM
Figure 4.3 A 16 Character x 2 Line LCD Module
19
4.1.2.2 CIRCUIT DISCRIPTION
The LCD panel's Enable and Register Select is connected to the Control Port. The
Control Port is an open collector / open drain output. By incorporating two 10K
external pull up resistors, the circuit is made portable for a wider range of computers.
The R/W line of the LCD panel is hard-wired into the write mode which will not cause
any bus conflicts on the data lines. Hence the LCD's internal Busy Flag cannot tell if
the LCD has accepted and finished processing the last instruction or not. The 10k
Potentiometer controls the contrast of the LCD panel
1GND Ground
2 VCC Supply Voltage +5V
3 VEE Contrast adjustment
4 RSRegister select :0->Control input,
1-> Data input
5 R/W Read/ Write
6 E Enable
7 to 14 D0 to D7 I/O Data pins
15 VB1 Backlight +5V
16 VB0 Backlight ground
20
Table 2 Pin Details of LCD
Figure 4.3 Timing diagram of LCD
This waveform will write an ASCII Byte out to the LCD's screen. The ASCII code to
be displayed is eight bits long and is sent to the LCD either four or eight bits at a time.
If four bit mode is used, two "nibbles" of data (Sent high four bits and then low four
bits with an "E" Clock pulse with each nibble) are sent to make up a full eight bit
transfer. The "E" Clock is used to initiate the data transfer within the LCD.
The "R/S" bit is used to select whether data or an instruction is being transferred
between the microcontroller and the LCD. If the Bit is set, then the byte at the current
LCD "Cursor" Position can be read or written. When the Bit is reset, either an
instruction is being sent to the LCD or the execution status of the last instruction is read
back Reading Data back is used in applications which requires data to be moved back
and forth on the LCD .
The "Busy Flag" can be polled to determine when the last instruction that has been sent
has completed processing. The "R/W" line is tied to ground if read back is not required.
This simplifies the application because when data is read back, the microcontroller I/O
pins have to be alternated between input and output modes. The "Clear Display" and
"Return Cursor and LCD to Home Position" instructions are used to reset the Cursor's
position to the top right character on the display.
21
Figure 4.4
Character display in LCD
Eight programmable characters are available and use codes 0x000 to 0x007. They are
programmed by pointing the LCD's "Cursor" to the Character Generator RAM
("CGRAM") Area at eight times the character address. The next eight characters
written to the RAM are each line of the programmable character, starting at the top.
Each LCD character is actually eight pixels high, with the bottom row normally used
for the underscore cursor. The bottom row can be used for graphic characters. The user
defined character line information is saved in the LCD's "CGRAM" area. This sixty
four bytes of memory is accessed using the "Move Cursor into CGRAM" instruction.
A potentiometer wired as a voltage divider is used as a contrast voltage to the Display.
This will provide an easily variable voltage between Ground and Vcc, which will be
used to specify the contrast (or "darkness") of the characters on the LCD screen.
Different LCDs work differently with lower voltages providing darker characters in
some and higher voltages do the same thing in others.
There are a variety of different ways of wiring up an LCD. To simplify the demands in
microcontrollers, a shift register is often used to reduce the number of I/O pins to three.
22
4.1.3 IR TRANSMITTER
A IR TRANSMITTER device consists of a timer circuit connected to an infrared
LED array. The timer causes the infrared LEDs to strobe at specific frequencies,
such as 10Hz for low priority (buses) or 14 Hz for high priority (emergency
vehicles). Low Priority transmitters will control the intersection to perform a
normal light change, while High Priority transmitters will change an entire
intersection immediately
Figure 4.5 Package Dimension
23
ABSOLUTE MAXIMUM RATINGS (TA = 25°C unless otherwise specified)
Parameter Symbol Rating Unit
Operating Temperature TOPR -40 to +100 °C
Storage Temperature TSTG -40 to +100 °C
Soldering Temperature (Iron) TSOL-I 240 for 5 sec °C
Soldering Temperature (Flow) TSOL-F
260 for 10 sec °C
Continuous Forward Current IF 100 mA
Reverse Voltage VR 5 V
Power Dissipation (1) PD 200 mWPeak Forward Current (5) IF(Peak) 1.5 A
4.1.3.1 OUTPUT GRAPHS:
1. Normalized Radiant Intensity vs. Input Current
24
2 Forward Voltage vs. Temperature
4 Normalized Radiant Intensity vs. Wavelength
25
5 Forward Current vs. Forward Voltage
6 Radiation Pattern
26
4.1.3.2 FEATURES
Wavelength= 880 nm
Chip material = AlGaAs
Package type: T-1 3/4 (5mm lens diameter)
Matched Photo sensor: QSD122/123/124
Medium Wide Emission Angle, 40°
High Output Power
Package material and color: Clear, purple tinted, plastic
4.1.4 IR RECEIVER
4.1.4.1 DIAGRAM
Narrow response range (660 nm peak),single heterostructure on the substrate
Spectral range Type Technology Case
Visible-red EPD-660-5 AlGaAs/AlGaAs/GaAs 5 mm plastic lens
27
Maximum Ratings
Parameter Value Unit
Storage Temperature - 40...+90 °C
Operating Temperature -40...+85 °C
Soldering Temperature 240 °C
Table-
Optical and Electrical Characteristics (Tamb = 25°C, unless otherwise specified)
Parameter Test conditions Symbol Min Typ Max Unit
Active area A 0.13 mm2
Peak sensitivity Smax 620 660 700 nm
Spectral bandwidth at 50% Ä 0,5 25 nm
Acceptance angle at 50% Së 40 deg.
Responsivity at 660 nm VR = 0 V Së 0.42 A/W
Short-circuit current* VR = 0, Ee=1 mW/cm²
ISC 0.85 µA
Dark current VR = 5 V, Ee=0 ID 40 200 pA
Reverse voltage IR = 10 µA VR 10 V
Junction capacitance VR = 0, Ee=0 Ñ 40 pF
Rise time
Fall time
RL = 50 ,
VR = 5 V
trtf
15
30ns
Table-
4.1.4.2 FEATURES Photo detector and preamplifier in one package
Internal filter for PCM frequency
Improved shielding against electrical field disturbance
TTL and CMOS compatibility
Output active low
Low power consumption
High immunity against ambient light
28
4.1.5 LED (LIGHT EMITTING DIODE)
A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator
lamps in many devices, and are increasingly used for lighting. Introduced as a practical
electronic component in 1962, early LEDs emitted low-intensity red light, but modern
versions are available across the visible, ultraviolet and infrared wavelengths, with very
high brightness.
When a light-emitting diode is forward biased (switched on), electrons are able to
recombine with holes within the device, releasing energy in the form of photons. This
effect is called electroluminescence and the colour of the light (corresponding to the
energy of the photon) is determined by the energy gap of the semiconductor. An LED is
usually small in area (less than 1 mm2), and integrated optical components are used to
shape its radiation pattern and assist in reflection. LEDs present many advantages over
incandescent light sources including lower energy consumption, longer lifetime, improved
robustness, smaller size, faster switching, and greater durability and reliability. LEDs
powerful enough for room lighting are relatively expensive and require more precise
current and heat management than compact fluorescent lamp sources of comparable
output.
FIGURE 4.6 LED
29 FEATURES
Efficiency: LEDs emit more light per watt than incandescent light bulbs. Their
efficiency is not affected by shape and size, unlike fluorescent light bulbs or tubes.
Colour: LEDs can emit light of an intended colour without using any colour filters as
traditional lighting methods need. This is more efficient and can lower initial costs.
Size: LEDs can be very small (smaller than 2 mm) and are easily populated onto
printed circuit boards.
On/Off time: LEDs light up very quickly. A typical red indicator LED will achieve
full brightness in under a microsecond LEDs used in communications devices can
have even faster response times.
Cycling: LEDs are ideal for uses subject to frequent on-off cycling, unlike fluorescent
lamps that fail faster when cycled often, or HID lamps that require a long time before
restarting.
Dimming: LEDs can very easily be dimmed either by pulse-width modulation or
lowering the forward current.
Cool light: In contrast to most light sources, LEDs radiate very little heat in the form
of IR that can cause damage to sensitive objects or fabrics. Wasted energy is dispersed
as heat through the base of the LED.
Slow failure: LEDs mostly fail by dimming over time, rather than the abrupt failure of
incandescent bulbs.
Lifetime: LEDs can have a relatively long useful life. One report estimates 35,000 to
50,000 hours of useful life, though time to complete failure may be longer. Fluorescent
tubes typically are rated at about 10,000 to 15,000 hours, depending partly on the
conditions of use, and incandescent light bulbs at 1,000–2,000 hours.
Shock resistance: LEDs, being solid state components, are difficult to damage with
external shock, unlike fluorescent and incandescent bulbs, which are fragile.
Focus: The solid package of the LED can be designed to focus its light. Incandescent
and fluorescent sources often require an external reflector to collect light and direct it
in a usable manner
30
4.1.6 RF TRANSMITTER RECEIVER
Radio frequency (RF) radiation is a subset of electromagnetic radiation with a
wavelength of 100km to 1mm, which is a frequency of 3 KHz to 300 GHz,[1]
respectively. This range of electromagnetic radiation constitutes the radio spectrum
and corresponds to the frequency of alternating current electrical signals used to
produce and detect radio waves. RF can refer to electromagnetic oscillations in
either electrical circuits or radiation through air and space. Like other subsets of
electromagnetic radiation, RF travels at the speed of light.
4.1.6.1 Radio communication
In order to receive radio signals, for instance from AM/FM radio stations, a
radio antenna must be used. However, since the antenna will pick up thousands of
radio signals at a time, a radio tuner is necessary to tune in to a particular
frequency (or frequency range).[2] This is typically done via a resonator (in its
simplest form, a circuit with a capacitor and an inductor). The resonator is
configured to resonate at a particular frequency (or frequency band), thus
amplifying sine waves at that radio frequency, while ignoring other sine waves.
Usually, either the inductor or the capacitor of the resonator is adjustable, allowing
the user to change the frequency at which it resonates.
4.1.6.2 Special properties of RF electrical signals
Electrical currents that oscillate at RF have special properties not shared by
direct current signals. One such property is the ease with which they can ionize air
to create a conductive path through air. This property is exploited by 'high
frequency' units used in electric arc welding, although strictly speaking these
machines do not typically employ frequencies within the HF band. Another special
property is an electromagnetic force that drives the RF current to the surface of
conductors, known as the skin effect.
31
4.2 SOFTWARE
4.2.1 KEIL CROSS COMPILER
A KEIL cross compiler is a software, which compiles a source code of one
environment as an object file to be executed in different environment.
It is broadly classified into development and simulation.Development of programs
are handled by Micro vision software and the simulation is handled by D Scope.
The Keil C51 C Compiler for the 8051 microcontroller is the most popular 8051 C
compiler in the world. It provides more features than any other 8051 C compiler
available today.
The C51 Compiler allows you to write 8051 microcontroller applications in C that,
once compiled, have the efficiency and speed of assembly language. Language
extensions in the C51 Compiler give you full access to all resources of the 8051.
The C51 Compiler translates C source files into relocatable object modules which
contain full symbolic information for debugging with the µVision Debugger or an
in-circuit emulator. In addition to the object file, the compiler generates a listing
file which may optionally include symbol table and cross reference information.
4.2.1.1-FEATURE
To help expedite the software development process, µVision offers numerous
features like:
A pull down menu system,
·Multiple file editing capability,
Full function editor with colour syntax highlighting, user definable key
sequences, and editor functions,
Application manager for accessing external programs,
Project manager and automated make facility for building target files,
32
The programs are typed in µVision and compiled here. The below is the screen of µVision
with a sample program.
Figure 4.7 - MICRO VISION
4.2.2 D SCOPE
DScope is a software debugger which simulates the hardware of the MCS 51, MCS
251 and 80C166 microcontroller family and can execute all machine instructions.
Simulation of the integrated peripherals is implemented by means of loadable
drivers. This makes DScope fully capable of simulating the integrated hardware of
the various derivatives of the microcontrollers. A corresponding driver exists for
each controller type supported. The software test is executed optionally either at the
source level, assembler level, or a combination of both.
33
All the actions that are performed by the program can be simulated here.
The values can be assigned to any of the ports and the output can be viewed. And
any peripherals that have to be used can be selected from the menu. In the picture
below the debugging window and the windows corresponding to the input/output
ports are displayed.
Figure 4.8- D SCOPE
34
5 DATA FLOW DIAGRAM
5.1 TRAFFIC JUNCTION SITUATION
Figure 5.1 Model of the traffic junction situation
DESCRIPTION
There were two sets of data that has been analyzed: data from time-based system and the
sensor-based system. These data obtained from the reports generated by Arena after the
entire simulation full. They were analyzed to see if the improvement in waiting time of
vehicle is succeeded or not. The data is compared by using the paired T -test, a way to
compare two sets of data to see if significant improvement has been made or not.
35
The paired T-test of the data acquired from the simulation is done in two tests: the paired
T-test of the data from the simulation in normal traffic condition and the paired T -test of
the data from the simulation of busy traffic condition. As the simulation generates vehicles
in random arrival time based on exponential distribution, average waiting time is different
in different simulation run.
5.2 STATE OF TRAFFIC LIGHT
5.2.1 TIME BASED
Figure 5.2 Time Based
36
5.2.2 SENSOR BASED
Figure 13
5.3TRAFFIC LIGHT SIMULATION MODEL
5.3.1 TIME BASED
37
5.3.1 SENSOR BASED
DESCRIPTION
The above Data Flow Diagram show the simulation models for time based and sensor-
based during run. Simulation has been run for 200 seconds for 25 run for each .time-based
and sensor-based system in normal and busy condition. Data from the reports generated in
Arena is mean waiting compiled in Microsoft Excel before the paired T –test is done using
Microsoft Excel. Figure shows the time (in seconds) of time-based system and sensor-
based system in normal and busy condition.
All statistical data from simulation and paired T -test is compiled in Table . From here, t-
value is calculated at 10.087 for normal traffic condition and 4.5115 for busy traffic
condition. With t-value as calculated and degree of freedom is 24 (n-l), the p-value for
normal traffic condition is 4.l495TIO, whereas the p-value for busy traffic condition is
1.438y4. As both p-value is less than 0.05, it is safe to assume that there are different
values in both normal and busy condition, which suggests there are improvements if the
sensor is implemented in the system.
38
Result of the study from simulation modelling of the traffic light control system with time-
based system and the sensor-based system showed that there are a lot of improvements on
waiting time of vehicles in the junctions if the implementation of sensor is done to the
traffic light\ system. Mean waiting time of time-based traffic light system is around 20
seconds for both normal traffic condition and busy traffic condition, while for sensor-based
traffic light system, the mean waiting time for vehicles in the junctions is about 7.5
seconds for normal traffic condition, and about 17 seconds for busy traffic conditions.
Within this study, the Arena simulation software, which is more appropriate for simulation
of manufacturing system, is used. While there are a lot of specific tools or simulation
software intended for traffic light studies available, the Arena software proves to be more
general purpose simulation software that can be used in simulation of the traffic light
control system. Therefore, in formulating optimal solutions for each of the traffic light in
the intersections, more appropriate tools can be used to study the traffic light system and to
improve the traffic condition at the intersection intended. However, some of the tools used
in studying the traffic light system are intended for specific purpose of the study or scarce
and hard to get. Hence a more general purpose tool such as Arena simulation software can
be configured in order to get the optimal solutions for the intended studies.
TABLE
39
Traffic light control system involves a very complex study. Even implementing one traffic
light in a single junction involved a lot of studies to be done and there is no obvious
optimal solution. In the study there are four junctions of an intersection involved, therefore,
a more complex work needs to be done as the state of one light influences the traffic flow
and conditions of other junctions as well.
While the work is to see if the implementation of sensor in the traffic light control system
can improve the waiting time of vehicles in the junction of an intersection, it does not
provide an optimal solution for the improvement of the waiting time of vehicles in
junctions as each parameter of the traffic light system such as arrival rate of vehicles at the
intersection, the average number of vehicles waiting in the junction and optimal traffic
light duration is different from one intersection to another. These parameters need to be
studied first to obtain the optimal solutions for the intended traffic light system. However,
the simulation done within the study provided general solution for implementing sensors in
the traffic light control system. Therefore, by implementing sensor in traffic light system,
the waiting time for vehicles in the junctions at the intersection can be reduced
significantly as has been proven by statistical method. Further improvements can be made
in the system by modifying the parameters in the simulation suitable for intended studies.
40
6. MODULES DESCRIPTION
6.1TRAFFIC CONTROL UNIT
This section consists of microcontroller, LCD display
FIGURE 6.1 Traffic Control Unit
6.1.1 IR TRANSMITTER
Infrared (IR) transmitters are found in many everyday electronic devices, such as
television remote controls. These devices operate in the electromagnetic spectrum's
infrared region. An IR transmitter is designed to transmit signals and commands to
electronic equipment through infrared waves.
41
Infrared transmitters are short-range communication devices and are not designed for
long-range communication.
An IR transmitter can be employed for many applications. Essentially, it is used to give
commands to electronic devices from a distance without using cords, cables or wires.
Most modern electronic devices are controlled mainly through an IR transmitter,
making them remote-control devices. Very few designated buttons make it onto actual
modern electronics such as televisions and video game systems
6.1.2 IR RECIEVER
IR receiver controls are using a 32-56 kHz modulated square wave for communication.
These circuits are used to transmit a 1-4 kHz digital signal (OOK modulation) through
infra light (this is the maximum attainable speed, 1000-4000 bits per sec). The
transmitter oscillator runs with adjustable frequency in the 32-56kHz range, and is
being turned ON/OFF with the modulating signal, a TTL voltage on the MOD input.
On the receiver side a photodiode takes up the signal. The integrated circuit inside the
chip is sensitive only around a specified frequency in the 32-56 kHz range. The output
is the demodulated digital input (but usually inverted), just what we used to drive the
transmitter. When the carrier is present, this output is usually low. When no carrier is
detected, the output is usually high.
6.1.3 MICROCONTROLLER
A microcontroller (sometimes abbreviated µC, uC or MCU) is a small computer on a
single integrated circuit containing a processor core, memory, and programmable
input/output peripherals. Program memory in the form of NOR flash or OTP ROM is also
often included on chip, as well as a typically small amount of RAM.
42
Microcontrollers are designed for embedded applications, in contrast to the
microprocessors used in personal computers or other general purpose applications.
Microcontrollers are used in automatically controlled products and devices, such as
automobile engine control systems, implantable medical devices, remote controls, office
machines, appliances, power tools, toys and other embedded systems. By reducing the size
and cost compared to a design that uses a separate microprocessor, memory, and
input/output devices, microcontrollers make it economical to digitally control even more
devices and processes. Mixed signal microcontrollers are common, integrating analog
components needed to control non-digital electronic systems.
FIGURE 6.2 MICROCONTROLLER
Some microcontrollers may use four-bit words and operate at clock rate frequencies as low
as 4 kHz, for low power consumption (milli watts or microwatts). They will generally have
the ability to retain functionality while waiting for an event such as a button press or other
interrupt; power consumption while sleeping (CPU clock and most peripherals off) may be
just nano watts, making many of them well suited for long lasting battery applications.
Other microcontrollers may serve performance-critical roles, where they may need to act
more like a digital signal processor (DSP), with higher clock speeds and power
consumption.
43
6.1.4 DRIVER CIRCUIT
In electronics, a driver is an electrical circuit or other electronic component used to control
another circuit or other component, such as a high-power transistor. They are usually used
to regulate current flowing through a circuit or is used to control the other factors such as
other components, some devices in the circuit. The term is used, for example, for a
specialized computer chip that controls the high-power transistors in AC-to-DC voltage
converters. An amplifier can also be considered the driver for loudspeakers, or a constant
voltage circuit that keeps an attached component operating within a broad range of input
voltages.
FIGURE 6.2 DRIVER
CIRCUIT
Typically the driver stage(s) of a circuit requires different characteristics to other circuit
stages. For example in a transistor power amplifier, typically the driver circuit requires
current gain, often the ability to discharge the following transistor bases rapidly, and low
output impedance to avoid or minimise distortion.
44
6.1.5 SIGNAL CONDIONING CIRCUIT
In electronics, signal conditioning means manipulating an analog signal in such a way that
it meets the requirements of the next stage for further processing. Most common use is in
analog-to-digital converters.
In control engineering applications, it is common to have a sensing stage (which consists
of a sensor), a signal conditioning stage (where usually amplification of the signal is done)
and a processing stage (normally carried out by an ADC and a micro-controller).
Operational amplifiers (op-amps) are commonly employed to carry out the amplification of
the signal in the signal conditioning stage.
Signal inputs accepted by signal conditioners include DC voltage and current, AC voltage
and current, frequency and electric charge. Sensor inputs can be accelerometer,
thermocouple, thermistor, resistance thermometer, strain gauge or bridge, and LVDT or
RVDT. Specialized inputs include encoder, counter or tachometer, timer or clock, relay or
switch, and other specialized inputs. Outputs for signal conditioning equipment can be
voltage, current, frequency, timer or counter, relay, resistance or potentiometer, and other
specialized outputs.
Signal conditioning can include amplification, filtering, converting, range matching,
isolation and any other processes required to make sensor output suitable for processing
after conditioning.
6.1.6 LCD
A liquid crystal display (LCD) is a flat panel display, electronic visual display, or video
display that uses the light modulating properties of liquid crystals (LCs). LCs do not emit
light directly.
45
LCDs are used in a wide range of applications, including computer monitors, television,
instrument panels, aircraft cockpit displays, signage, etc. They are common in consumer
devices such as video players, gaming devices, clocks, watches, calculators, and
telephones. LCDs have replaced cathode ray tube (CRT) displays in most applications.
They are available in a wider range of screen sizes than CRT and plasma displays, and
since they do not use phosphors, they cannot suffer image burn-in. LCDs are, however,
susceptible to image persistence.
FIGURE 6.4 LCD
LCDs are more energy efficient and offer safer disposal than CRTs. Its low electrical
power consumption enables it to be used in battery-powered electronic equipment. It is an
electronically modulated optical device made up of any number of segments filled with
liquid crystals and arrayed in front of a light source (backlight) or reflector to produce
images in colour or monochrome. The most flexible ones use an array of small pixels. The
earliest discovery leading to the development of LCD technology, the discovery of liquid
crystals, dates from 1888. By 2008, worldwide sales of televisions with LCD screens had
surpassed the sale of CRT units.
6.1.7 LED
A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator
lamps in many devices and are increasingly used for other lighting. Introduced as a
practical electronic component in 1962, early LEDs emitted low-intensity red light, but
modern versions are available across the visible, ultraviolet, and infrared wavelengths, with
very high brightness.
46
FIGURE 6.5 LED
When a light-emitting diode is forward-biased (switched on), 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 gap of the semiconductor. LEDs are
often small in area (less than 1 mm2), and integrated optical components may be used to
shape its radiation pattern. LEDs present many advantages over incandescent light sources
including lower energy consumption, longer lifetime, improved robustness, smaller size,
and faster switching. LEDs powerful enough for room lighting are relatively expensive and
require more precise current and heat management than compact fluorescent lamp sources
of comparable output. Light-emitting diodes are used in applications as diverse as aviation
lighting, automotive lighting, advertising, general lighting, and traffic signals. LEDs have
allowed new text, video displays, and sensors to be developed, while their high switching
rates are also useful in advanced communications technology. Infrared LEDs are also used
in the remote control units of many commercial products including televisions, DVD
players, and other domestic appliances.
6.2AMBULANCE SECTION
47
6.2.1 KEYPAD
A keypad is a set of buttons arranged in a block or "pad" which usually bear digits,
symbols and usually a complete set of alphabetical letters. If it mostly contains numbers
then it can also be called a numeric keypad. Keypads are found on many alphanumeric
keyboards and on other devices such as calculators, push-button telephones, combination
locks, and digital door locks, which require mainly numeric input.
As a general rule, the keys on calculator-style keypads are arranged such that 123 is on the
bottom row. Whereas, in a telephone keypad, either in a home or mobile phone, there will
be the 123-keys at the top. A phone key-pad also has the special buttons labelled * (star)
and # (octothorpe, number sign, "pound" or "hash") on either side of the zero key. Most of
the keys on a telephone also bear letters which have had several auxiliary uses, such as
remembering area codes or whole telephone numbers.
The keypad of a calculator contains the digits 0 through 9, from bottom upwards, together
with the four arithmetic operations, the decimal point and other more advanced
mathematical functions.
Keypads are also a feature of some combination locks. This type of lock is often used on
doors, such as that found at the main entrance to some offices.
6.2.1 ENCODER
An encoder is a device, circuit, transducer, software program, algorithm or person that
converts information from one format or code to another, for the purposes of
standardization, speed, secrecy, security, or saving space by shrinking size.
48
6.2.2 TRANSMITTER
In electronics and telecommunications a transmitter or radio transmitter is an electronic
device which, with the aid of an antenna, produces radio waves. The transmitter itself
generates a radio frequency alternating current, which is applied to the antenna. When
excited by this alternating current, the antenna radiates radio waves. In addition to their use
in broadcasting, transmitters are necessary component parts of many electronic devices that
communicate by radio, such as cell phones, wireless computer networks, Bluetooth
enabled devices, garage door openers, two-way radios in aircraft, ships, and spacecraft,
radar sets, and navigational beacons. The term transmitter is usually limited to equipment
that generates radio waves for communication purposes; or radiolocation, such as radar and
navigational transmitters. Generators of radio waves for heating or industrial purposes,
such as microwave ovens or diathermy equipment, are not usually called transmitters even
though they often have similar circuits. The term is popularly used more specifically to
refer to transmitting equipment used for broadcasting, as in radio transmitter or television
transmitter. This usage usually includes both the transmitter proper as described above,
and the antenna, and often the building it is housed in.
An unrelated use of the term is in industrial process control, where a "transmitter" is a
telemetry device which converts measurements from a sensor into a signal, and sends it,
usually via wires, to be received by some display or control device located a distance
away.
49
7 IMPLEMENTATION RESULT
TABLE RESULT
There were two sets of data that has been analyzed: data from time-based system and the
sensor-based system. These data obtained from the reports generated by Arena after the
entire simulation full. They were analyzed to see if the improvement in waiting time of
vehicle is succeeded or not. The data is compared by using the paired T -test, a way to
compare two sets of data to see if significant improvement has been made or not. The
paired T-test of the data acquired from the simulation is done in two tests: the paired T-test
of the data from the simulation in normal traffic condition and the paired T -test of the data
from the simulation of busy traffic condition. As the simulation generates vehicles in
random arrival time based on exponential distribution, average waiting time is different in
different simulation run.
The above Data show the simulation models for time based and sensor-based during run.
Simulation has been run for 200 seconds for 25 run for each .time-based and sensor-based
system in normal and busy condition.
50
Data from the reports generated in Arena is mean waiting compiled in Microsoft Excel
before the paired T –test is done using Microsoft Excel. Figure shows the time (in seconds)
of time-based system and sensor-based system in normal and busy condition.
All statistical data from simulation and paired T -test is compiled in Table . From here, t-
value is calculated at 10.087 for normal traffic condition and 4.5115 for busy traffic
condition. With t-value as calculated and degree of freedom is 24 (n-l), the p-value for
normal traffic condition is 4.l495TIO, whereas the p-value for busy traffic condition is
1.438y4. As both p-value is less than 0.05, it is safe to assume that there are different
values in both normal and busy condition, which suggests there are improvements if the
sensor is implemented in the system. Result of the study from simulation modelling of the
traffic light control system with time-based system and the sensor-based system showed
that there are a lot of improvements on waiting time of vehicles in the junctions if the
implementation of sensor is done to the traffic light\ system. Mean waiting time of time-
based traffic light system is around 20 seconds for both normal traffic condition and busy
traffic condition, while for sensor-based traffic light system, the mean waiting time for
vehicles in the junctions is about 7.5 seconds for normal traffic condition, and about 17
seconds for busy traffic conditions.
Within this study, the Arena simulation software, which is more appropriate for simulation
of manufacturing system, is used. While there are a lot of specific tools or simulation
software intended for traffic light studies available, the Arena software proves to be more
general purpose simulation software that can be used in simulation of the traffic light
control system. Therefore, in formulating optimal solutions for each of the traffic light in
the intersections, more appropriate tools can be used to study the traffic light system and to
improve the traffic condition at the intersection intended. However, some of the tools used
in studying the traffic light system are intended for specific purpose of the study or scarce
and hard to get. Hence a more general purpose tool such as Arena simulation software can
be configured in order to get the optimal solutions for the intended studies.
51
8 CONCLUSION
Traffic light control system involves a very complex study. Even implementing one traffic
light in a single junction involved a lot of studies to be done and there is no obvious
optimal solution. In the study there are four junctions of an intersection involved, therefore,
a more complex work needs to be done as the state of one light influences the traffic flow
and conditions of other junctions as well. While the work is to see if the implementation of
sensor in the traffic light control system can improve the waiting time of vehicles in the
junction of an intersection, it does not provide an optimal solution for the improvement of
the waiting time of vehicles in junctions as each parameter of the traffic light system such
as arrival rate of vehicles at the intersection, the average number of vehicles waiting in the
junction and optimal traffic light duration is different from one intersection to another.
These parameters need to be studied first to obtain the optimal solutions for the intended
traffic light system. However, the simulation done within the study provided general
solution for implementing sensors in the traffic light control system. Therefore, by
implementing sensor in traffic light system, the waiting time for vehicles in the junctions at
the intersection can be reduced significantly as has been proven by statistical method.
Further improvements can be made in the system by modifying the parameters in the
simulation suitable for intended studies.
52
9 FUTURE ENHANCEMENT
9.1 IMPLEMENTATION OF GSM
The system will inform the status of the patient to the hospital as the command
giving to the system in the ambulance. This section consists of temperature sensor
and a heart rate sensor which record the status of the patient. Whenever the driver
wants to sent the information about the status of the patient to the hospital, by
pressing the switch the system will send the information through SMS. In this way
the doctors were for the situation in the hospital.
53
Microcontroller
P89V51RD2
Temperature
sensorLM35Heart rate
sensor
ADC 0809
16x2 LCD Display
GSM modu
le
GSM Mobil
e
IR TX
2 Sets of IR RX for
road 1
9.1.1 GSM
GSM (Global System for Mobile Communications,
originally Groupe Spécial Mobile), is a standard set developed by
the European Telecommunications Standards Institute (ETSI) to describe
technologies for second generation (2G) digital cellular networks.
Developed as a replacement for first generation (1G) analog cellular
networks, the GSM standard originally described a digital, circuit switched
network optimized for full duplex voice telephony. The standard was
expanded over time to include first circuit switched data transport, then
packet data transport via GPRS (General Packet Radio Services). Packet
data transmission speeds were later increased via EDGE (Enhanced Data
rates for GSM Evolution) referred as EGPRS. The GSM standard is more
improved after the development of third generation (3G) UMTS standard
developed by the 3GPP. GSM networks will evolve further as they begin to
incorporate fourth generation (4G) LTE Advanced standards. "GSM" is
a trademark owned by the GSM Association.
9.1.2 HEART RATE SENSOR
Modern heart rate monitors usually comprise two elements: a chest
strap transmitter and a wrist receiver or mobile phone (which usually
doubles as a watch or phone). In early plastic straps water or liquid was
required to get good performance. Later units have used conductive smart
fabric with built-in microprocessors which analyse the EKG signal to
determine heart rate.
54
Strapless heart rate monitors now allow the user to just touch two
sensors on a wristwatch display for a few seconds to view their heart rate.
These are popular for their comfort and ease of use though they don't give
as much detail as monitors which use a chest strap.
More advanced models will offer measurements of heart rate
variability, activity, and breathing rate to assess parameters relating to a
subject's fitness. Sensor fusion algorithms allow these monitors to detect
core temperature and dehydration
Another style of heart rate monitor replaces the plastic around-the-
chest strap with fabric sensors - the most common of these is a sports bra
for women which includes sensors in the fabric.
In old versions, when a heart beat is detected a radio signal is
transmitted, which the receiver uses to determine the current heart rate. This
signal can be a simple radio pulse or a unique coded signal from the chest
strap (such as Bluetooth, ANT, or other low-power radio link); the latter
prevents one user's receiver from using signals from other nearby
transmitters (known as cross-talk interference).
In recent years smart phone applications have been developed that
measure the heart beat rate by tracking the acceleration at your chest (Sports
Heart Rate Monitor) or by tracking color changes in the light that passes
through your finger (Instant Heart Rate).
` Newer versions include a microprocessor which is continuously
monitoring the EKG and calculating the heart rate, and other parameters.
These may include accelerometers which can detect speed and distance
eliminating the need for foot worn devices.
There are a wide number of receiver designs, with various features.
These include average heart rate over exercise period, time in a specific
heart rate zone, calories burned, breathing rate, built-in speed and distance,
and detailed logging that can be downloaded to a computer.
55
9.1.3 TEMPERATURE SENSOR
The LM35 series are precision integrated-circuit temperature sensors,
whose output voltage is linearly proportional to the Celsius (Centigrade)
temperature. The LM35 thus has an advantage over linear temperature
sensors calibrated in ˚ Kelvin, as the user is not required to subtract a large
constant voltage from its output to obtain convenient Centigrade scaling.
The LM35 does not require any external calibration or trimming to provide
typical accuracies of ±1 ⁄4˚C at room temperature and ±3 ⁄4˚C over a full
−55 to +150˚C temperature range. Low cost is assured by trimming and
calibration at the wafer level.
The LM35’s low output impedance, linear output, and precise inherent
calibration make interfacing to readout or control circuitry especially easy.
It can be used with single power supplies, or with plus and minus supplies.
As it draws only 60 µA from its supply, it has very low self-heating, less
than 0.1˚C in still air. The LM35 is rated to operate over a −55˚ to +150˚C
temperature range, while the LM35C is rated for a −40˚ to +110˚C range
(−10˚ with improved accuracy). The LM35 series is available packaged in
hermetic TO-46 transistor packages, while the LM35C, LM35CA, and
LM35D are also available in the plastic TO-92 transistor package. The
LM35D is also available in an 8-lead surface mount small outline package
and a plastic TO-220 package.
9.1.3.1 FEATURE
Calibrated directly in ˚ Celsius (Centigrade)
Linear + 10.0 mV/˚C scale factor
0.5˚C accuracy guaranteable (at +25˚C)
Rated for full −55˚ to +150˚C range
56
Suitable for remote applications
Low cost due to wafer-level trimming
Operates from 4 to 30 volts
Less than 60 µA current drain
Low self-heating, 0.08˚C in still air
Nonlinearity only ±1⁄4˚C typical
Low impedance output, 0.1 Ω for 1 mA load
57
10 OUTPUT SCREEN SHOTS
10.1 TRAFFIC LIGHT CONTROL UNIT
Figure 10.1 Traffic Control Unit
58
10.2 AMBULANCE SECTION
Figure 10.2 Ambulance Section
59
12 REFRENCES
1. Albagul, A., Hrairi, M., Wabyudi, and Hidayatullah, M.F .. "Design
and Development of Sensor Based Traffic Light". Science
Publications 2006. American Journal of Applied Science, 3 (3), pp
1745-1749.
2. Altiok, T. and Melamed, B. "Simulation Modeling and Analysis
with Arena". Elsevier, UK. 2007.
3. Bham, G.H. and Benekohal, R.F. "A high fidelity traffic simulation
model bas sed on cellular automata and car-following concepts."
Transportation Research Part C, 1-32 Elsevier. 2004.
4. Caristi, J. 1988. "The Simulation Language SIMAN on
Microcomputer and Mainframe". Journal of Applied Mathematics
and Simulation Vol I Number 3 1988.
5. Coleri, S., Cheung, and S.Y., Varaiya, P. "Sensor Networks For
Monitoring Control". Department of Electrical Engineering and
Computer Science, University of California, Berkeley. 2004.
6. Furstenberg, K., Hipp, 1. and Liebram, A. 2003. "A Laser Scanner
For Detailed Traffic Data Collection and Data Control". 7th World
Congress on Intelligent Transport System
7. Gonzalez-Calleros, lM., Martinez-Carballido, l Muoz-
Arteaga, J. and Guerrero-Garcia, l, "An Iterative Method To Desigu
Traffic Flow Models". Digital Society. 2009
60
8. Kelton, W.D., Sadowski, R.P. and Sturrock, D.T. 2007. "Simulation
With Arena". McGraw Hill, New York. NY. 2004.
9. Koskinen, K., Setala, N. and Kosonen, 1. "Fuzzy Sigual Control -
FUSICO". Laboratory of Transportation Engineering, Helsinki
University of Technology. 2007.
10. Rakha, H. and Crowther, B "Comparison and calibration of
FRESIM and INTEGRATION steady-state- car-following
behavior". Transportation Research Part A 1-27 Elsevier Science
Ltd. 2003
11. Smaldone, T. ''Traffic Light Simulation: A Study Into How Long It
Takes Vehicles Stopped at Red Lights To Go and To Cross the Light
After It Turns Green". Modeling and Simulation Independent Study
Course, Rutgers University, Camden, N.J. 2001.
12 Tan, K.K., Khalid, M. and Yusof, R. "Intelligent Traffic Light
Control by Fuzzy Logic". Malaysian Journal of Computer Science,
Vol. 9 No. 2, December 1996, pp. 29-35
13. Wiering, M., Veenen lV., Vreeken l and Koopman, A. "Intelligent
Traffic Light Control". Intelligent System Group, Institute of
Information and Computer Science, Utrecht University, Utrecht, The
Netherlands. 2004.
14. Yang,C.L. and Wen, W. "Solving the Traffic Problem Using a
Simulation Model". International Conference on Information
Resource Proceedings (CONF-IRM 2008)
61