基于单片机的自动亮度路灯设计(含电路原理图,程序代码)
基于单片机的自动亮度路灯设计(含电路原理图,程序代码)(论文10000字,电路原理图,程序代码)
摘要
路灯作为公路基础设施极大的方便了人们夜间的出行,同时大量的路灯在方便了人们的同时也带来了巨大的能源消耗,因此对于路灯的节约使用,合理使用就非常有必要,这样可以极大的节约社会资源。
在本次课题基于单片机的自动亮度路灯设计中,围绕路灯的控制展开了设计,本系统采用了STC89C52单片机,按键,光照传感器,红外传感器,DS1302时钟模块,LCD液晶等构成整个控制系统的硬件基础,在功能上其具有手动和自动,定时三种工作模式;当自动亮度路灯进入自动模式时,其只要在光照不足并且红外检测到有人的情况下才会点亮路灯;在自动亮度路灯进入定时模式时,只会在设定的时间段内点亮路灯;在手动模式下,用户可以手动进行路灯的开关控制;具有显示设备,显示当前的时间,模式,路灯的状态信息等等;在设计的过程中,一方面针对课题完成电路图图纸设计,软件程序设计,另一方面还通过使用电烙铁,镊子等工具对自动亮度路灯的实物模型进行制作,通过焊接,硬件检查,程序下载,功能测试等步骤对目标功能进行反复调试,最终实现了课题目标。
关键词:路灯;单片机;光照;人体;自动 [资料来源:http://www.doc163.com]
ABSTRAC
As a highway infrastructure, street lamps greatly facilitate people's travel at night. At the same time, a large number of street lamps not only facilitate people, but also bring huge energy consumption. Therefore, it is very necessary for the economical and rational use of street lamps, which can greatly save social resources.
In the design of automatic brightness street lamp based on single chip microcomputer, the design is carried out around the control of street lamp. The system adopts STC89C52 single chip microcomputer, key, light sensor, infrared sensor, DS1302 clock module and LCD liquid crystal to form the hardware foundation of the whole control system. In terms of function, it has three working modes: manual, automatic and timing; When the automatic brightness street lamp enters the automatic mode, it will light up the street lamp only when the illumination is insufficient and the infrared detects someone; When the automatic brightness street lamp enters the timing mode, it will only light up the street lamp within the set time period; In the manual mode, the user can manually control the switch of street lamps; It has a display device to display the current time, mode, status information of street lamps, etc; In the process of design, on the one hand, the circuit diagram, drawing design and software program design are completed for the subject. On the other hand, the physical model of automatic brightness street lamp is made by using electric soldering iron, tweezers and other tools. The target function is debugged repeatedly through welding, hardware inspection, program download, function test and other steps, and finally the goal of the subject is realized. [资料来源:http://www.doc163.com]
Key words: street lamp; singlechip; illumination; Human body; automatic
系统总体设计
通过针对上述课题的功能分析,本次基于单片机的自动亮度路灯设计,其系统整个框图如图2.1所示。整个自动亮度路灯系统,包括STC89C52单片机,按键,光照传感器,红外传感器,DS1302时钟模块,LCD液晶等等。其可以通DS1302时钟模块来获取当前的实时时间,并且通过光照和红外传感器去检测当前的光照强度和是否有人,并根据设定好的模式,来进行操作控制路灯,
目录
1绪论 4
1.1课题背景以及意义 4
1.2国内外发展现状 4
1.3本文主要内容 5
2 系统方案设计 6
2.1 功能设计 6 [资料来源:https://www.doc163.com]
2.2 系统总体设计 6
2.3 主控制器方案设计 7
2.4显示系统方案选择 7
2.5本章小结 8
3 硬件电路设计 9
3.1 单片机电路设计 9
3.2 按键电路设计 10
3.3 时钟电路设计 11
3.4 光照检测电路设计 11
3.5 显示电路设计 12
3.6人体检测电路设计 13
3.6LED灯电路设计 13
3.7本章小结 14
4 软件设计 15
4.1 开发环境 15
4.2主程序设计 15
4.3显示程序设计 16
4.4读取时间程序设计 17
4.5本章小结 18
5 系统调试 19
5.1硬件调试 19
5.2 软件调试 19
5.3本章小结 21
6 总结 23
参考文献 24
致谢 26