亮度自动调节台灯电路的设计..doc
文本预览下载声明
摘要
台灯亮度自动调节电路系统以STC12C5A60S2单片机为中央控制单元,通过光敏电阻等扩展模块,实现了根据外界光照强度变化台灯自动调节亮度的功能。该设计主要实现了台灯亮度的自动调节,单片机通过光敏电阻来获取外界的光强信息并将该信息转换成数字信号。通过红外模块系统判断台灯附近是否有人,无人时台灯不工作,有人在附近时,台灯会自动开启。当人离开一段时间后台灯会自动关闭并作出提醒,这样便有效地节约了能源。此外系统还带有时间显示的功能,通过按键调节可以对时间进行校正。经过测试,各模块的功能均能正常实现,同时该系统还具有控制简单、反应灵敏等优点。
关键词:STC12C5A60S2单片机;光敏电阻;PWM波;红外感应
Abstract
The brightness automatic adjustment circuit system of lamp is controlled by STC12C5A60S2, through other expansions like photoresistor module, brightness of the lamp can be automatically adjusted according to that of the outside. The design makes it possible for the lamp to adjust it’s brightness automatically , the micro-controller gets light intensity nearby by the photoresistor and the information will be converted into a digital signal. Infrared module of the system judges whether someone is near the lamp , the lamp will automatically turn on when someone is nearby and will not work when it is not . When people leaves the desk for some time, the lamp will automatically turn off and make a reminder, which effectively saves energy. In addition the system also has the function of time display,which can be corrected by keys . Tests prove that the function of each module can be achieve normally and it is easily to control as well as quick-witted.
Keywords: STC12C5A60S2; Photoresistance; PWM; Infrared sensors
目录
1 绪论 6
1.1 研究课题的背景与意义 6
1.2 本课题的研究内容及实施方案 7
1.3 论文内容安排 8
2 整体方案设计 8
2.1 整体逻辑框图 8
2.2 方案论证 9
3 硬件方案设计 11
3.1 STC12C5A60S2最小系统 11
3.2 光敏电阻 12
3.2.1 光敏电阻的性质 12
3.2.2 光敏电阻模块电路图 15
3.3 液晶显示屏1602 15
3.3.1 1602简介 15
3.3.2 1602与单片机连接图 17
3.4 时钟芯片DS1302 18
3.5 红外传感器 19
3.6 按键模块 20
3.7 蜂鸣器电路 20
4 软件设计 21
4.1 整体软件流程图 21
4.2 各子模块功能设计 22
4.2.1 STC12C5A60S2单片机A/D转换模块 22
4.2.2 STC12C5A60S2单片机中断模块 25
4.2.3 单片机定时器模块 27
4.2.4 光线采集的实现 30
4.2.5 自动断电功能的实现 31
4.2.6 LCD显示模块 32
4.2.7 时钟模块 35
4.3 软件开发环境 36
4.3.1 KEIL简介 36
4.3.2 STC-ISP简介 37
5 系统调试 39
5.1 焊接 39
5.2 调试结果 40
总结与展望 42
参考
显示全部