基于单片机的红外遥控电子密码锁的外文及翻译.docx
《基于单片机的红外遥控电子密码锁的外文及翻译.docx》由会员分享,可在线阅读,更多相关《基于单片机的红外遥控电子密码锁的外文及翻译.docx(20页珍藏版)》请在冰豆网上搜索。
基于单片机的红外遥控电子密码锁的外文及翻译
毕业设计(论文)
外文资料翻译
学生姓名:
朱德涛学号:
**********
所在学院:
电子与信息工程学院
专业:
电子信息工程
*******
2014年03月15日
Proceedingsof20094thInternationalConferenceonComputerScience&Education
TheDesignofElectronicLocksBasedonInfraredRemote-ControlwithMCU
ZhangChengXueShunXiangWu
DepartmentofAutomationDepartmentofAutomation
XiamenUniversityXiamenUniversity
Xiamen,ChinaXiamen,China
*********************wsx1***********
Abstract-Atpresent,key-padelectroniclockwithalarming
funtionistograduallyreplacethetraditionalmechanical
locks,overcomingtheshortcomingsofthetraditionalmechanical
lockswhichcontainfewpasswordandlackofreliabiIty,butkeypad
electroniclockmakesagreatprogressintermsoftechnology
andperformance.Thispaperrepresentsatypeofremote-controlled
electroniclockdevelopedwiththechipofAT89S51.
Thistypeoflockhavetwoinputdevices,oneofthemisa4*3
matrixkeyboardmountedonthelock,theotheroneisaremote
controllerwhichalsohave4*3matixkeyboard.wecanuseeither
ofthemtoopenthelockorchangethepasswordwehaveset.In
thedesign,weadopttheinfraredrayasthemedium,becauseof
thestronganti-interferenceability,reliabletransmissionof
information.
IndexTerms-MCUElectroniclocksInfraredRemote-controlLCD1602
I.INTRODUCTION
Thedesignisbasedonsinglechip,makesuseof4*3
keyboardandinfraredremotecontrollerasinput,LCD1602
coulddisplaytheinformationofthestepswhenyouare
operating.Thisdesignmentcouldalsorealizemodifyingthe
passwordandalarming.Whenarequirementtoresetthe
password,itisnecessarytomakesurethepasswordis
correct,otherwiseitwillmakenoisetowarnyouthepassword
iswrong.Inthisdesignment,1limitthelengthofthepassword
atsix,JustliketheATMofbank.youmustenterrightpassword
ifyouwanttogetthrough.
II.THEFRAMEWORKOFTHEDESIGNMENT
Thedesignmentconsistsofsixmodules:
themain
controllermodule,LCD1602module,4*3keyboardmodule,
infraredremotecontrolmodule,thealarmmodule,the
unlockingsimulationmodule.
MainControllerModule:
alow-power,high-performance
CMOS8-bitsinglechip,thedeviceusedATMEL'shighdensity,
non-volatilememorytechnology,compatiblewith
standardcommandsystemofMCS-51.An8-bitcommon
centralprocessingunitandISPFlashmemorycellare
integratedinthischip.
LCDmodules:
LCD1602isacharacterliquidcrystal
displaymodules,isatypeofdot-matrixLCDdedicatingto
displayletters,numbers,symbolsandsoon.Considering
economyandpracticeinthisregard,adoptingLCDl602is
enoughtomeettherequirementsofcharacterdisplayingonthe
LCD.
4*3keyboardmodule:
BecauseofI/OportofMCUis
limited,accordingtomatrixkeyboardtorealizecircuit.Inthis
way,wecandesignenoughbuttonsonthekeyboardbutnot
takeuptoomanyportsoftheMCU.
Infraredremotecontrolmodule:
thedesignusedauniversal
TVremotecontrollerasinputdevice,thedevicecanprovidea
widerangeofinfraredencodingformat,sowemakeuseofthe
codingformatofthepulsewidthmodulation.
Alarmmodules:
Inthisdesign,selectthebuzzertosounda
warning.Thesingle-chipthroughtheportP3.2outputsasquare
wavepulse-drivenaudioloudspeakers.
Unlockinginstructions:
Inthisdesign,1choosetouseLED
lightstosimulatethesituationofthelock.whenweenter
password,LEDlightswillflashonbehalfoftheunlockingis
successful.
Figure1.Theframeworkofthedesignment
A.ThedesignofMatrixkeyboard
Matrixkeyboardworkingprinciple:
verticallinesthrough
theresistanceconnected+5Vpower.whennokeysarepressed
down,theverticallinesisinhighlevelsituation,otherwise,the
situationisthesamewiththehorizontalline'swhichiscrossed
onthebutton.Originally,thehorizonallinesareinlow-level,
whenwecheckthevaryingsituationoftheverticalIines,that
meansbuttonispresseddown,atthistimewesavethesituation
ofportp2.4-p2.6,thenweprogramtomaketheportp2.0-p2.3
inhighlevelsituationlinebyline,atthemeantimecheckingthe
varyingofthesituationoftheportp2.4-p2.6,whenit
changes,wesavethesituationoftheportp2.0-p2.3.Inthis
way,wehaveknownwhichbuttonhadbeenpress
down,becausewehaverecordedsituationoftheport
p2.0~p2.6.Differentkeyshavedifferentcodingformat,the
keyboardprocessingtasksare:
Firstly,todeterminewhetheror
notpressthebutton,thencheckwhichbuttonhave
pressed,throughtheprogramming,gettheformationofkey
coding.Allofthekeycodeshowninthefollowingtable:
TABLE1.THEVALUEOFKEYCODING
EE
DE
BE
ED
DD
BD
EB
DB
BB
E7
D7
B7
Figure2.The4•3keyboardcircuit
B.Thedesignofinfraredremote–control
1)TheintroductionoftheLC7461
Atpresent,therearelotsofchipsdedicatingtotransmitthe
infraredray,intermsoftheencodingformatthatcanbe
dividedintotwomajorcategories:
PWMandPPM.Herewe
haveadoptedarelativelyeasytomodulate,thePWM's,LC7461
chip.Whentheinfraredcontroller'buttonispressed,itwillsend
outsomesignalwhichcontainstheinformationaboutthe
codingformat.Thesignalhasthefollowingcharacteristics:
the
PWMpulsewidthlastfor0.56ms,interval0.56msasaperiod
of1.12msrepresentingthebinary"0";thePWMpulsewidth
lastfor0.56ms,interval1.68msasaperiodof2.24ms
representingthebinary"1".Theabove-mentioned"0"and"1"
composedof42bitsbinarycode,ascontainedinthe38kHz
frequencymodulationforthesecondlaunchinorderto
enhanceefficiencyandreducelowerpowerconsumption,and
thenthroughtheinfrareddiodetosendout.
“0”“1”
0.56ms0.56ms
1.125ms2.25ms
Figure3.Theformationofthesignal.
2)Theinfraredreceivers
Infraredreceiverisanintegratedcircuitincludingasetof
funtionsofreceiving,amplificationandshaping,withoutany
externalcomponents,takesalltheworkcompatiblewithTTLlevel,
itissuitableforavarietyofinfraredremotecontroland
infraredsignaltransferring.Infraredreceivertransmitsthe
demodulatedsignaltothesingle-chipAT89S51bythewayof
interruption.NOTE:
Whenthereisnoinfraredsignal,theoutput
portisinhigh-level,sothesignalwereceivediscontrarytothe
signalsentoutbefore.
3)Thedecodingoftheinfraredsignal
Whenwereceiveasignalcontainingasynchronized
beginningof9mslow-leveland4.5mshigh-Level,itmakesus
preparetodecodethedata.Thekeyofdecodingishowto
identify"0"and"1".Accordingtotheformationofthesignal
wecanfindthatthedefinitionof"0"and"1"startswith0.56ms
low-level,theonlydifferencebetweenthemisthewidthofthe
high-level,"0"bitis0.56ms,"1"bitis1.68ms,sowedelay
0.9mstocomparethecurrentlevelforidentifyingthebit,the
flowchartasfollows:
N
Y
N
Y
Figure4.Theflowchartofdecoding
4)Theworkingprocessoftheinfraredremote-conroller
IRtransmit/receivecontrolcircuitsareachieved
bytheAT89S51microcontrollerwithsimplecircuit,
selectableoutputcontrolmethodandverypractical
Thespecificworkprocessisasfollows:
Launch:
First,sentbackthedatafromtheserial
transmitportP3.1totheP1.1portforinternal
modem,sentoutfromtheP1.2port,andthenfired
outthroughtheinfraredemittingdiodes,firing
distanceisabout10m.
Receipt:
Theinfraredreceiverheadmatchedwith
thelaunchisused.,sentoutthedatalaunchedtothe
serialport3.0,andthenthesystemwillconfirm
whetherthesenddataareconsistentwiththereceive
data,yeswillunlock,nowillgiveup.
C.Thedesignofmaincircuit
Accordingtothedesignoftheanalysis,thehardware
circuitryofsingle-chipelectroniclocksasshownintheFigure
below.P0portconnectLCDl6028-bitdatabus,atthesame
time,P0portisconnectedtothe8-bitportsofanode-sharing
digitaltube,theportofP0.1strobesLED.P2portaccess4*3matrixkeyboardcircuit,whileP2.5,P2.6andP2.7respectively
connecttheRS,RW,E-portoftheLCD1602.Buzzeralarm
promptedbytheP3.2output.
Figure5.Thedesignofmaincircuit
III.RESULT
Accrdingtothedesign,theoperationisshownasthe
figuresbelow:
Figure6.aunlockinginterface
Whenwewanttoresetthepassword,firstly,thesystem
checksoutthepasswordiscorrectornot,ifthepasswordis
right,wecouldgetinthenextstep,otherwisethesystemmakes
warning.
Figure7.Interfaceofcheckingthepassword
Figure8.Interfaceofresetpassword
IV.COCLUSION
Inthispaper,aninfraredremotecontrolelectronic
lockswasdesignedandimplemented,themain
technicalindicatorsare:
thelockopening,password
storage,theeffectiveprotectionofuser'spassword,
auto-alarmifthewrongpassword,unlockthe
keyboardofthemachine,remoteunlockingandother
functions.Becauseofinfraredremotecontrolusedin
thislocksystem,therearemanyadvantages:
Infraredlaunchingdeviceuseinfraredlight-emitting
diodesminiatureremotecontroltransmitteriseasyandinexpensive;usedigitalsignalcodedmodulationtoimproveanti-interferencewhensignalaretransmitted,lessmisoperation,lowpowerconsumpti-on,includingotheradvantages,suchasfastresponseinfraredtransmission,hightransmissionefficiency,stableandreliable
operation.Basedontheseadvantages,thislockcan
bewidelyusedincivildoorsandwarehousedoors.
Intheinformationage,inmyopinion,thedesigncouldplay
animportantpartinourdailylifeandwillsupplantthe
tranditontraditionalmechanicallocklateron.Thoughthereis
somepoints