Vous êtes sur la page 1sur 3

2009 First International Workshop on Education Technology and Computer Science

Research of Traffic Signal Light Intelligent Control System


Based On Microcontroller

Zhang Yuye Yan Weisheng


Marine college of Northwest Polytechnical University Marine college of Northwest Polytechnical University
Xi’an, China Xi’an, China
Physics Department of XianYang Normal University
XianYang, China.
lele98412@126.com

Abstract—A development of distributed area traffic signal In this system, the realization of design of traffic signal
lights control based on single-chip microcontroller through light control is in virtue of the single-chip microcontroller
CAN BUS is described. With the core of AT89C51, infrared AT89C51 and CAN BUS is regarded as field bus. The
receiver receives the infrared signal coming from launcher. designator of distributed traffic signal lights intelligent
The demodulation signal is treated by single-chip control system was carried out by three control styles of
microcontroller. The single-chip microcontroller controls the Vehicle flux, remote and PC. And some corrective measures
CAN BUS controller to structure CAN BUS communication are taken in aspect of software and hardware. The field
system to transmit the data. The designator of distributed control of traffic signal light becomes flexible and effective.
traffic signal lights intelligent control system was carried out
To some extent, traffic jam, unreasonable latency time of
by three control styles of Vehicle flux, remote and PC. The
stoppage of vehicle, emergency cars or forcibly passing, etc
paper introduces total scheme and system structure, also the
hardware design of the system in detail. By experimental are solved. The system has several benefits such as simple
testing, when the key K1-K6 is pressed ,time setting of east- structure, high reliability, low costs, good real-time, easy
west,south-north direction, emergency car ,time’s increase installation and maintenance and so on. So, the system owns
,decrease ,holding are effectively controlled. When the low- a broader application prospect.
level time of WDI is continuous greater than 1.6s, the RESET
port of watchdog produces negative overflow pulse signal II. DESIGN SCHEME AND SYSTEM STRUCTURE
lasting 200ms to reset AT89C51.The design demands of system The hardware subassembly of this system consists of
are all satisfied. vehicle-flux detecting circuit, keyboard-time setting circuit,
infrared remote transmitter/receiver circuit, single-chip
Keywords-Traffic signal ligt; AT89C51; CAN BUS;
controller, CAN BUS controller[1], CAN BUS transceiver,
Intelligent control
optoelectronic isolation chip, SCM parallel interface, watch
dog circuit, etc. The supervisor node connected to host
I. INTRODUCTION computer is set as main node and control apparatus of signal
With the economical development, the number of light in each crossing as smart node. So, region traffic light
automobiles expands rapidly and urban highway is growing control system is realized and the system principle diagram
crowded. Traffic jam is already an international problem. A is shown as figure1 below:
secure, reliable, convenient and fast urban multifunction Signal light control of each crossing is realized by
traffic lights control system becomes very urgent necessary. infrared remote control apparatus. Encoded signal emitted
Under ordinary conditions, traffic signals control mainly has by Infrared transmitter is loaded to single-chip controller
two defects:1.When the traffic lane wait until the green through infrared receiver so as to control traffic lights,
light, time setting is almost same and fixed. A-road was waiting time and emergency cars.
always crowded with vehicles and go-ahead time is short. In addition, the vehicle-flux detection apparatus in east
So, vehicles can’t pass through in the time allowed. But sub- and west, south and north direction is used to real-
lane has few vehicles and go-ahead time is relatively long. signal is treated by single-chip microcontroller. the set of
2. Emergency cars is not considered.(for example, fire red-green alteration and waiting time of traffic lights is
engines and ambulances have priority over other traffic. The realized by programming technique of single-chip
two lanes should both wait them to pass through. ) Because microcontroller. Communication between PC and single-
the traffic light control system is lack of emergency chip microcontroller is done through serial port. And the
measures, the crossroads always meets a traffic jam and transmitter and receiver of digital communication in CAN
leads to unnecessary economic losses. Bus is also carried out[2]. PC is in charge of centralization of
management of control apparatus of all signal lights and

978-0-7695-3557-9/09 $25.00 © 2009 IEEE 301


DOI 10.1109/ETCS.2009.328
transmission of working-mode control information of each generate carrier frequency signal with certain pulse width
signal light controller. after division. The infrared-emitting diode is driven by
output encoded signal to emission outwardly.
PC Serial port B. Infrared remote receiving circuit
Time Infrared receiving, demodulation module receives
display infrared signal coming from emitter, after amplification and
time
Keyboard-

Extensive CPU parallel interface


Watch demodulation of internal integrated circuit, the coded pulse
dog signal, which is output by output terminal and inverse
Signal
SCM controller

amplified by transistor, is sent to receiver to decode by


light receiver demodulation module[3]. When the corresponding
control key of the receiver is pressed, the receiver outputs high level
control coding
Infrared remote

signal which connects to external interruption of single-chip


controller and applies for interruption. The valid key
latch

Vehicle condition is judged by interrupt service routine. The


-flux interface circuits of infrared receiver and single-chip
informa controller are shown as figure3 below:
tion
Signal Signal Infrared
receiving demodulating receiving
apparatus
CAN BUS

CAN Bus Photoelectric CAN Bus


controller isolation receiver

Figure 1. Block diagram of system principle. Power Signal MCU


driven amplification
III. SYSTEM DESIGN
Figure 3. Principle diagram of infrared receiving

A. Infrared remote transmitting circuit


Because system should realize signal light alteration in C. Interface circuit of CAN Bus nodes[5]
different direction, if the two directions are east-west and The communication of traffic lights control of each
south-north, several functions such as the choice of the crossing and host computer is done by the respective CAN
signal lights in east-west, south-north direction, time Bus interface module. The principle diagram of hardware
increase and decrease, emergency cars, etc should be circuit of bus system is shown as figure4 below:
realized. The principle diagram of Infrared remote
transmitting circuit is shown as figure2 below:
CAN Bus transceiver
Single –chip control

CAN Bus control

Optical coupler

Power South Time


control and control CAN BUS
signal amplification

Signal transmitting

north
contro

Infrared remote electroplate

Figure 4. principle diagram of CAN Bus nodes interface


carrier East Power
The single-chip controller is mainly in charge of the
frequency and drive
initialization of CAN Bus controller, the receiving and
generate west transmitting of data, etc. CAN Bus transceiver and CAN
control Bus interface section adopt some safe and anti-jamming
Figure 2. Principle diagram of Infrared remote transmitting circuit measures. To enhance CAN Bus anti-jamming ability, CAN
controller does not directly connect to CAN transceiver. But
Oscillating circuit consisting of infrared remote by adding high-speed optoelectronic isolator chip, the
transmitter, ceramic resonant device and capacitor can electrical isolation of each nodes in CAN Bus is realized. It
is worth noting that VCC and VDD of optically coupled

302
circuit should be completely isolated, or, the use of optically and bus transceiver 82C250 of PHILIPS are used. The
coupled circuit has no sense. Thus, small-power supply optical coupler adopts 6N137 chip. The hardware circuit of
isolation module or isolated output switch supply module system is designed and manufactured by Protel DXP.
whose value is less or equal to 5V can be adopted. By experimental testing, when the key K1-K6 is pressed
, time setting of east-west, south-north direction, emergency
D. Watch-dog circuit cars, time’s increase, decrease, holding are effectively
Single-chip controller’s own capacity of resisting controlled. When the low-level time of WDI is continuous
disturbance is less. Especially in formidable or big-noise greater than 1.6s, the RESET port of watchdog produces
condition, because of external disturbance to single-chip negative overflow pulse signal lasting 200mst to reset
controller, when things are not so bad, the inner data of AT89C51[7].The design demands of system are all satisfied.
system will go wrong, when situation is serious, the To improve anti-interference and reliability of system
program run will be seriously affected to system halting. So, communication, pin CANH and pin CANL of Bus
the system can not run normally. Watch-dog technology is transceiver 82C250 connects to CAN Bus through 5 Ω
an important method to prevent SCM from system halting resistance. So over-current surge is avoided. Between pin
and enhance capacity of resisting disturbance of SCM CANH and pin CANL of 82C250 and ground, respectively
system. In consideration of design for reliability and good exists a 30pF parallel capacitor to get rid of high-frequency
running in severe rugged environment, the system adopts interference and prevent electromagnetic radiation. The two
hardware watchdog circuit is shown as figure5 below: terminals of bus respectively connects 120 Ω terminating
resistance and matched bus impedance. In addition, between
Hand-reset Monitoring SCM the input and ground of CAN Bus, there is a lightningproof
circuit control tube. When transient disturbance occurs between the input
and ground, the affection of thunder weather to system
communication is avoided by discharge of lightningproof
Power driven tube. Although this part adds complexity of nodes,
guarantees effectively stability and security of
communication.
Figure 5. principle diagram of watchdog
V. CONCLUSION
Traffic signal light intelligent control system plays an
E. Distribution detecting control system
active role in improvement of traffic jam and increase traffic
CAN Bus has several virtues such as good anti-jamming capacity. In this system, the real-time control of
capacity, no address conception in communication, no automation, intelligence, humanization of signal lights in
constrain to node, and so on. So, it is widely used in many crossing is realized. By system’s function extension, the
fields as vehicles, numerical control machine, instruments system can be used in other field of industrial control and
and meters and field controlling. In the design, intelligent can own a broader application prospect.
traffic signal lights controller, supervisor node interface and
PC are component of communication system. The real-time REFERENCES
monitor, high-speed data acquisition, and so on of [1] SJA1000 CAN Controller[S].Product Specification. Philips
intelligent distribution signal lights are realized. Semiconductors,2000.
The communication between SCM and PC adopts serial [2] PCA82C250 CAN Controller Interface. Product
style[4]. The working mode of CAN Bus is set as Intel. PC Specification[S].Philips Semiconductors,2000.
sends data to SCM. Then, by control signal, SCM writes [3] Digital Logic Pocket Data Book[S] .Texas Instruments,2003:512.
data to CAN Bus controller .And the transceiver of CAN [4] MAX232.Multichannel RS232 Drivers and Receivers. Maxim
Bus sends data. Data receiving is done by interruption. Integrated Products[S].1997.
[5] Hu Guangyong, Design and Implementation of CAN Bus Node
IV. EXPERIMENT ANALYSES Circuit[J], Control & Automation, 2006(22): 1-2.
The SCM controller of this system chooses [6] Rao Yuntao,Zhou Jijun,Zheng Yongyun,FieldbusCAN Principle and
Applied Technology[M].Beijing:Beijing aerospace University
IntelAT89C51chip of MCS-51 series. Infrared remote Press,2003.6,154-155.
transmitter/receiver adopts BA5104/BA5302. Watchdog [7] Rao Yuntao,Zhou Jijun,Zheng Yongyun,FieldbusCAN Principle and
monitoring circuit is designed by MAX692 .In bus Applied Technology[M].Beijing:Beijing aerospace University
communication interface, CAN Bus controller SJA1000[6] Press,2003.6,154-155.

303

Vous aimerez peut-être aussi