基于单片机的家居空气质量监控系统

基于单片机的 家居空气质量监控系统I

摘要

随着社会的不断发展与科学技术的日新月异。家庭住所作为人们日常起居生活最核心的区域越来越被人们所关注。特别是近年来,外界环境污染愈发严重,人们越来越渴望自己的居所在满足日常基本起居的同时更能够为自己提供一个安全、舒适、温馨的环境。为此,人们在需要相应的空气净化设备同时,更需要一种简洁、方便、有效、功能齐全、面向家居的空气质量检测设备。将检测与控制相结合,实现设备间的智能联动。

本文所构建了家居的空气质量监控系统面向于现代家居环境能够检测并显示出温度,湿度,甲醛,PM2.5各项实时数据。本系统以AT89C51单片机为核心,主要包括传感器温湿度采集,传感器气体采集,A/D模/数转换,LCD液晶显示,声光报警等部分。系统通过搭建的传感器元件采集家居中温湿度,甲醛含量以及PM2.5含量,并实时显示上述采集数据。此外,采集上来的数据与单片机内部设定的整定值比较。当数据不合标准时发出报警信号并开启相应设备通知家居主人。最后,本文将设计的系统在PROTUES环境下进行了仿真,验证了设计的正确性,可行性。

本设计借鉴了市场现有的产品以及环境质量现有的研究成果。集实用性,高效性,经济性于一身。为今后智能家居的发展提供了新的思路。

关键词:单片机;空气质量检测;传感器;PROTUES

I

abstract

With the continuous development of society and the rapid development of science and technology. As the core of people's daily life, the family residence has become more and more concerned by people. Especially in recent years, the environmental pollution has become more and more serious, people are more and more eager to meet their own homes in the daily basic living while more able to provide themselves with a safe, comfortable, warm environment。 To this end, we need the corresponding air purification equipment at the same time, but also need a simple, convenient, effective, complete function, for home air quality testing equipment. The detection and control are combined to realize the intelligent linkage between devices。

The air quality monitoring system in the home is designed to detect and display the temperature, humidity, formaldehyde and PM2.5 real-time data in the modern home environment. This system to AT89C51 microcontroller as the core, including the temperature and humidity sensor acquisition, sensor gas collection, A/D mode / number conversion, LCD liquid crystal display, sound and light alarm and other parts。The system collects the temperature and humidity, the formaldehyde content and the PM2.5 content of the sensor, and displays the data in real time. In addition, the data collected from the internal settings of the microcontroller and the setting value of the comparison。When the data is not standard, the alarm signal is issued and the corresponding equipment is turned on to inform the home owner. Finally, the design of the system in the PROTUES environment simulation, verify the correctness of the design, feasibility。

This design draws on the existing research results of the existing products and environmental quality of the market。Practicality, high efficiency, economy in one body。It provides a new idea for the development of smart home in the future。

Key words: single chip microcomputer; air quality detection; sensor; PROTUES

II

目 录

第1章 引言 ....................................................... 1

1.1 设计背景及意义.......................................... 1 1.2 家居环境监测系统现状.................................... 2 1.3 设计目的及内容.......................................... 3

第2章 系统设计方案论证和总体框架设计 ........................................................... 4

第3章 第4章 第5章 2.1 设计要求................................................ 4

2.1.1 家居空气质量监测系统功能.......................... 4 2.2系统硬件的选型与论证 .................................... 4

2.2.1单片机控制器的选型 ................................ 4 2.2.2温、湿度传感器的选型 .............................. 5 2.2.3 甲醛气体监测模块选择与论证........................ 6 2.2.4 PM2.5监测模块选择与论证 .......................... 6 2.3 家居空气质量监测系统总体设计框架........................ 7

系统硬件模块电路设计 ............................................................................... 8

3.1控制模块设计 ............................................ 8

3.1.1 AT89C51单片机的介绍 .............................. 8 3.1.2 时钟电路设计..................................... 11 3.1.3 复位电路设计..................................... 11 3.1.4 单片机最小系统硬件电路图......................... 12 3.2传感器模块设计 ......................................... 12

3.2.1温湿度检测模块设计 ............................... 12 3.2.2 甲醛检测模块设计................................. 13 3.2.3 PM2.5检测模块设计 ............................... 13 3.3液晶显示模块设计 ....................................... 14 3.4报警模块设计 ........................................... 16 3.5电源模块设计 ........................................... 16

系统软件设计 ............................................................................................. 18

4.1程序设计软件简介 ....................................... 18 4.2程序流程图 ............................................ 18

4.2.1温湿度测量模块软件设计 ........................... 18 4.3.2 PM2.5测量模块软件设计 ........................... 19 4.3.3 甲醛测量模块软件设计............................. 19

仿真与实验测试 ......................................................................................... 21

III

联系客服:779662525#qq.com(#替换为@)