项目编号:mcuclub-dz-265
设计简介:
项目名:环境监测(实物)
项目编号:mcuclub-dz-265
单片机类型:STM32F103C8T6
具体功能:
1、通过DHT11检测温湿度,当温度大于设置最大值,进行声光报,并启动风扇降温,当湿度小于设置最小值,进行声光报,并启动加湿器加湿
2、通过MQ-5检测可燃气体值,当可燃气体值大于设置最大值,进行声光报,并启动加湿器及通风
3、警通过SGP30检测CO2值,当CO2值大于设置最大值,进行声光报警,并启动加湿器及通风
4、通过按键设置各阈值
5、通过OLED显示屏显示测量值
总字数:14650
摘 要
随着生活质量上升,人们对环境的要求逐步上升,但现存环境监测系统存在结构单一、价格昂贵、操作复杂等缺点,无法进行广泛普及,因此,生产一款环境监测系统成为大势所趋。
通过传感器技术、单片机技术和显示技术,可以将环境相关参数进行集中采集、处理、数据显示、报警等,从而实现智能环境监控与显示功能。应用温湿度传感器、可燃气体传感器、CO2传感器,对室内所在环境的温度、湿度、可燃气体浓度及CO2浓度分别进行采集,将传感器监测到的数据传输至STM32 单片机,经单片机处理后将各个数值传输到OLED 屏幕,方便实时观测环境信息。通过按键进行阈值设置,如果监测到相关参数异常时,蜂鸣器和LED 灯共同进行声光报警,并通过相关的外部设备进行相关参数调节。
通过多次测试,该环境监测系统能够长期稳定运行,并提供稳定可靠的数据,为环境参数的监测提供一种方便、快捷的调节方式。
关键词:STM32单片机;环境监测;传感器;显示屏
Abstract
With the improvement of quality of life, people’s requirements for the environment are gradually increasing. However, existing environmental monitoring systems have shortcomings such as single structure, expensive price, and complex operation, which cannot be widely popularized. Therefore, the production of an environmental monitoring system has become a trend.
Through sensor technology, microcontroller technology, and display technology, environmental related parameters can be collected, processed, displayed, and alarmed in a centralized manner, thereby achieving intelligent environmental monitoring and display functions. By using temperature and humidity sensors, combustible gas sensors, and CO2 sensors, the temperature, humidity, combustible gas concentration, and CO2 concentration of the indoor environment are collected separately. The data monitored by the sensors is transmitted to the STM32 microcontroller, and after processing by the microcontroller, the various values are transmitted to the OLED screen for real-time observation of environmental information. By pressing the button to set the threshold, if any abnormal parameters are detected, the buzzer and LED light will jointly give an audible and visual alarm, and adjust the relevant parameters through relevant external devices.
Through multiple tests, the environmental monitoring system can operate stably for a long time and provide stable and reliable data, providing a convenient and fast adjustment method for monitoring environmental parameters.
Key words: STM32 microcontroller; Environmental monitoring; Sensors; display screen
目 录
1.绪论
1.1 研究背景及其研究意义
1.2 国内外研究现状
1.2.1 国内研究现状
1.2.2 国外研究现状
1.3 研究目标和组织结构
2.系统方案设计
2.1 整体方案设计
2.2 主要器件选型选择
2.2.1 主控芯片方案选择
2.2.2 显示模块方案选择
2.2.3 MQ-5可燃气传感器的方案选型
2.2.4 CO2检测模块方案选
2.2.5温湿度检测模块方案选择
3.硬件电路设计
3.1 主控模块电路
3.2 MQ-5天然气模块电路
3.3 DHT11温湿度检测模块电路
3.4 CO2检测模块电路
3.5 继电器调节模块
3.6 按键模块
3.7 LCD1602显示模块电路
3.8 声光报警报警提醒电路模块
4.系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 温湿度检测模块子流程
4.5 OLED显示流程设计
5.实物调试
5.1 实物总体设计
5.2可燃气浓度浓度模块实物测试
5.3 CO2模块实物测试
5.4温湿度模块实物测试
总结
参考文献
致谢
附录
附录A:原理图
附录B:PCB
附录C:程序