设计说明书
总字数:19000+
摘要
随着城市化进程加快,建筑密度与复杂度不断提升,消防安全保障的及时性与可靠性愈发关键。传统消火栓系统仅具备基础储水与供水功能,存在无水状态难察觉、火灾预警滞后、用水量无法统计等问题 —— 若消火栓缺水未及时发现,火灾发生时将延误灭火时机;火灾初期烟雾扩散时,缺乏主动预警机制易导致火势蔓延;同时无法实时监测用水量,也不利于消防资源的优化调配。因此,研发一款集成状态监测、火灾预警、智能控制与数据传输功能的单片机消火栓系统,对提升消防安全保障水平具有重要现实意义。
本设计提出了一种基于 STC89C52 单片机的消火栓系统。系统主要功能包括:通过电压型液体检测模块检测消火栓内储水状态,无水时触发蜂鸣器报警,并通过 ECBO2 蓝牙模块发送 “消防栓中未检测到有水,请速速查看!”;支持通过按键直接控制继电器开启水泵,配合 YF-S401 水流量计检测瞬时水流量并计算总用水量,相关数据可通过蓝牙实时传输;通过 MQ-2 烟雾检测模块监测环境烟雾值,当数值超过设定最大值时,蜂鸣器报警且蓝牙发送 “发生火灾,请速速查看!”;支持通过按键自定义烟雾最大值阈值;所有监测数据(储水状态、水流量、烟雾值、阈值参数)均通过 LCD1602 显示屏实时展示,方便现场查看。
该消火栓系统突破了传统设备的功能局限,实现了 “状态监测 – 火灾预警 – 智能控制 – 数据传输” 一体化,能及时发现消火栓缺水隐患、快速响应初期火灾、精准统计用水量,为消防管理部门提供实时数据支持,有效提升消防安全保障的及时性与可靠性,助力构建更高效的消防应急体系。
关键词:STC89C52;消火栓系统;状态监测;火灾预警;数据传输
Design of Fire Hydrant System Based on Single Chip Microcomputer
Abstract
With the acceleration of urbanization and the continuous increase in building density and complexity, the timeliness and reliability of fire safety protection have become increasingly crucial. The traditional fire hydrant system only has basic water storage and supply functions, and has problems such as difficulty in detecting the absence of water, delayed fire warning, and inability to count water consumption. If the water shortage of the fire hydrant is not detected in a timely manner, the timing of extinguishing the fire will be delayed when a fire occurs; When smoke spreads during the early stages of a fire, the lack of an active warning mechanism can easily lead to the spread of the fire; At the same time, it is not possible to monitor water usage in real time, which is also not conducive to optimizing the allocation of firefighting resources. Therefore, developing a single-chip fire hydrant system that integrates status monitoring, fire warning, intelligent control, and data transmission functions is of great practical significance for improving the level of fire safety protection.
This design proposes a fire hydrant system based on STC89C52 microcontroller. The main functions of the system include: detecting the water storage status inside the fire hydrant through the voltage type liquid detection module, triggering the buzzer alarm when there is no water, and sending the message “No water detected in the fire hydrant, please check quickly!” through the ECBO2 Bluetooth module; Support direct control of the relay to turn on the water pump through buttons, in conjunction with the YF-S401 water flow meter to detect instantaneous water flow and calculate total water consumption. Relevant data can be transmitted in real-time via Bluetooth; Monitor the environmental smoke value through the MQ-2 smoke detection module. When the value exceeds the set maximum value, the buzzer will sound an alarm and Bluetooth will send a message saying “Fire has occurred, please check quickly; Support customizing the maximum smoke threshold through buttons; All monitoring data (water storage status, water flow rate, smoke value, threshold parameters) are displayed in real-time on the LCD1602 screen for easy on-site viewing.
This fire hydrant system breaks through the functional limitations of traditional equipment and realizes the integration of “status monitoring fire warning intelligent control data transmission”. It can timely detect water shortage hazards in fire hydrants, quickly respond to initial fires, and accurately calculate water consumption, providing real-time data support for fire management departments, effectively improving the timeliness and reliability of fire safety protection, and helping to build a more efficient fire emergency system.
Keywords: STC89C52; Fire hydrant system; Status monitoring; Fire warning; data 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 蜂鸣器报警模块电路设计
3.10 蓝牙通信模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 A/D模数转换子流程
4.4 独立按键
4.5 LCD1602液晶显示子流程
4.6蓝牙模块子流程
5 实物制作与功能测试
5.1 实物制作
5.2 液体检测与蜂鸣器报警功能测试
5.3 烟雾检测与蜂鸣器报警功能测试
5.4 水泵控制与水流量检测功能测试
5.5 烟雾阈值设置与 LCD 显示功能测试
5.6 蓝牙数据传输功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序