您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > 基于光电传感器的路灯控制系统
1光电测试课程设计基于光电传感器的路灯控制系统姓名:陈杨林,陈志文,梁明峰,徐木海班级:06电科1班学号:200630570102200630570103200630570113200630570127指导老师:代秋芳、刘江、罗霞日期:2009.12.15——2009.12.25论文提交日期2009年12月25日论文答辩日期2009年12月25日华南农业大学工程学院2摘要随着城市市政建设的发展,传统的路灯控制与维护手段已远远不能适应城市现代化发展的速度。城市市政建设日新月异,宽阔的街道,各种各样的路灯给城市带来了光明的同时也增添了城市的夜间魅力。但是由于道路,路灯众多,传统的人工管理模式已经和快速,现代化的城市建设不相适应。现代计算机集控技术的发展的城市市政管理带来了福音。城市路灯控制系统是现代计算机技术运用于城市市政建设中有效且必然的产物,实现了城市路灯系统的计算机集中控制、监测与管理。本文将介绍用小器件模拟现实物品,如用LED模拟路灯,设计个简单的基于光电传感器的路灯控制系统,阐述系统控制思想,介绍各单元模块设计思想。关键词:光控路灯控制单片机3目录1系统方案选择················································································41.1方案论证与比较······································································41.1.1光控电路····································································41.1.2单片机控制电路···························································51.1.3其他因素···································································51.2系统总体电路图····································································62电路分析······················································································62.1光控电路··············································································62.2主控电路··············································································72.3路灯电路··············································································72.4显示电路··············································································82.5工作流程图···········································································83讨论及进一步研究建议····································································94课程设计心得················································································9参考文献·······················································································10Abstract·························································································11附录源程序·················································································1241系统方案论证设计任务是设计制作一个有一个光控装置,一个终端控制和路灯组成的基于光电传感的路灯控制系统,其中能够实现根据时间和光强信息实现路灯的智能控制。根据题目要求系统主要光控电路,单片机,显示电路,和路灯驱动电路组成。系统方案如图所示。图1方案一系统结构图图2方案二系统结构图1.1方案论证与比较1.1.1光控电路方案一,其电路原理如图所示。主控制器光控电路路灯显示电路5图3方案一光控电路该电路使用光敏电阻RG和电阻R组成一个分压电路,74ls04整形放大,输出极性相反的信号。方案二,其电路原理如图所示。VCC10KRR1K光敏电阻ResAdj1P0.4图4方案二光控电路该电路使用光敏电阻和R组成一个分压电路,没有经过整形输出信号至p0.41.1.2单片机控制电路方案一,单片机采用了ATmega8。ATmega8是AVR高档单片机成员之一,片内带有8K字节的Flash存储器,功耗小,其中完成路灯工作状念的判断、路灯点亮时间的定时和控制继电器工作。方案二,单片机采用了c8051f300.c8051f300是非常高端的一种51单片机,运算速度快,通用性高,其中完成路灯点亮时间的定时、根据光强控制输出.1.1.3其他因素方案一,具有主机控制和路灯状态检测功能,并可进一步实现多级网络控制。方案二,采用了液晶显示,并且编程简便,还有可实现多级光强判断。6综合上述,考虑到电路结构的简便性,设计的可行性,产品的综合性价比和进一步扩展性等因素,我们决定选择方案二。2.2系统总体电路图图5系统总体电路原理图2电路分析2.1光控电路VCC10KRR1K光敏电阻ResAdj1P0.4图6光控电路图该模块电路主要完成对环境光线的检测.通过光敏电阻将光照强度转化成电压。白天光线强时,光敏电阻阻值远小于R,此时输入P0.4为低电平。当晚上光线弱时,则光敏电阻阻值远大于R,此时输入P0.4为高电平,单片机接受到高7电平,就能够控制灯点亮。2.2主控电路图7主控电路图主控制器,即单片机C8051F300根据P0.4的输入经芯片内置AD转换,获得光照强度,编程PWM控制P0.0的输出,以控制LED灯的亮灭并实现灯的亮度可调,当P0.4输入低电平,P0.0输出高电平,当P0.4输入高电平,P0.0输出低电平。另外,定时程序也控制P0.0的输出,当到达某时刻,P0.0输出低电平或高电平以控制LED的亮灭。2.3路灯电路VCC1KR1Res21KR2Res21KR3Res21KR4Res2LED1LED1LED2LED1LED3LED1LED4LED1P0.0图8路灯电路图路灯部分,当单片机P0.0输出高电平,LED灯灭,当P0.0输出低电平时,LED灯亮。因P0.0输出的低电平为PWM控制,电压可变,以至LED灯亮度可调82.4显示电路1122334455图9显示电路图LCD12864用以显示有光和无光。光控路灯亮度情况,定时情况。2.5工作流程图图10程序工作流程图主程序晚上白天无光?灯亮定时是否有光?灯亮灯灭是开关是否按下否是无光有光93讨论及进一步研究建议本控制系统研究的只是利用单片机根据光强和时间控制灯的开关,且定时是预先编写程序时就设置好的,要想改动设的时间就得修改程序重新烧录进单片机,因此可用外界键盘加以改进,使之能够用键盘输入,免去重新烧写。另外还可加设噪声传感器路实时检测路面交通噪声信号大小,并将其转变成模拟电信号,经A/D转换后送入CPU,通过模糊控制算法实时处理人车流量信息,动态调节灯光强弱,实现节能控制。为了更好更准确地更有效控制路灯,可加设灯电路状态检测电路,检测路灯状况,监测路灯工作状态及好坏,通过LCD显示。这样的一个系统比较好地实现了人机交互,方便管理和维护路灯。大体结构图如下:图11进一步研究的系统框图4课程设计心得本次课程设计要实现基本要求还是比较地简单的,但要实现一些外扩展功能,如检测灯的好坏,还是挺困难,挺耗费成本,在课程设计限制的时间内,我们略显力不从心,因此,外扩展功能就没怎么去实现。我们明白,课程设计的目的并不在于设计一个真正的完善的路灯控制系统,而是通过设计与实现系统,学习和学会一个系统的设计流程与方法。10参考文献[1]李铁楠.城市道路照明设计.光源与照明.2006(2):116-117[2]杨本文,郑旭东.城市路灯照明节能方案及运行管理.湖北电力,2006(8):61-62[3]秦荣茂.浅谈城市路灯的控制技术.电气知识,2004(3):2611AbstractWiththecitymunicipalbuilding,thetraditionalmeansofcontrolandmaintenanceofstreetlightshavenotadapttothespeedofdevelopmentofurbanmodernization.Citymunicipalbuildingwitheachpassingday,thewidestreets,avarietyoflightstothecitytobringabrightandalsoaddedtothecity'snight-timecharm.However,duetoroads,streetnumber,thetraditionalmanualmanagementmodehasbeen,andfast,incompatiblewithmodernurbanconstruction.Setofmoderncomputercontroltechnologydevelopmenthasbroughtthegospelofurbanadministration.Citystreetlightcontrolsystemisusedinmoderncomputertechnologyeffectivelyinurbanmunicipalconstructionandinevitableby-producttoachievethecity'sstreetlightsystem,centralizedcontrolofacomputer,monitoringandmanagement.Thisarticledescribesasmalldevicesimulationwiththerealitems,suchasstreetlampswithLEDsimulation,designasimplestreet-basedphotoelectricsensorcontrolsystem,describedthesystemofthoughtcontrol,introducingeachunitmoduledesign.Keywords:light-operatedroadlightingcontrolMCU12附录源程序#includemain.h#includedelay.h#includelcd.hexternvoidInit_Device(void);sbitled0=P0^3;sbitbb=P0^2;//晚上控制intl=1;voidpwm(unsignedchari){if(i150)//光强强度:1档{PCA0CPM0=0x00;PutStr(1,0,光强:5档);}if(i=150){PCA0CPM0=0x42;if(i=150&&i170){PCA0CPH
本文标题:基于光电传感器的路灯控制系统
链接地址:https://www.777doc.com/doc-2573498 .html