设计说明书
总字数:16000+
本文设计并实现了一款基于STM32的智能晾衣架系统,旨在解决传统晾衣架智能化程度低、功能单一的问题。系统以STM32F103C8T6单片机为核心控制器,集成了光照检测模块(GL5516光敏电阻)、温湿度检测模块(DHT11传感器)、红外遥控模块(VS1838)、语音识别模块(SU-03T)、OLED显示模块以及步进电机驱动模块,实现了手动与自动双模式控制。在自动模式下,系统能够根据环境光照强度和湿度变化自动控制晾衣架的伸缩,并通过语音播报实时状态;在手动模式下,用户可通过红外遥控或按键灵活设置参数阈值,满足个性化需求。
系统采用模块化方案,通过对比分析选用了性价比高的传感器和执行器件。例如,选择DHT11传感器满足家用温湿度检测需求,选用OLED显示屏实现低功耗高清晰度的信息显示。软件设计采用分层架构,主程序通过初始化、数据采集、逻辑判断和控制输出四个步骤实现功能闭环,并通过独立子程序处理按键、显示、传感器数据解析等任务。测试结果表明,系统在光照阈值和湿度阈值下均能准确响应,能根据天气环境变化自动控制晾衣架关闭,语音控制以及红外遥控功能能正常实现。
本设计的创新点在于融合了多模态交互方式和环境自适应功能,解决了传统晾衣架无法应对突发天气变化的痛点。
关键词:单片机;传感器;模块
This paper designs and implements an intelligent clothes hanger system based on STM32, aiming to address the low level of intelligence and limited functionality of traditional clothes hangers. The system employs the STM32F103C8T6 microcontroller as the core controller and integrates a light detection module (GL5516 photoresistor), a temperature and humidity detection module (DHT11 sensor), an infrared remote control module (VS1838), a voice recognition module (SU-03T), an OLED display module, and a stepper motor drive module. It achieves dual-mode control, both manual and automatic. In automatic mode, the system can extend or retract the clothes hanger based on ambient light intensity and humidity changes, while providing real-time status updates via voice broadcast. In manual mode, users can flexibly set parameter thresholds through infrared remote control or buttons to meet personalized needs.
The system adopts a modular design, selecting cost-effective sensors and actuators through comparative analysis. For example, the DHT11 sensor is chosen to meet household temperature and humidity detection requirements, while the OLED display ensures low power consumption and high-definition information presentation. The software design follows a layered architecture, with the main program achieving functional闭环 (closed-loop) through four steps: initialization, data acquisition, logical judgment, and control output. Independent subroutines handle tasks such as button input, display output, and sensor data parsing. The test results show that the system can respond accurately under the light threshold and humidity threshold, can automatically control the drying rack to close according to the weather environment changes, and the voice control and infrared remote control functions can be realized normally.
The innovation of this design lies in the integration of multi-modal interaction mode and environment adaptive function, which solves the pain point that traditional drying racks cannot cope with sudden weather changes.
Keywords:single-chip microcomputer; Sensor; module
第1章 引言
1.1 研究背景和意义
1.1.1 研究背景
1.1.2 研究意义
1.2 国内外研究现状
1.2.1 国内研究现状
1.2.2 国外研究现状
1.2.3 总结
1.3 主要内容和工作安排
第2章 系统需求分析以及总体设计
2.1系统需求分析
2.2 系统整体方案的设计
2.3 方案的选择
2.3.1 控制芯片的选择
2.3.2 红外接收模块的选择
2.3.3 光照检测模块的选择
2.3.4 湿度检测模块的选择
2.3.5 显示模块的选择
2.4 本章小结
第3章 智能晾衣架的硬件设计
3.1 STM32控制系统
3.2 语音识别和语音播报电路
3.2.1 语音识别电路
3.2.2语音播报电路
3.3 红外接收电路
3.4 光照检测电路
3.5 温湿度检测电路
3.6 OLED显示电路
3.7 本章小结
第4章 智能晾衣架的软件程序设计
4.1 系统软件的总体设计方案
4.2 系统主流程设计
4.3 独立按键
4.4 OLED显示流程设计
4.5 温湿度检测模块子流程设计
4.6 红外接收子流程设计
4.7 步进电机子流程设计
4.8 语言识别模块子流程设计
4.9 语音播报模块子流程设计
4.10 本章小结
第5章 系统功能测试
5.1 晾衣架测试整体平台
5.2 晾衣架手动遥控功能测试
5.2 晾衣架湿度变化自动控制晾衣架功能测试
5.3 光照变化自动控制晾衣架开关
5.4 语音控制晾衣架开关
5.5 按键设置光照和湿度阈值
5.6 本章小结
第6章 总结与展望
6.1工作总结
6.2 展望
参考文献
致谢
购买后可查看具体内容!