8/12/2019 Mok Kim Final Project Report
1/28
Final Project Report
E3390 Electronic Circuits Design LabRFID Access Control System
e!!rey "o#osep$ %im
Submitte& in partial !ul!illment o! t$e re'uirements !or t$e(ac$elor o! Science Degree
"ay ))* +00,
Department o! Electrical EngineeringColumbia -ni.ersity
)
8/12/2019 Mok Kim Final Project Report
2/28
/able o! Contents
) E1ecuti.e Summary+ (loc# Diagram* Design /argets* an& Speci!ications3 In&i.i&ual (loc# Descriptions2 (ill o! "aterials
4ealt$* Sa!ety* 5 En.ironmental Issues6 Final 7antt C$art, Criticism o! /$is Course
Appen&i1 8 so!t are co&e
+
8/12/2019 Mok Kim Final Project Report
3/28
) E1ecuti.e Summary
RFID is a contactless i&enti!ication tec$nology base& on t$e transmission o!ra&io !re'uency a.es Its a&.antage o.er its pre&ecessor* t$e barco&e system* isits increase& range an& increase& &ata storage capacity /$e typical RFID systemconsist o! t$ree main components* t$e transpon&er :or tag;* t$e rea&er* an& t$eapplication
/$e tag is t$e &ata storage component /$e tags e ill use in t$is project ill be passi.e tags* meaning t$ey &o not $a.e an internal po er supply /$e rea&eracti.ates* po ers* an& communicates it$ t$e tag using electromagnetic a.es&enie&?
3
8/12/2019 Mok Kim Final Project Report
4/28
+ (loc# Diagram* Design /argets* an& Speci!ications
(loc# Diagram
Design /argets an& Speci!ications
RFID Tag Purchased since a practical (small and portable) tag is out of ourmanufacturing capabilities.RFID Tag Reader Constructed using discrete components and ICs.Microcomputer programming Programmed on PIC16F7 !C" in assembl#language using !icrochips !P$%&.User Interface 'his includespushbuttons (read command) s itches (configurechange operation mode normal or setup).
Alerting System 'his includes $*+s to indicate ,accept- or ,re ect- error indicator(or might ha/e it ust blin0 bet een accept and re ect lights) displa# FI+s uni2uecode.Mechanical System $oc0ing mechanism. 3ot implemented at this time.
2
"ni2ue'ag I+
&itstream
145 0Carrier
eadCommand
!odulated8ignalContaining"ni2ue'ag I+
Figure 1: RFID Access Control System Block Diagram
8/12/2019 Mok Kim Final Project Report
5/28
3 In&i.i&ual (loc# Descriptions
RFID /ag
Atmel rea&=only /% 30 tags ere c$osen !or t$is system /$ese tags respon& toa )+ #4 a.e it$ an )+ #4 A" a.e containing a 62=bit rolling co&e at3 9#bps /$e co&e contains an @ bit $ea&er !ollo e& by a uni'ue ID co&e /$e &atais enco&e& using "anc$ester enco&ing
/$ese tags ere c$osen because o! our #no le&ge o! $o to &emo&ulate A"compare& to tags t$at use ot$er #in&s o! sc$emes suc$ as FS% or PS% Also* ourapplication &i& not re'uire Also* e &i& not re'uire t$e increase& !unctionalitieso! more e1pensi.e Rea&B rite tags
Figure 2: Atmel TK553 Tag !"it# resistor $or si%e com&arison'
8/12/2019 Mok Kim Final Project Report
6/28
RFID /ag Rea&er
/$e purpose o! t$e Rea&er component is to acti.ate an& po er t$e tag* &emo&ulatet$e response* an& prepare t$e signal !or t$e microcontroller /$e components o!t$is rea&er are t$e antenna* signal generator* pea# &etector* lo pass !ilter* an&.oltage comparator
Antenna
"any antenna con!igurations ere constructe& !or testing Eac$ $a& limite& rangean& ere &i!!icult to use because t$e coils oul& come out o! placeIn t$e en&* e settle& on a pre=ma&e antenna t$at consiste& o! t o coils rappe&aroun& a !errite coil in a trans!ormer con!iguration /$e in&uctance o! t$e coils
ere measure&* an& an appropriate capacitor as c$osen to tune t$e antenna to t$e
resonant !re'uency using t$e parallel tan# circuit e'uation
/$is antenna still $a& .ery limite& range /$e range as no !art$er t$an one (utit$ t$is con!iguration it as possible to rest t$e tag &irectly on t$e antenna*
allo ing !or a consistently goo& signal
Signal 7enerator
A )+ #4 s'uare a.e signal generator is re'uire& to &ri.e t$e antenna egenerate& a signal !rom t$e "C- !or t$is purpose* but &ue to time constrictions
e &i& not $a.e time to buil& a circuit to ma#e t$e signal $a.e t$e necessary.oltage For no * e are using a !unction generator as t$e signal generator It isset to output a s'uare a.e at )+ #4 * )0 pp
Pea# Detector
/$e pea# &etector is use& to e1tract t$e en.elop o! t$e A" signal Figures 3 an& 2s$o t$e antenna input it$out an& it$ t$e tag in pro1imity Figure s$o s t$esignal a!ter t$e pea# &etector
6
8/12/2019 Mok Kim Final Project Report
7/28
Figure 3: 125 k(% s)uare "a*e
Figure +: A, res&onse $rom tag
,
8/12/2019 Mok Kim Final Project Report
8/28
Figure 5: -ut&ut o$ &eak .etector
Lo Pass Filter
A !irst or&er lo pass !ilter it$ a cuto!! o! )0 #4 as constructe& to re&uce t$ecarrier !re'uency /$e &ata is at 3 9 #4
@
8/12/2019 Mok Kim Final Project Report
9/28
oltage Comparator
/$e en.elop signal is con.erte& to a s'uare a.e in preparation !or sen&ing to t$emicrocontroller /$e L"2)) comparator as use& otice t$e noise in t$e signal/$is noise greatly a!!ecte& $at t$e "C- as rea&ing* causing inconsistentresults in our application
Figure /: -ut&ut o$ 0oltage Com&arator
9
8/12/2019 Mok Kim Final Project Report
10/28
/ o in.erte& Sc$mitt triggers ere use& to smoot$ out t$e e&ges /$e resultingoutput as sent into t$e "C-
Figure : -ut&ut o$ Sc#mitt Triggers
)0
8/12/2019 Mok Kim Final Project Report
11/28
"icrocontroller
/$e PIC16F7 !C" as programmed in assembl# language. 'he !C" isresponsible for decoding the !anchester encoded data e9tracting the datacontrolling the $*+s that indicate the I+ and managing the accesscontrol.
Figure : ,C Control Diagram
ID E1traction
/$e !irst step in rea&ing t$e &ata is to !in& t$e $ea&er o! t$e co&e /$e Atmel c$ips$a.e a $ea&er o! E6 : )))00))0;
e &e.ise& a sc$eme to !in& t$e $ea&er as !ollo s
))
8/12/2019 Mok Kim Final Project Report
12/28
= First* p$ase correction=%eep sampling input pin :e.ery t o usec; until a $ig$ is rea&= e1t* #eep sampling input pin until a lo is rea&
= Finally* #eep sampling input until a $ig$ is rea&
= Secon&* ait just o.er $al! a perio& to a&just !or "anc$ester enco&ing an&sample t$ere at 3 9) #4 =Sample @=bits an& c$ec# i! all erosG i! not* rotate bits le!t an& sample
t$e ne1t bitG repeat until all eros = o #eep s$i!ting @=bit in&o until t$e !irst $ig$=le.el is !oun&G t$is
bit an& t$e ne1t , bits ma#e up t$e $ea&er = A!ter t$e $ea&er* sample anot$er @=bits t$is is t$e uni'ue tag ID
Figure 4: ,anc#ester nco.ing
8/12/2019 Mok Kim Final Project Report
13/28
Figure 1 : Final Com&lete. System
)3
8/12/2019 Mok Kim Final Project Report
14/28
)2
8/12/2019 Mok Kim Final Project Report
15/28
)
8/12/2019 Mok Kim Final Project Report
16/28
2 (ill o! "aterials
Part "anu!acturer Cost/% 30 /ag Atmel J + 60Antenna ) +@PIC16F7 "icroc$ip ) ) 0L"2)) ational
Semicon&uctor + + J ) 0
,2)2 Sc$mitt/rigger
/e1as Instruments + + J 0
Capacitors 3Resistors 2/otal Cost Appro1 3@ ,0
4ealt$* Sa!ety* an& En.ironmental Issues
a Pro&uct Dangers o &angers relate& to t$e use o! our project are note& Care s$oul& beta#en to $oo# up t$e circuit properly an& use o! correct .oltages
b 4ealt$ 4a ar&s o $ealt$ $a ar&s associate& it$ RFID tec$nology $a.e been note&
c En.ironmental 4a ar&si FCC regulations co.er RFID &e.ices ranging in !re'uency !rom
9#4 to 62 74 Accor&ing to FCC Part ) * Section ) +09* t$ema1imum E !iel& !or a &e.ice operating bet een 009= 290 "$at a measuring &istance o! 300m is +200B! u Bm
ii Electric S$oc# Problems All ires are insulate&*
)6
8/12/2019 Mok Kim Final Project Report
17/28
6 7antt C$art
RFID Reader
Jeffrey Mok, Joseph Kim30-Jan 6-Feb
13-Feb
20-Feb
27-Feb 6-Mar
13-Mar
1 2 3 4 5 6 7Research RFID Types, Existin !pps "Je##, J$e%Research RFID Desi ns "Je##, J$e% Deter&ine 'hich parts t$ b(y "Je##%Deter&ine s(bsyste&s t$ )esi n "Je##, J$e%Meet 'ith *r$# +t$ #i '$r.in 'ith M/ "J$e%I&pr$ e !ntenna Desi n an) Rea)er s(bsys"Je##%*r$ ra& Micr$c$&p(ter "J$e%Desi n !sse&b e ser inter#ace "Je##, J$e%Mechanica +(bsyste& i# ti&e "J$e%F$r& #act$r )esi n "Je##, J$e%+yste& Deb( in "Je##, J$e%*r$ ect *resentati$nFina Rep$rt
27-Mar 3-!pr
10- !pr
17- !pr
24-Apr
1-May
3-May
10-May
9 10 11 12 13 14 15 16Research RFID Types, Existin !pps "Je##, J$e%Research RFID Desi ns "Je##, J$e% Deter&ine 'hich parts t$ b(y "Je##%Deter&ine s(bsyste&s t$ )esi n "Je##, J$e%
Meet 'ith *r$# +t$ #i '$r.in 'ith M/ "J$e%I&pr$ e !ntenna Desi n an) Rea)er s(bsys"Je##%*r$ ra& Micr$c$&p(ter "J$e%Desi n !sse&b e ser inter#ace "Je##, J$e%Mechanica +(bsyste& i# ti&e "J$e%F$r& #act$r )esi n "Je##, J$e%+yste& Deb( in "Je##, J$e%*r$ ect *resentati$nFina Rep$rt
),
8/12/2019 Mok Kim Final Project Report
18/28
, Criticism o! t$is Course
/$e most positi.e t$ing about t$is course as t$e sense o! ac$ie.ement $en t$e project as complete e too# a #in& o! tec$nology t$at e &i& not anye1perience it$ be!ore* but ere able to use relati.ely simple i&eas !rom ourclasses to implement commercial tec$nology
e may $a.e spent too muc$ time at t$e beginning o! t$e semester &e!ining our project Per$aps t$is is goo& in t$at it re!lects t$e &etaile& planning re'uire& inin&ustry be!ore a project is un&erta#en (ut I t$in# e oul& $a.e bene!ite& !roma stricter sc$e&ule Also* t$e possibility o! t$is course becoming a t o semestercourse s$oul& sol.e t$at problem
A re.ie o! some electronic circuits material oul& $a.e $elpe& too Again* a t o
semester course oul& $elp it$ t$is It oul& also be interesting to see $o someo! t$e material !rom t$e ot$er EE trac#s coul& be part o! t$e projects
)@
8/12/2019 Mok Kim Final Project Report
19/28
Appen&i1
So!t are Co&e
LIS/ PK)6F,2title "ain
8/12/2019 Mok Kim Final Project Report
20/28
goto isrSer.ice Ggoto interrupt routine
org 0 $ G(eginning o! Program Storage
GG Port Initiali ationGinitPort
clr! P
8/12/2019 Mok Kim Final Project Report
21/28
bt!ss P
8/12/2019 Mok Kim Final Project Report
22/28
goto IDreject GID rejecte& bc! P
8/12/2019 Mok Kim Final Project Report
23/28
GGGGGGGne1t(it
&ec!s Count+goto "o&eSelectmo.! /emp*/agIDrl! /agID*Fcall c+Delay
bc! /agID*0 bt!sc P
8/12/2019 Mok Kim Final Project Report
24/28
GGne1t ,call grab(yte GDIA7
8/12/2019 Mok Kim Final Project Report
25/28
call tDelaymo.l (N0)0)0)0)Nmo. ! P
8/12/2019 Mok Kim Final Project Report
26/28
mo. ! /emp&elay
&ec!s /emp*F G 60 usec &elay loopgoto &elayreturn
GVtent$=secon& &elaytDelay
mo.l 0)$mo. ! Cycle)mo.l 9@$mo. ! Cycle+
tloop&ec!s Cycle)* Fgoto tloop
&ec!s Cycle+* Fgoto tloopreturn
GV+ cyclescDelay
mo.l DN@2Nmo. ! Cycle3
cloop&ec!s Cycle3* F
goto cloopreturn
c+Delaymo.l DN@)Nmo. ! Cycle3
c+loop&ec!s Cycle3* Fgoto c+loopreturn
c3Delaymo.l DN@3Nmo. ! Cycle3
c3loop&ec!s Cycle3* Fgoto c3loopreturn
+6
8/12/2019 Mok Kim Final Project Report
27/28
G$al! a perio&$Delay
mo.l DN2)Nmo. ! Cycle3
$loop&ec!s Cycle3*Fgoto $loopreturn
grab(yteclr! /agID G clear /agID
bt!sc P
8/12/2019 Mok Kim Final Project Report
28/28
GJJJJisrSer.ice
goto isrSer.ice
E D