1013基于单片机的智能窗户控制系统设计与实现
- 格式:docx
- 大小:170.10 KB
- 文档页数:30
基于单片机的智能窗户控制系统设计与实现
摘要
随着科技的进步,经济的快速发展,人们对生活质量的要求越来越高,自动化设备
也就逐渐被人们所喜爱,所以设计智能窗户系统具有实践意义。目前普通窗户在下雨时
不能自动关闭,在刮大风有沙尘天气的时候也不能自动关闭,这给我们带来了诸多不便,
也给我们带来经济损失,在这种情况下安装智能窗就可以让我们不再让这些问题成为我
们的烦恼。智能窗户代替现在的普通窗户将会成为一种趋势。
本论文阐述了以STC89C52RC单片机为核心的智能开窗器的工作原理和设计方法。 温湿度信号由温湿度传感器DHT11采集,并以数字信号的方式传送给单片机,烟雾检 测采用的是MQ-2传感器。论文介绍了该控制系统的硬件部分和软件部分的设计与实现。 硬件电路包括:温湿度检测电路,烟雾检测电路和电机控制电路。单片机通过对信号进 行相应处理,根据温湿度和烟穿情况对连接窗户的电机进行控制,从而实现对窗户开闭 进行自动控制的目的。
关键诃智能窗户控制,STC89C52单片机,DHT11温湿度传感器,MQ-2传感器, 电机控制Design and Implementation of Intelligent
Window Control System Based on SCM
Abstract
With the progress of science and technology and the rapid development of economy, people's
requirement for the quality of life becomes higher and higher, and automation equipment is also
gradually enjoyed by people, so to design a kind of intelligent window system is proposed.
Currently ordinary window cannot be automatically shut down when it rains, the wind is dust
weather, this brings us to inconvenience, also brings economic losses, in this case the
installation of intelligent window can let us not to let these problems become our troubles.
Intelligent windows instead of ordinary window will now become a trend.
The working principle and the design method of intelligent window based on STC89C52RC micro
controller are described in the paper. Humidity and temperature signal are collected from the
temperature and humidity sensor DHT11 acquisition, and smoke is detected by MQ-2 sensor. Digital
signals are transmitted to the micro controller. This paper introduces the hardware and software
parts. The control system includes temperature and humidity detection circuit, smoke detection
circuit and motor control circuit. SCM is response to process corresponding signals, thus to
realize the control of the connected window according to temperature and humidity and smoke.
Keywords: Intelligent Window Control, STC89C52, DHT11, MQ-2, Motor Control摘要 ...................................................................... 1
ABSTRACT ................................................................................................. II
第1章绪论 ............................................................... 1
1.1课题研究背景与意义 ..................................................... 1
1.2课题研究现状 ........................................................... 1
1-3本设计的主要任务和内容 ................................................. 2
1.4论文组织结构 ........................................................... 2
第2章 关键技术介绍 ..................................................... 3
2. 1 STC89C52RC 单片机 ....................................................... 3
2.2 DHT11温湿度传感器 .................................................... 3
2.3 MQ-2烟雾传感器 ....................................................... 4
第3章 系统需求分析 ..................................................... 5
3- 1系统设计目标 .......................................................... 5
3.2系统功能需求 ........................................................... 5
3.2. I温度采集模块 .................................................... 5
3.2.2湿度采集模块 ..................................................... 5
3.2.3烟雾采集模块 ..................................................... 5
3.2.4电机控制模块 ..................................................... 5
3.2.5复位模块 ......................................................... 5
3-3系统非功能需求 ......................................................... 5
第4章系统设计 ........................................................... 6
4. 1系统总体框图 .......................................................... 6
4.2系统硬件设计 ........................................................... 7 4. 2. 1硬件构件设计 ................................................... 7
4. 2.2时钟电路 ......................................................... 8
4. 2.3单片机内部组成 .................................................. 10
4. 2.4引脚定义 ........................................................ 10
4. 2.5复位电路 ........................................................ 12
4. 2.6电机控制电路 ................................................... 14
4.3系统软件设计 .......................................................... 15
4.3. 1温湿度的读取 .................................................... 15
4.3.2 MQ-2 的检测 ...................................................... 15
4.3.3电机的驱动 ...................................................... 16
4.3.4传感器信号处理 .................................................. 16
第5章系统实现 ........................................................... 17
5- 1系统软件的实现 ...................................................... 17
5. 1. 1设备初始化 .................................................... 17
5. 1.2温湿度读取 ...................................................... 17