设计说明书
总字数:20000+
摘要
随着智能家居理念的普及与生活品质的提升,家居环境的自动化调节与远程管控成为人们追求便捷生活的重要需求。温湿度失衡、光照不适、空气质量不佳等问题,不仅影响居住舒适度,长期还可能对健康产生潜在影响;而传统家居设备需手动操作,难以实现实时响应与远程管理,无法满足现代家庭对智能化、便捷化的需求。因此,研发一套能自动监测环境参数、智能控制设备且支持远程交互的智能家居控制系统,具有重要的现实意义。
本设计提出一种基于 STM32F103C8T6 单片机的智能家居控制系统。系统主要功能包括:通过 DHT11 温湿度检测模块采集环境温湿度,当检测值大于预设最大值时,控制继电器驱动风扇开启;借助 5516 光照检测模块获取光照强度,当光照大于预设最小值时,通过 ULN2003A 驱动步进电机控制窗帘打开,反之则关闭;利用 MQ-135 空气质量传感器监测空气质量,当检测值超出预设最大值时,继电器驱动净化器工作;支持通过按键本地设置温湿度最大值、空气质量最大值、光照最小值,同时可手动控制风扇、窗帘、净化器的开关;通过 OLED 显示屏实时显示传感器检测数据、预设阈值、窗帘开关状态及设备控制模式;此外,系统通过 ESP8266-12F WiFi 模块将检测数据上传至阿里云,阿里云平台可下发指令远程控制各设备开关。
该智能家居控制系统的作用在于,为用户打造了一体化的智能家居管理方案。通过自动监测与智能控制,实现家居环境的实时调节,提升居住舒适度;本地按键与远程云平台双端控制,满足用户多样化操作需求,为生活带来便捷;同时,实时数据监测与设备管控,助力用户科学管理家居设备,降低能源消耗,推动家居生活向智能化、低碳化发展。
关键词:STM32;智能家居;环境监测;自动控制;远程交互
Design of Intelligent Home Control System Based on Single Chip Microcomputer
Abstract
With the popularization of smart home concepts and the improvement of quality of life, the automation and remote control of home environments have become important demands for people to pursue convenient living. Problems such as temperature and humidity imbalance, inadequate lighting, and poor air quality not only affect living comfort, but may also have potential long-term health impacts; However, traditional home devices require manual operation, making it difficult to achieve real-time response and remote management, and unable to meet the modern home’s demand for intelligence and convenience. Therefore, developing a smart home control system that can automatically monitor environmental parameters, intelligently control devices, and support remote interaction has important practical significance.
This design proposes an intelligent home control system based on STM32F103C8T6 microcontroller. The main functions of the system include: collecting environmental temperature and humidity through the DHT11 temperature and humidity detection module, and when the detection value is greater than the preset maximum value, controlling the relay to drive the fan to turn on; By using the 5516 light detection module to obtain the light intensity, when the light is greater than the preset minimum value, the ULN2003A drives the stepper motor to control the curtains to open, otherwise they will close; Using MQ-135 air quality sensor to monitor air quality, when the detection value exceeds the preset maximum value, the relay drives the purifier to work; Support local setting of maximum temperature and humidity, maximum air quality, and minimum lighting through buttons, and manual control of fan, curtain, and purifier switches; Real time display of sensor detection data, preset threshold, curtain switch status, and device control mode through OLED display screen; In addition, the system uploads the detection data to Alibaba Cloud through the ESP8266-12F WiFi module, and the Alibaba Cloud platform can issue instructions to remotely control the on/off of each device.
The function of this smart home control system is to create an integrated smart home management solution for users. Through automatic monitoring and intelligent control, real-time adjustment of the home environment is achieved to enhance living comfort; Dual end control of local buttons and remote cloud platform, meeting users’ diverse operational needs and bringing convenience to life; At the same time, real-time data monitoring and device control help users scientifically manage home devices, reduce energy consumption, and promote the development of smart and low-carbon home life.
Keywords:STM32; Smart home; Environmental monitoring; Auto-Control; remote interaction
目 录
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 WiFi 通信模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 温度检测模块子流程
4.5 OLED显示流程设计
4.6 WiFi模块子流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 环境检测与显示功能测试
5.3 设备智能控制功能测试
5.4 按键本地操作功能测试
5.5 WiFi 远程通信功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!