网学网自动化PLC相关毕业设计编辑为广大网友搜集整理了:基于AVR单片机的LED自适应调光绩等信息,祝愿广大网友取得需要的信息,参考学习。
论文编号:ZD1173 论文字数:20389,页数:55
基于AVR单片机的LED自适应调光传感系统
摘要
随着LED照明技术的发展,对LED自适应调光技术的需求更加强烈。本文以AVR单片机中的ATmeage16作为控制器,利用基于I2C(Inter Integrated Circuit)总线的光传感芯片TSL2561采集室内环境光照度,采用脉宽调制(Pulse Width Modulation-PWM)方式调节LED恒流驱动IC(BP2808、LM3404HV、LM3402HV等可根据功率需要选择),进而调节LED的发光亮度,最终维持室内环境光照度在一个设定的水平。同时利用红外人体感应模块采集室内人体信号,实现LED灯开启和关断的智能控制。再利用单总线技术的DS18B20温度传感器采集室内温度和使用LCD1602液晶屏实现室内照度和温度的实时显示,再加按键实现LED亮度的手动控制,最后使用串口通信实现与上位PC的实时通信与控制。本文完成了整套系统的硬件设计和软件编程,重点介绍了ATmeage16通过I2C总线读取光传感器芯片TSL2561数据、传感器数据转换为实际的室内环境照度、PWM信号生成和输出、DS18B20的通讯。
关键词:ATmeage16 TSl2561 PWM LED调光
AVR microcontroller based adaptive dimming LED sensor system
ABSTRACT
With the development of LED lighting technology,adaptive LED dimming technology for the needs of even more intense. In this paper, the ATmeage16 AVR microcontroller as a controller,based I2C (Inter Integrated Circuit) bus, light sensing chip TSL2561 acquisition indoor illumination。Using pulse width modulation (Pulse Width Modulation-PWM) LED constant current drive mode regulator IC (BP2808, LM3404HV, LM3402HV so can the power to choose), then adjust the LED''s brightness, final light intensity of the indoor environment to maintain a specified level. The human body using infrared sensor module also collected indoor body signal, LED lights turn on and off the intelligent control. Reuse of single-bus technology DS18B20 temperature sensor acquisition and use of the indoor temperature LCD1602 LCD indoor illumination and temperature to achieve real-time display, together to achieve LED brightness button manual control, Together to achieve LED brightness button manual control, and finally use the Serial Communication with the host PC for real-time communication and control. This complete package of hardware and software design, focusing on the ATmeage16 through the I2C bus to read optical sensor chip TSL2561 data, sensor data is converted to the actual illumination of the indoor environment, PWM signal generation and output, DS18B20 communications.
Key Words:ATmeage16 TSl2561 PWM LED dimming
目 录
摘要 I
ABSTRACT II
前 言 1
1主要功能及流程说明 2
1.1主要功能 2
1.2系统流程图 2
2 LED自适应调光温度传感系统的硬件设计 3
2.1 AVR单片机的硬件连接及介绍 3
2.2 TSL2561光强传感器的硬件连接及介绍 4
2.3 DS18B20温度传感器的硬件连接及介绍 5
2.4 PWM波形的发生及恒流IC的输出 6
2.4.1 PWM波形发生 6
2.4.2 恒流IC—BP2808 8
2.5 LCD1602液晶显示的链接及介绍 11
2.6 红外人体感应模块介绍 14
2.7 串口通讯及外部控制中断 16
3 LED自适应调光温度传感系统的软件设计 18
3.1 AVR单片机内部中断、 I/O设置及PWM发生 18
3.2 TSL2561的I2C通讯及照度的计算 24
3.3 DS18B20的单总线连接及温度转换 30
3.4 LCD1602的通讯及显示 34
3.5 串口通讯的软件设计 38
3.6系统条件判断及模糊控制软件编写 43
4系统总体设计介绍 44
4.1 系统性能特点说明 44
4.2 系统总体电路图 44
5 设计总结及心得体会 45
参考文献 46
附 录 47
致 谢 51