设计说明书
总字数:18000+
摘要
随着人们生活与学习方式的转变,长时间近距离使用台灯已成为常态,而不良坐姿与不适宜的光照环境,不仅易导致视力下降,还可能引发颈椎腰椎问题,严重影响身体健康。当前普通台灯多仅具备基础照明功能,无法根据环境光照自动调节亮度,也缺乏坐姿提醒与定时休息警示,难以满足用户对健康用灯的需求。因此,研发一款兼具智能光照调节、坐姿监测与定时提醒功能的多功能台灯十分必要。
本设计提出一种基于 STM32F103C8T6 单片机的多功能台灯。系统主要功能包括:通过 HC-R04 超声波模块检测台灯与人的距离;借助 5516 光照模块采集环境光照值;当检测距离小于设置最大值(判定有人)时,若光照值小于设置最大值,自动开启 LED 灯光,且光照值在最大值与最小值之间时,根据光照强度自动调节灯光亮度,光照值小于设置最小值时,灯光调整为最大亮度;当检测距离小于设置最小值(判定坐姿异常)时,通过 CN-TTS 语音模块发出 “请注意坐姿” 的提醒;当检测到有人时,系统自动开始计时,计时达到设置时间后,通过 CN-TTS 语音模块提醒 “请注意休息”;用户可通过按键设置距离、光照、计时等各参数阈值,也可手动调节灯光亮度及切换工作模式;通过 OLED 显示屏实时显示距离、光照值、计时时长及灯光亮度等测量数据。
该多功能台灯的作用在于,为用户提供了一款集智能照明、健康监测与提醒于一体的用灯设备。通过自动调节光照亮度,可营造舒适的视觉环境,减少视力损伤;坐姿与定时休息提醒能帮助用户养成良好习惯,预防颈椎腰椎问题,全方位保障用户健康,提升生活与学习质量。
关键词:STM32F103C8T6;多功能台灯;超声波距离检测;光照调节;语音提醒
Design of Multi functional Desk Lamp Based on Single Chip Microcomputer
Abstract
With the changes in people’s lifestyles and learning styles, using desk lamps in close proximity for long periods of time has become the norm. Poor sitting posture and unsuitable lighting environment not only lead to vision loss, but also may cause cervical and lumbar spine problems, seriously affecting physical health. Currently, most ordinary desk lamps only have basic lighting functions and cannot automatically adjust brightness according to ambient lighting. They also lack sitting posture reminders and scheduled rest warnings, making it difficult to meet users’ needs for healthy lighting. Therefore, it is necessary to develop a multifunctional desk lamp that combines intelligent lighting adjustment, sitting posture monitoring, and timed reminder functions.
This design proposes a multifunctional desk lamp based on STM32F103C8T6 microcontroller. The main functions of the system include: detecting the distance between the desk lamp and a person through the HC-R04 ultrasonic module; Collect ambient light values using the 5516 lighting module; When the detection distance is less than the set maximum value (indicating the presence of someone), if the lighting value is less than the set maximum value, the LED light will automatically turn on. When the lighting value is between the maximum and minimum values, the brightness of the light will be automatically adjusted according to the lighting intensity. When the lighting value is less than the set minimum value, the light will be adjusted to the maximum brightness; When the detection distance is less than the set minimum value (to determine abnormal sitting posture), a reminder of “Please pay attention to sitting posture” will be issued through the CN-TTS voice module; When someone is detected, the system automatically starts timing. When the timing reaches the set time, the CN-TTS voice module reminds’ Please pay attention to rest ‘; Users can set various parameter thresholds such as distance, lighting, timing, etc. by pressing buttons, and can also manually adjust the brightness of the lights and switch working modes; Real time display of distance, lighting value, timing duration, and light brightness measurement data through OLED display screen.
The function of this multifunctional desk lamp is to provide users with a lighting device that integrates intelligent lighting, health monitoring, and reminders. By automatically adjusting the brightness of the lighting, a comfortable visual environment can be created to reduce visual impairment; Sitting posture and scheduled rest reminders can help users develop good habits, prevent cervical and lumbar spine problems, comprehensively ensure user health, and improve the quality of life and learning.
Keywords:STM32F103C8T6; Multi functional desk lamp; Ultrasonic distance detection; Light regulation; Voice reminder
目 录
1 绪论
1.1 研究背景及意义
1.2 国内外研究现状
1.3 主要内容
2 系统总体方案设计
2.1系统总体设计
2.2 主要模块方案选择
3 系统硬件设计
3.1 总体硬件框架
3.2 主控模块电路设计
3.3 距离检测模块电路设计
3.4 光照检测模块电路设计
3.5 LED 灯光控制模块电路设计
3.6 语音提醒模块电路设计
3.7 显示模块电路设计
3.8 按键模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 OLED显示流程设计
4.5超声波检测模块子流程
5 实物制作与功能测试
5.1 实物制作
5.2 距离与光照检测及 OLED 显示功能测试
5.3 LED 灯智能调光功能测试
5.4 坐姿异常语音提醒功能测试
5.5 定时休息语音提醒功能测试
5.6 按键阈值设置功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!