基于单片机的自动定时开关插座的设计
本科毕业设计(论文)自动定时开关插座的设计燕 山 大 学 2014年6月 本科毕业设计(论文)自动定时开关插座的设计学 院 专 业 学生 姓名 学 号 指导 教师 答辩 日期 2014年6月26日 燕山大学毕业设计(论文)任务书学院 系级教学单位 学号学生姓名专 业班 级题目题目名称自动定时开关插座的设计题目性质1.理工类工程设计 ( );工程技术实验研究型();理论研究型( );计算机软件型( );综合型( )2.管理类( );3.外语类( );4.艺术类( )题目类型1.毕业设计() 2.论文( )题目来源科研课题( ) 生产实际( ) 自选题目( ) 主要内容以单片机为核心,设计智能定时开关插座,该系统可以实现自动按时控制插座的打开、关闭,以达到控制用电设备工作,节省电能的效果。基本要求1、独立完成系统软、硬件设计,并搭电路验证。2、实现至少十六个时间点。3、无线打开关闭插座。参考资料MCS-51单片机应用设计 张毅刚等编 哈尔滨工业大学出版社 1992.4单片机原理及系统设计 胡汉才编著 清华大学出版社 2002周 次14周58周912周1316周1718周应完成的内容收集资料熟悉课题内容设计思路电路设计程序设计程序设计搭电路调试改进同前论文撰写课题总结答辩指导教师 职称副教授 2014年3月4日系级教学单位审批 2014 年 3月 6 日摘要摘要随着近年来各个家庭的家用电器的增多,以及各种公共用电设备的增加,各种智能化控制的功能被附加于产品之内,但不可忽视的是较为老旧的电器产品缺乏这些基本功能。因此这给生活和工作带来很大的不便,同时长期的无用工作状态也带来了大量的电力资源的消耗。本文介绍了一种基于51系列单片机的系统设计,通过以实时时钟芯片的时间信息为基准,配合单片机内部扩展RAM存储的时间设定值,以及液晶显示屏对各种信息的显示,从而以达到定时控制开关插座电路的目的。此外,在该设计基础之上,再添加红外遥控打开/关闭插座的功能,以进一步使得该设计更具智能化和实用性。该设计虽然结构简单,但能广泛应用于各个用电控制的工作环境中,具有较强的适用性。关键词单片机;自动定时开关;DS1302;VS1838BI 燕山大学本科生毕业设计(论文)AbstractAs household appliances households increased in recent years, a variety of intelligent control functions has been added to the various public electrical equipment.But what can not be ignored is that the older electrical products lack of these basic functions. Therefore, this bring a lot of inconvenience to our life and work.At the same time, the useless work state has also brought a lot of power consumption.Therefore, this paper will introduce a kind of system design based on the 51 Series MCU, by taking the time ination of real-time clock chip as the benchmark, with the time setting value in the single-chip internal expansion RAM storage and all kinds of ination displayed by the LCD, so as to achieve timing control circuit of the switch socket. In addition, in order to make the design more intelligent and practicability, it also adds the remote control function to open/close the socket with the infrared controller based on the foundation of the design.The design has simple structure, but is widely applied to various work environment of electric control.So it has a strong sense of design.KeywordsMCU;the Automatic Timing Switch Socket;DS1302;VS1838BI 目 录摘要IAbstractII第1章 绪论11.1 课题背景11.2 当前国内外研究现状11.3 定时开关的应用11.4 设计的主要内容和章节安排2第2章 系统总体设计42.1 总体结构42.2 总体结构的工作原理52.3 本章小结6第3章 主控制器与外围器件73.1 STC12C5A60S2单片机73.2 LCD1602液晶显示模块83.3 DS1302实时时钟模块103.4 红外接收模块143.4.1 遥控发射器及其编码143.4.2 遥控信号的接收163.5继电器控制模块163.6 本章小结17第4章 硬件设计184.1 单片机最小系统设计184.1.1 单片机184.1.2 电源电路184.1.3 复位电路194.1.4 晶振电路204.1.5 RS232接口转USB接口电路214.2 显示电路设计224.3 时钟电路设计244.4 红外接收电路设计254.5 继电器控制电路274.6 按键电路274.7本章小结28第5章 软件设计295.1 主程序设计295.2 LCD1602显示程序设计305.3 DS1302实时时钟程序设计315.4 VS1838B中断程序设计345.5 系统测试355.6 本章小结36结论