1、红外感光智能LED台灯设计(此文档为word格式,下载后您可任意编辑修改!)本科毕业论文(设计) 题 目: 红外感光智能LED台灯 学 校: 山东科技大学 院 系: 机械电子工程学院 专 业: 机械设计制造及其自动化 摘要 随着社会的进步,人们生活水平日益提高,追逐高质量生活已经成了当下的主题。智能化产品更是当下的发展趋势。为了满足人们高质量生活的诉求,现设计一种红外感光智能LED台灯,该产品可以克服普通台灯不能根据环境光强自动调节光的亮度的问题,使得使用者有更舒适的体验,并且能在一定程度上保护人眼,且比较节能。 本次设计的内容基于单片机控制,使得该台灯具有人体感应,自动根据环境光强度自动调节
2、台灯亮度,同时为了满足使用者的某些特殊要求,该台灯还设有手动调节功能,台灯的控制分为台灯按键控制和红外遥控控制两种,这使得台灯的控制更加方便,灵活。 本次设计包括硬件部分和软件部分,硬件电路的核心是由单片机的控制模块,PCF8591+光敏电阻的自动调光模块,HC-SR501人体感应模块,HS0038遥控红外接收模块,红外遥控器,LED发光电路共同组成,软件采用比较灵活的C语言进行编程,进而对硬件电路进行有效控制。关键字:单片机;HC-SR501;自动调光模块;HS0038;红外遥控器ABSTRACT With the social progress and theimprovement of
3、living standards,pursuing order to meet thedemands ofpeopleof an infraredphotosensitiveinligent LED lamp in this design.The product can overcome the question of the common desk lamp can not automatically adjust the brightness according to the environmental light intensity,which allows the users to g
4、et more comfortable experience and can protect the in a certain extent and more energy-efficient. The content of this design is based on the control of MCU .It makes the lampwith the function of body induction, automatically adjust the lamp brightness according to the ambient light intensity,.And in
5、 order to meet some special requirements of the users, the lamp is also provided with a manual adjustment function.The control of lamp includes the key control and the infrared remote control.which makes the lamp control more convenient and flexible. The design includes body induction module, HS0038
6、 infrared remote control receiving module, infrared remote controller, the LED luminous circuit composed. The software uses flexible C language programming to get the effective control of the () uint8 jj=0; while(1) sweep(); if(mode=0)&(ii=0) if(; uint8 byte=0; SDA=1; for(n=0;n8;n+) SCL=0; _nop_();
7、_nop_(); _nop_(); _nop_(); _nop_(); SCL=1; _nop_(); _nop_(); byte=1; if(SDA=1) byte=byte+1; _nop_(); _nop_(); SCL=0; _nop_(); return(byte); void Ack_I2c(uint8 a) *判断是否非应答信号* if(a=0) SDA=0; else SDA=1; _nop_(); _nop_(); _nop_(); SCL=1; _nop_(); _nop_(); _nop_(); _nop_(); _nop_(); SCL=0; _nop_(); _nop
8、_(); void writeIIC(uint8 x,uint8 y) *写两个IIC字节* iicstart(); iicsendbyte(x); if(ack=0) return; iicsendbyte(y); if(ack=0) return; iicstop(); uint8 readIIC(uint8 z) *读取模数转化信号* uint8 bb; iicstart(); iicsendbyte(z+1); if(ack=0) return(0); bb=iicreadbyte(); Ack_I2c(1); iicstop(); return(bb); void delay() *
9、延时函数* uint16 dd; uint8 ee; for(ee=0;ee40;ee+) for(dd=0;dd500;dd+) sweep(); writeIIC(0x90,0x41); aa=readIIC(0x90); select(); void sweep() *遥控+按键扫描* uint8 jj=0,i1,i2,cs=0; while(cs+)4608)&(temp1=0xf0)&(aa=0xe0)&(aa=0xd0)&(aa=0xc0)&(aa=0xb0)&(aa=0xa0)&(aa=0x90)&(aa=0x80)&(aa=0x70)&(aa=0x60)&(aa=0x50)&(aa=0x40)&(aa=0x00)&(aa=0x3f) P0=0xff; P2=0xff; 参考文献1:秦曾煌 主编.电工学(第七版);高等教育出版社,2009.09 2: 沙占友 孟志永 王彦朋单片机外围电路设计(第2版);电子工业出版社,2006.3:刘娟 梁卫文 程莉 等单片机C语言与PROTUES仿真技能实训;中国电力出版社 2010.08 4
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1