设计说明书
总字数:16000+
摘要
在家庭生活环境中,可燃气体泄漏及环境温度异常是潜在的重大安全隐患,若未能及时发现和处理,可能引发爆炸、火灾等严重事故,威胁居民的生命财产安全。因此,研发一种能实时监测可燃气体浓度与环境温度、自动响应安全风险的家用报警控制系统具有重要的现实意义。
本设计提出一种基于 STC89C52 单片机的家用可燃气体报警器控制系统。系统主要功能包括:通过 MQ-5 传感器检测环境中可燃气体浓度,当浓度大于最小值时触发声光报警;浓度处于最小值与最大值之间时,在声光报警的同时启动通风设备;浓度大于最大值时,声光报警启动并自动通过继电器开启风扇和水泵;通过 DS18B20 传感器检测环境温度,温度大于最小值时触发声光报警,大于最大值时声光报警启动并自动通过继电器开启水泵;用户可通过按键设置可燃气体和温度的阈值,还能手动控制水泵和风扇的启停;LCD1602 显示屏实时显示可燃气体浓度、环境温度及设备工作状态;通过 ECBO2 蓝牙模块将测量数据发送至手机端,支持手机端设置阈值及远程控制水泵和风扇。
该系统的作用在于构建了多层次的家用安全防护机制。通过多参数协同监测与分级响应策略,在可燃气体泄漏和温度异常的不同阶段采取针对性措施,结合本地显示与远程控制功能,为家庭安全提供全方位保障。有效提升了家庭应对燃气泄漏和温度异常风险的能力,为居民创造更安全的居住环境。
关键词:STC89C52;可燃气体报警;安全监测;自动控制;
Design of Control System for Household Combustible Gas Alarm Based on Single Chip Microcomputer
Abstract
In the home living environment, combustible gas leakage and abnormal environmental temperature are potential major safety hazards. If not detected and dealt with in a timely manner, they may cause serious accidents such as explosions and fires, threatening the safety of residents’ lives and property. Therefore, it is of great practical significance to develop a household alarm control system that can monitor the concentration of combustible gases and environmental temperature in real time, and automatically respond to safety risks.
This design proposes a control system for household combustible gas alarm based on STC89C52 microcontroller. The main functions of the system include: detecting the concentration of combustible gases in the environment through MQ-5 sensors, and triggering sound and light alarms when the concentration is greater than the minimum value; When the concentration is between the minimum and maximum values, start the ventilation equipment at the same time as the sound and light alarm; When the concentration exceeds the maximum value, the sound and light alarm is activated and the fan and water pump are automatically turned on through the relay; Detect the ambient temperature through DS18B20 sensor. When the temperature exceeds the minimum value, an audible and visual alarm is triggered. When it exceeds the maximum value, the audible and visual alarm is activated and the water pump is automatically started through a relay; Users can set thresholds for combustible gases and temperatures through buttons, and manually control the start and stop of water pumps and fans; The LCD1602 display screen displays real-time combustible gas concentration, ambient temperature, and equipment operating status; Send measurement data to the mobile phone through the ECBO2 Bluetooth module, supporting threshold setting and remote control of water pumps and fans on the mobile phone.
The function of this system is to build a multi-level home security protection mechanism. Through multi parameter collaborative monitoring and graded response strategies, targeted measures are taken at different stages of combustible gas leakage and temperature anomalies, combined with local display and remote control functions, to provide comprehensive protection for home safety. Effectively enhancing the ability of households to cope with gas leaks and abnormal temperature risks, creating a safer living environment for residents.
Keywords:STC89C52; Combustible gas alarm; Safety monitoring; Auto-Control
目 录
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 蓝牙模块子流程
4.6 温度检测模块子流程
4.7 ADC模数转换子流程设计
5 仿真制作与功能测试
5.1 仿真制作
5.2 可燃气体检测与联动控制功能仿真测试
5.3 温度检测与联动控制功能仿真测试
5.4 阈值设置与手动控制功能仿真测试
5.5 显示功能仿真测试
5.6 蓝牙通信功能仿真测试
6 实物制作与功能测试
6.1 实物制作
6.2 可燃气体检测与联动控制功能测试
6.3 温度检测与联动控制功能测试
6.4 阈值设置与手动控制功能测试
6.5 显示功能测试
6.6 蓝牙通信功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!