设计说明书
总字数:16000+
摘要
随着人们对睡眠质量重视程度的提升,打造舒适、健康的睡眠环境成为重要需求。传统枕头功能单一,无法满足个性化睡眠管理需求,如睡眠定时提醒、环境温湿度调节、个性化音乐助眠等功能的缺失,可能影响睡眠体验与健康。因此,研发一款集成多种智能功能的睡枕具有重要现实意义。
本设计提出一种基于 STM32F103C8T6 单片机的智能睡枕系统。系统主要功能包括:通过 DS1302 时钟模块获取当前时间,当定时时间到达时,控制电机微微转动实现轻柔提醒;借助 DHT11 模块监测环境温湿度,当检测到温度较高时,自动通过继电器开启制冷功能;支持设置 DFPlayer Mini 音乐模块的播放时间,时间到达后自动关闭音乐;通过按键可实现界面切换、闹钟设置、定时音乐播放时间调整,以及通过 ULN2003A 驱动步进电机调节枕头高低,另设独立按键控制按摩功能的启停;OLED 显示屏实时显示时间、温湿度、设备状态等数据;通过 WiFi 模块将检测数据上传至手机端,支持远程控制制冷开关、音乐播报开关及闹钟设置。
该智能睡枕的作用在于构建了 “环境调节 – 定时管理 – 交互控制” 的一体化睡眠辅助体系。通过精准的定时提醒与环境调节,营造舒适睡眠环境;多样化的按键操作与远程控制功能,满足用户个性化使用需求;音乐播放与按摩功能进一步提升睡眠舒适度。为用户提供了便捷、智能的睡眠管理解决方案,助力改善睡眠质量。
关键词:智能睡枕;STM32;睡眠辅助;环境监测;远程控制
Design and Implementation of Intelligent Sleep Pillow
Abstract
With the increasing emphasis on sleep quality, creating a comfortable and healthy sleeping environment has become an important demand. Traditional pillows have a single function and cannot meet the needs of personalized sleep management. The lack of functions such as sleep timing reminders, environmental temperature and humidity regulation, and personalized music sleep assistance may affect the sleep experience and health. Therefore, developing a sleep pillow that integrates multiple intelligent functions has significant practical significance.
This design proposes an intelligent sleeping pillow system based on STM32F103C8T6 microcontroller. The main functions of the system include: obtaining the current time through the DS1302 clock module, and when the scheduled time arrives, controlling the motor to rotate slightly to achieve gentle reminders; By using the DHT11 module to monitor environmental temperature and humidity, when a high temperature is detected, the cooling function is automatically activated through a relay; Support setting the playback time of DFPlayer Mini music module, and automatically turn off the music when the time is up; Interface switching, alarm setting, timed music playback time adjustment can be achieved through buttons, as well as adjusting pillow height through ULN2003A driven stepper motor. An independent button is also set to control the start and stop of massage function; OLED display screen displays real-time data such as time, temperature and humidity, equipment status, etc; Upload detection data to the mobile phone via WiFi module, supporting remote control of cooling switch, music playback switch, and alarm setting.
The function of this intelligent sleep pillow is to build an integrated sleep assistance system of “environment regulation timing management interactive control”. Create a comfortable sleeping environment through precise timing reminders and environmental adjustments; Diversified button operations and remote control functions to meet users’ personalized usage needs; The music playback and massage functions further enhance sleep comfort. Providing users with convenient and intelligent sleep management solutions to help improve sleep quality.
Keywords:intelligent sleeping pillow; STM32; Sleep assistance; 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 WiFi 模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 OLED显示子流程设计
4.4 独立按键子流程设计
4.5 ADC模数转换子流程设计
4.6 温湿度检测模块子流程设计
4.7 步进电机子流程设计
4.8 MP3音乐播放模块子流程设计
4.9 时钟模块子流程设计
4.10 WiFi模块子流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 时钟与定时提醒功能测试
5.3 温湿度检测与制冷控制功能测试
5.4 音乐播放与定时关闭功能测试
5.5 按键与步进电机调节功能测试
5.6 显示功能测试
5.7 WiFi 通信与远程控制功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!