设计说明书
总字数:19000+
摘要
随着城市化进程的加快和居民安全意识的提升,火灾预警的及时性与准确性对保障生命财产安全、降低灾害损失具有至关重要的意义。传统火灾预警方式多依赖单一传感器检测或人工巡查,存在预警滞后、误报率高、覆盖范围有限等问题,难以满足现代建筑多区域、全方位的安全防护需求。
基于 STM32F103C8T6 单片机的火灾预警系统,采用 “主机 – 从机” 分布式架构,整合了 MQ-2 烟雾传感器、DHT11 温湿度传感器、MQ-7 一氧化碳传感器、YS-17 火焰传感器、ZigBee 无线通信模块、ESP8266 WIFI 模块、按键模块、声光报警装置及水泵驱动电路,实现了多区域火灾风险的实时监测与智能预警。系统核心功能包括:从机端(如厨房、客厅):通过 MQ-2 检测烟雾浓度,DHT11 监测温湿度,MQ-7(厨房专用)检测一氧化碳浓度,YS-17 识别火焰特征;当烟雾、温度、一氧化碳浓度超阈值或检测到火焰时,立即触发声光报警,并联动水泵启动灭火;同时通过 ZigBee 模块将实时数据(温湿度、烟雾浓度、一氧化碳浓度、火焰状态)上传至主机。主机端:接收各从机数据并集中处理,支持通过按键设置温度、湿度、一氧化碳浓度等参数的阈值;当监测值异常时同步触发报警,并通过 ESP8266 WIFI 模块将数据推送至手机端,实现远程监测与参数设置;具备断网自动重连机制,保障通信稳定性。
该系统的实现,突破了传统单区域预警的局限,通过多传感器融合检测与分布式通信,提升了火灾预警的及时性、准确性和覆盖范围,为家庭、办公等场所的消防安全提供了可靠保障,同时为多区域安防监测系统的研发提供了参考,具有较高的实用价值和推广意义。
关键词:火灾预警系统;多传感器融合;分布式监测;无线通信;智能报警
ABSTRACT
With the acceleration of urbanization and the improvement of residents’ safety awareness, the timeliness and accuracy of fire early warning are of vital significance for protecting life and property safety and reducing disaster losses. Traditional fire early warning methods mostly rely on single-sensor detection or manual inspection, which have problems such as delayed warning, high false alarm rate, and limited coverage, making it difficult to meet the needs of all-round safety protection in multi-area modern buildings.
The fire early warning system based on the STM32F103C8T6 microcontroller adopts a “host-slave” distributed architecture, integrating MQ-2 smoke sensor, DHT11 temperature and humidity sensor, MQ-7 carbon monoxide sensor, YS-17 flame sensor, ZigBee wireless communication module, ESP8266 WIFI module, key module, sound and light alarm device, and water pump drive circuit, realizing real-time monitoring and intelligent early warning of fire risks in multiple areas. The core functions of the system include:Slave terminal (e.g., kitchen, living room): Detecting smoke concentration through MQ-2, monitoring temperature and humidity via DHT11, detecting carbon monoxide concentration with MQ-7 (exclusively for the kitchen), and identifying flame characteristics by YS-17; when smoke, temperature, or carbon monoxide concentration exceeds the threshold or flame is detected, it immediately triggers sound and light alarm and links the water pump to start fire extinguishing; at the same time, real-time data (temperature and humidity, smoke concentration, carbon monoxide concentration, flame status) are uploaded to the host through the ZigBee module.Host terminal: Receiving and centrally processing data from each slave, supporting the setting of thresholds for parameters such as temperature, humidity, and carbon monoxide concentration through keys; synchronously triggering an alarm when the monitored value is abnormal, and pushing data to the mobile phone terminal through the ESP8266 WIFI module to realize remote monitoring and parameter setting; equipped with an automatic reconnection mechanism after network disconnection to ensure communication stability.
The implementation of this system breaks through the limitations of traditional single-area early warning. Through multi-sensor fusion detection and distributed communication, it improves the timeliness, accuracy, and coverage of fire early warning, providing reliable protection for fire safety in homes, offices, and other places. Meanwhile, it provides a reference for the research and development of multi-area security monitoring systems, with high practical value and promotion significance.
Keywords:Fire early warning system; Multi-sensor fusion; Distributed monitoring; Wireless communication; Intelligent alarm
目录
第1章 绪论
1.1 研究的目的及意义
1.2 国内外发展情况
1.3 本文主要研究内容
第2章 设计思路与方案论证
2.1 主要元器件选择
2.1.1 主控芯片选择
2.1.2 烟雾传感器选择
2.1.3 温湿度传感器选择
2.1.4 一氧化碳传感器选择
2.1.5 火焰传感器选择
2.1.6 ZigBee 通信模块选择
2.1.7 WIFI 模块选择
2.1.8 声光报警装置选择
2.1.9 水泵驱动模块选择
2.1.10 按键模块选择
2.2整体设计方案
第 3 章 硬件设计
第三章 硬件电路设计
3.1 主控电路模块
3.2 烟雾传感器电路(MQ-2)
3.3 温湿度传感器电路(DHT11)
3.4 一氧化碳传感器电路(MQ-7)
3.5 火焰传感器电路(YS-17)
3.6 ZigBee 通信模块电路
3.7 WIFI 模块电路(ESP8266)
3.8 按键模块电路
3.9 声光报警模块电路
3.10 水泵驱动电路
3.11 OLED 显示模块电路
第4章 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 OLED显示流程设计
4.5 温湿度检测模块子流程设计
4.6 zigbee模块子流程设计
4.7 WiFi模块子流程设计
第 5 章 实物测试
5.1 整体实物测试
5.2 烟雾传感器(MQ-2)功能测试
5.3 温湿度传感器(DHT11)功能测试
5.4 一氧化碳传感器(MQ-7)功能测试
5.5 火焰传感器(YS-17)功能测试
5.6 ZigBee 与 WIFI 通信功能测试
5.7 按键设置与报警功能测试
5.8 执行设备(水泵)功能测试
第6章 总结与展望
6.1 总结
6.2 展望
致谢
参考文献
附录
附录一:原理图
附录二:PCB
附录三:主程序
购买后可查看具体内容!