news 2026/7/25 6:54:18

【dz-691】基于单片机的智能台灯设计

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
【dz-691】基于单片机的智能台灯设计

摘要

传统台灯多依赖手动开关与固定亮度调节,存在照明按需匹配不足、节能性欠佳及操作便捷性有限等问题,难以满足现代生活中智能化、个性化的照明需求。​

基于 STM32F103C8T6 单片机的智能台灯测控系统,整合了 D203S 人体红外传感器、5516 光照检测模块、红外避障模块、DS1302 时钟模块、按键、OLED 显示屏、ECB02 蓝牙模块及执行设备(台灯光源、蜂鸣器),实现了台灯的自动化感知与智能调控。系统核心功能包括:通过 D203S 实时检测周围是否有人,作为台灯开关的基础判断依据;借助 5516 检测光照强度,当光照值大于设置最大值时台灯熄灭,光照值小于最大值且有人时台灯低亮度,光照值低于最小值且有人时台灯高亮度;利用红外避障模块检测人是否靠近,检测到靠近时台灯转为微光;通过 DS1302 获取时间,支持按键修正时间,可设置开灯计时,到达计时时间蜂鸣器提醒 2 秒;支持通过按键设置光照最大最小值、切换自动控制灯亮度模式及手动调节;通过 OLED 显示屏实时显示各项检测数据、时间及设备状态;利用蓝牙模块将数据同步至手机端,实现远程监测与亮度调节、模式切换。​

该系统有效提升了台灯使用的智能化与便捷性,实现了照明的按需调控,兼顾节能与使用舒适度,为智能照明设备的研发提供了参考,具有较高的实际应用价值。

关键词:STM32F103C8T6;智能台灯;测控系统;传感器;智能调控;蓝牙通信

ABSTRACT

Traditional table lamps mostly rely on manual switches and fixed brightness adjustment, which have problems such as insufficient on-demand matching of lighting, poor energy efficiency, and limited operational convenience, making it difficult to meet the intelligent and personalized lighting needs in modern life.​

The intelligent table lamp measurement and control system based on the STM32F103C8T6 microcontroller integrates the D203S human infrared sensor, 5516 light detection module, infrared obstacle avoidance module, DS1302 clock module, buttons, OLED display, ECB02 Bluetooth module, and executive devices (table lamp light source, buzzer), realizing automatic sensing and intelligent control of the table lamp. The core functions of the system include: real-time detection of whether there is a person around through D203S, which serves as the basic judgment basis for the table lamp switch; detection of light intensity with 5516, when the light value is greater than the set maximum value, the table lamp turns off; when the light value is less than the maximum value and there is a person, the table lamp is at low brightness; when the light value is lower than the minimum value and there is a person, the table lamp is at high brightness; using the infrared obstacle avoidance module to detect whether a person is approaching, and when a person is detected approaching, the table lamp turns to dim light; obtaining time through DS1302, supporting time correction through buttons, setting the lamp-on timing, and the buzzer will remind for 2 seconds when the timing time is reached; supporting the setting of maximum and minimum light values, switching the automatic control of lamp brightness mode and manual adjustment through buttons; real-time display of various detection data, time and equipment status through the OLED display; using the Bluetooth module to synchronize data to the mobile phone, realizing remote monitoring and equipment control (brightness adjustment, mode switching).​

This system effectively improves the intelligence and convenience of table lamp use, realizes on-demand control of lighting, takes into account energy saving and use comfort, provides a reference for the research and development of intelligent lighting equipment, and has high practical application value.

Keywords:STM32F103C8T6; intelligent table lamp; measurement and control system; sensor; intelligent control; Bluetooth communication

目录

第1章 绪论

1.1 研究的目的及意义

1.2 国内外发展情况

1.3 本文主要研究内容

第2章 设计思路与方案论证

2.1 主要元器件选择

2.1.1 主控芯片选择

2.1.2 人体红外传感器选择

2.1.3 光照检测模块选择

2.1.4 红外避障模块选择

2.1.5 时钟模块选择

2.1.6 显示模块选择

2.1.7 蓝牙模块选择

2.2整体设计方案

第 3 章 硬件设计

3.1 主控电路模块

3.2 人体红外传感器电路

3.3 光照检测模块电路

3.4 红外避障传感器电路

3.5 时钟模块电路

3.6 显示模块电路

3.7 蓝牙模块电路

3.8 按键模块电路

3.9 执行设备驱动电路

第4章 系统程序设计

4.1 编程软件介绍

4.2 系统主流程设计

4.3 独立按键

4.4 OLED显示流程设计

4.5 LED灯亮度调节子流程设计

4.6 时钟模块子流程设计

4.7 蓝牙模块子流程

第 5 章 实物测试

5.1 整体实物测试

5.2 人体红外传感器功能测试

5.3 光照检测与亮度调节功能测试

5.4 红外避障与靠近感应功能测试

5.5 时钟与定时提醒功能测试

5.6 蓝牙模块功能测试

5.7 按键设置与显示功能测试

5.8 综合模式运行测试

第6章 总结与展望

致谢

参考文献

附录

附录一:原理图

附录二:PCB

附录三:主程序

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/7/24 22:20:47

【小程序毕设源码分享】基于springboot+小程序的私家车位共享系统的设计与实现(程序+文档+代码讲解+一条龙定制)

博主介绍:✌️码农一枚 ,专注于大学生项目实战开发、讲解和毕业🚢文撰写修改等。全栈领域优质创作者,博客之星、掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java、小程序技术领域和毕业项目实战 ✌️技术范围:&am…

作者头像 李华
网站建设 2026/7/23 2:54:14

好写作AI:答辩“求生”演习——AI模拟提问帮你提前拆招!

想象一下,当答辩老师推着眼镜,缓缓问出那个你完全没准备的问题时,时间仿佛静止了——这种“学术公开处刑”的恐惧,现在可以提前化解了。 距离答辩还有三天,陈默对着镜子练习了二十遍开场白,却依然心慌得像个…

作者头像 李华
网站建设 2026/7/20 20:45:24

构建区域创新生态,实现科技成果转化的高效路径

在全球经济竞争日益激烈的背景下,科技创新已成为推动区域经济发展的重要引擎。然而,在实际操作中,科技成果转化却面临诸多瓶颈问题。科技成果供需信息不对称、转化渠道不畅以及专业化服务能力不足等问题,严重制约了科技成果转化的…

作者头像 李华
网站建设 2026/7/20 20:25:05

Prompt脱敏——不损失(或尽量少损失)原文本语义和上下文价值的前提下,防止原始敏感数据暴露给模型服务方、潜在的攻击者或出现在模型训练数据中

核心定义 Prompt脱敏 是指在将包含敏感或隐私信息的文本(即Prompt,提示词)提交给大型语言模型进行处理之前,通过技术手段识别并处理掉这些敏感信息,以确保数据安全和隐私合规。 其核心目标是在不损失(或尽…

作者头像 李华
网站建设 2026/7/23 4:54:57

利用API技术解析公众号内容热度的专业指南

在内容驱动的数字时代,公众号运营者亟需数据驱动决策,以精准识别高热度内容。本文从软件测试从业者的专业视角出发,详细阐述如何通过API接口调用获取公众号数据,并结合算法解析热度趋势。全文分为三部分:API调用实操步…

作者头像 李华
网站建设 2026/7/21 14:31:41

2026年软件测试公众号热度全景:专业洞察与实战案例

软件测试公众号内容在2026年呈现“专业化场景化”趋势,热度最高的文章聚焦解决从业者实际痛点,阅读量和分享率持续飙升。核心热度驱动因素包括可操作性指南、量化数据支撑和真实案例嵌入,而非泛理论化内容。本报告将解析三大热门内容类型&…

作者头像 李华