当前位置:网站首页>Design of traffic light control system based on MCU
Design of traffic light control system based on MCU
2022-07-18 00:33:00 【Chloroplasts don't forget to breathe】
WeChat official account : Chuangxiang diary
send out : SCM traffic lights
Access to the source code + The report + Schematic diagram and simulation 
1、 With a single chip microcomputer STC89C52 Design a traffic light system , And use digital tube to display time ,LED Indicate passage .
2、 use 74HC245 To drive 4 A digital tube , Make the nixie tube appear brighter during the day .
3、 Key function : The yellow light is always on ( Late night mode )、 No way 、 East West traffic 、 North south traffic 、 Time plus 、 Less time 、 Switch 、 determine .
Overall block diagram of system design 
Principle description of each module
Minimum system AT89C52 modular
AT89C52 It's a low voltage , High performance CMOS 8 Bit MCU , Film inclusion 8k bytes Rewritable Flash Read only program memory and 256 bytes Random access data memory (RAM), The device adopts ATMEL The company's high density 、 Non volatile storage technology production , Compatible standards MCS-51 Command system , Built in universal 8 Bit CPU and Flash Storage unit ,AT89C52 SCM is widely used in electronic industry .
52 Principle description of minimum system of single chip microcomputer :
4.5V Power Supply : Power the system .
Crystal oscillator : Provide pulses for the operation of single chip microcomputer .
EA Connected to high level : Indicates that the program downloaded from the internal program memory is run .
Description of main pins :
VCC(40 foot ): Supply voltage
GND(20 foot ): Grounding .
RST: Reset input .
/EA/VPP(31 foot ): When /EA Keep the battery low , Then during this period, the external program memory (0000H-FFFFH), Whether or not there is internal program memory . Only use external memory , Otherwise, the on-chip program memory is selected after the MCU is powered on or reset .
XTAL1(19 foot ): The input of the reverse oscillation amplifier and the input of the internal clock working circuit .
XTAL2(18 foot ): Output from the reverse oscillator .
74HC245 Chip module
74HC245 It's a high-speed CMOS device ,74HC245 Pin compatible with low power Schottky TTL(LSTTL) series . 74HC245 The eight way transceiver has positive phase tri state bus compatible output in both sending and receiving directions .74HC245 The output enable end of (OE) For easy cascading , And send / The receiver (DIR) Used to control direction .OE Control output , The bus is effectively isolated .) Output .
Pin instructions :
(1) The first 1 foot DIR, For input / output port conversion ,DIR=“1” High level signal is generated by “A” End input “B” End output ,DIR=“0” The low level signal is generated by “B” End input “A” End output .
(2) The first 2~9 foot “A” Signal input and output terminals ,A0=B0…A7=B7,A0 And B0 It's a group. , If DIR=“1”OE=“0” be A1 Input B1 Output , Other similar . If DIR=“0”OE=“0” be B1 Input A1 Output , Other similar .
(3) The first 11~18 foot “B” Signal input and output terminals , Function and “A” The same , No more description .
(4) The first 19 foot OE, Enable end , If the foot is “1”A/B The signal at the terminal will not be connected , Only for “0” when A/B End is enabled , This foot also acts as a switch .
(5) The first 10 foot GND, Power ground .
(6) The first 20 foot VCC, Positive pole of power supply .
Display module functions
The display modules are code tube display and LED Show , The digital tube countdown display can remind the driver of the time when the signal light color changes 、 stay “ stop it ” and “ adopt ” Choose between the two . Drivers and pedestrians are generally willing to choose the signal control mode with countdown display , And think that the intersection with countdown display is safer . Countdown display is a method used to reduce the driver's complex judgment at the critical moment of signal color change , It can remind the driver of the time when the light color changes , Help the driver in “ stop it ” and “ adopt ” Choose between the two . Through the combination of two displays , This design is more reasonable and reliable . Here's the picture 3-4 Shown .
Control button module
This system requires few key controls , And I/0 Enough mouth , Independent type can be adopted directly . Press the key to set the running state of the system , The forbidden status is displayed on the nixie tube “00”, All the red lights are on ; The reset button can reset the whole system ; East West traffic is the green light in the east-west direction , The red light in the north-south direction is on ; The green light on the north-south direction is on when you travel from north to South , The red light in the east-west direction is on ; Time addition and subtraction can set the time of passing and waiting for passing ; The switch button can switch the direction and time of addition and subtraction . Through the control of the security check module , Make the whole system flexible , practical . Here's the picture 3-5 Shown .
Description of the general schematic diagram of the system
When on 4.5v After power supply , Press the power switch , North south direction nixie tube display “25”. The nixie tube begins to count down , To 5 seconds , Yellow light and buzzer sound 5 Next , The red, green and yellow lights will be switched . Key 1 function 、 Key 2 The yellow light is always on ( Late night mode )、 Key 3 The red light is always on ( Emergency mode )、 Key 4 Reset 、 Key 5 East West traffic 、 Key 6 North south traffic 、 Key 7 Time plus 、 Key 8 Less time 、 Key 9 stop it . The general schematic diagram of the system is shown in Annex 1.

边栏推荐
- 【踩坑专栏】解决idea插件搜不到的问题
- Basic use of beautifulsoap
- 【黄啊码】MySQL入门—3、我用select *,老板直接赶我坐火车回家去,买的还是站票
- This SQL will report an error when it is executed in pg. Oracle is OK
- Difference between QPS and TPS
- 【直播课】腾讯课堂------基于GO语言的云原生工具二次开发实战训练营-------Kubernetes Operator开发
- Data Lake (XVII): Flink and iceberg integrate datastream API operations
- 【数学建模暑期培训】Matlab绘图命令
- Oracle P8架构师离职,怒喷MySQL是“糟糕的数据库”……
- Typos (spring daily question 57)
猜你喜欢

MFC实现类的序列化

Basic database operations in MySQL

Degree engine (12): video loading

Today, I went to oppo for an interview and got numb...

View CPU information mode

Meituan side: @transactional principle and common pits?

Typescript 14 starting from 0: built in tool type

kali系统入门-Hping3的使用
![[MySQL - Basic] multi table query](/img/2d/974e810568eda86dc28919791e1b10.png)
[MySQL - Basic] multi table query

10 pictures to understand the service registration discovery mechanism
随机推荐
mysql进阶(三)游标简易知识点汇总
【古月21讲】ROS入门系列(2)——发布者Publisher、订阅者Subscriber的编程实现+自定义话题消息编程实现
【答疑解惑】 裁员浪潮中,N+1 到底指什么?
Introduction to Kali system use of hping3
Seven sorts (2)
[interview question] what is the difference between poll() and remove() in the queue
Full link voltage testing experience of software testing technology (Part 2)
【面试题】在 Queue 中 poll()和 remove()有什么区别
【直播课】腾讯课堂------基于GO语言的云原生工具二次开发实战训练营-------Kubernetes Operator开发
MFC|自绘CStatic刷新不及时问题
[live class] Tencent classroom ----- cloud native tool secondary development training camp based on go language ------ Prometheus exporter development
【LeetCode】Day100-颜色分类
[live class] Tencent classroom ----- cloud native tool secondary development training camp based on go language ----- kubernetes operator development
Teach you how to use code to realize SSO single sign on
MFC基于单个文档的文件读写
Applet pulls up enterprise wechat group QR code
蔚来缘何没有产品主义?
科技公司纷纷反对 英国网络安全法案搁置
463 sword finger offer- (09, 30, 06, 24)
MySQL advanced (III) summary of cursor simple knowledge points