设计说明书
总字数:17000+
摘要
在现代生活中,家庭及公共场所的安全防护愈发受到重视,火灾、燃气泄漏、温湿度异常等安全隐患若不能及时发现和处理,可能会造成严重的财产损失和人员伤亡。传统的安防设备多存在监测维度单一、报警方式局限、缺乏远程交互等问题,难以满足全方位安全防护的需求。因此,研发一种能实时监测多种环境参数、具备多重报警功能且支持远程通信的智能报警装置十分必要。
本设计提出了一种基于 STM32F103C8T6 单片机的无线通信报警装置系统。系统主要功能包括:通过 MQ-2 传感器监测环境烟雾浓度,当浓度超过预设最大值时触发声光报警并发送短信;借助 DHT11 传感器采集环境温湿度,温度超出最大阈值时启动声光报警与短信通知;通过 MQ-4 传感器检测天然气浓度,浓度超标时立即执行声光报警和短信发送操作;利用 HC-SR04 传感器在布防状态下监测是否有人闯入,监测到异常时触发报警并发送短信。用户可通过按键设置烟雾、温度、天然气的最大阈值及系统布防撤防状态;OLED 显示屏实时显示各项环境参数测量值;4G 模块实现将监测数据远程传输至手机端,支持手机端设置各类阈值参数。
该无线通信报警装置系统的作用在于,通过多维度环境参数监测与多重报警机制,构建了全方位的安全防护体系。实时的声光报警与短信通知能让用户在第一时间掌握安全隐患,远程数据传输与阈值设置功能增强了系统的灵活性和可控性。为家庭、商铺等场所提供了一种便捷、可靠的安全监测解决方案,有助于提升安全防护的及时性和有效性,保障生命财产安全。
关键词:单片机;无线通信;报警装置;STM32F103C8T6;环境监测
Wireless Communication Alarm Device System Based on STM32 Microcontroller
Abstract
In modern life, the safety protection of homes and public places is increasingly valued. If safety hazards such as fires, gas leaks, and abnormal temperature and humidity are not detected and dealt with in a timely manner, they may cause serious property damage and casualties. Traditional security equipment often has problems such as single monitoring dimensions, limited alarm methods, and lack of remote interaction, making it difficult to meet the needs of comprehensive security protection. Therefore, it is necessary to develop an intelligent alarm device that can monitor multiple environmental parameters in real time, has multiple alarm functions, and supports remote communication.
This design proposes a wireless communication alarm device system based on STM32F103C8T6 microcontroller. The main functions of the system include: monitoring environmental smoke concentration through MQ-2 sensors, triggering sound and light alarms and sending text messages when the concentration exceeds the preset maximum value; Collect environmental temperature and humidity using DHT11 sensors, and activate sound and light alarms and SMS notifications when the temperature exceeds the maximum threshold; Detect natural gas concentration through MQ-4 sensor, and immediately execute sound and light alarm and SMS sending operations when the concentration exceeds the standard; Use HC-SR04 sensor to monitor for intrusion in the armed state, and trigger an alarm and send a text message when an abnormality is detected. Users can set the maximum thresholds for smoke, temperature, and natural gas, as well as the system’s arming and disarming status, through buttons; OLED display screen displays real-time measurement values of various environmental parameters; The 4G module enables remote transmission of monitoring data to the mobile phone and supports setting various threshold parameters on the mobile phone.
The function of this wireless communication alarm device system is to build a comprehensive security protection system through multi-dimensional environmental parameter monitoring and multiple alarm mechanisms. Real time sound and light alarms and SMS notifications can enable users to grasp security risks in a timely manner, while remote data transmission and threshold setting functions enhance the flexibility and controllability of the system. It provides a convenient and reliable security monitoring solution for homes, shops, and other places, which helps to improve the timeliness and effectiveness of security protection and ensure the safety of life and property.
Keywords: microcontroller; Wireless communication; Alarm device; STM32F103C8T6; environmental monitoring
目 录
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 4G 通信模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 OLED显示流程设计
4.5 ADC模数转换子流程设计
4.6 温湿度检测模块子流程设计
4.7 超声波检测模块子流程设计
4.8 4G模块联网子流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 环境参数检测及显示功能测试
5.3 人体存在检测与布防功能测试
5.4 声光报警功能测试
5.5 4G 通信功能测试
5.6 按键参数设置功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!