Upload
rishab-mehta
View
219
Download
0
Embed Size (px)
Citation preview
7/23/2019 Microprocessor Based Control of Traffic Lights
1/8
TERM PAPER OF
MICROPROCESSOR
TOPIC
:MICROPROCESSOR BASED CONTROL
OF TRAFFIC LIGHTS
SUBMITTED TO: SUBMITTED BY:
Ms. Gaganpreet Kaur Rishab MehtaLect. In ECE Btech-MBA (CSE)LPU Reg. No-3450070062
Section-D1703Roll no. -51
7/23/2019 Microprocessor Based Control of Traffic Lights
2/8
CONTENTS
INTRODUCTIONDESCRIPITIONASSEMBLY LANGUAGE PROGRAMPROCEDUREBIBLIOGRAPHY
INTRODUCTION
A microprocessor has been incorporated into a
traffic light simulator. It is being used to teach
undergraduate industrial engineers about software
development and basic concepts of interfacing. Thesimulator combines hardware, software, and
documentation into a compact portable package
which can be locally constructed. It provides a
useful part of the study program required to develop
the skills industrial engineers need for industrial
control.
The main aim of this project is to design a
Traffic light controller using 8085 microprocessor.
The 8085 Microprocessor is a popular
Microprocessor used in Industries for various
applications. Such as traffic light control,
temperature control, stepper motor control, etc. In
this project, the traffic lights are interfaced to
Microprocessor system through buffer and ports of
programmable peripheral Interface 8255. So the
traffic lights can be automatically switched
ON/OFF in desired sequence. The Interface board
has been designed to work with parallel port of
Microprocessor system.
The hardware of the system consists of two
parts. The first part is Microprocessor based system
with 8085. Microprocessor as CPU and the
peripheral devices like EPROM, RAM, Keyboard
& Display Controller 8279, Programmable as
Peripheral Interface 8255, 26 pin parallel port
connector, 21 keys Hexa key pad and six number of
seven segment LEDs.
The second part is the traffic light controller
interface board, which consist of 36 LEDs in
which 20 LEDs are used for vehicle traffic and
they are connected to 20 port lines of 8255 through
Buffer. Remaining LEDs are used for pedestrian
traffic. The traffic light interface board is
connected to Main board using 26 core flat cables
to 26-pin Port connector. The LEDs can be
switched ON/OFF in the specified sequence by the
Microprocessor.
The block diagram of the system is shown in fig.1. The lay out of the traffic light is shown in fig 2.
Traffic light interface board
8085CPU
Latch 8255PPI
26pinportconnector
26pinportconnector
Buffer AD
0-AD
7A
0-A
7
26 pinFRC cable
D0-
D7
System Bus
EPROM RAM8279
keyboardDisplay
Controller
Anode driver
Decoder Keyboard Cathode driver
Display
7/23/2019 Microprocessor Based Control of Traffic Lights
3/8
FIG.2: LAYOUT OF TRAFFIC LIGHTS
a primary object of the invention to provide a
traffic light control and information transmission
device that applies the existing broadband network
to transmit data between the central traffic controlcomputer and themicroprocessors of the cross roads
to avoid the installation of the cables and save the
construction cost.
In order to achieve the objective set forth, a traffic
light control and information transmission device in
accordance with the present invention comprises amicroprocessor on the cross road, the
microprocessor further connects to a traffic
lightcontroller, an electronic display board, a video
camera, a compression circuitry, an I/O interface, a
traffic flow detector and connected to the central
traffic control computer through the DSL (DigitalSubscriber Loop). The control signals, traffic,public
information or news of the central traffic control
computer can go through the DSL to the
microprocessor; the microprocessor can control the
traffic light and display all the information on the
electronic display board. The traffic flow data ofthe
cross roads can be accessed by the traffic flowdetector and the video camera and transmitted back
to the central traffic control computer.
Fig 1: Block diagram of Traffic Light Controller
StopPW
StopPW
Stop PN Stop PNStopPE
StopPE
GoPW
Stop PS
Go PS
Stop PS
Go PS
GoPE
GoPW
Go PN Go PN GoPE
NORTH
SOUTH
EAST
WEST
StopW
WarningW
GoW
FRW
FLW
STW
Stop NWarning N
Go NFR N FL NST N
Stop S
Warning S Go S
FR SST SFL S
StopE
WarningE
FRE
FLE
STE
7/23/2019 Microprocessor Based Control of Traffic Lights
4/8
FIG 1 is a circuit block diagram of the present
invention;
FIG. 2 is a flowchart of the present invention.
DESCRIPTION OF THE PREFERRED
EMBODIMENT
Referring to FIG. 1, the components of the present
invention are described below:
The microprocessor 1 is inside the traffic control
box of the traffic light and to control all the
circuitries.The traffic light controller 2 is connected to and
controlled by the microprocessor 1 to send out the
stop, go and direction signals.
The electronic display board 3 is connected to and
controlled by the microprocessor 1 to display
characters, patterns and graphic images.
The video camera 4 is connected to and controlled by the microprocessor 1 to monitor the traffic flow.
The compression circuitry 5 connects to the
microprocessor 1 and the video camera 4, the
compression circuitry 5 compresses the image data
captured by the video camera 4 and sends the
compressed data to the microprocessor 1.
The I/O interface 6 connects to the microprocessor
1 and receives, transmits data and control signals.
The traffic flow detector 7 connects to the I/O
interface 6 and gathers the traffic flow information;
the traffic flow information is input to the
microprocessor 1.
The DSL (Digital Subscriber Loop) 8 connects to
the I/O interface 6 and receives, transmits data and
control signals.
The broadband network 9 links the DSL 8 and the
central traffic control computer 91 together; the
central traffic control computer 91 sends and
receives the data and controls signals to the
microprocessor through the broadband network 9.
The video camera 4 can be a picture camera; the
DSL 8 can be a cable modem, ADSL, VDSL, or
XDSL as needed.
Based on above structure and referring to the flow
chart shown in FIG. 2, the traffic flow detector 7 on
the cross roads gather the traffic flow information
and pass the data to the microprocessor 1 through
the I/O interface 6; the video camera 4(or picture
camera) inputs the traffic flow images to the
compression circuitry 5, those data are converted
into digital signals by the compression circuitry 5
and input to the microprocessor 1. The DSL 8
transmits the data by the traffic flow detector7 and
the video camera 4 (or picture camera) through the
broadband network 9 to the central traffic control
computer 91, the central traffic control computer 91
calculates the best control timing for the traffic light
controller 2 and transmits the bestcontrol timing
through the broadband network 9, the DSL 8 (or
cable modem) receives the best control timing and
then transmits those to the microprocessor 1, the
microprocessor 1 can response accordingly to the
traffic light controller 2.
Based on above description, the communication between the microprocessor 1 on the cross roads
and the central traffic control computer 91 on the
central office is through the existing broadband
network 9, therefore this scheme can avoid
theinconvenience and tedious of the installation of
the cables; the installation, road work cost can be
minimized.
The traffic, public information or news can also go
7/23/2019 Microprocessor Based Control of Traffic Lights
5/8
from the central traffic control computer 91 and
through the broadband network 9, the
microprocessor 1 on the cross roads can receive
those information and display those messages on
theelectronic display board 3, all the drivers can be
informed.
While a preferred embodiment of the invention has
been shown and described in detail, it will be
readily understood and appreciated that numerous
omissions, changes and additions may be made
without departing from the spirit and scope of
theinvention.
Vinytics Peripherals offers Microprocessor based
Traffic Light Controller Interface Module Card.
Vinytics Peripherals develops microprocessor and
PC based products for engineering colleges, science
colleges, polytechnics, test & measurement, process
control, industrial automation, medical,
instrumentation, intelligent graphic systems,
research laboratories, supervisory control and dataacquisition, telecommunication and production
facilities. The Interfacing Modules can be
connected to the lines of 8/16 bit Microprocessor or
Microcontroller Training kit to perform the
experiments in the laboratory that helps in learning
about real time interfacing problems of the
microprocessors or microcontroller TheMicroprocessor based Traffic Light Controller
Interface Module Card, VMC-TLC has RED,
YELLOW and GREEN LED`s to demonstrate the
use of Microprocessor in controlling the traffic
movement under the control of program. It is a
good example of use of Microprocessor in common
applications.
Traffic light controller interface module is designed
to simulate the function of four way traffic light
controller. Combinations of red, amber and green
LEDs are provided to indicate Halt, Wait and Go
signals for vehicles. Combination of red and green
LEDs are provided for pedestrian crossing. 36
LEDs are arranged in the form of an intersection.
A typical junction is represented on the PCB with
comprehensive legend printing.
At the left corner of each road, a group of five
LEDs (red, amber and 3 green) are arranged in the
form of a T-section to control the traffic of that
road. Each road is named North (N), South(S), East
(E) and West (W). LEDs L1, L10, L19 & L28
(Red) are for the stop signal for the vehicles on the
road N, S, W, & E respectively. L2, L11, L20 &
L29 (Amber) indicates wait state for vehicles on the
road N, S, W, & E respectively. L3, L4 & L5
(Green) are for left, strait and right turn for the
vehicles on road S. similarly L12-L13-L14, L23-
L22-L21 & L32-L31-L30 simulates same function
for the roads E, N, W respectively.
A total of 16 LEDs (2 Red & 2 Green at each road)
are provided for pedestrian crossing. L7-L9.L16-
L18, L25-L27 & L34-L36 (Green) when on allows
pedestrians to cross and L6-L8, L15-L17, L24-L26
& L33-L35 (Red) when on alarms the pedestrians towait.
To minimize the hardware pedestrians indicator
LEDs (both red and green are connected to same
port lines (PC4 to PC7) with red inverted. Red
LEDs L10 & L28 are connected to port lines PC2
& PC3 while L1 & L19 are connected to lines PC0
& PC1 after inversion. All other LEDs (amber and
green) are connected to port A
7/23/2019 Microprocessor Based Control of Traffic Lights
6/8
& B.
ASSEMBLY LANGUAGE PROGRAMS:-
MODEL SMALL
.STACK 100
.DATA
CWR EQU 0FFC6 H
PORTA EQU 0FFC0 H
PORTB EQU 0FFC2 H
PORTC EQU 0FFC4 H
.CODE
START:
MOV AX,@DATAMOV DS,AX
MOV AL,80H
MOV DX,CWR
OUT DX,AL
MOV AL,F3H
MOV DX,PORTC
OUT DX,ALMOV AL,FFH
MOV DX,PORTA
OUT DX,AL
MOV AL,FFH
MOV DX,PORTB
OUT DX,AL
MOV CL,03H
CALL DELAY
TOP:
MOV AL,EEH
MOV DX,PORTA
OUT DX,AL
MOV AL,EEH
MOV DX,PORTB
OUT DX,AL
MOV CL,02H
CALL DELAY
MOV AL,FCH
MOV DX,PORTC
OUT DX,AL
MOV AL,7DH
MOV DX,PORTA
OUT DX,AL
MOV AL,57H
MOV DX,PORTBOUT DX,AL
MOV CL,15H
CALL DELAY
MOV AL,E7H
MOV DX,PORTB
OUT DX,ALMOV AL,FDH
MOV DX,PORTA
OUT DX,AL
MOV AL,EDH
MOV DX,PORTA
OUT DX,AL
MOV CL,02H
CALL DELAY
MOV AL,F7H
MOV DX,PORTB
OUT DX,AL
MOV AL,F0H
MOV DX,PORTC
OUT DX,AL
MOV AL,F1H
7/23/2019 Microprocessor Based Control of Traffic Lights
7/8
MOV DX,PORTA
OUT DX,AL
MOV CL,15H
CALL DELAY
MOV AL,FBH
MOV DX,PORTA
OUT DX,AL
MOV AL,FBH
MOV DX,PORTB
OUT DX,AL
MOV AL,50H
MOV DX,PORTC
OUT DX,AL
MOV CL,15H
CALL DELAY
MOV AL,FEH
MOV DX,PORTA
OUT DX,AL
MOV AL,FEH
MOV DX,PORTB
OUT DX,AL
MOV CL,03H
CALL DELAY
MOV AL,FFH
MOV DX,PORTAOUT DX,AL
MOV AL,AFH
MOV DX,PORTC
OUT DX,AL
MOV AL,EEH
MOV DX,PORTA
OUT DX,AL
MOV AL,EEH
MOV DX,PORTB
OUT DX,AL
MOV CL,02H
CALL DELAY
MOV AL,BFH
MOV DX,PORTA
OUT DX,AL
MOV AL,BFH
MOV DX,PORTB
OUT DX,AL
MOV CL,15H
CALL DELAY
JMP TOP
DELAY:
MOV BX,10H
D1:
MOV CX,0FFFFH
D2:
LOOP D2
DEC BX
JNZ D1
INT 03HEND START
PROCEDURE:-
1. Connect power supply 5V & GND to both
microprocessor trainer kit & Traffic light controller interfacing kit.
2. Connect data bus between microprocessor trainer
kit & Traffic light controller interfacing kit.
3. Enter the program to control Traffic light.
4. Execute the program by typing GO E000:0B80ENTER.
5. Observe the LEDs on traffic light controller
7/23/2019 Microprocessor Based Control of Traffic Lights
8/8
PCB.
BIBLIOGRAPHY
www.google.com
www.wikipedia.org
www.ask.com
www.bing.com
www.microprocessor.com
http://www.google.com/http://www.wikipedia.org/http://www.ask.com/http://www.bing.com/http://www.microprocessor.com/http://www.google.com/http://www.wikipedia.org/http://www.ask.com/http://www.bing.com/http://www.microprocessor.com/