设计说明书
总字数:17000+
摘要
随着环境问题日益受到关注,空气质量监测成为保障公众健康和环境安全的重要手段。多种有害气体、温湿度、颗粒物及噪声等环境参数的异常,不仅影响生态环境,更可能对人体健康造成潜在威胁。因此,研发一种能全面、实时监测多种环境参数的系统具有重要意义。 本设计提出了一种基于STM32F103C8T6单片机的多节点环境监测系统。系统主要功能包括:从机1通过SGP30、MQ-7、MQ-135、MQ-136分别检测氮氧化物、碳氧化物、二氧化硫和硫化氢;从机2通过MQ-131、MQ-4、MQ-137分别检测臭氧、甲烷和氨气;从机3通过DHT11、GP2Y10和声音检测模块分别检测温湿度、PM2.5浓度和噪声;各从机通过zigbee模块将数据远程传输。主机通过zigbee接收各从机数据,用户可通过三个按键设定各参数阈值,当检测值超出设定范围时,系统进行声光报警,并通过OLED显示各项测量数据。 该环境监测系统的作用在于,为用户提供了一种全面、实时的环境参数监测工具。通过及时监测和报警,能够帮助人们了解周围环境质量状况,便于采取相应措施,保障身体健康和环境安全。
关键词:单片机;环境监测;传感器;zigbee通信
Multi-node Environmental Monitoring System Based on Single-chip Microcomputer
Abstract
With increasing attention to environmental issues, air quality monitoring has become an important means to safeguard public health and environmental safety. Abnormalities in various environmental parameters such as harmful gases, temperature and humidity, particulate matter, and noise not only affect the ecological environment but may also pose potential threats to human health. Therefore, developing a system capable of comprehensively and real-time monitoring multiple environmental parameters is of significant importance.
This design proposes a multi-node environmental monitoring system based on the STM32F103C8T6 microcontroller. The main functions of the system include:
– Slave 1 detects nitrogen oxides, carbon oxides, sulfur dioxide, and hydrogen sulfide using SGP30, MQ-7, MQ-135, and MQ-136, respectively.
– Slave 2 detects ozone, methane, and ammonia gas using MQ-131, MQ-4, and MQ-137, respectively.
– Slave 3 detects temperature and humidity, PM2.5 concentration, and noise using DHT11, GP2Y10, and a sound detection module, respectively.
Each slave remotely transmits data via a Zigbee module.
The host receives data from all slaves via Zigbee. Users can set thresholds for each parameter using three buttons. When detected values exceed the set range, the system triggers audible and visual alarms and displays all measured data on an OLED screen.
The role of this environmental monitoring system is to provide users with a comprehensive, real-time tool for monitoring environmental parameters. Through timely monitoring and alarms, it helps humans understand the quality of their surrounding environment, enabling them to take appropriate measures to protect both health and environmental safety.
Keywords:Microcontroller; Environmental monitoring; Sensor; Zigbee communication
目 录
1 绪论
1.1 研究背景及意义
1.2 国内外研究现状
1.3 主要内容
2 系统总体方案设计
2.1 系统总体设计
2.2 主要模块方案选择
3 系统硬件设计
3.1 总体硬件框架
3.2 主控模块电路设计
3.3 从机 1 硬件电路设计
3.4 从机 2 硬件电路设计
3.5 从机 3 硬件电路设计
3.6 ZigBee 通信模块电路设计
3.7 主机人机交互模块电路设计
3.8 电源模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 系统从机主流程设计
4.4 SGP30模块子流程设计
4.5 MQ系列检测模块子流程设计
4.6 温湿度检测模块子流程设计
4.7 PM2.5检测模块子流程设计
4.8 声音检测模块子流程设计
4.9 zigbee模块子流程设计
4.10 OLED显示屏子流程设计
4.11 独立按键子流程设计
4.12 声光报警模块子流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 环境参数采集与数据传输功能测试
5.3 数据显示功能测试
5.4 参数阈值设定功能测试
5.5 声光报警功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!