摘 要
本文聚焦于基于 Arduino 的智能台灯设计,采用模块化设计与软件仿真方法。系统在软件逻辑层面划分为光照模拟、感应判断和模式控制三个核心模块。光照模拟模块接收环境光强数值并执行匹配算法;感应判断模块依据“有人/无人”状态信号编写延时关闭逻辑;模式控制模块处理“手动/自动”模式切换,确保手动模式优先。通过绘制系统控制流程图,清晰呈现各部分逻辑关系。在实现阶段,利用 Arduino IDE 开发软件,编写自动调光(光强 <200 用高亮,200 - 500 用中亮,>500 用低亮)和感应控制(有人开灯,无人超 30 秒关灯)等关键算法。该设计综合运用传感器技术、自动控制理论与嵌入式编程知识,旨在提升照明舒适度、实现节能目标。以 Arduino 单片机为核心,结合超声波传感器、光敏传感器及蓝牙技术,实现黑暗灯亮与人走灯灭功能,互不干扰。采用锂电池供电,便于携带,通过采集光敏电阻电压和蓝牙控制,有效实时调控 LED 灯。此设计具有重要教学意义,能锻炼学生综合能力,为未来从事智能控制领域工作奠定基础。
关键词:Arduino;智能台灯;模块化设计;自动调光;人体感应
Abstract
This paper focuses on the design of an intelligent desk lamp based on Arduino, employing a modular design and software simulation approach. The system is divided into three core modules at the software logic level: light simulation, sensing judgment, and mode control. The light simulation module receives ambient light intensity values and executes a matching algorithm; the sensing judgment module writes a delay shutdown logic based on the "occupied/unoccupied" status signals; the mode control module handles the "manual/automatic" mode switching, ensuring the priority of the manual mode. By drawing a system control flowchart, the logical relationships among various parts are clearly presented. During the implementation phase, Arduino IDE is used for software development, and key algorithms such as automatic dimming (high brightness when light intensity < 200, medium brightness between 200 - 500, and low brightness when > 500) and sensing control (turn on the lamp when occupied and turn it off after 30 seconds when unoccupied) are written. This design comprehensively applies sensor technology, automatic control theory, and embedded programming knowledge, aiming to improve lighting comfort and achieve energy-saving goals. With an Arduino microcontroller as the core, combined with ultrasonic sensors, photosensitive sensors, and Bluetooth technology, it realizes the functions of turning on the lamp in darkness and turning it off when people leave, without interfering with each other. It is powered by a lithium battery for portability. By collecting the voltage of the photosensitive resistor and using Bluetooth control, it effectively and real-time regulates the LED lamp. This design has significant teaching implications, can exercise students' comprehensive abilities, and lay a solid foundation for future work in the field of intelligent control.
Keywords:Arduino; Intelligent Desk Lamp; Modular Design; Automatic Dimming; Human Body Sensing
目 录
摘 要
Abstract
1 引言
1.1 研究智能台灯的意义和目的
1.2 国内外发展现状
1.2.1国内发展现状
1.2.2国外发展现状
1.2.3国内外发展现状对比与机遇分析
1.3 本文研究主要内容
2 产品的设计方案
2.1 产品的所实现功能
2.2 总体结构设计
2.3 电路元器件的选择
2.3.1 ARDUINO Mega2560单片机
2.3.2 超声波测距模块
2.3.3 光敏电阻传感器
2.3.4 蓝牙模块
3 硬件电路设计
3.1 电源电路
3.2 通信电路
3.3 复位电路
3.4 传感器检测电路
3.5 光检测电路
4 软件程序设计
4.1 总体设计流程图
4.2 主程序流程图
4.3 超声波和光敏电阻控制程序
4.4 蓝牙控制程序
5 系统的测试和调试
5.1 概况
5.2 注意事项
6 总结与展望
6.1总结
6.2展望
致 谢
参考文献
附 录





















