设计说明书
总字数:15000+
摘要
随着家庭用气普及率的提升,煤气安全已成为居家安全的重要关注点。煤气泄漏引发的爆炸、中毒等事故频发,传统监测方式因缺乏实时性和自动应急能力,难以有效防范风险。尤其在无人值守场景下,泄漏隐患难以及时处理,给家庭安全带来严重威胁。因此,研发一种集实时监测、自动防护、远程管控于一体的家用煤气监测系统具有重要现实意义。
本设计提出一种基于 STM32F103C8T6 单片机的家用煤气远程监测系统。系统核心功能包括:通过 MQ-5 传感器实时监测环境煤气浓度,当浓度超过设定最大值时,自动驱动 ULN2003A 控制的四相五线步进电机关闭煤气阀门,同时触发声光报警;通过继电器实现点火控制,配合按键模块完成浓度最大值设置、阀门开关及点火操作;借助定时器记录煤气使用总时长,OLED 显示屏实时展示浓度值、阀门状态、用气时长等数据;通过 ESP8266-WiFi 模块将监测数据上传至手机端,支持远程参数设置、阀门开关及点火控制。
该系统的作用在于构建多层次煤气安全防护体系。实时监测与自动关阀功能快速阻断泄漏风险,声光报警及时警示现场人员;本地按键与远程 WiFi 控制结合,实现灵活的操作管理;数据记录与显示功能助力用户掌握用气规律,为安全用气和成本管理提供依据。整体设计兼顾安全性与便捷性,为家庭煤气安全提供智能化解决方案,有效降低安全事故发生率,提升居家生活的安全感与舒适度。
关键词:单片机;煤气监测;远程控制;安全防护;WiFi 传输
Home gas remote monitoring system
Abstract
With the increasing popularity of household gas usage, gas safety has become an important concern for home safety. Accidents such as explosions and poisoning caused by gas leaks occur frequently, and traditional monitoring methods lack real-time and automatic emergency capabilities, making it difficult to effectively prevent risks. Especially in unmanned scenarios, leakage hazards are difficult to deal with in a timely manner, posing a serious threat to home safety. Therefore, developing a household gas monitoring system that integrates real-time monitoring, automatic protection, and remote control is of great practical significance.
This design proposes a home gas remote monitoring system based on STM32F103C8T6 microcontroller. The core functions of the system include real-time monitoring of environmental gas concentration through MQ-5 sensors. When the concentration exceeds the set maximum value, it automatically drives the four phase five wire stepper motor controlled by ULN2003A to close the gas valve and trigger an audible and visual alarm; Ignition control is achieved through relays, and the maximum concentration setting, valve switching, and ignition operation are completed in conjunction with key modules; Using a timer to record the total duration of gas usage, the OLED display screen displays real-time data such as concentration values, valve status, and gas usage duration; Upload monitoring data to the mobile phone through the ESP8266 WiFi module, supporting remote parameter settings, valve switches, and ignition control.
The function of this system is to build a multi-level gas safety protection system. Real time monitoring and automatic valve closing function quickly block the risk of leakage, and sound and light alarms promptly alert on-site personnel; Combining local buttons with remote WiFi control to achieve flexible operation management; The data recording and display function helps users grasp the gas usage patterns, providing a basis for safe gas usage and cost management. The overall design balances safety and convenience, providing intelligent solutions for home gas safety, effectively reducing the incidence of safety accidents, and enhancing the sense of security and comfort in home life.
Keywords:microcontroller; Gas monitoring; Remote control; Security protection; WiFi transmission
目 录
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 无线通信模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 OLED显示流程设计
4.5 WiFi模块子流程设计
4.6 ADC模数转换子流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 煤气浓度检测及显示功能测试
5.3 阀门控制与点火功能测试
5.4 超标报警与自动关阀功能测试
5.5 参数设置与时长统计功能测试
5.6 无线通信功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!