五邑大学本科毕业设计I摘要随着社会的不断进步,人们对低碳生活逐步认识和接受,并从很多方面开始关注,尤其是在环保上做出了很多努力。利用声音和光线的强弱来控制开关的断开或者闭合的电子产品来能够有效的降低能耗,节约能源。它不仅适用于住宅区的楼道,而且适用于工厂、办公室、教学楼等公共场所。因此,声光控制开关,在我们的低碳生活中,将起到重要作用。本毕业设计就是针对目前的情况而设计的。一种简单的通过声音和光线来控制继电器的断开闭合,从而达到开关的自动断开、闭合功能,其具有很强的适用性。该设计主要由STC89C51单片机、±15V和5V的电压源电路、声音的接收放大控制电路、光信号的接收放大控制电路以及继电器的驱动电路组成。测试结果证明该系统性能稳定、操作方便,具有较高的实用价值。本文对控制系统的组成、硬件和软件的设计、工作原理进行了详细的论述。关键词单片机;声音控制;光控制;自动开关五邑大学本科毕业设计IIAbstractWiththedevelopmentofsociety,peoplegraduallyunderstandandacceptlow-carbonlife,andbegintopayattentioninmanyways.Peoplehasmadealotofeffortespeciallyinenvironmentalprotection.Thestrengthofusingsoundandlighttocontrolswitchdisconnectedorclosedelectronicproductscanreduceenergyconsumptionandsaveenergyeffectively.Itnotonlyappliestoresidentialareasofthecorridor,butalsoappliestofactories,offices,schoolbuildingsandotherpublicplaces.Therefore,thesoundandlightcontrolswitch,inourlow-carbonlife,willplayanimportantrole.Thegraduationprojectisdesignedforthecurrentsituation.Itachievesthefunctionofautomaticswitchingoffandclosingbyopeningorclosingtherelayinasimplewaywhichiscontrolledthroughsoundandlight.Ithasstrongapplicability.ThedesigniscomposedmainlybySTC89C51microcontroller,±15Vand5Vvoltagesourcecircuit,thesoundofthereceivingandenlargementofthecontrolcircuit,theopticalsignalofthereceivingandenlargementofthecontrolcircuitandrelaydrivecircuit.Testresultsshowthatthesystemisstable,easytooperateandithashighpracticalvalue.Inthispaper,compositionofthecontrolsystem,thedesignofhardwareandsoftwareandworkingprinciplearediscussedindetail.KeywordsSinglechipmicrocomputerSoundControlLightControlAutomaticswitch五邑大学本科毕业设计III目录摘要··············································································································································IAbstract··········································································································································II第1章绪论·································································································································11.1课题背景·······················································································································11.2研究目的和意义···········································································································11.3国内外概况···················································································································11.4本论文主要内容···········································································································1第2章电路中用到的元器件·····································································································32.1驻极体话筒···················································································································32.2光敏电阻·······················································································································32.351单片机······················································································································42.4电磁继电器···················································································································62.5本章小结·······················································································································7第3章电路原理图的设计·········································································································83.1引言·······························································································································83.2系统设计方案···············································································································83.2.1系统设计的原理框图························································································83.2.2系统设计的原理框图解析················································································83.3系统模块功能简介·······································································································93.3.1电源电路············································································································93.3.2光控电路··········································································································103.3.3声控电路··········································································································113.3.4单片机控制电路······························································································123.3.5继电器驱动电路································································································133.4本章小结·····················································································································13第4章参数计算·······················································································································144.1电源电路·····················································································································144.2声控电路··············································································