设计说明书
总字数:18000+
摘要
在家庭生活中,安全防护与环境舒适是人们关注的核心需求。传统家庭安防多依赖单一监控设备,环境监测与安全预警缺乏联动,难以应对非法入侵、火灾、气体泄漏等多种风险,且事后响应滞后,易造成安全隐患。因此,研发一种集多维度监测、自动控制、声光报警及远程通知于一体的家庭防卫监控系统十分必要。
本设计提出了一种基于 STM32F103C8T6 单片机的家庭防卫监控系统。系统主要功能包括:通过 D203S 人体热释电模块监测环境异动,布防状态下检测到人体活动时触发声光报警;借助 DHT11 温湿度模块实时采集环境温湿度,当数值超过设定最大值时,自动通过继电器开启通风设备;通过 MQ-2 烟雾传感器与 MQ-4 瓦斯传感器分别监测烟雾浓度与瓦斯含量,超标时同步启动通风;YS-17 火焰检测模块发现火情后,立即控制继电器驱动灭火水泵工作;OLED 显示模块实时展示撤防 / 布防状态、温湿度、烟雾、瓦斯浓度及火灾报警信息;所有监测数据通过 ESP8266-WiFi 模块传输至手机端,异常时发送报警信息;用户可通过按键自定义温湿度、烟雾、瓦斯的阈值参数。
该家庭防卫监控系统的作用在于,构建了 “监测 – 预警 – 控制 – 通知” 的全链条家庭安全体系。通过多传感器协同工作实现风险全面感知,自动控制功能降低灾害扩散风险,远程通知确保用户及时掌握家庭状态,为家庭安全与环境舒适提供全方位保障。
关键词:单片机;家庭防卫监控;多传感器监测;自动控制;远程报警
Home Defense Monitoring System Based on STM32
Abstract
In family life, safety protection and comfortable environment are the core needs that people pay attention to. Traditional home security often relies on a single monitoring device, and there is a lack of linkage between environmental monitoring and security warning, making it difficult to deal with various risks such as illegal intrusion, fire, and gas leakage. In addition, the response time is lagging behind, which can easily cause safety hazards. Therefore, it is necessary to develop a home defense monitoring system that integrates multi-dimensional monitoring, automatic control, sound and light alarm, and remote notification.
This design proposes a home defense monitoring system based on STM32F103C8T6 microcontroller. The main functions of the system include: monitoring environmental abnormalities through the D203S human thermoelectric module, triggering sound and light alarms when human activity is detected in the armed state; Real time collection of environmental temperature and humidity using the DHT11 temperature and humidity module. When the value exceeds the set maximum value, the ventilation equipment is automatically turned on through a relay; Monitor smoke concentration and gas content separately through MQ-2 smoke sensor and MQ-4 gas sensor, and start ventilation synchronously when exceeding the standard; After the YS-17 flame detection module detects a fire, it immediately controls the relay to drive the fire extinguishing water pump to work; The OLED display module displays real-time information on the status of disarming/arming, temperature and humidity, smoke, gas concentration, and fire alarm; All monitoring data is transmitted to the mobile phone through the ESP8266 WiFi module, and an alarm message is sent in case of abnormalities; Users can customize threshold parameters for temperature, humidity, smoke, and gas through buttons.
The function of this home defense monitoring system is to build a full chain home security system of “monitoring warning control notification”. Through the collaborative work of multiple sensors, comprehensive risk perception is achieved, and automatic control functions are used to reduce the risk of disaster spread. Remote notifications ensure that users can timely grasp the status of their homes, providing comprehensive protection for home safety and environmental comfort.
Keywords:microcontroller; Home defense monitoring; Multi sensor monitoring; Auto-Control; Remote alarm
目 录
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 继电器控制模块电路设计
3.11 WiFi 通信模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 温湿度检测模块子流程
4.5 人体热释电感应模块子流程设计
4.6 烟雾检测模块子流程设计
4.7 甲烷检测模块子流程设计
4.8 火焰检测模块子流程设计
4.9 OLED显示流程设计
4.10 WiFi模块子流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 人体感应与声光报警功能测试
5.3 温湿度监测与通风控制功能测试
5.4 烟雾监测与通风控制功能测试
5.5 瓦斯监测与通风控制功能测试
5.6 火焰检测与水泵控制功能测试
5.7 参数设置功能测试
5.8 远程监控与报警通知功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!