1、 本科生毕业论文本科生毕业论文(设计设计) 题 目: 交通信号智能控制系 统的研究与设计 学生姓名: 学 号: 专业班级: 通信工程 08102 班 指导教师: 完成时间: 2012 年 5 月 10 日 目 录 摘 要 .I Abstract II 第 1 章 绪论 1 1.1 研究意义 . 1 1.2 交通灯研究现状 . 2 1.2.1 国内城市交通现状 2 1.2.2 国际先进成果 2 第 2 章 总体方案设计 3 2.1 方案的比较与选择 3 2.1.1 方案的比较 3 2.1.2 方案的选择 4 第 3 章 系统硬件设计 6 3.1 单片机概述 6 3.2 电源电路 11 3.3 检
2、测电路 12 3.3.1 红外传感器的发展 12 3.3.2 常用的红外传感器 . 12 3.3.3 热释电红外传感器简介 14 3.3.4 检测车流量的方法 14 3.4 紧急按键 K1 电路 . 15 3.5 红绿灯显示电路 16 3.6 倒计时显示电路 17 3.7 振荡电路 . 19 3.8 复位电路 . 20 第 4 章 系统软件设计 22 4.1 主程序设计 23 4.2 延时子程序 . 26 4.2.1 计数器硬件延时 26 4.2.2 软件延时 28 4.3 计数器计数 29 4.4 数码管显示子程序 30 4.5 黄灯闪烁子程序 31 4.6 车流量算法子程序 31 4.7
3、紧急车辆子程序 . 32 第 5 章 系统实现 33 5.1 仿真软件简介 33 5.1.1 Proteus 软件简介 33 5.1.2 Keil 软件简介 . 35 5.2 仿真实现 37 结 论 40 参考文献 41 致 谢 42 附 录 43 I 摘 要 本文根据 AT89C51 单片机的特点及交通灯在实际控制中的特点, 提出了一种用单片 机自动控制交通灯以及时间显示的方法,同时给出了软硬件设计的方法。设计的过程包 括硬件电路设计和程序设计两大步骤,对在单片机应用中可能遇到的重要设计问题都有 涉足。本系统采用单片机作为核心控制器,通过红外检测系统来测量东西方向和南北方 向的车流量大小,经
4、过简单的算法得出红绿灯时间。然后分别用红、黄、绿灯的不同组 合来指挥两个方向的通车与禁行,用 LED 数码管作为倒计时指示,实时地控制当前交 通灯时间使 LED 显示器进行倒计时工作并与状态灯保持同步,在保持交通安全的同时 最大限度地提高交通能顺畅交替运行,从而实现十字路口的智能交通控制。 关键词:关键词:单片机;交通灯;红外检测;智能控制 II Abstract According to the characteristics of the AT89C51 microcontroller and the characteristics of traffic lights in the act
5、ual control,the paper proposes a kind of automatic traffic lights with a single chip and method of time display and gives the hardware and software design methods. The process of design includes the hardware circuit design and programming two steps, and might encounter important problems in the desi
6、gn of SCP application.The system uses the SCM as the core controller and measures the east-west and north-south direction of traffic flow size through the infrared detection system. The time of traffic lights is calculated through a simple algorithm. And command the different combinations of two direction and exclude traffic with red, yellow, and green .Then use the LED digital tube as the countdown instructions ,real-time control the time of the cou