基于单片机的路灯控制系统设计开题报告.doc_第1页
基于单片机的路灯控制系统设计开题报告.doc_第2页
基于单片机的路灯控制系统设计开题报告.doc_第3页
基于单片机的路灯控制系统设计开题报告.doc_第4页
基于单片机的路灯控制系统设计开题报告.doc_第5页
已阅读5页,还剩14页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

毕业设计(论文)材料之二(2)安徽工程大学机电学院本科毕业设计(论文)开题报告题目: 基于单片机的路灯控制系统设计 课 题 类 型: 设计 实验研究 论文 学 生 姓 名: 学 号: 专 业 班 级: 教 学 单 位: 指 导 教 师: 开 题 时 间: 2012 年 3月 13 日开题报告内容与要求一、本课题的内容及研究意义1、论文研究的目的和意义如今,照明电路的数量越来越多,使得路灯的用电量占城市用电量的比重越来越大,在用电高峰期时,电网超负荷运行,电网电压都低于额定值,在用电低谷期供电电压又高于额定值,当电压高时不但影响照明设备的使用寿命,而且耗电量也大幅增加,当低谷时,照明设备有不能正常工作。所以,对城市的路灯的设计已经成为了当务之急,特别是午夜之后车流量急剧减少时,应该适当的关闭路灯,节约用电。但是我国的既节能又能延长路灯寿命的技术相比国外却是落后了,因此路灯控制系统的设计对于城市的发展至关重要。本论文旨在设计一套对外界光线和电压信号的采集来控制路灯的自动启停以及智能调压的控制系统,它能对路灯进行稳压、调压、自启动并延长路灯寿命的作用。2、论文研究内容本设计可以通过对外界光线和电压信号的采集来控制路灯的自动启停以及智能调压从而减少城市路灯照明耗电量,又对输入电压进行稳压调节来提高用电效率。要求学生独立选择芯片、设计电路、编制程序、调试、完成整个系统功能。主要内容如下:(1) 根据控制技术的特点,进行路灯系统设计的整体研究与设计。(2) 针对光线和电压信号的采集,采用数据采集技术。(3) 通过按键可对相关的参数值进行设置,从而实现对不同时间进行不同的开灯模式。(4) 当电压符合额定电压时,系统自动进行稳压。(5) 在午夜之后降低电压以调节路灯亮度,实现调压。二、本课题的研究现状和发展趋势目前,路灯系统一般采用钠灯、水银灯、金卤灯等灯具。这类灯具有发光效率高、光色好、安装简易等优点,被广泛使用,但同时也存在着诸如:功率因子低、对电压要求严格、耗电量大等缺点。我国目前大部分城市都采用全夜灯的方式进行照明,普遍存在的问题有两点:一方面因为后半夜行人稀少,采用全夜灯的方式浪费太大,因此,有的地方采取前半夜全亮,后半夜全灭的照明方式;有的地方在后半夜采用亮一隔一或亮一隔二的节能措施,此种方式虽然节约了电费支出,却带来了社会治安和交通安全问题,不利于城市安全问题。另一方面,在后半夜因行人稀少,而应该降低路灯的亮度,以避免光源污染,影响居民的晚间的休息。但由于后半夜是用电低谷期,电力系统电压升高,路灯反而比白天更亮了。这不仅造成了能源浪费,还大大影响了设备和灯具的使用寿命。目前,路灯照明广泛采用高压钠灯,其设计寿命在12000小时以上,在正常情况下至少可用3年,但是由于超压使用,现在路灯的使用寿命仅仅只有1年左右,有的甚至只有几个月,造成维护和材料的极大浪费。较高的电压不仅不能让负载设备更好的工作,而且还会造成发热及过早损坏,还会造成不必要的电费开支。而且,我国绝大多数地区的路灯关开灯都是采用人工控制或者定时控制,这样也有许多不利之处:若采用人工控制,则路灯开关存在着一定的不确定性,同时也占用了一定的人力资源;定时控制则存在着夏冬季白黑昼时间不同的情况,使得天还没黑路灯就开,天还没亮路灯就灭的情况,大大影响了人们的日常出生活。本设计通过使用AT89C51单片机对系统进行智能控制,使系统达到自动启停及智能调压。近年来,随着科技的不断发展,各种路灯控制器也被不断的研究出来。其中,美国和日本主要集中在研究紧凑型荧光灯和镇流器荧光灯两个方面。而我国目前的市场上有多种路灯节能控制产品,能达到一定的节能效果,但就功能和效果上还不能尽如人意,主要有以下几种情况:第一种,采用自耦变压器及磁饱和电抗器的降压技术。其不足是由于反应速度较慢,用电高峰时电压降到非稳定区容易造成灯光闪灭,不能自动调节,同时如果电压突然升高,则会对灯具造成损坏,相对来说稳压效果较差;第二种是采用电子器件构成的可控硅式设备。该设备主要采取简单的相控技术,不足之处是元器件较容易发热损坏。而为了更好的达到控制的目的,现在国内外都开始采用智能控制方式,如光控、声控、时控等,国外甚至开始采用太阳能供能光控方式来控制路灯,基本可以达到完全自给自足的效果。综上所述,未来的智能路灯控制必将向着更安全、更环保、更节能、更高效率的方向发展。3、 本课题的研究方案及工作计划1、设计方案本次课程设计是由传感器通过外界光信号的强弱来产生电压信号,再由单片机控制实现路灯的自动启停及智能稳压。本设计通过使用AT89C51单片机芯片来设计电路,编制程序,仿真,调试,完成整个系统的功能。整个控制系统主要包括四个模块:信号采集模块、数据处理模块、稳压模块和控制模块。2、技术路线设计要求采集输入电压信号,通过A/D转换后输入控制器,当外界光信号的强度低于一定数值时,通过软启动开启路灯。当光信号强度高于一定数值时,通过软启动关闭路灯,并将采集输入电压信号,与已设定的标准电压值进行比较,并对输入电压进行稳压,再通过时钟电路对路灯亮度进行调节,在午夜之后对路灯亮度进行降低,最后达到节电稳压。技术方案如下图:光敏电阻A/D转换器外部光线强度继电器驱动AT89C51单片机电压放大报警LED显示键盘控制三端稳压器路灯3、关键问题(1)信号采集电路设计该模块需要检测环境光的变化,根据环境光的明暗进行路灯开关的自动控制。基于此要求采用由光敏电阻组成的分压电路进行检测。光敏电阻器又称光导管,特性是在特定光的照射下,其阻值迅速减小,可用于检测可见光。在不同的光强下,光敏电阻的电阻值会发生明显变化,光敏电阻器是利用半导体的光电效应制成的一种电阻值随入射光的强弱而改变的电阻器;入射光强,电阻减小,入射光通过检测不同光强下电阻值的变化量来控制路灯的开和关。(2)稳压模块设计通过采集三端稳压器输出的电压并将该电压与设定电压进行比较,进而调整输出电压的大小,达到稳压的目的。本设计使用美国国家半导体公司的三端可调正稳压器集成电路LM317。(3)时钟电路设计为实现路灯对电压进行智能补偿,从而达到智能调压,本设计采用美国DALLAS公司的实时时钟电路DS1302,该芯片一种高性能、低功耗、带RAM的实时时钟电路,它可以对年、月、日、周日、时、分、秒进行计时,具有闰年补偿功能,工作电压为2.5V5.5V。采用三线接口与CPU进行同步通信,并可采用突发方式一次传送多个字节的时钟信号或RAM数据。DS1302内部有一个318的用于临时性存放数据的RAM寄存器。另外该芯片有备份电源引脚,可以在断电后仍能工作,以保证时钟的准确性。3、时间安排(1) 2012.2.202012.2.29 查阅相关资料,理解设计任务书。(2) 2012.3.1 2012.4.1 搜索资料,完成开题报告。(3) 2012.4.1 2012.4.20 硬件调试,排除故障直至满足设计要求。(4) 2012.4.202012.5.10 软件调试,排除故障直至满足设计要求。(5) 2012.5.102012.5.30 整理资料,按要求撰写论文,完成初稿。(6) 2012.6.12012.6.20 论文整定,最终定稿,准备答辩。四、主要参考文献1 查兵,崔浩.单片机原理J.中国高新技术,2011年1期2 李健,蒋全胜,任灵芝.智能路灯控制系统设计J.工业控制计算机,2010年6期3 金仁贵.单片机应用系统的开发方法J.电脑知识与技术:学术交流,2006年12期4 严怀龙.基于单片机的数据采集系统J.广西轻工业,2006年6期5 王虎城,周晋军,皮依标,叶振华. 基于光传感器和单片机的校园路灯控制系统设计J.科技广场,2011年1期6 王立红. 基于单片机的智能路灯控制系统J. 网络财富,2010年6期7 王皑,佘丹妮. 基于单片机的模拟路灯控制系统设计J. 仪表技术,2011年11期8 张毅刚.单片机原理及应用M.高等教育出版社,20039 阎石.数字电子技术基础M.高等教育出版社,200610 童诗白,华成英.模拟电子技术基础M.高等教育出版社,200611 程德福,林君.智能仪器M.机械工业出版社,200912 刁鸣.常用电路模块分析与设计指导M.清华大学出版社,200813 Xu Jun, Peng Yonglong, Li Yabi. Study of Energy-saving Solar Street Light Using LED Based on MCU-controlled (J). Test & measurement technology. 2008, (10):29-3114 LIU Lianhao, A new street lamp controller design (J). Computing Technology and Automation, 1997, (4):61-6315 ZHANG Liqun, Single-chip single board controller from time to time in the street lamp factory control (J). Application of Energy Technologies, 1998, (4):33-3416 The Introduction of AT89C51英文原文:(From: The Introduction of AT89C51)The Introduction of AT89C51DescriptionThe AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.Function characteristicThe AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator and clock circuitry. In addition, the AT89C51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The Power-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.Pin DescriptionVCC:Supply voltage.GND:Ground.Port 0Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as highimpedance inputs.Port 0 may also be configured to be the multiplexed loworder address/data bus during accesses to external program and data memory. In this mode P0 has internal pullups.Port 0 also receives the code bytes during Flash programming,and outputs the code bytes during programverification. External pullups are required during programverification.Port 1Port 1 is an 8-bit bi-directional I/O port with internal pullups.The Port 1 output buffers can sink/source four TTL inputs.When 1s are written to Port 1 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pullups.Port 1 also receives the low-order address bytes during Flash programming and verification.Port 2Port 2 is an 8-bit bi-directional I/O port with internal pullups.The Port 2 output buffers can sink/source four TTL inputs.When 1s are written to Port 2 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,Port 2 pins that are externally being pulled low will source current, because of the internal pullups.Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses. In this application, it uses strong internal pullupswhen emitting 1s. During accesses to external data memory that use 8-bit addresses, Port 2 emits the contents of the P2 Special Function Register.Port 2 also receives the high-order address bits and some control signals during Flash programming and verification.Port 3Port 3 is an 8-bit bi-directional I/O port with internal pullups.The Port 3 output buffers can sink/source four TTL inputs.When 1s are written to Port 3 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups.Port 3 also serves the functions of various special features of the AT89C51 as listed below:Port 3 also receives some control signals for Flash programming and verification.RSTReset input. A high on this pin for two machine cycles while the oscillator is running resets the device.ALE/PROGAddress Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming.In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external Data Memory.If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.PSENProgram Store Enable is the read strobe to external program memory.When the AT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.EA/VPPExternal Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset.EA should be strapped to VCC for internal program executions.This pin also receives the 12-volt programming enable voltage(VPP) during Flash programming, for parts that require12-volt VPP.XTAL1Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2Output from the inverting oscillator amplifier.Oscillator CharacteristicsXTAL1 and XTAL2 are the input and output, respectively,of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1.Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2.There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed. Figure 1. Oscillator Connections Figure 2. External Clock Drive ConfigurationIdle ModeIn idle mode, the CPU puts itself to sleep while all the onchip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset.It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution,from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not be one that writes to a port pin or to external memory.Power-down ModeIn the power-down mode, the oscillator is stopped, and the instruction that invokes power-down is the last instruction executed. The on-chip RAM and Special Function Registers retain their values until the power-down mode is terminated. The only exit from power-down is a hardware reset. Reset redefines the SFRs but does not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize.Program Memory Lock BitsOn the chip are three lock bits which can be left unprogrammed (U) or can be programmed (P) to obtain the additional features listed in the table below.When lock bit 1 is programmed, the logic level at the EA pin is sampled and latched during reset. If the device is powered up without a reset, the latch initializes to a random value, and holds that value until reset is activated. It is necessary that the latched value of EA be in agreement with the current logic level at that pin in order for the device to function properly.译文:AT89C51的介绍描述AT89C51是一个低电压,高性能CMOS 8位单片机带有4K字节的可反复擦写的程序存储器(PENROM)。这种器件采用ATMEL公司的高密度、不容易丢失存储技术生产,并且能够与MCS-51系列的单片机兼容。片内含有8位中央处理器和闪烁存储单元,有较强的功能的AT89C51单片机能够被应用到控制领域中。功能特性AT89C51提供以下的功能标准:4K字节闪烁存储器,128字节随机存取数据存储器,32个I/O口,2个16位定时/计数器,1个5向量两级中断结构,1个串行通信口,片内震荡器和时钟电路。另外,AT89C51还可以进行0HZ的静态逻辑操作,并支持两种软件的节电模式。闲散方式停止中央处理器的工作,能够允许随机存取数据存储器、定时/计数器、串行通信口及中断系统继续工作。掉电方式保存随机存取数据存储器中的内容,但震荡器停止工作并禁止其它所有部件的工作直到下一个复位。引脚描述VCC:电源电压 GND:地P0口P0口是一组8位漏极开路双向I/O口,即地址/数据总线复用口。作为输出口时,每一个管脚都能够驱动8个TTL电路。当“1”被写入P0口时,每个管脚都能够作为高阻抗输入端。P0口还能够在访问外部数据存储器或程序存储器时,转换地址和数据总线复用,并在这时激活内部的上拉电阻。P0口在闪烁编程时,P0口接收指令,在程序校验时,输出指令,需要接电阻。P1口P1口一个带内部上拉电阻的8位双向I/O口,P1的输出缓冲级可驱动4个TTL电路。对端口写“1”,通过内部的电阻把端口拉到高电平,此时可作为输入口。因为内部有电阻,某个引脚被外部信号拉低时输出一个电流。闪烁编程时和程序校验时,P1口接收低8位地址。P2口P2口是一个内部带有上拉电阻的8位双向I/O口,P2的输出缓冲级可驱动4个TTL电路。对端口写“1”,通过内部的电阻把端口拉到高电平,此时,可作为输入口。因为内部有电阻,某个引脚被外部信号拉低时会输出一个电流。在访问外部程序存储器或16位地址的外部数据存储器时,P2口送出高8位地址数据。在访问8位地址的外部数据存储器时,P2口线上的内容在整个运行期间不变。闪烁编程或校验时,P2口接收高位地址和其它控制信号。P3口P3口是一组带有内部电阻的8位双向I/O口,P3口输出缓冲故可驱动4个TTL电路。对P3口写如“1”时,它们被内部电阻拉到高电平并可作为输入端时,被外部拉低的P3口将用电阻输出电流。P3口除了作为一般的I/O口外,更重要的用途是它的第二功能,如下表所示:端口引脚第二功能P3.0RXDP3.1TXDP3.2INT0P3.3INT1P3.4T0P3.5T1P3.6WRP3.7RDP3口还接收一些用于闪烁存储器编程和程序校验的控制信号。RST复位输入。当震荡器工作时,RET引脚出现两个机器周期以上的高电平将使单片机复位。ALE/当访问外部程序存储器或数据存储器时,ALE输出脉冲用于锁存地址的低8位字节。即使不访问外部存储器,ALE以时钟震荡频率的1/16输出固定的正脉冲信号,因此它可对输出时钟或用于定时目的。要注意的是:每当访问外部数据存储器时将跳过一个ALE脉冲时,闪烁存储器编程时,这个引脚还用于输入编程脉冲。如果必要,可对特殊寄存器区中的8EH单元的D0位置禁止ALE操作。这个位置后只有一条MOVX和MOVC指令ALE才会被应用。此外,这个引脚会微弱拉高,单片机执行外部程序时,应设置ALE无效。PSEN程序储存允许输出是外部程序存储器的读选通信号,当AT89C51由外部程序存储器读取指令时,每个机器周期两次PSEN 有效,即输出两个脉冲。在此期间,当访问外部数据存储器时,这两次有效的PSEN 信号不出现。EA/VPP外部访问允许。欲使中央处理器仅访问外部程序存储器,EA端必须保持低电平。需要注意的是:如果加密位LBI被编程,复位时内部会锁存EA端状态。如EA端为高电平,CPU则执行内部程序存储器中的指令。闪烁存储器编程时,该引脚加上+12V的编程允许电压VPP,当然这必须是该器件是使用12V编程电压VPP。XTAL1:震荡器反相放大器及内部时钟发生器的输入端。XTAL2:震荡器反相放大器的输出端。时钟震荡器AT89C51中有一个用于构成内部震荡器的高增益反相放大器,引脚XTAL1和XTAL2分别是该放大器的输入端和输出端。这个放大器与作为反馈元件的片外石英晶体或陶瓷谐振

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论