基于单片机密码锁的设计剖析

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

毕业设计说明书基于单片机电子密码锁的设计学院:专业:学生姓名:学号:指导教师:2014年6月摘要Ⅰ摘要本次设计题目为遥控电子密码锁的设计,与传统锁相比,电子密码锁具有非常多的优点:操作简单,易于编程等,因而也具有更广阔的市场应用前景。这次毕设采用8051做为核心,加上各种外接电路实现要求的各种功能,例如:矩阵键盘电路、红外接收和发射电路、LCD屏显示器等等,密码锁的功能包括设置原始密码、实现本机开锁、8到10米遥控开锁、密码错误3次报警报警、修改密码的能力。下面的论文比较详细说明了遥控密码锁的硬软件电路电路设计、总机电路图,个人认为设计的难点在于红外线的发射和接收,如果使用传统的编码器、解码器就会使是系统变得异常复杂,故我们应该打破传统思维的限制利用现代化技术找到一种可以替代的简单技术来解决问题。这种新技术是应用单片机来调制红外线信号,然后用红外发射管发射出去。本机接收部分用HS0038器件,它是接收周期约为26us,频率约为38KHZ的信号,它能够一次性完成模拟电路的分立元件完成的对信号的接收、放大等,HS0038输出的是TTL信号,可以直接输入单片机进行处理。这个原件会使本机接受部分电路的设计变得简单,使用方便,降低了成本。本次设计的的电子密码锁的实用性非常强,比如它能够用在家里和仓库的门上也可以用在保险柜或者汽车门上,并且这种所比较传统的机械锁更加安全保障。实际的生活和生产中,我们可能会碰到许多对身体健康有害的环境:有害气体、辐射等等,因此采用遥控的方式开锁既可以最大限度的隔离各种电气干扰。关键词:安全、密码锁、红外遥控AbstractⅡAbstractThisdesigntitledinfraredremoteelectroniclocksdesign,comparedwiththetraditionallocks,remoteelectroniclockshavealotofadvantages:easytooperate,easytoprogram,andthusalsohaveabroadermarketprospects.Theremoteelectroniclocksdesignedintotwomodules:thetransmittermoduleandreceivermodule.TheentiresystemtoAT89C51core,pluskeyboardcircuit,crystaloscillatorcircuit,infraredreceivercircuit,alarmcircuit,infraredtransmittercircuit,displaycircuitandotherperipheralcircuitstoachieve,withthedefaultsixoriginalpassword,themachinelock,remotekeylessentry,passwordinputerroralarm,changepasswordsandotherfunctions.Thefollowingpaperintroducestheoveralldesignoftheinfraredremoteelectroniclocks,hardwarecircuitandsoftwarecircuit,difficultypersonallythinkthatdesignisaninfraredtransmitterandreceiver,ifyouuseatraditionalencoders,decoderswillmakethesystembecomeabnormalcomplex,itmustfindanewwaytosolvetheproblem.Partofthelaunchtomodulatethesignalusinglight-emittingdiodestoemitinfraredlight.ReceiversectionusesintegratedreceiverHS0038,itreceivesafrequencyof38KHZ,aperiodof26us,itcanbearemotecontrolsignalreception,amplification,detection,plasticrolledintoone,andtheoutputoftheitcanbeidentifiedTTLsignal,therebygreatlysimplifyingareceivingcircuitdesignandcircuitcomplexity,easeofuse.Thedesignoftheelectroniclockspracticalityisverystrong,suchthatitcanbeusedathomeandwarehousedoorscanalsobeusedinthesafeorcardoor,andthisthemoretraditionalmechanicallockmoresecurity.Inindustrialproduction,wewillencounteravarietyofenvironments:harmfulgases,radiation,etc.,soawaytounlocktheremotecontroltomaximizeboththeisolationofvariouselectricalinterference.Keywords:security,passwordlock,infraredremotecontrol.目录IV目录摘要...........................................................IAbstract.....................................................III目录..........................................................IV第一章绪论....................................................11.1设计的背景及其意义........................................11.2电子密码锁的研究现状.....................................21.3红外通信概述.............................................31.4设计的要求及其指标........................................41.4.1主要设计内容.......................................41.4.2主要设计指标及其参数...............................4第二章系统总体方案设计........................................52.1整体设计思路.............................................52.2硬件电路设计方案.........................................52.2.1遥控发射部分设计...................................52.2.2本机接收部分设计.......................................63.1AT89C52单片机............................................83.1.1AT89C52简介.......................................83.1.2AT89C52的引脚功能.................................83.1.3晶振电路设计......................................103.1.4复位电路..........................................113.2电源电路................................................123.3红外发射电路............................................143.3.1红外对管简介......................................143.3.2红外发射电路......................................143.4红外接收电路设计.......................................153.4.1HS0038概述.......................................153.4.2红外一体化接收头的特性:..........................163.4.3红外接收电路图....................................173.5键盘电路................................................173.5.1矩阵键盘原理......................................173.5.2矩阵键盘原理图....................................183.6显示电路................................................193.7报警电路设计............................................203.8电磁锁部分电路..........................................21第四章软件设计..............................................234.1系统发射部分的软件设计...................................234.1.1主程序流程图......................................234.1.2延时10ms子程序..................................244.1.3键盘扫描程序.....................................244.1.4红外发射程序......................................264.2主机接收部分程序设计....................................284.2.1主程序设计.......................................28目录Ⅳ4.2.2红外接收程序.....................................284.2.3密码识别子程序..................................304.2.4报警部分程序.....................................304.2.5显示子程序........................................314.2.7修改密码子程序..................................32第五章结论...................................................34参考文献......................................................35致谢..................................

1 / 55
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功