news 2026/3/4 3:21:19

【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/2/27 14:24:59

2026年软件测试公众号热度全景:专业洞察与行动指南

软件测试公众号在2026年已成为从业者获取行业动态的核心渠道,热度内容集中于解决实际痛点(如效率瓶颈、安全风险),并以专业深度驱动流量增长。本文基于最新数据,解析三大爆款内容类型,并以“手动验证”为案…

作者头像 李华
网站建设 2026/3/3 0:46:03

好写作AI:论文政策建议不再“假大空”,AI教你写出一针见血的方案!

当你的政策建议部分写得像政府工作报告摘抄,连自己看了都想点“下一页跳过”时——是时候请AI这位“策略军师”出山了。 张明对着论文最后一章“政策建议”发了半小时呆,写出来的句子仿佛是从十年前教科书里穿越来的:“应加强监管…需完善体系…

作者头像 李华
网站建设 2026/3/4 3:09:54

SGMICRO圣邦微 SGM2205-3.3XKC3G/TR SOT-223-3 线性稳压器(LDO)

特性宽工作输入电压范围:2.5V至20V固定输出电压:1.8V、2.5V、3.0V、3.3V、3.6V、4.2V、5.0V和12V可调输出电压范围:1.8V至15V输出电压精度:25C时为1%低压差:800mA时典型值为450mV电流限制和热保护出色的负载和线性瞬态…

作者头像 李华
网站建设 2026/3/4 3:09:53

Infineon英飞凌 IR2085STRPBF SOIC-8 栅极驱动芯片

特性简单的初级侧控制解决方案,可用于48V分布式系统的半桥直流母线转换器,减少元件数量和电路板空间集成50%占空比振荡器和半桥驱动IC于单个SO - 8封装中可编程开关频率,每通道最高可达500kHz具备/- 1A驱动电流能力,针对低电荷MOS…

作者头像 李华
网站建设 2026/2/28 22:33:29

我用的是 Arch BTW”到底算不算吹牛?

在 Linux 圈子里,有一句话几乎已经成了文化符号: “I use Arch BTW.” 它既是炫耀,也是自嘲; 既是身份认同,也是社区玩梗。 但问题来了—— 如果你用的是 EndeavourOS、CachyOS、Manjaro,甚至是装了 Archinstall 的 Arch,那你到底“配不配”说这句话? 这看似是个玩…

作者头像 李华
网站建设 2026/3/1 12:17:12

AI工具评测:效率革命的实战地图

2026年自动化测试领域迎来AI深度整合,工具评测类内容占据流量榜首。爆款核心在于量化对比与场景化解决方案: 性能实测数据驱动决策:热门文章通过横向评测Selenium智能插件与Cypress云环境适应性(如API超时自愈率提升35%&#xff0…

作者头像 李华