设计说明书
总字数:25000+
摘要
在居家生活中,实时掌握家居环境状况、及时应对环境异常并实现便捷管理,对提升居住舒适度与安全性具有重要意义。传统的家居环境管理多依赖人工观察与操作,存在环境异常发现不及时、调节不精准、管理便捷性差等问题,难以满足现代化居家生活的需求。
基于 STM32F103C8T6 单片机的家居环境监测与预警系统(项目编号:mcuclub-dz-1025),整合了 DHT11 温湿度传感器、噪声检测模块、雨水检测模块、人体热释电感应模块 D203S、MQ-2 烟雾传感器、光敏电阻 5516、按键、OLED 显示模块、WiFi 模块 ESP8266、步进电机(通过 ULN2003 驱动)、舵机 SG90 及蜂鸣器,实现了对家居环境的自动化监测、调节、预警与远程管理。系统核心功能包括:通过 DHT11 检测温湿度,依据温湿度值按优先级最低原则控制窗户开关;通过噪声检测模块检测声音,噪声过大时按优先级次之原则关窗;通过雨水检测模块检测雨量,雨量超最大值时按优先级次之原则关窗;通过人体热释电感应模块 D203S 检测窗外是否有人,有人时按优先级次之原则关窗并使蜂鸣器报警;通过 MQ-2 检测烟雾值,烟雾超最大值时按优先级最高原则开窗并使蜂鸣器报警;通过光敏电阻 5516 检测光照值,依据光照值控制窗帘(舵机 SG90)开关;利用按键可设置各参数阈值,控制窗户、窗帘、风扇;通过 OLED 显示各项测量数据与模式;通过 WiFi 模块 ESP8266 将数据发送到手机端,手机端可设置阈值、远程控制窗户、窗帘、风扇,APP 页面标题为 “卧室窗户智能控制系统”,且各功能按空气质量 > 人体检测 > 是否下雨 > 噪音 > 温度 > 湿度的优先级执行。
该系统的实现,有效提升了家居环境监测与管理的自动化、智能化水平,通过实时监测、自动调节、及时预警及远程管理,为居家生活提供了可靠的技术支持,同时为家居智能化领域的发展提供了参考,具有较高的实用价值与推广意义。
关键词:家居环境监测;STM32;智能预警;远程管理;优先级控制;卧室窗户控制
ABSTRACT
In home life, real-time grasp of the home environment status, timely response to environmental abnormalities, and realization of convenient management are of great significance for improving living comfort and safety. Traditional home environment management mostly relies on manual observation and operation, which has problems such as untimely discovery of environmental abnormalities, inaccurate regulation, and poor management convenience, making it difficult to meet the needs of modern home life.
The home environment monitoring and early warning system based on STM32F103C8T6 microcontroller (Project No.: mcuclub-dz-1025) integrates DHT11 temperature and humidity sensor, noise detection module, rain detection module, human pyroelectric induction module D203S, MQ-2 smoke sensor, photoresistor 5516, buttons, OLED display module, WiFi module ESP8266, stepper motor (driven by ULN2003), servo SG90 and buzzer, realizing automatic monitoring, regulation, early warning and remote management of the home environment. The core functions of the system include: detecting temperature and humidity through DHT11, and controlling the opening and closing of windows according to the lowest priority principle based on temperature and humidity values; detecting sound through the noise detection module, and closing windows according to the secondary priority principle when the noise is too large; detecting rainfall through the rain detection module, and closing windows according to the secondary priority principle when the rainfall exceeds the maximum value; detecting whether there is a person outside the window through the human pyroelectric induction module D203S, and closing the window and making the buzzer alarm according to the secondary priority principle when there is a person; detecting the smoke value through MQ-2, and opening the window and making the buzzer alarm according to the highest priority principle when the smoke exceeds the maximum value; detecting the light value through the photoresistor 5516, and controlling the opening and closing of the curtain (servo SG90) according to the light value; using buttons to set various parameter thresholds and control windows, curtains, and fans; displaying various measurement data and modes through OLED; sending data to the mobile phone through the WiFi module ESP8266, and the mobile phone can set thresholds and remotely control windows, curtains, and fans. The title of the APP page is “Bedroom Window Intelligent Control System”, and each function is executed according to the priority of air quality > human detection > whether it is raining > noise > temperature > humidity.
The implementation of this system has effectively improved the automation and intelligence level of home environment monitoring and management. Through real-time monitoring, automatic regulation, timely early warning and remote management, it provides reliable technical support for home life, and also provides a reference for the development of the home intelligence field, with high practical value and promotion significance.
Keywords:Home environment monitoring; STM32; Intelligent early warning; Remote management; Priority control; Bedroom window control
目录
第1章 绪论
1.1 研究的目的及意义
1.2 国内外发展情况
1.2.1 国外研究现状
1.2.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 光照检测模块选择
2.1.8 步进电机及驱动模块选择
2.1.9 舵机选择
2.1.10 显示模块选择
2.1.11 WiFi 模块选择
2.1.12 按键模块选择
2.1.13 声光报警模块选择
2.1.14 风扇控制模块选择
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 按键模块电路
3.12 声光报警模块电路
3.13 风扇控制模块电路
3.14 WiFi 模块电路
第4章 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 OLED显示子流程设计
4.4 独立按键子流程设计
4.5 ADC模数转换子流程设计
4.6 温湿度检测模块子流程设计
4.7 WiFi模块子流程设计
第 5 章 实物测试
5.1 整体实物测试
5.2 温湿度监测与窗户控制功能测试
5.3 噪声监测与关窗功能测试
5.4 雨水监测与关窗功能测试
5.5 人体检测与关窗报警功能测试
5.6 烟雾监测与开窗报警功能测试
5.7 光照监测与窗帘控制功能测试
5.8 显示功能测试
5.9 按键设置功能测试
5.10 远程通信功能测试
5.11 系统综合运行测试
第6章 总结与展望
6.1 总结
6.2 展望
致谢
参考文献
附录
附录一:原理图
附录二:PCB
附录三:主程序
购买后可查看具体内容!