新宇电子工作室摘要在现代社会的发展,几乎每天我们会使用到路灯,虽然不像家用电器一样频繁的接触,可是路灯的发展却与我们息息相关。目前市场上的路灯大多使用的发光体为荧光管或LED,灯光亮度不能随环境变化而自动调节,不够智能。随着电子科学技术的快速发展,电子科学技术为设计出智能路灯提供了可能。因此,本文设计和实现了基于51单片机的智能路灯系统,该系统由51单片机作为主控芯片、光强度传感器、PWM波光调节部分以及液晶显示等硬件设备构成,利用光强度传感器捕获周围的光亮,根据环境的变化,进而控制路灯的亮灭和强度。本文提出的智能路灯系统具有低功耗,高稳定性等优点。与传统的路灯相比,它的功能更加强大,使用也更加方便。不仅提升了现在路灯的品质,也更好地满足了人们日常生活的需求。关键词:单片机;光控模块;PWM波新宇电子工作室ABSTRACTInthedevelopmentofmodernsociety,almosteverydaywewillusethestreetlights,althoughwedonotuseitasfrequentlyashouseholdappliances,butthedevelopmentofstreetlampiscloselyrelatedtous.Atpresent,theluminousbodyinsidethestreetlampiscomposedoffluorescenttubeorLEDonthemarket.Brightnessadjustmentoftheordinarylampisinconvenientandunintelligentanditdoesnotchangewiththeenvironment.Withtherapiddevelopmentofelectronicscienceandtechnology,thereisagreatpossibilitytodesignasmartstreetlamp.Therefore,thispaperdesignsandimplementsanintelligentsystemforstreetlampbasedon51microcomputer.Thesystemconsistsofcontrolchipof51singlechipmicrocomputer,lightintensitysensor,infraredsensor,PWMwaveadjustmentandliquidcrystaldisplay(LCD).Usinglightintensitysensorcaptureslightaround,accordingtochangesintheenvironment,whichinturncontroltheintensityandblinkinglights.Finally,experimentalresultshowstheproposedintelligentsystemforstreetlampislowerpowerconsumptionandhighstability.Comparedwiththetraditionalstreetlamp,theproposedsystemismorepowerfulandmoreconvenient.Notonlydoesitimprovethequalityofthestreetlamp,butalsoitmeetspeople’sneedfordailylife.Keywords:Singlechipmicrocomputer;Opticalmodule;PWMwave新宇电子工作室目录第一章绪论...................................................................................51.1课题研究背景与研究意义.................................................................................51.2课题的研究内容和研究目标..............................................................................6第二章系统方案及原理...............................................................72.1系统设计思路....................................................................................................72.2微控制器的选择与论证...................................................................................82.3显示模块的选择与论证.....................................................................................9第三章硬件设计.........................................................................103.1控制模块............................................................................................................103.1.1微控制器的发展....................................................................................103.1.2微控制器模块........................................................................................113.1.351单片机.................................................................................................123.1.451单片机外部电路................................................................................153.2显示电路........................................................................................................173.3光强度检测电路................................................................................................193.4.1BH1750简介............................................................................................193.4.2BH1750的通讯步奏...............................................................................193.4.3BH1750与单片机的连接.......................................................................203.4PWM波调光电路...........................................................................................213.6.1概述.........................................................................................................213.6.2PWM波调光电路...................................................................................22第四章软件设计.........................................................................224.1软件开发环境的介绍.......................................................................................224.2程序的流程图....................................................................................................234.3IIC时序控制........................................................................................................24新宇电子工作室第五章调试与检测.....................................................................265.1整机调试............................................................................................................265.2调试结论.............................................................................................................27第六章总结.................................................................................27参考文献.........................................................................................29致谢.................................................................................................30附录.................................................................................................31新宇电子工作室第一章绪论智能家居、智能汽车、智能机器人……,智能控制的设备已经无处不在。蒸汽机的发明带来是工业革命。电子技术的发展带来的是信息革命。电子科学技术应用于社会生产以及社会生活的方方面面已经是时代的主流和趋势,衡量一个国家的综合国力和发展潜力,电子技术的有效转化率很重要。好的技术应用到实际生活才是王道。电子科学是基础学科,是工业生产和现代化建设的基础。从电子科学的水平就可以反应一个国家的现代化发展水平。随着中国现代化进程的不断推进,在工业、农业等方面都对电子科学提出了更高的