设计说明书
总字数:15000+
摘要
随着居民生活水平的提高,燃气作为便捷能源被广泛应用于家庭和商业场景,但煤气泄漏、气压异常等安全隐患若不能及时发现和处理,可能引发爆炸、中毒等严重安全事故,威胁生命财产安全。因此,研发一种能实时、准确监测煤气状态并具备多重预警功能的设备十分必要。
本设计提出了一种基于 STM32F103C8T6 单片机的煤气监测系统。系统主要功能包括:通过MQ-5 煤气浓度检测模块实时监测环境中煤气浓度,当浓度超过设定最大值时,触发声光报警并通过继电器控制风扇通风,同时借助4G 模块发送 “煤气泄漏,请速速查看” 的短信提醒;通过XGZP6847 气压检测模块监测煤气瓶气压,若气压过低或过高,启动声光报警并通过4G 模块发送 “煤气瓶气压异常,请速速查看” 的短信提醒;通过HX711 称重模块检测煤气瓶内煤气余量,掌握气体使用状态;用户可通过按键模块设置各参数阈值,也可手动控制通风功能;通过OLED 显示模块实时展示煤气浓度、气压、余量等测量数据。
该煤气监测系统的作用在于,为燃气安全使用提供了一种全方位、智能化的监测与预警方案。通过多模块协同工作实现实时监测、自动报警、远程提醒及手动控制,能够帮助用户及时发现燃气安全隐患并采取应对措施,有效降低安全事故发生概率,保障生活生产安全。
关键词:单片机;煤气监测;浓度检测;气压监测;安全预警
Design of Gas Monitoring Based on Single Chip Microcomputer
Abstract
With the improvement of residents’ living standards, gas has been widely used as a convenient energy source in households and commercial scenarios. However, if safety hazards such as gas leaks and abnormal air pressure are not detected and dealt with in a timely manner, they may cause serious safety accidents such as explosions and poisoning, posing a threat to life and property safety. Therefore, it is necessary to develop a device that can monitor the gas status in real time and accurately, and has multiple warning functions.
This design proposes a gas monitoring system based on STM32F103C8T6 microcontroller. The main functions of the system include: real-time monitoring of the gas concentration in the environment through the MQ-5 gas concentration detection module. When the concentration exceeds the set maximum value, an audible and visual alarm will be triggered and the fan ventilation will be controlled through the relay. At the same time, the 4G module will send a short message reminder of “gas leakage, please check it quickly”; Monitor the gas cylinder pressure through the XGZP6847 pressure detection module. If the pressure is too low or too high, activate the sound and light alarm and send a SMS reminder through the 4G module saying “Gas cylinder pressure abnormal, please check quickly”; Use the HX711 weighing module to detect the remaining amount of gas in the gas cylinder and grasp the gas usage status; Users can set various parameter thresholds through the button module and manually control the ventilation function; Real time display of measurement data such as gas concentration, pressure, and remaining amount through OLED display module.
The function of this gas monitoring system is to provide a comprehensive and intelligent monitoring and warning solution for the safe use of gas. Through the collaborative work of multiple modules, real-time monitoring, automatic alarm, remote reminder, and manual control can be achieved, which can help users discover gas safety hazards in a timely manner and take corresponding measures, effectively reducing the probability of safety accidents and ensuring the safety of life and production.
Keywords: microcontroller; Gas monitoring; Concentration detection; Air pressure monitoring; Security Warning
目 录
1 绪论
1.1 研究背景及意义
1.2 国内外研究现状
1.3 主要内容
2 系统总体方案设计
2.1系统总体设计
2.2 主要模块方案选择
3 系统硬件设计
3.1 总体硬件框架
3.2 主控模块电路设计
3.3 煤气浓度检测模块电路设计
3.4 气压检测模块电路设计
3.5 称重模块电路设计
3.6 显示模块电路设计
3.7 按键模块电路设计
3.8 声光报警模块电路设计
3.9 继电器模块电路设计
3.10 4G 模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键子流程设计
4.4 OLED显示流程设计
4.5 称重模块子流程设计
4.6 发送短信子流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 多参数检测及 OLED 显示功能测试
5.3 煤气浓度异常报警与通风控制功能测试
5.4 气压异常报警功能测试
5.5 按键阈值设置与手动控制功能测试
5.6 4G 模块远程短信提醒功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!