您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > 基于单片机的红外遥控电子密码锁设计
1摘要:目前大部分的锁都是机械式的,其最大的缺点是利用简单工具就能很容易地把锁打开,不安全。针对这种情况,设计了基于单片机AT89C52和红外线接收管的红外遥控密码锁,设计包含红外发射模块、红外接收模块和单片机处理模块。与一般的采用专用遥控编码和解码集成电路的设备不同,它具有安全可靠、成本低廉、连接方便,简单易用,应用范围广等特点,而且特别适合家庭,宾馆,仓库,私家车库等场所。红外遥控电子密码锁,主要分为遥控部分和主机部分。当从遥控器输入密码时,键盘向单片机发送外部中断,单片机识别按键号码并且将其编码后通过红外发光二极管发送到主机接收部分。主机接收部分的红外接收器接收到红外信号,将其整理放大之后通过串行口向单片机发送串行口中断,单片机得到串行中断信号将其解码还原成发射前的信号,之后验证密码,判断开锁还是报警。主机接收部分通过键盘的外部中断得到密码信号,无需红外遥控发射,可直接验证密码。同时主机部分还有修改密码的功能,倘若密码泄露可以及时更改密码。红外遥控电子密码锁其稳定的特点,安全的性能,便捷的操作方式和广泛的应用范围等使其具有良好的市场前景和发展空间。关键词:单片机;红外发射;红外接收;串行中断信号;密码修改DesignoftheInfraredRemoteControlElectronicLocksBasedonMCU2Abstract:Atpresent,mostofthelocksaremechanically,itsbiggestdrawbackistheuseofsimpletoolscaneasilyopenthelock,notverysafe.Inviewofthissituation,IdesignedtheinfraredremotecontrollocksbasedonmicrocontrollerAT89C52andtheinfraredreceivertube.Thedesignincludesaninfraredtransmittermodule,infraredreceivermoduleandmicrocontrollerprocessingmodule.Differentwiththededicatedremoteencodinganddecodingintegratedcircuitdevice,ithasasafe,reliable,lowcost,easytoconnect,easytouse,andawiderangeofapplications,andisparticularlysuitableforfamilies,hotels,warehouses,privategaragesandotherplaces.Theinfraredremotecontrolelectroniclocks,isdividedintoaremotepartandahostpart.Whenyouenterthepasswordfromtheremotecontrol,thekeyboardissentexternalinterrupttotheMCU,microcontrolleridentificationkeynumberandencodedbytheinfraredlight-emittingdiodessenttothehostreceivingpart.Theinfraredreceiverinthehostreceivesreceivetheinfraredsignal,finishingzoomsentserialportinterrupttothemicrocontrollerthroughtheserialport,themicrocontrollerserialinterruptsignaltodecodethesignalintopre-launch,afterverificationpassword,judgmentunlockoralarm.Thehostreceivingpartreceivesencryptedsignalsthroughexternalkeyboardinterruptwithouttheinfraredremotecontroltransmittercanbedirectlyauthenticationpassword.Hostpartalsocanchangethepassword,ifthepasswordisleakedatthesametime,wecanchangethepassword.Stablecharacteristics,safeperformance,convenientoperationandextensiverangeofapplicationsoftheinfraredremotecontrolelectroniclockshasagoodmarketprospectsanddevelopmentspace.Keywords:Microcontroller;Infraredemission;Infraredreceiver;Serialinterruptsignal;Changethepassword目录31、绪论................................................................................................................................31.1设计的背景和意义...................................................................................................31.2设计的任务和要求...................................................................................................41.3设计理论...................................................................................................................51.4待解决的问题...........................................................................................................52、总体设计方案................................................................................................................52.1设计思路...................................................................................................................52.2红外通信部分设计...................................................................................................62.3单片机串口通信部分设计.......................................................................................83、硬件电路设计..............................................................................................................103.1控制芯片单片机与系统框图.................................................................................103.2单片机最小系统....................................................................................................123.3红外遥控发射部分设计........................................................................................133.4红外遥控接收部分设计........................................................................................143.5显示部分设计.........................................................................................................143.6报警部分设计.........................................................................................................174、软件电路设计..............................................................................................................185、设计效果......................................................................................................................235.1主要注意事项..........................................................................................................235.2实物效果..................................................................................................................24结语................................................................................................................................25参考文献............................................................................................................................26致谢................................................................................................................................27附录.......................................................................................................
本文标题:基于单片机的红外遥控电子密码锁设计
链接地址:https://www.777doc.com/doc-4423871 .html