【2017年整理】模拟路灯控制系统附硬件图及c程序.doc
文本预览下载声明
摘 要
本文介绍了一个模拟路灯控制系统的应用方案,用以实现模拟路灯的智能控制。本方案以宏晶公司的MCU芯片STC12C5410AD为核心,加以简单的外围电路,实现了模拟路灯控制系统所要求的全部技术内容。STC单片机在最近几年应用越来越广泛,因其抗干扰能力强、稳定性好,性价比高,因此是低成本路灯控制解决方案的首选。该控制系统除了选用廉价的单片机芯片,还采用了廉价的红外对射传感器,大大降低了系统成本。整个系统的电路简单,结构紧凑,电源驱动仅采用变压器与三端稳压器相结合,附加少许滤波电容便实现了稳定的电源输出。经过多次测试,证实该系统能长时间稳定工作,完全满足设计要求指标。
关键词:模拟控制;LED照明;单片机
ABSTRACT
This paper introduces a simulation control system application scheme street, to simulate the street lamp of intelligent control. This plan to macro crystal company MCU, STC12C5410AD as the core, to chip the periphery of the simple circuit, realize the simulation street lamp control system all of the requested technology content. STC SCM in recent years more and more wide application, because of its strong anti-interference ability, good stability, high performance/price ratio, and so is the low cost street lamp control solutions of choice. The control system in addition to choose cheap single-chip microcomputer chip, also adopted the cheap infrared mutual illuminate sensor, and greatly reduce the cost of system. The whole system of the circuit is simple, compact structure, power drive only used three transformer and the regulators, and the combination of a few additional filter capacitance will realize the stable power output. After many test, and confirm that the system can work stably for a long time, fully meet the design requirements index.
Keywords: Simulate controlling; LED lighting; Single-chip microcomputer
目 录
1 系统设计 1
1.1 设计要求 1
1.1.1 基本要求 1
1.1.2 发挥部分 2
1.2 总体设计方案 2
1.2.1 功能分解及设计思路 2
1.2.2 方案论证与比较 2
1.2.3 系统各模块的最终方案 5
1.3 系统功能说明书(用户使用说明书) 5
1.3.1 路灯的工作模式 5
1.3.2 按键操作说明 6
2 单元电路设计 6
2.1 电源供电电路 6
2.2 单片机最小系统 7
2.3 输入与输出 7
2.4 电流源驱动 8
3 软件设计 9
3.1 系统主程序流程图 9
3.1.1系统流程图 9
3.1.2 定时器溢出中断处理函数流程图 10
3.1.3 按键扫描流程图 11
3.2 系统子程序 11
4 系统测试 12
4.1 测试仪器 12
4.2 指标测试 13
4.2.1 各部分测试的指标 13
4.2.2 系统实现的功能 13
5 结论 15
参考文献 16
附录 1 程序代码 17
附录 2 硬件原理图 28
附录 3 PCB图(部分) 29
1 系统设计
1.1 设计要求
设计并制作一套模拟路灯控制系统。控制系统结构如图1.1所示:
图1.1 模拟路灯控制系统
路灯布置如图1.2所示:
图1.2 路灯布置示意图
显示全部