1、I 本科生毕业设计(论文) 学 院: 电子与电气工程学院 专 业: 自动化 学 生: 指导教师: II 完成日期 2013 年 5 月 III 红外窗帘控制器设计与实现 Design and Implementation of Infrared Controller for Curtain 总计: 毕业设计(论文) 34 页 表 格: 3 个 插 图: 36 幅 IV 红外窗帘控制器设计与实现 摘 要 本文设计了一种基于 STC89C52 单片机的红外窗帘控制器,系统分为两个 部分,一是红外遥控器部分,分别设置了启动/停止、打开、关闭、速度减小、速度增加 和自动 6 个按键,当不同的按键被按下
2、时红外发射二极管便发出不同的按键编码。二是 接收控制器部分,其功能是用单片机通过一体化红外接收头接收遥控器发出的编码并进 行解调,然后根据编码的功能来控制步进电机的运行状态。系统包括手动和自动两种模 式,在手动模式下可通过按键来控制窗帘的打开,关闭或停止。在自动模式下可根据室 内光线的强度自动控制窗帘的打开或关闭。从而实现手动和自动控制窗帘的目的。 关键词 单片机;红外;遥控;窗帘 Design and Implementation of Infrared Controller for Curtain Abstract: This design is an infrared curtain c
3、ontroller based on the STC89C52 single chip micro computer. The system can be divided into two parts. The first part is the IR remote control which sets the 6 buttons of start/stop, open, close, slow down, speed up and automatic. The infrared emitting diode will send different code when different bu
4、tton is pressed. The second part is the receiving controller which would make use of the single chip micro computer to receive the code sent by the remote control through the integrated infrared receiver and make demodulation. Then it would control the running situation of the stepping motor accordi
5、ng to the functions of the code. The system includes two kinds of models manual and automatic. Under the manual model, you can make the curtain be opened, closed or stopped by pressing the buttons. Under the automatic model,opening or closing the curtain can be controlled automatically according to
6、the intensity of the indoor light. In this way, the curtain can be controlled manually and automatically. Key words: Single chip micro computer; infrared; remote control; curtain V 目 录 1 引言 1 2 单片机的介绍 2 2.1 单片机简介 . 3 2.2 单片机的特点 . 3 2.3 单片机的应用 . 3 2.4 单片机 AT89C52 的结构原理 . 4 3 系统总体设计 8 3.1 系统硬件电路设计 . 9 3.1.1 红外发射模块 9 3.1.2 红外接收模块 10 3.1.3 显示模块 11 3.1.4 光控模块 13 3.1.5 步进电机驱动模块 14 3.1.6 窗帘框架构造设计 16 3.2 系统软件设计 . 16 3.2.1 红外遥控器的编码 16 3.2.2 二进制信号的调制 17 3