亮度自动调节台灯电路的设计Word下载.docx
《亮度自动调节台灯电路的设计Word下载.docx》由会员分享,可在线阅读,更多相关《亮度自动调节台灯电路的设计Word下载.docx(52页珍藏版)》请在冰豆网上搜索。
![亮度自动调节台灯电路的设计Word下载.docx](https://file1.bdocx.com/fileroot1/2022-10/10/3e389823-18ef-4ffe-8eb1-92cf07439412/3e389823-18ef-4ffe-8eb1-92cf074394121.gif)
当人离开一段时间后台灯会自动关闭并作出提醒,这样便有效地节约了能源。
此外系统还带有时间显示的功能,通过按键调节可以对时间进行校正。
经过测试,各模块的功能均能正常实现,同时该系统还具有控制简单、反应灵敏等优点。
关键词:
STC12C5A60S2单片机;
光敏电阻;
PWM波;
红外感应
1
Abstract
ThebrightnessautomaticadjustmentcircuitsystemoflampiscontrolledbySTC12C5A60S2,throughotherexpansionslikephotoresistormodule,brightnessofthelampcanbeautomaticallyadjustedaccordingtothatoftheoutside.Thedesignmakesitpossibleforthelamptoadjustit’sbrightnessautomatically,themicro-controllergetslightintensitynearbybythephotoresistorandtheinformationwillbeconvertedintoadigitalsignal.Infraredmoduleofthesystemjudgeswhethersomeoneisnearthelamp,thelampwillautomaticallyturnonwhensomeoneisnearbyandwillnotworkwhenitisnot.Whenpeopleleavesthedeskforsometime,thelampwillautomaticallyturnoffandmakeareminder,whicheffectivelysavesenergy.Inadditionthesystemalsohasthefunctionoftimedisplay,whichcanbecorrectedbykeys.Testsprovethatthefunctionofeachmodulecanbeachievenormallyanditiseasilytocontrolaswellasquick-witted.
:
STC12C5A60S2;
Photoresistance;
PWM;
InfraredsensorsKeywords
2
1绪论..........................................................................................................................5
1.1研究课题的背景与意义...............................................................................5
1.2本课题的研究内容及实施方案...................................................................5
1.3论文内容安排...............................................................................................6
2整体方案设计..........................................................................................................7
2.1整体逻辑框图...............................................................................................7
2.2方案论证.......................................................................................................73硬件方案设计........................................................................................................10
3.1STC12C5A60S2最小系统........................................................................10
3.2光敏电阻.....................................................................................................11
3.2.1光敏电阻的性质..............................................................................11
3.2.2光敏电阻模块电路图......................................................................13
3.3液晶显示屏1602........................................................................................14
3.3.11602简介.........................................................................................14
3.3.21602与单片机连接图.....................................................................15
3.4时钟芯片DS1302......................................................................................16
3.5红外传感器.................................................................................................17
3.6按键模块.....................................................................................................17
3.7蜂鸣器电路.................................................................................................184软件设计................................................................................错误~未定义书签。
4.1整体软件流程图.........................................................................................19
4.2各子模块功能设计.....................................................................................20
4.2.1STC12C5A60S2单片机A/D转换模块.........................................20
4.2.2STC12C5A60S2单片机中断模块.................................................22
4.2.3单片机定时器模块..........................................................................24
4.2.4光线采集的实现..............................................................................27
4.2.5自动断电功能的实现......................................................................28
4.2.6LCD显示模块.................................................................................28
4.2.7时钟模块..........................................................................................30
4.3软件开发环境.............................................................................................32
4.3.1KEIL简介........................................................................................32
4.3.2STC-ISP简介..................................................................................335系统调试................................................................................................................35
5.1焊接.............................................................................................................35
5.2调试结果...............................................