设计说明书
总字数:18000+
摘要
随着公共卫生管理要求的不断提高,洗手间环境的舒适与安全愈发受到重视。传统的洗手间管理依赖人工巡检,存在信息滞后、响应不及时、管理效率低等问题,难以满足智能化、精细化管理的需求。
基于 STM32F103C8T6 单片机的物联网洗手间监测系统,整合了 DHT11 温湿度检测模块、人体热释电传感器、MQ-135 氨气传感器、MQ-2 烟雾传感器、按键、OLED 显示屏及 WiFi 模块等,实现了洗手间环境的自动化监测与智能控制。系统核心功能包括:通过 DHT11 实时监测环境温湿度;借助人体热释电传感器检测是否有人,有人时开灯且关闭马桶冲洗功能,无人时关灯并自动冲洗马桶;利用 MQ-135 检测氨气浓度,超过设定最大值时启动通风并进行声光报警;通过 MQ-2 检测烟雾浓度,超过设定最大值时启动通风并进行声光报警;支持通过按键设置氨气和烟雾浓度阈值及控制外设;通过 OLED 显示屏实时显示各项监测数据;利用 WiFi 模块将数据远程发送到手机端,实现远程监测与控制(通风、冲洗马桶、开关灯)。
该系统的实现,有效提升了洗手间管理的自动化与智能化水平,及时应对环境异常,改善了洗手间环境质量,为公共卫生管理提供了高效、可靠的解决方案,同时为同类物联网监测设备的研发提供了参考,具有较高的实际应用价值。
关键词:STM32F103C8T6;洗手间环境;物联网;监测系统;传感器;WiFi 通信
ABSTRACT
With the continuous improvement of public health management requirements, the comfort and safety of restroom environments have received increasing attention. Traditional restroom management relies on manual inspections, which suffer from information lag, delayed responses, and low management efficiency, making it difficult to meet the needs of intelligent and refined management.
The IoT-based restroom monitoring system based on the STM32F103C8T6 microcontroller integrates hardware such as the DHT11 temperature and humidity detection module, pyroelectric infrared sensor, MQ-135 ammonia sensor, MQ-2 smoke sensor, buttons, OLED display, and WiFi module, realizing automatic monitoring and intelligent control of the restroom environment. The core functions of the system include: real-time monitoring of ambient temperature and humidity through DHT11; detecting the presence of people via the pyroelectric infrared sensor, turning on the lights and disabling the toilet flushing when someone is present, and turning off the lights and automatically flushing the toilet when no one is present; using MQ-135 to detect ammonia concentration, activating ventilation and issuing an acousto-optic alarm when the concentration exceeds the set maximum value; detecting smoke concentration through MQ-2, activating ventilation and issuing an acousto-optic alarm when the concentration exceeds the set maximum value; supporting the setting of ammonia and smoke concentration thresholds and controlling peripherals via buttons; displaying data in real-time through the OLED display; and remotely sending data to the mobile phone via the WiFi module to achieve remote monitoring and control (ventilation, toilet flushing, light switching).
The implementation of this system has effectively improved the automation and intelligence level of restroom management, promptly responded to environmental abnormalities, improved the quality of the restroom environment, provided an efficient and reliable solution for public health management, and also offered a reference for the research and development of similar IoT monitoring equipment, with high practical application value.
Keywords:STM32F103C8T6; Restroom environment; Internet of Things; Monitoring system; Sensor; WiFi communication
目录
第 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 显示模块选择
2.1.7 WiFi 模块选择
2.1.8 按键模块选择
2.2整体设计方案
第 3 章 硬件设计
3.1 主控电路模块
3.2 温湿度传感器电路
3.3 人体热释电传感器电路
3.4 氨气传感器电路
3.5 烟雾传感器电路
3.6 WiFi 模块电路
3.7 显示与按键模块电路
3.8 执行设备驱动电路
第4章 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 温湿度检测模块子流程
4.5 OLED显示流程设计
4.5 WiFi模块子流程设计
第 5 章 实物测试
5.1 整体实物测试
5.2 温湿度传感器功能测试
5.3 人体热释电传感器功能测试
5.4 氨气与烟雾传感器功能测试
5.5 WiFi 模块功能测试
5.6 执行设备功能测试
5.7 按键与显示功能测试
第 6 章 总结与展望
6.1 总结
6.2 展望
致谢
参考文献
附录
附录一:原理图
附录二:PCB
附录三:主程序
购买后可查看具体内容!