设计说明书
总字数:15000+
本毕业论文旨在设计和实现一种基于STM32F103C8T6单片机的火灾检测系统。该系统通过多种传感器(火焰传感器、烟雾传感器、可燃气体传感器和温度传感器)实时监测火灾的发生和各种危险指标,并通过继电器控制水泵、风扇等设备进行火灾应急处理,并通过声光报警和短信通知实现及时的火灾预警和报警功能。具体功能包括以下几个方面:火焰传感器检测明火:系统通过火焰传感器实时检测明火的存在,一旦发生明火,通过继电器控制水泵进行灭火,并同时触发声光报警。烟雾传感器检测烟雾浓度:系统通过MQ-2传感器检测烟雾浓度,当烟雾浓度超过预设的最大值时,系统通过继电器控制风扇进行通风排烟,并触发声光报警。可燃气体传感器检测气体浓度:系统通过MQ-5传感器检测当前环境中可燃气体的浓度,当气体浓度超过设定的最大值时,系统通过继电器控制风扇进行通风排气,并触发声光报警。温度传感器检测温度值:系统通过DS18B20温度传感器检测当前环境的温度值,当温度超过预设的最大值时,系统通过继电器控制风扇进行通风散热,并触发声光报警。按键设置和手动控制:系统通过按键可以设置各项阈值,手动控制水泵、风扇等设备的启停,以及切换工作模式。显示屏显示数据:系统通过LCD1602显示屏实时显示各项监测数据,包括烟雾浓度、气体浓度、温度值等。短信通知功能:当系统检测到明火、烟雾浓度、可燃气体浓度或温度超过预设的最大值时,通过GSM模块发送相应的短信通知,包括“发生火灾”、“烟雾过高”、“可燃气体泄露”和“温度过高”。独立的烟雾传感器和蜂鸣器:系统配备了烟雾传感器A和烟雾传感器B,如果A传感器监测的烟雾浓度小于B传感器监测的烟雾浓度,则通过蜂鸣器A进行报警。通过本论文的研究,我们成功设计和实现了一种功能丰富、安全可靠的基于单片机的火灾检测系统。该系统具有高效的火灾监测能力,能够及时预警和处理火灾危险,提供了有效的保护措施和安全性保障。在未来的实际应用中,该系统将对火灾防控工作起到重要的辅助作用,并有望在家庭、办公场所等多个领域得到广泛应用。
关键词:单片机;火灾检测;传感器;继电器;声光报警;短信通知
This thesis aims to design and implement a fire detection system based on the STM32F103C8T6 microcontroller. The system utilizes various sensors including a flame sensor, smoke sensor, flammable gas sensor, and temperature sensor to continuously monitor the occurrence of fire and various hazardous indicators. It employs relays to control devices such as water pumps and fans for emergency fire response. Additionally, the system incorporates sound and light alarms as well as SMS notifications to provide timely fire warnings and alerts. The specific functionalities of the system are as follows:Flame Sensor for Fire Detection: The system employs a flame sensor to detect the presence of open flames. In the event of a fire, the system activates a water pump through a relay for firefighting purposes, while simultaneously triggering sound and light alarms.Smoke Sensor for Smoke Concentration Detection: The system utilizes an MQ-2 sensor to measure the concentration of smoke. If the smoke concentration exceeds the predetermined threshold, the system controls a fan through a relay to ventilate the area and triggers sound and light alarms.Flammable Gas Sensor for Gas Concentration Detection: The system employs an MQ-5 sensor to monitor the concentration of flammable gases in the environment. If the gas concentration exceeds the set maximum value, the system controls a fan through a relay for ventilation and triggers sound and light alarms.Temperature Sensor for Temperature Monitoring: The system utilizes a DS18B20 temperature sensor to measure the ambient temperature. If the temperature exceeds the predefined maximum value, the system controls a fan through a relay for cooling and triggers sound and light alarms.Keypad for Setting and Manual Control: The system incorporates a keypad for users to set threshold values and manually control the operation of water pumps, fans, and switch between different modes.LCD1602 Display for Real-time Data: The system employs an LCD1602 display to provide real-time monitoring of various parameters such as smoke concentration, gas concentration, and temperature.SMS Notification: When the system detects open flames, high smoke concentration, high flammable gas concentration, or excessive temperature, it sends corresponding SMS notifications using a GSM module, including messages such as “Fire Occurrence,” “High Smoke Level,” “Flammable Gas Leakage,” and “High Temperature.”Independent Smoke Sensors and Buzzers: The system is equipped with two smoke sensors, A and B. If the smoke concentration detected by sensor A is lower than that of sensor B, the system activates buzzer A for alarm purposes.Through the research presented in this thesis, we have successfully designed and implemented a feature-rich and reliable fire detection system based on the STM32F103C8T6 microcontroller. The system demonstrates efficient fire monitoring capabilities, timely fire warnings, and effective fire hazard management. In practical applications, it is expected to play a crucial role in fire prevention and control, finding wide application in various settings such as homes and offices.Keywords: Microcontroller, Fire Detection, Sensors, Relays, Sound and Light Alarms, SMS Notification
目 录
摘要
Abstract
第1章绪论
1.1研究背景及意义
1.2国内外研究现状
1.3论文的主要内容
第2章 系统总体设计方案
2.1系统总体设计
2.2主要模块方案选择
2.2.1主控模块方案选择
2.2.2温度监测模块方案选择
2.2.3 烟雾监测模块方案选择
2.2.4 可燃气体监测模块方案选择
第3章硬件设计
3.1主控模块电路设计
3.2 火焰监测模块电路设计
3.3 可燃气监测模块电路设计
3.4 烟雾监测模块电路设计
3.5 环境温度模块电路
3.6 显示模块电路设计
3.7 继电器模块电路设计
3.8 GSM模块电路设计
第4章 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 OLED显示流程设计
第5章 实物测试
5.1 整体实物焊接图
5.2火焰监测实物测试
5.3 可燃气体检测实物测试
5.4 烟雾检测实物测试
5.5 环境温度检测实物测试
第6章 总结展望
参考文献
附录
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!