设计说明书
总字数:20000+
摘要
随着科技的发展和生活品质的提升,智能家居已成为现代家居生活的重要发展方向。传统家居环境中,环境安全监测滞后、设备控制繁琐、缺乏远程管理能力等问题,难以满足人们对居住安全性、舒适性与便捷性的需求。因此,研发一种集成多参数监测、自动控制与远程管理的智能家居控制系统具有重要现实意义。
本设计提出了一种基于 STM32F103C8T6 单片机的智能家居控制系统。系统主要功能包括:通过 MQ-135 传感器监测环境有害气体浓度,当浓度超过最大值时,触发声光报警并通过继电器自动开启通风设备;借助 DS1302 时钟模块获取实时时间,支持通过按键手动修正时间参数;通过 5516 光照传感器监测环境光照强度,在预设窗帘开启时段内,当光照大于最大值时,通过 ULN2003A 驱动步进电机自动打开窗帘;利用 DHT11 传感器实时监测室内温湿度数据;通过 D203S 人体热释电感应模块检测人体活动,布防状态下监测到人员活动时,立即启动声光报警并向手机端推送弹窗提醒;通过按键可设置各参数阈值,同时支持手动控制通风设备和窗帘的开关状态;OLED 显示屏分区实时显示各项监测数据与设备状态;通过 ESP8266 WiFi 模块实现与手机端的数据交互,支持远程设置阈值及控制通风、窗帘等设备。
该智能家居控制系统的作用在于,构建了 “环境监测 – 自动控制 – 远程管理” 的一体化智能家居解决方案。通过多维度环境参数监测与智能响应,及时消除家居安全隐患,保障居住安全;自动调节窗帘、通风等设备,营造舒适的室内环境;按键本地控制与手机远程管理相结合,满足不同场景下的操作需求。为用户提供了安全、舒适、便捷的智能居住体验,推动传统家居向智能化、人性化方向升级。
关键词:单片机;智能家居控制系统;环境监测;远程控制
Design of Intelligent Home Control System Based on Single Chip Microcomputer
Abstract
With the development of technology and the improvement of quality of life, smart homes have become an important direction for modern home life. In traditional home environments, problems such as outdated environmental safety monitoring, cumbersome equipment control, and lack of remote management capabilities make it difficult to meet people’s needs for residential safety, comfort, and convenience. Therefore, developing an intelligent home control system that integrates multi parameter monitoring, automatic control, and remote management is of great practical significance.
This design proposes an intelligent home control system based on STM32F103C8T6 microcontroller. The main functions of the system include: monitoring the concentration of harmful gases in the environment through MQ-135 sensors, triggering sound and light alarms when the concentration exceeds the maximum value, and automatically turning on ventilation equipment through relays; Using DS1302 clock module to obtain real-time time, supporting manual adjustment of time parameters through buttons; By monitoring the ambient light intensity through the 5516 light sensor, during the preset window opening period, when the light exceeds the maximum value, the ULN2003A drives the stepper motor to automatically open the curtains; Real time monitoring of indoor temperature and humidity data using DHT11 sensors; By using the D203S human pyroelectric induction module to detect human activity, when personnel activity is detected in the armed state, the sound and light alarm will be immediately activated and a pop-up reminder will be pushed to the mobile phone; Various parameter thresholds can be set through buttons, and manual control of the on/off status of ventilation equipment and curtains is also supported; OLED display screen partitions real-time display of various monitoring data and device status; Realize data exchange with mobile devices through ESP8266 WiFi module, supporting remote threshold setting and control of ventilation, curtains and other devices.
The function of this smart home control system is to build an integrated smart home solution of “environmental monitoring automatic control remote management”. Through multi-dimensional environmental parameter monitoring and intelligent response, timely eliminate home safety hazards and ensure residential safety; Automatically adjust curtains, ventilation and other equipment to create a comfortable indoor environment; Combining local button control with remote management on mobile phones to meet operational needs in different scenarios. Providing users with a safe, comfortable, and convenient smart living experience, promoting the upgrading of traditional homes towards intelligence and humanization.
Keywords: microcontroller; Smart home control system; Environmental monitoring; Remote control
目 录
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 步进电机驱动模块电路设计
3.12 声光报警模块电路设计
3.13 WiFi 模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 OLED显示流程设计
4.5 温湿度检测模块子流程
4.6 WiFi模块子流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 环境参数监测及显示功能测试
5.3 时钟与窗帘控制功能测试
5.4 人体感应与报警功能测试
5.5 远程控制与联动功能测试
5.6 按键设置与手动控制功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!