0% found this document useful (0 votes)
171 views27 pages

Traffic Control System Using 89C51: Project Title

This project aims to develop a traffic control system using a microcontroller. The system will control traffic lights at a four-way intersection using LED lights to indicate signals. An AT89C51 microcontroller will be interfaced with LEDs to provide centralized control of the traffic signals. The microcontroller will be programmed to adjust the timing and phasing of the lights to manage changing traffic conditions. The circuit uses components like the AT89C51 microcontroller, crystal oscillator, LEDs, 7404 inverter, L293D motor driver, and a stepper motor. It is intended to be reliable, compact and cost-effective.

Uploaded by

Hafza Ghafoor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
171 views27 pages

Traffic Control System Using 89C51: Project Title

This project aims to develop a traffic control system using a microcontroller. The system will control traffic lights at a four-way intersection using LED lights to indicate signals. An AT89C51 microcontroller will be interfaced with LEDs to provide centralized control of the traffic signals. The microcontroller will be programmed to adjust the timing and phasing of the lights to manage changing traffic conditions. The circuit uses components like the AT89C51 microcontroller, crystal oscillator, LEDs, 7404 inverter, L293D motor driver, and a stepper motor. It is intended to be reliable, compact and cost-effective.

Uploaded by

Hafza Ghafoor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Project Title:

Traffic Control System


using 89C51
Thajid Ibna Rouf Uday
Id:021 121 102
Marzia IslamMow
ID:024121009
Amzad Hossain
ID:021 111 140
Description
Traffic congestion is one of the major problems, the
world is facing today. Traffic monitoring and
controlling is a difficult task. We can easily handle it
by microcontroller system .
All roadways are built with devices meant to control
traffic. They help the driver navigate and assign the
right-of-way at intersections. Traffic lights have been
installed in most cities around the world. They assign
the right of way to road users by the use of lights in
standard colors (red - amber/yellow - green), using a
universal color code.
Description
This project is developed to meet the

requirements of solid state traffic light controller
by adopting microcontroller as the main
controlling element, and led’s as the indication of
light. A micro controller is interfaced to led’s
provide for centralized control of the traffic
signals. Microcontroller is programmed in such a
way to adjust their timing and phasing to meet
changing traffic conditions. The circuit besides
being reliable and compact is also cost effective
Description

Typically traffic lights consist of a set of three colored


lights: red, yellow and green. In a typical cycle,
Flashing Green: Varies among jurisdiction.
Illumination of the green light allows traffic to
proceed in the direction denoted.
Description
Flashing Yellow: Caution, crossing or road
hazard ahead. Illumination of the amber/yellow
light denoting, if safe to do so, prepare to stop
short of the intersection, and
Flashing Red: Treat as a stop sign. Illumination
of the red signal prohibits any traffic from
proceeding.
After completing every cycle red and yellow
lights are flashing at a time for proceed next cycle
to flash green light
Description
ASSUMPTION:
Traffic signal is controlled by light are generally
built in 2 types for four roads junction point.
TYPE 1: one major road and one minor road are
crossed at a point.
TYPE2: Two major roads are crossed at a point.
These two type of traffic system are different for
heavy rush of vehicles. Our traffic control system
is built in TYPE2 , which is shown next slide
Description
Description
Working procedure:
When the display1 of road 1 flash green light to move
then other three roads are show stop sign.
 After Some sec yellow light (halt signal) is flashes for
Some sec. At the same moment display1 of road2
shows red and yellow signals at a time, which means
that after some sec it will flash green light.
This sequence is repeated continuously for accordingly
road 1, 2, 3 & 4.
When all roads are shows red signal for Some sec,
then general people are crossing road very safely which
shows in Display
Description
Most of the time general people are not use
foot over bridge to cross the road, and many
busy roads have no foot over bridge to cross
road. So, If there is a traffic control display to
show when general people are cross the road
which is play very important role to minimize
largely the road accident. At the mean time
there was a bar which is closed all the road and
does not move on the vehicles. Because some
time driver are not flow the traffic signals .
COMPONENTS
AT89C51 Microcontroller Chip, 1pic
Crystal 12MHZ
PC B Board
74LS245 Buffer IC, 2pic
7404 Inverter, 4pic
Resistor: 330 ohms, 20pic
LED-Green, 8pic
LED-Red, 8pic
LED-Yellow, 4pic
L293D Motor Driver (package) , 4pic
Stepper Motor, 4pic
COMPONENTS AT89C51
AT89C51 is an 8-
bit microcontroller and
belongs to Atmel's 8051
family. 
ATMEL 89C51 has 4KB of
Flash programmable and
erasable read only memory
(PEROM) and 128 bytes of
RAM.
It can be erased and program
to a maximum of 1000 times.
COMPONENTS 74LS245
These octal bus transceivers are
designed for asynchronous two-way
communication between data buses.
The control-function implementation
minimizes external timing
requirements.
The devices allow data transmission
from the A bus to the B bus or from
the B bus to the A bus, depending on
the logic level at the direction-control
(DIR) input. The output-enable(OE)
input can disable the device so that
the buses are effectively isolated.
COMPONENTS 7404

•This package contains six inverter


•All six inverters can be used
independently of one another .
COMPONENTS
Resistance - 330 ohms
COMPONENTS
LED
COMPONENTS L293D Motor Driver
Wide Supply-Voltage Range:
4.5 V to 36 V
 Separate Input-Logic Supply
High-Noise-Immunity Inputs
Output Current 1 A Per
Channel
Peak Output Current 2 A Per
Channel
Can Drive 2 motors (servo or dc
motor ) at a time
Can Drive one stepper motor
 Stepper motor
A stepper motor is a brushless DC electric motor that
divides a full rotation into a number of equal steps. The
motor's position can then be commanded to move and
hold at one of these steps without any feedback sensor,
as long as the motor is carefully sized to the
application.
Circuit Schematic
Program
ORG 0H
MOV R1,#22H ;load R1,22H
MOV R2,#24H ;load R2,24H
MOV R3,#14H ;load R3,14H
MOV R4,#0CH ;load R4,0CH
MOV R6,#21H ;load R6,21H
ORG 0030
Program
START: MOV p2,R2 ;Sent port2 from R2
ACALL DELAY2
MOV p1,R6 ;Sent port1 from R6
ACALL COUNTD
MOV p2,R2 ;Sent port2 from R2
MOV p1,R6 ;Sent port1 from R6

ACALL COUNTD
MOV p2,#26H ;Sent port2 from 26H
MOV p1,R1 ;Sent port1 from R1

ACALL DELAY2
MOV p2,R6 ;Sent port2 from R6
MOV p1,R2 ;Sent port1 from R2

ACALL COUNTD
MOV p2,R6 ;Sent port2 from R6
MOV p1,R2 ;Sent port1 from R2

ACALL COUNTD
MOV p2,R1 ;Sent port2 from R1
MOV p1,#34H ;Sent port1 from 34H
Program
ACALL DELAY2
MOV p2,R2 ;Sent port2 from R2
MOV p1,R4 ;Sent port1 from R4

ACALL COUNTD
MOV p2,R2 ;Sent port2 from R2
MOV p1,R4 ;Sent port1 from R4

ACALL COUNTD
MOV p2,#34H ;Sent port2 from 34H
MOV p1,R3 ;Sent port1 from R3

ACALL DELAY2
MOV p2,R4 ;Sent port2 from R4
MOV p1,R2 ;Sent port1 from R2

ACALL COUNTD


Program
MOV p2,R4 ;Sent port2 from R4
MOV p1,R2 ;Sent port1 from R2

ACALL COUNTD
MOV p2,R3 ;Sent port2 from R3
MOV p1,#24H ;Sent port1 from 24H

ACALL DELAY2
MOV p2,#0E4h ;Sent port2 from E4H
MOV p1,#0E4h ;Sent port1 from E4H
ACALL COUNTD
MOV p2,R2 ;Sent port2 from R2
MOV p1,#26H ;Sent port1 from 26H
ACALL DELAY2
LJMP START
Program
COUNTD: MOV p0,#67H ; 9 ACALL DELAY2
ACALL DELAY2 MOV p0,#4FH ; 3
MOV p0,#7FH ; 8 ACALL DELAY2
ACALL DELAY2 MOV p0,#5BH ; 2
MOV p0,#27H ; 7 ACALL DELAY2
ACALL DELAY2 MOV p0,#06H ; 1
MOV p0,#7DH ; 6 ACALL DELAY2
ACALL DELAY2 MOV p0,#3fH ; 0
ACALL DELAY2
MOV p0,#6DH ; 5
RET
ACALL DELAY2
MOV p0,#66H ; 4
Program
DELAY1: MOV R0,#0EFH DELAY2: MOV
L3: MOV R5,#7DH R0,#7DH ;47
L6: MOV R5,#7DH
L2: MOV R7,#7DH L5: MOV R7,#0FFH
L1: NOP
NOP L4: DJNZ R7,L4
DJNZ R7,L1 NOP
DJNZ R5,L5
DJNZ R5,L2 DJNZ R0,L6
DJNZ R0,L3 RET
RET END
Simulation
Reference
http://www.engineersgarage.com/electronic-compon
ents/at89c51-microcontroller-datasheet
https://www.ece.cmu.edu/~ece348/labs/docs/SN74LS
245.pdf
http://www.me.umn.edu/courses/me2011/arduino/tec
hnotes/dcmotors/L293/L293.html
UIUserver 2
Thanks
Any Question or Query ?

You might also like