项目编号:mcuclub-dz-289
设计简介:
项目名:空气质量
项目编号:mcuclub-dz-289
单片机类型:STM32F103C8T6
具体功能:
1、通过MQ-5检测天然气或煤气值,超过设置最大值进行语音播报,并开启风扇和净化器
2、通过MQ-7检测CO值,超过设置最大值进行语音播报,并开启风扇和净化器
3、通过MS1100检测甲醛值,超过设置最大值进行语音播报,并开启风扇和净化器
4、通过MQ-135检测甲苯值,超过设置最大值进行语音播报,并开启风扇和净化器
5、通过SGP30检测TVOC值及CO2值,超过设置最大值进语音播报,并开启风扇和净化器
6、通过按键设置各上限值,可以手动控制风扇和净化器、切换模式
7、通过显示屏显示数据
8、通过蓝牙模块将测量数据发送到手机端,并可以控制风扇和净化器、切换模式
总字数:19808
摘 要
日益尖锐的空气质量问题,让人们意识到用环境牺牲来换取经济的发展已不可取。在该背景下,国家和人民都充分认识到了对空气质量保护的重要性,加大了对空气污染的治理力度。
本文基于STM32单片机设计了一款空气质量监测系统,采用不同种类的传感器分别对空气中的天然气或煤气、CO、甲醛、甲苯、TVOC或CO2等值,然后将采集到的实时数据发送到单片机,单片机对接收到的数据进行分析和处理,进而控制继电器的启停对相关参数进行调节,使相关参数处于正常状态,并将相关数据显示在手机端和显示屏上进行实时显示。
总而言之,空气质量监测在生态环境保护工作中发挥着关键性的作用,共促生态环境的健康、可持续发展,共创美好人居空气环境。
关键词:STM32单片机;空气质量监测;传感器;继电器;测控
Abstract
Increasingly acute air quality problems, let people realize that environmental sacrifice in exchange for economic development is no longer desirable. In this context, the state and the people have fully realized the importance of air quality protection, and increased the efforts to control air pollution.
This paper designs an air quality monitoring system based on STM32 microcontroller. Different kinds of sensors are used to measure the equivalent value of natural gas or gas, CO, formaldehyde, toluene, TVOC or CO2 in the air respectively, and then the real-time data collected is sent to the microcontroller, which analyzes and processes the received data. Then control the start and stop of the relay to adjust the relevant parameters, so that the relevant parameters are in a normal state, and the relevant data is displayed on the mobile phone and the display screen for real-time display.
All in all, air quality monitoring plays a key role in the protection of the ecological environment, promoting the healthy and sustainable development of the ecological environment and creating a better living air environment.
Key words: STM32 MCU; Air quality monitoring; Sensor; Relay; Measure and control
目 录
1.绪论
1.1 研究背景及其研究意义
1.2 国内外研究现状
1.3 研究目标和组织结构
2.系统方案设计
2.1 整体方案设计
2.2 主要器件选型选择
2.2.1 主控芯片方案选择
2.2.2 显示模块方案选择
2.2.3 MQ-5天然气或煤气传感器的方案选型
2.2.4 CO检测模块方案选型
2.2.5甲醛检测模块方案选择
2.2.6甲苯检测模块方案选择
3.硬件电路设计
3.1 主控模块电路
3.2 MQ-5煤气或者天然气模块电路
3.3 MS1100甲醛检测模块电路
3.4 MQ-7检测CO模块电路
3.5 MQ-135甲苯检测模块电路
3.6 TVOC、CO2检测模块电路
3.7 OLED显示模块电路
3.8 按键电路
3.9 语音播报模块(TTS)
3.10 继电器调节模块
3.11 蓝牙模块(ECB02)
4.系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 OLED显示流程设计
4.5 蓝牙模块子流程
5.实物调试
5.1 实物总体设计
5.2 CO浓度模块实物测试
5.3天然气或煤气浓度模块实物测试
5.4甲醛浓度模块实物测试
5.5甲苯浓度模块实物测试
5.6 TVOC值及CO2浓度模块实物测试
5.7蓝牙模块实物测试
总结与展望
参考文献
致谢
附录
附录A:原理图
附录B:PCB
附录C:程序