设计说明书
总字数:13000+
摘要
在家庭日常生活中,烟雾和可燃气体泄漏是潜在的重大安全隐患,若未能及时发现和预警,可能引发火灾、爆炸等严重事故,威胁居民的生命财产安全。因此,研发一种能实时监测、及时报警的家庭燃气安全系统具有重要的现实意义。
本设计提出一种基于 STM32F103C8T6 单片机的家庭燃气安全系统。系统主要功能包括:通过 MQ-2 传感器监测环境烟雾浓度,当浓度大于最大值时触发间隔 200ms 的声光报警,并通过 4G 模块发送预警短信;通过 MQ-5 可燃气体监测模块检测环境中可燃气体浓度,当浓度大于最大值时启动间隔 100ms 的声光报警,同时通过 4G 模块发送报警短信;用户可通过按键设置烟雾和可燃气体的报警阈值,也能手动取消对应声光报警,系统在环境回归正常后自动恢复监测报警功能;通过 OLED 显示屏实时显示当前烟雾浓度和可燃气体浓度数值。
该系统的作用在于构建了家庭燃气安全的实时监测与多级预警机制。通过精准的传感器检测、及时的声光报警和远程短信通知,能在安全隐患初期快速提醒用户,结合灵活的阈值设置与报警控制功能,为家庭环境提供全方位的安全防护,有效降低燃气相关事故的发生风险。
关键词:单片机;家庭燃气安全;烟雾监测;可燃气体检测
Design of Home Gas Safety System Based on Single Chip Microcomputer
Abstract
In daily household life, smoke and combustible gas leaks are potential major safety hazards. If not detected and warned in a timely manner, they may cause serious accidents such as fires and explosions, threatening the safety of residents’ lives and property. Therefore, developing a home gas safety system that can monitor and alert in real-time is of great practical significance.
This design proposes a home gas safety system based on STM32F103C8T6 microcontroller. The main functions of the system include: monitoring environmental smoke concentration through MQ-2 sensors, triggering sound and light alarms with intervals of 200ms when the concentration is greater than the maximum value, and sending warning messages through 4G modules; Detect the concentration of combustible gases in the environment through the MQ-5 combustible gas monitoring module. When the concentration exceeds the maximum value, sound and light alarms will be triggered every 100ms, and alarm messages will be sent through the 4G module; Users can set the alarm thresholds for smoke and combustible gases through buttons, and manually cancel the corresponding sound and light alarms. The system will automatically restore the monitoring and alarm function after the environment returns to normal; Real time display of current smoke concentration and combustible gas concentration values through OLED display screen.
The function of this system is to establish a real-time monitoring and multi-level warning mechanism for household gas safety. Through precise sensor detection, timely sound and light alarms, and remote SMS notifications, users can be quickly alerted to safety hazards in the early stages. Combined with flexible threshold settings and alarm control functions, comprehensive safety protection is provided for the home environment, effectively reducing the risk of gas related accidents.
Keywords: microcontroller; Household gas safety; Smoke monitoring; Combustible gas detection
目 录
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 4G 通信模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 OLED显示流程设计
4.5 发送短信子流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 烟雾与可燃气检测及显示功能测试
5.3 声光报警功能测试
5.4 4G 通信功能测试
5.5 按键交互与阈值设置功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!