设计说明书
总字数:20000+
摘要
随着生活品质的提升和智能化生活理念的普及,家居环境的自动化、便捷化与健康化成为人们追求的重要方向。传统家居系统依赖人工操作,难以实时精准调控环境参数,也无法及时应对潜在的环境健康风险,因此,研发一套能自动监测、智能调控且便捷交互的智能家居控制系统具有重要现实意义。
本设计提出了一种基于 STM32F103C8T6 单片机的智能家居控制系统。系统核心功能包括:通过 DHT11 温湿度传感器实时检测室内温湿度值,当检测到温度低于预设最小值时,自动启动加热片(模拟地暖)进行升温;当湿度低于预设最小值时,自动开启雾化片(模拟加湿器)增加湿度;通过 SGP30 气体传感器检测室内 CO₂浓度,当浓度超过预设最大值时,系统立即触发声光报警,并驱动 ULN2003A 芯片控制四相五线步进电机(模拟窗户)开启通风;通过 5516 光照检测模块采集光照强度,当光照值高于预设最小值时,自动驱动步进电机(模拟窗帘)打开以利用自然光;用户可通过按键灵活设置温湿度、CO₂浓度、光照值等各项参数的阈值;系统通过 OLED 显示屏实时显示各项检测数据,方便用户直观查看;同时,借助 ECB02 蓝牙模块将检测数据传输至手机端,用户也可通过手机端远程控制地暖、加湿器、窗户、窗帘等各功能模块。
该智能家居控制系统的作用在于,为用户打造了一个自动化、智能化且可交互的家居环境。通过实时监测与自动调控,既能保障室内环境参数处于舒适健康范围,又能减少人工操作成本;手机端远程控制功能进一步提升了使用便捷性,有效提升用户的居住体验与生活质量。
关键词:STM32F103C8T6;智能家居;环境参数监测;智能调控;蓝牙通信
Design of Intelligent Home Control System Based on Single Chip Microcomputer
Abstract
With the improvement of quality of life and the popularization of intelligent living concepts, automation, convenience, and healthiness of home environments have become important directions pursued by people. Traditional home systems rely on manual operation, making it difficult to accurately regulate environmental parameters in real time and respond to potential environmental health risks in a timely manner. Therefore, developing an intelligent home control system that can automatically monitor, intelligently regulate, and interact conveniently is of great practical significance.
This design proposes an intelligent home control system based on STM32F103C8T6 microcontroller. The core functions of the system include: real-time detection of indoor temperature and humidity values through DHT11 temperature and humidity sensors. When the temperature is detected to be below the preset minimum value, the heating element (simulating underfloor heating) is automatically activated to increase the temperature; When the humidity is below the preset minimum value, automatically turn on the atomizer (simulating a humidifier) to increase the humidity; The indoor CO ₂ concentration is detected by the SGP30 gas sensor. When the concentration exceeds the preset maximum value, the system immediately triggers an audible and visual alarm and drives the ULN2003A chip to control the four phase five wire stepper motor (simulating a window) to open ventilation; Collecting light intensity through the 5516 light detection module, when the light value is higher than the preset minimum value, the stepper motor (simulating curtains) is automatically driven to open and utilize natural light; Users can flexibly set threshold values for various parameters such as temperature and humidity, CO ₂ concentration, and light intensity through buttons; The system displays various detection data in real-time through an OLED display screen, making it convenient for users to visually view; At the same time, with the help of ECB02 Bluetooth module, the detection data is transmitted to the mobile phone, and users can also remotely control various functional modules such as underfloor heating, humidifier, windows, curtains, etc. through the mobile phone.
The function of this smart home control system is to create an automated, intelligent, and interactive home environment for users. By real-time monitoring and automatic regulation, indoor environmental parameters can be ensured to be within a comfortable and healthy range, while reducing manual operation costs; The remote control function on the mobile phone further enhances the convenience of use, effectively improving users’ living experience and quality of life.
Keywords:STM32F103C8T6; Smart home; Environmental parameter monitoring; Intelligent regulation; Bluetooth communication
目 录
1 绪论
1.1 研究背景及意义
1.2 国内外研究现状
1.3 主要内容
2 系统总体方案设计
2.1系统总体设计
2.2 主要模块方案选择
3 系统硬件设计
3.1 总体硬件框架
3.2 主控模块电路设计
3.3 温湿度检测模块电路设计
3.4 CO₂浓度检测模块电路设计
3.5 光照检测模块电路设计
3.6 执行模块电路设计
3.7 显示模块电路设计
3.8 按键模块电路设计
3.9 声光报警模块电路设计
3.10 蓝牙通信模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 OLED显示流程设计
4.5 温湿度检测模块子流程
4.6 光照检测模块子流程设计
4.7 SGP30模块子流程设计
4.8 蓝牙模块子流程
4.9 步进电机子流程
4.10 声光报警模块子流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 温湿度检测与执行控制功能测试
5.3 CO₂浓度检测与声光报警及窗户控制功能测试
5.4 光照检测与窗帘控制功能测试
5.5 按键阈值设置功能测试
5.6 蓝牙通信与手机端控制功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!