毕业设计说明书公用路灯用电量分配系统的设计专业电子信息工程学生姓名王乾班级BMZ电子082学号0861407225指导教师曹妍完成日期2012年5月31日公用路灯用电量分配系统的设计摘要:随着住房制度改革的深入,越来越多的居民买了商品房,原来的单位住宅楼的公用路灯费用是由单位出资的,而商品住宅楼内的居民来自不同的单位,要不要安装路灯?安装路灯后费用如何解决?“公用路灯用电量分配系统”是为了解决商品住宅楼内公用路灯的收缴费用问题。系统的设计包括硬件部分和软件部分的设计,硬件部分主要功能模块由单片机芯片AT89C2051,复位及看门狗电路MAX813L,继电器接口电路,数码管显示电路等组成。系统以AT89C2051单片机为核心,利用其指令来实现对住宅公用路灯用电量的自动分配。介绍了软件编程思想及设计中应考虑和解决的几个主要问题。公用路灯用电量分配系统具有低功耗、可靠性、安全性、低成本等特点。设计解决了楼道路灯电费收缴的难题,有较好的实用价值。关键词:公用路灯;用电量分配;单片机;看门狗;继电器电路DesignonpublicstreetlampofpowerconsumptiondistributionsystemAbstract:Alongwiththedevelopingofthehousesystem,moreandmorepeoplehaveboughtthecommodityapartment,thecostofstreetlampwaspaidbytheunitinthepast,butthepeopleinthecommodityarecomingfromdifferentplaces.Dotheyneedthestreetlampandhowtopaythecostforeveryone?"Publicstreetlampofpowerconsumptiondistributionsystem",cansolveallofthem.Thedesignincludesthesystematichardwareblockdiagramstructure,somemainfunctionmodule(theAT89C2051microcomputerandwatchdogtimerMAX813L,relayinterfacecircuit,etc.)andunitcircuit,thesoftwareprogrammingthoughtandtheproblemsinthedesigning.ThesystemtakesAT89C2051monolithicintegratedcircuitasakey,usingitsinstructiontogetthepublicstreetlampofpowerconsumptionofautomaticassignment.Andwiththeilluminatedexaminationsysteminthestreetlightstartbuttonelectriccircuit,itcanactaccordingtotheenvironmentbrightnesstocontrolwhethertousethestreetlight.Assignthedevicetohavelowconsumptioninpowerconsumptionofpublicstreetlamp;dependability;securities;safety,andlowcost.Thustheproblemofcollectingstairwaylampelectricitycostwillbesettledwell.Keywords:publicstreetlamp;powerconsumptiondistribution;microcomputer;watchdogtimer;relayinterfacecircuit目录1概述.........................................................12课题研究背景与意义..............................................22.1课题研究背景..................................................22.2课题研究意义..................................................23单片机简介.......................................................33.1单片机的简单介绍..............................................33.2单片机的工作过程..............................................63.3单片机的发展与社会需求........................................64公用路灯用电量分配系统工作原理与用途.............................74.1用电量的分配原理..............................................74.2系统总体方案的确定............................................85公用路灯用电量分配系统的硬件设计................................115.1主系统设计及其分析...........................................115.2AT89C2051介绍................................................115.3AT89C2051的振荡器和时钟电路..................................125.4执行分配的继电器电路设计及其分析..............................135.5系统供电电源电路设计及其分析..................................145.6双电压比较器集成电路..........................................145.7看门狗电路....................................................165.8长...