You are on page 1of 39

CHAPTER 1 INTRODUCTION

RFID based Secured access system implemented on 8051 microcontroller . This is a very useful application of RFID Radio!fre"uency identification ) and is very commonly used in institutes# offices# homes and so on. $n RFID system consists of a reader device and a transponder. $ transponder or ta% has a uni"ue serial number &hich is identified by the reader. 'ere RFID has been interfaced &ith $T8()51 to provide secured access. The relevant messa%es are also displayed on a 1*+, -)D. RFID automated access for door controls to buildin%s# departments# rooms# secured closets &irin%# ./0# etc.1 and cabinets is very cost effective and secure to use. 2any people do not reali3e ho& easy it is to implement card access systems such as card access door or doors usin% RFID readers and RFID )ards or 4eyfobs for Secured $ccess )ontrol 2ana%ement. 5ou can even use smart readers for computer rooms and securin% individual computers. In fact access based entrance and e+its usin% access smart technolo%y is rapidly becomin% the &ay of the future for many businesses# %overnment buildin%s# hospitals# museums and other establishments re"uirin% secured but easy to control access solutions. $ccess based systems use either 1,5 6'3 RFID or 17.5* 2'3 RFID readers# cards and 6eyfobs. Features: 8 -o& po&er re"uirement. 8 9+cellent characters appearance. 8 Reliability. 8 -o&er cost. In our pro:ect &e are implementin% the RFID based secured access system by usin% microcontroller. The system communicates &ith an administrator .) via a serial communications lin6 and 'yperTerminal. RFID technolo%y is based on the concept of ma%netic couplin%# &hich is the principle that current flo&in% in one circuit can induce current flo& in another circuit throu%h a ma%netic field %enerated in the space bet&een the circuits.

CHAPTER 2. BLOCK DIAGRAM

,.1 /loc6 Dia%ram of RFID /ased system

CHAPTER 3. CIRCUIT DIAGRAM 1.

Fi%;7.1 circuit dia%ram

,.

FI<;7., RFID Reader

7.

Fi%;7.7 RFID Ta%

CHAPTER . CIRCUIT DE!CRIPTION


DE!IGNING:
The main intension of this pro:ect is to desi%n a RFID based Secured access system usin% 8051 microcontroller $T8()511 . In order to fulfill this application there are fe& steps that has been performed i.e. 11 Desi%nin% the po&er supply for the entire circuitry. ,1 Selection of microcontroller that suits our application. 71 Selection of -)D =1 Selection of -,(7D 51 Selection of RFID 2>D?-9 )omplete studies of all the above points are useful to develop this pro:ect.

PO"ER !UPPL# !ECTION:


In!order to &or6 &ith any components basic re"uirement is po&er supply. In this section there is a re"uirement one volta%e level i.e. 5@ D) po&er supply. Ao& the aim is to desi%n the po&er supply section &hich converts ,70@ $) in to 5@ D). Since ,70@ $) is too hi%h to reduce it to directly 5@ D)# therefore &e need a step!do&n transformer that reduces the line volta%e to certain volta%e that &ill help us to convert it in to a 5@ D). )onsiderin% the efficiency factor of the brid%e rectifier# &e came to a conclusion to choose a transformer# &hose secondary volta%e is 7 to = @ hi%her than the re"uired volta%e i.e. 5@. For this application 0!(@ transformers is used# since it is easily available in the mar6et. The output of the transformer is (@ $)B it feed to rectifier that converts $) to pulsatin% D). $s &e all 6no& that there are 7 6ind of rectifiers that is 11 half &ave ,1 Full &ave and 71 /rid%e rectifier 'ere &e short listed to use /rid%e rectifier# because half &ave rectifier has &e less in efficiency. 9ven thou%h the efficiency of full &ave and brid%e rectifier are the same# since

there is no re"uirement for any ne%ative volta%e for our application# &e %one &ith brid%e rectifier. Since the output volta%e of the rectifier is pulsatin% D)# in order to convert it into pureD) &e use a hi%h value 1000?FC1500?F1 of capacitor in parallel that acts as a filter. The most easy &ay to re%ulate this volta%e is by usin% a D805 volta%e re%ulator# &hose output volta%e is constant 5@ D) irrespective of any fluctuation in line volta%e.

!ELECTION OF MICROCONTROLLER:
$s &e 6no& that there so many types of micro controller families that are available in the mar6et. Those are 11 8051 Family ,1 $@R microcontroller Family 71 .I) microcontroller Family =1 $R2 Family /asic 8051 family is enou%h for our applicationB hence &e are not concentratin% on hi%her end controller families. In order to fulfill our application basic that is $T8()51 controller is enou%h. /ut still &e selected $T8(S5, controller because of inbuilt IS. in system pro%rammer1 option. There are minimum si+ re"uirements for proper operation of microcontroller. Those are; 11 po&er supply section ,1 pull!ups for ports it is must for .>RT01 71 Reset circuit =1 )rystal circuit 51 IS. circuit for pro%ram dumpin%1 *1 9$C@.. pin is connected to @cc. .>RT0 is open collector thatEs &hy &e are usin% pull!up resistor &hich ma6es .>RT0 as an IC> port. Reset circuit is used to reset the microcontroller. )rystal circuit is used for the microcontroller for timin% pluses. In this pro:ect &e are not usin% e+ternal memory thatEs &hy 9$C@.. pin in the microcontroller is connected to @cc that indicates internal memory is used for this application.

!ELECTION OF LCD: $ $%&u%' (r)sta$ '%s*$a) LCD1 is an electronically!

modulated optical device shaped into a thin# flat panel made up of any number of color or

monochrome pi+els filled &ith li"uid crystals and arrayed in front of a li%ht source bac6li%ht1 or reflector.

!ELECTION OF L2+3D:
This device is suitable for use in s&itchin% applications at fre"uencies up to 5 6'3. The -,(7D is assembled in a 1* lead plastic pac6aa%e &hich has = center pins connected to%ether and used for heatsin6in% The -,(7D is assembled in a ,0 lead surface mount &hich has 8 center pins connected to%ether and used for heatsin6in%.

!ELECTION OF RFID MODULE:


Radio!fre"uency identification RFID1 is a technolo%y that uses communication throu%h the use of radio &aves to e+chan%e data bet&een a reader and an electronic ta% attached to an ob:ect# for the purpose of identification and trac6in%.

CIRCUIT OPERATION:
The RFID ta% is used as an identity for a particular user. If the identity serial number of the ta%1 of the user is matched &ith the one already stored in this system# he %ets immediate access throu%h it. This RFID based secured access system also has many additional features. For e+ample# a ne& user can re%ister himself &ith the system. $ re%istered user can also &ithdra& his entry from the system. These features can be accessed by pressin% a tactile s&itch connected to the microcontroller. In be%innin%# the user is prompted to scan his ta% or ID. The serial code of the ta% is identified by the reader module and is sent to $T8()51 for chec6in%. If the ID is matched by the microcontroller# the user %ets the access. >n the contrary# if the ta% is not identified# a messa%e FGron% IDE1 is displayed on -)D screen. $ ne& user needs to press the s&itch to re%ister after &hich his identity is verified t&ice &ith RFID ta%. The ne& record is stored by the microcontroller to %rant future access. The system also sho&s F9rrorE if the ta%s do not match durin% verification. $n e+istin% user can delete his record by pressin% the same s&itch. $%ain the verification is carried out and the user is deleted ifthe IDs match. If a different ta% is scanned throu%h the reader# -)D displays Fyou have sho&n different IDE. Ghen an RFID ta% comes in this ran%e# the reader detects it and sends a uni"ue code of the ta% serially. This serial code# consistin% of 1, bytes# is received by the microcontroller.

This code is treated as an ID for the user and is stored as an array in the microcontroller. If the ID is matched &ith this code# the user is %ranted access thou%h the system. For more details on &or6in% and connections of the circuit# refer RFID interfacin% throu%h serial interrupt.

CHAPTER,. COMPONENT DE!CRIPTION


,.1 AT-+C,1:
$T8()51 is an 8!bit microcontroller and belon%s to $tmelHs 8051 family. $T8()51 has =4/ of Flash pro%rammable and erasable read only memory .9R>21 and 1,8 bytes of R$2. It can be erased and pro%ram to a ma+imum of 1000 times.In =0 pin $T8()51# there are four ports desi%nated as .1# .,# .7 and .0. $ll these ports are 8!bit bi!directional ports# i.e.# they can be used as both input and output ports. 9+cept . 0 &hich needs e+ternal pull!ups# rest of the ports have internal pull!ups. Ghen 1s are &ritten to these port pins# they are pulled hi%h by the internal pull!ups and can be used as inputs.

P%. C/.0%1urat%/.:

10

Fi%;5.1 .in Dia%ram of 8051

These ports are also bit addressable and so their bits can also be accessed individually. .ort . 0 and ., are also used to provide lo& byte and hi%h byte addresses# respectively# &hen connected to an e+ternal memory. .ort 7 has multiple+ed pins for special functions li6e serial communication# hard&are interrupts# timer inputs and readC&rite operation from e+ternal memory. $T8()51 has an inbuilt ?$RT for serial communication. It can be pro%rammed to operate at different baud rates. Includin% t&o timers I hard&are interrupts# it has a total of si+ interrupts.

Features:
8 )ompatible &ith 2)S!51J .roducts 8 =4 /ytes of In!System Repro%rammable Flash 2emory 8 9ndurance; 1#000 GriteC9rase )ycles 8 Fully Static >peration; 0 '3 to ,= 2'3 8 Three!level .ro%ram 2emory -oc6 8 1,8 + 8!bit Internal R$2 8 7, .ro%rammable IC> -ines 8 T&o 1*!bit TimerC)ounters 8 Si+ Interrupt Sources 8 .ro%rammable Serial )hannel 8 -o&!po&er Idle and .o&er!do&n 2odes

PIN DE!CRIPTION: 2CC


Supply volta%e.

GND
<round.

P/rt 3 .ort 0 is an 8!bit open!drain bi!directional IC> port. $s an output port# each pin can
sin6 ei%ht TT- inputs. Ghen 1s are &ritten to port 0 pins# the pins can be used as hi%h impedance inputs. .ort 0 may also be confi%ured to be the multiple+ed lo& order addressCdata bus durin% accesses to e+ternal pro%ram and data memory. In this mode .0 has internal 11

pullups. .ort 0 also receives the code bytes durin% Flash pro%rammin%# and outputs the code
bytes durin% pro%ram verification. 9+ternal pullups are re"uired durin% pro%ram verification.

P/rt 1
.ort 1 is an 8!bit bi!directional IC> port &ith internal pullups. The .ort 1 output buffers can sin6Csource four TT- inputs. Ghen 1s are &ritten to .ort 1 pins they are pulled hi%h by theinternal pullups and can be used as inputs. $s inputs# .ort 1 pins that are e+ternally bein% pulled lo& &ill source current II-1 because of the internal pullups. .ort 1 also receives the lo&!order address bytes durin% Flash pro%rammin% and verification.

P/rt 2
.ort , is an 8!bit bi!directional IC> port &ith internal pullups. The .ort , output buffers can sin6Csource four TT- inputs. Ghen 1s are &ritten to .ort , pins they are pulled hi%h by the internal pullups and can be used as inputs. $s inputs# .ort , pins that are e+ternally bein% pulled lo& &ill source current II-1 because of the internal pullups. .ort , emits the hi%h!order address byte durin% fetches from e+ternal pro%ram memory and durin% accesses to e+ternal data memory that use 1*!bit addresses 2>@0 K D.TR1. In this application# it uses stron% internal pullups &hen emittin% 1s. Durin% access to e+ternal data memory that use 8!bit addresses 2>@0 K RI1# .ort , emits the contents of the ., Special Function Re%ister. .ort , also receives the hi%h!order address bits and some control si%nals durin% Flash pro%rammin% and verification.

P/rt 3
.ort 7 is an 8!bit bi!directional IC> port &ith internal pullups. The .ort 7 output buffers can sin6Csource four TT- inputs. Ghen 1s are &ritten to .ort 7 pins they are pulled hi%h by the internal pullups and can be used as inputs. $s inputs# .ort 7 pins that are e+ternally bein% pulled lo& &ill source current II-1 because of the pullups. .ort 7 also serves the functions of various special features of the $T8()51 as listed belo&; P/rt P%. A$ter.ate Fu.(t%/.s .7.0 R0D serial input port1 .7.1 T0D serial output port1 .7., IAT0 e+ternal interrupt 01 .7.7 IAT1 e+ternal interrupt 11 .7.= T0 timer 0 e+ternal input1

1,

.7.5 T1 timer 1 e+ternal input1 .7.* GR e+ternal data memory &rite strobe1
.7.D RD e+ternal data memory read strobe1 .ort 7 also receives some control si%nals for Flash pro%rammin% and verification.

R!T
Reset input. $ hi%h on this pin for t&o machine cycles &hile the oscillator is runnin% resets the device.

ALE4PROG
$ddress -atch 9nable output pulse for latchin% the lo& byte of the address durin% accesses to e+ternal memory. This pin is also the pro%ram pulse input .R><1 durin% Flash pro%rammin%. In normal operation $-9 is emitted at a constant rate of 1C* the oscillator fre"uency# and may be used for e+ternal timin% or cloc6in% purposes. Aote# ho&ever# that one $-9 pulse is s6ipped durin% each access to e+ternal Data 2emory. If desired# $-9 operation can be disabled by settin% bit 0 of SFR location 89'. Gith the bit set# $-9 is active only durin% a 2>@0 or 2>@) instruction. >ther&ise# the pin is &ea6ly pulled hi%h. Settin% the $-9!disable bit has no effect if the microcontroller is in e+ternal e+ecution mode.

P!EN
.ro%ram Store 9nable is the read strobe to e+ternal pro%ram memory. Ghen the $T8()51 is e+ecutin% code from e+ternal pro%ram memory# .S9A is activated t&ice each machine cycle# e+cept that t&o .S9A activations are s6ipped durin% each access to e+ternal data memory.

EA42PP
9+ternal $ccess 9nable. 9$ must be strapped to <AD in order to enable the device to fetch code from e+ternal pro%ram memory locations startin% at 0000' up to FFFF'. Aote# ho&ever# that if loc6 bit 1 is pro%rammed# 9$ &ill be internally latched on reset. 9$ should be strapped to @)) for internal pro%ram e+ecutions. This pin also receives the 1,!volt pro%rammin% enable volta%e @..1 durin% Flash pro%rammin%# for parts that re"uire 1,!volt @...

5TAL1
Input to the invertin% oscillator amplifier and input to the internal cloc6 operatin% circuit.

17

5TAL2
>utput from the invertin% oscillator amplifier. Os(%$$at/r C6ara(ter%st%(s 0T$-1 and 0T$-, are the input and output# respectively# of an invertin% amplifier &hich can be confi%ured for use as an on!chip oscillator# as sho&n in Fi%ure 1. 9ither a "uart3 crystal or ceramic resonator may be used. To drive the device from an e+ternal cloc6 source# 0T$-, should be left unconnected &hile 0T$-1 is driven as sho&n in Fi%ure ,. There are no re"uirements on the duty cycle of the e+ternal cloc6 si%nal# since the input to the internal cloc6in% circuitry is throu%h a divide!by!t&o flip!flop# but minimum and ma+imum volta%e hi%h and lo& time specifications must be observed.

I'$e M/'e
In idle mode# the ).? puts itself to sleep &hile all the on!chip peripherals remain active. The mode is invo6ed by soft&are. The content of the on!chip R$2 and all the special functions re%isters remain unchan%ed durin% this mode. The idle mode can be terminated by any enable interrupt or by a hard&are reset. It should be noted that &hen idle is terminated by a hard &are reset# the device normally resumes pro%ram e+ecution# from &here it left off# up to t&o machine cycles before the internal reset al%orithm ta6es control. >n!chip hard&are inhibits access to internal R$2 in this event# but access to the port pins is not inhibited. To eliminate the possibility of an une+pected &rite to a port pin &hen Idle is terminated by reset# the instruction follo&in% the one that invo6es Idle should not be one that &rites to a port pin or to e+ternal memory.

P/7er8'/7. M/'e
In the po&er!do&n mode# the oscillator is stopped# and the instruction that invo6es po&er!do&n is the last instruction e+ecuted. The on!chip R$2 and Special Function Re%isters retain their values until the po&er!do&n mode is terminated. The only e+it from po&er!do&n is a hard&are reset. Reset redefines the SFRs but does not chan%e the on!chip R$2. The reset should not be activated before @)) is restored to its normal operatin% level and must be held active lon% enou%h to allo& the oscillator to restart and stabili3e.

Pr/1ra9 Me9/r) L/(: B%ts


>n the chip are three loc6 bits &hich can be left unpro%rammed ?1 or can be pro%rammed .1 to obtain the additional features. Ghen loc6 bit 1 is pro%rammed# the lo%ic level at the 9$ pin is sampled and latched durin% reset. If the device is po&ered up &ithout a

1=

reset# the latch initiali3es to a random value# and holds that value until reset is activated. It is necessary that the latched value of 9$ be in a%reement &ith the current lo%ic level at that pin in order for the device to function properly. ARCHITECTURE OF -8BIT MICROCONTROLLER

Fi%; 5., $rchitecture of 8051

5.2 RFID MODULE:


RFID technolo%y is based on the concept of ma%netic couplin%# &hich is the principle that current flo&in% in one circuit can induce current flo& in another circuit throu%h a ma%netic field %enerated in the space bet&een the circuits. In passive RFID# there are t&o ma:or components; the reader and the mobile ta%. The reader has t&o main functions; the first is to transmit a carrier si%nal# and the second is to receive a response from any ta%s in pro+imity of the reader. $ ta% needs to receive the carrier si%nal# modify it in some &ay correspondin% to the data on the card# and retransmit the modified response bac6 to the reader. In modern passive RFID devices# the ta% consists of a small inte%rated circuit that performs the modulation1 and an antenna. The benefit of passive RFID is that it re"uires no internal po&er sourceB the circuit on the ta% is actually po&ered by the carrier si%nal. Thus# the carrier si%nal transmitted from the reader must be considerably lar%e so that the response can be read

15

even from the card. $s sho&n in the above bloc6 dia%ram RFID systems are classified accordin% to the properties of the data carrier called a transponder or ta%. The t&o ma:or classes of RFID transponders are active and passive. $ctive transponders contain a battery or are connected to an e+ternal po&er source. $ctive transponders are capable of lon%er communication distance and can perform data collection tas6s even &hen no reader is present. .assive transponders are po&ered by RF field. .assive transponders are smaller# have lo&er cost and re"uire no periodic maintenance. The simple RFID devices are sin%le bit 9lectronic $rticle Surveillance 9$S1 ta%s. It simply detects the presence and absence of an 9$S transponder in the reader 3one. 9$S ta%s are passive and must not contain inte%rated circuits. Fi+ed RFID and 2obile RFID; Dependin% on mobility# RFID readers are classified into t&o different types; fi+ed RFID and mobile RFID. If the reader reads ta%s in a stationary position# it is called fi+ed RFID. These fi+ed readers are set up specific interro%ation 3ones and create a LbubbleL of RF ener%y that can be ti%htly controlled if the physics is &ell en%ineered. This allo&s a very definitive readin% area for &hen ta%s %o in and out of the interro%ation 3one. >n the other hand# if the reader is mobile &hen the reader reads ta%s# it is called mobile RFID. 2obile readers include hand helds# carts and vehicle mounted RFID readers from manufacturers such as 2otorola# Intermec# Sirit# etc. There are three types of RFID ta%s; passive RFID ta%s# &hich have no po&er source and re"uire an e+ternal electroma%netic field to initiate a si%nal transmission# active RFID ta%s# &hich contain a battery and can transmit si%nals once an e+ternal source HInterro%atorH1 has been successfully identified# and battery assisted passive /$.1 RFID ta%s# &hich re"uire an e+ternal source to &a6e up but have si%nificant hi%her for&ard lin6 capability providin% %reater ran%e. 2ost passive RFID devices operate in one of three fre"uency bands; lo& fre"uency 1,5 6'31# hi%h fre"uency 17.5* 2'31# and ultra!hi%h fre"uency =00 to (70 2'31. Githin these bands# there are various &ays to modulate the si%nal so the reader can easily decipher the data. RFID can be used in a variety of applications# such as; M $ccess mana%ement

1*

M Trac6in% of %oods and RFID in retail M Trac6in% of persons and animals M Toll collection and contactless payment M 2achine readable travel documents M Smartdust for massively distributed sensor net&or6s1

RF TRAN!MITTER AND RECEI2ER MODULE:


These modules are no& &idely and cheaply available &ith the operatin% fre"uency of

=77 2'3. The transmitter module accepts serial data. The encoder I) ta6es in parallel data at the T0 side pac6a%es it into serial format and then transmits it &ith the help of a RF transmitter module. $t the R0 end# the decoder I) receives the si%nal via the RF receiver module# decodes the serial data and reproduces the ori%inal data in the parallel format.

FEATURE!
Ran%e in open space Standard )onditions1; 100 2eters R0 Receiver Fre"uency; =77 2'3 -o& .o&er )onsumption 9asy For $pplication R0 >peratin% @olta%e; 5@ T0 Fre"uency Ran%e; =77.(, 2'3 T0 Supply @olta%e; 7@ N *@

1D

Fi%; 5.7 =77 2'3 Transmitter

THE T5 33 ;Tra.s9%ss%/. M/'u$e):


The T0=77 &ireless RF transmitter uses onCoff 6eyin% to transmit data to the

matchin% receiver# R0=77. The data input O6eysP the sa& resonator in the transmitter &hen the input is Q7 volts or %reater# $2 modulatin% the data onto the =77 2'3 carrier. The data is then demodulated by the receiver# &hich accurately reproduces the ori%inal data. The data input is )2>S level )ompatible &hen the unit is run on Q5 volts. Ghen drivin% &ith a )2>S input# there must be enou%h level to achieve at least 7@ on the data input# 5@ is preferable. This is due to the start!up time of the oscillator needin% to be fast to accurately reproduce your data. If the volta%e is too lo&# the oscillator &ill not start fast enou%h to accurately reproduces your data# especially at hi%her data rates. -uc6ily not much drive is needed# so this should be easy since it is 22K ohms of load. Almost any CMOS
output will drive this without any problems. There are some CMOS outputs which have very little drive capability which may not work so testin! the volta!e at the data input may be a wise choice if you are havin! problems.

18

Fi%; 5.= =77 2'3 RF Receiver

T6e R5 33 ;Re(e%<er M/'u$e):


The receiver sho&n in Fi%ure also contains :ust one transistor. It is biased to act as a re%enerative oscillator# in &hich the received antenna si%nal causes the transistor to s&itch to hi%h amplification# thereby automatically arran%in% the si%nal detection. Ae+t# the Fra&E demodulated si%nal is amplified and shaped!up by op!amps. The result is a fairly clean di%ital si%nal at the output of the receiver. The lo%ic hi%h level is at about ,C7 of the supply volta%e# i.e.# bet&een 7 @ and =.5 @. The ran%e of the simple system sho&n in Fi%ures is much smaller than that of more e+pensive units# mainly because of the lo& transmit po&er appro+. 1 mG1 and the relative insensitivity and &ide!band nature of the receiver. 2oreover# amplitude!modulated noise is not suppressed in any &ay.

,.3 LI=UID CR#!TAL DI!PLA# ;LCD):


$ $%&u%' (r)sta$ '%s*$a) LCD1 is a thin# flat panel used for electronically displayin% information such as te+t# ima%es# and movin% pictures. Its uses include monitors for computers# televisions# instrument panels# and other devices ran%in% from aircraft coc6pit displays# to every!day consumer devices such as video players# %amin% devices# calculators# and telephones. $mon% its ma:or features are its li%ht&ei%ht construction# its portability# and its ability to be produced in much lar%er screen si3es than are practical for the construction of 1(

cathode ray tube )RT1 display technolo%y. Its lo& electrical po&er consumption enables it to be used in battery!po&ered electronic e"uipment. It is an electronically!modulated optical device made up of any number of pi+els filled &ith li"uid crystals and arrayed in front of a li%ht source bac6li%ht1 or reflector to produce ima%es in color or monochrome. The earliest discovery leadin% to the development of -)D technolo%y# the discovery of li"uid crystals# dates from 1888.

PIN DE!CRIPTION:

Fi%;5.5 .in Dia%ram of -)D

2CC> 2!! a.' 2EE:


Ghile @)) and @SS provide Q5@ and %round respectively# @99 is used for controllin% -)D contrast.

R! ;REGI!TER !ELECT):
There are t&o important re%isters inside the -)D. Ghen RS is lo& 01# the data is to be treated as a command or special instruction such as clear screen# position cursor# etc.1. Ghen RS is hi%h 11# the data that is sent is a te+t data &hich should be displayed on the screen. For e+ample# to display the letter LTL on the screen you &ould set RS hi%h.

,0

R" ;READ4"RITE):
The R" line is the LReadCGriteL control line. Ghen RG is lo& 01# the information on the data bus is bein% &ritten to the -)D. Ghen RG is hi%h 11# the pro%ram is effectively "ueryin% or readin%1 the -)D. >nly one instruction L<et -)D statusL1 is a read command. $ll others are &rite commands# so RG &ill almost be lo&.

EN ;ENABLE):
The EN line is called L9nableL. This control line is used to tell the -)D that you are sendin% it data. To send data to the -)D# your pro%ram should first set this line hi%h 11 and then set the other t&o control lines andCor put data on the data bus. Ghen the other lines are completely ready# brin% EN lo& 01 a%ain. The 1!0 transition tells the ==D80 to ta6e the data currently found on the other control lines and on the data bus and to treat it as a command.

D38D? ;DATA LINE!):


The 8!bit data pins# D0!DD are used to send information to the -)D or read the content of the -)DEs internal re%isters. To display letters and numbers# &e send $S)II codes for the letters $!R# a!3 and numbers 0!( to these pins &hile ma6in% RSS1. There are also instruction command codes that can be sent to the -)D to clear the display or force the cursor to the home position or blin6 the cursor. Ge also use RSS0 to chec6 the busy fla% bit to see if the -)D is ready to receive the information. The busy fla% is DD and can be read &hen RCG S 1 and RSS0# as follo&s; if RCG S 1# RS S 0. Ghen DDS1 busy fla% S 11# the -)D is busy ta6in% care of internal operations and &ill not accept any ne& information. Ghen DD S 0# the -)D is ready to receive ne& information.

,. 2OLTAGE REGULATOR
The Di%ital board can use any po&er supply that creates a D) volta%e bet&een * and 1, volts. $ 5@ volta%e re%ulator D8051 is used to ensure that no more than 5@ is delivered to the Di%ital board re%ardless of the volta%e present at the T1, connector provided that volta%e is less than 1,@D)1. The re%ulator functions by usin% a diode to clamp the output volta%e at 5@D) re%ardless of the input volta%e ! e+cess volta%e is converted to heat and dissipated throu%h the body of the re%ulator. If a D) supply of %reater than 1,@ is used# e+cessive heat &ill be %enerated# and the board may be dama%ed. If a D) supply of less than 5@ is used# insufficient volta%e &ill be present at the re%ulators output.

,1

Fi%;5.* @olta%e Re%ulator

,., RE!I!TOR!
COLOUR CODE $s Resistors are so small it is not possible to print their resistance value on the side so a )olour code system is used.

Fi%; 5.D )olour )ode >f Resistors

,,

FI<!10., )>2/IA$TI>A >F R9SIST>RS

RE!I!TOR COMBINATION RE!I!TOR! IN !ERIE!


Ghen t&o or more resistors are placed end to end they are said to be connected in

series. The positions of resistors in circuits are sho&n by a se"uence of numbers from R1# R,# R7# up&ards. Aot to be confused &ith their values ,R, =4D etc.Total resistance for resistors in series is R S R1 Q R,

RE!I!TOR IN PARALLEL
Ghen t&o or more resistors are placed side by side they are said to be connected in parallel. Total resistance for t&o resistors in parallel is R S R1 + R,1C R1 Q R,1.

,7

RE!I!TOR! IN !ERIE! @ PARALLEL


The total resistance for resistors placed in a combination of series and parallel is found in sta%es. First add the t&o resistors in series. Then find the total resistance. R= S R1 QR, Then R S R= + R7 C R= Q R7 This can be combined into R1 Q R,1 + R7 C R1 Q R,1 Q R7

,.A CAPACITOR
The capacitorHs function is to store electricity# or electrical ener%y. The capacitor also functions as a filter# passin% alternatin% current $)1# and bloc6in% direct current D)1. This symbol is used to indicate a capacitor in a circuit dia%ram. The capacitor is constructed &ith t&o electrode plates facin% each other# but separated by an insulator. Ghen D) volta%e is applied to the capacitor# an electric char%e is stored on each electrode. Ghile the capacitor is char%in% up# current flo&s.

ELECTROL#TIC CAPACITOR ;ELECTROCHEMICAL T#PE CAPACITOR)

$luminum is used for the electrodes by usin% a thin o+idi3ation membrane. -ar%e values of capacitance can be obtained in comparison &ith the si3e of the capacitor# because the dielectric used is very thin

Fi%5.8E
#TIC

LECTROL

CAPACITOR

,=

CERAMIC CAPACITOR!
)eramic capacitors are constructed &ith materials such as titanium acid barium used as the dielectric. Internally# these capacitors are not constructed as a coil# so they can be used in hi%h fre"uency applications. Typically# they are used in circuits &hich bypass hi%h fre"uency si%nals to %round. These capacitors have the shape of a dis6. Their capacitance is comparatively small.

Fi%;5.( )eramic )apacitor

MICACAPACITOR
These capacitors use 2ica for the dielectric. 2ica capacitors have %ood stability because their temperature coefficient is small. /ecause their fre"uency characteristic is e+cellent# they are used for resonance circuits# and hi%h fre"uency filters. $lso# they have %ood insulation# and so can be utili3ed in hi%h volta%e circuits. It &as often used for 9+pensive. vacuum tube styleradio transmitters#etc. 2ica capacitors do not have hi%h values of capacitance# and they can be relatively

Fi%;5.( 2ica )apacitor

,5

,.? DC MOTOR
'ere slo& speed dc motor &ith %ear bo+ to reduce the speed of the platform. This type of %ear motor is %ettin% from the second hand machine. Supply volta%e of this dc motor is * to ( volt dc. $s &e vary the volta%e speed is also vary. )urrent consumption of dc motor is ,00 ma. It is also possible to use a stepper motor. If &e use stepper motor then &e re"uire a hi%h current supply. Aormal stepper motors re"uire a minimum 1 $ po&er supply. /rushless D) motors use a rotatin% permanent ma%net in the rotor# and stationary electrical ma%nets on the motor housin%. $ motor controller converts D) to $). This desi%n is simpler than that of brushed motors because it eliminates the complication of transferrin% po&er from outside the motor to the spinnin% rotor. $dvanta%es of brushless motors include lon% life span# little or no maintenance# and hi%h efficiency. Disadvanta%es include hi%h initial cost# and more complicated motor speed controllers

Fi%; 5.10 Dc 2otor

,.- PRINTED CIRCUIT BOARD:8


The use of miniaturi3ation and sub miniaturi3ation in electronic e"uipment desi%n has been responsible for the introduction of a ne& techni"ue in inters component &irin% and assembly that is popularly 6no&n as printed circuit. The printed circuit boards .)/s1 consist of an insulatin% substrate material &ith metallic circuitry photo chemically formed upon that substrate. Thus .)/ provides sufficient mechanical support and necessary electrical connections for an electronic circuit.

,*

A'<a.ta1es /0 *r%.te' (%r(u%t B/ar's: 8 11 )ircuit characteristics can be maintained &ithout introducin% variations inter circuit capacitance. ,1 Gave solderin% or vapour phase reflo& solderin% can mechani3e component &irin% and assembly. 71 2ass production can be achieved at lo&er cost. =1 The si3e of component assembly can be reduced &ith correspondin% decrease in &ei%ht. 51 Inspection time is reduced as probability of error is eliminated. T)*es /0 PCBCs: 8 There are four ma:or types of .)/Es; ! 11 Sin%le sided .)/; ! In this# copper trac6s are on one side of the board# and are the simplest form of .)/. These are simplest to manufacture thus have lo& production cost. ,1 Double sided .)/;! In this# copper trac6s are provided on both sides of the substrate. To achieve the connections bet&een the boards# hole platin% is done# &hich increase the manufacturin% comple+ity. 71 2ultilayered .)/; ! In this# t&o or more pieces of dielectric substrate material &ith circuitry formed upon them are stac6ed up and bonded to%ether. 9lectrically connections are established from one side to the other and to the layer circuitry by drilled holes# &hich are subse"uently plated throu%h copper. =1 Fle+ible .)/; ! Fle+ible circuit is basically a hi%hly fle+ible variant of the conventional ri%id printed circuit board theme.

PCB Ma.u0a(tur%.1 Pr/(ess: 8 There are a number of different processes# &hich are used to manufacture a .)/# &hich is ready for component assembly# from a copper clad base material. These processes are as follo&s

,D

.reprocessin%; ! This consists of initial preparation of a copper clad laminate ready for subse"uent processin%. Ae+t is to drill toolin% holes. .assin% a board throu%h rollers performs cleanin% operation. .hotolitho%raphy; ! This process for .)/s involves the e+posure of a photo resist material to li%ht throu%h a mas6. This is used for definin% copper trac6 and land patterns. 9tchin%; ! The etchin% process is performed by e+posin% the surface of the board to an etchant solution &hich dissolves a&ay the e+posed copper areas .The different solutions used are; Fe)l# )u)l# etc. Drillin%; ! Drillin% is used to create the component lead holes and throu%h holes in a .)/ .The drillin% can be done before or after the trac6 areas have been defined. Solder 2as6in%; ! It is the process of applyin% or%anic coatin%s selectively to those areas &here no solder &ettin%s is needed .The solder mas6 is applied by screen! printin%. 2etal .latin%; ! The platin% is done to ensure protection of the copper trac6s and establish connection bet&een different layers of multiplayer boards. .)/s are stac6ed before bein% ta6en for final assembly of components .The .)/ should retain its solder ability. /are!/oard Testin%; ! 9ach board needs to ensure that the re"uired connections e+ist# that there are no short circuits and holes are properly placed .The testin% usually consists of visual inspection and continuity testin%.

,.+ KEIL !OFT"ARE:


2any companies provide the 8051 assembler# some of them provide share&are version of their product on the Geb# 4iel is one of them. Ge can do&nload them from their Gebsites. 'o&ever# the si3e of code for these share&are versions is limited and &e have to consider &hich assembler is suitable for our application.

Ke%$ U<%s%/.2:
This is an ID9 Inte%rated Development 9nvironment1 that helps you &rite# compile# and debu% embedded pro%rams. It encapsulates the follo&in% components; 8 $ pro:ect mana%er 8 $ ma6e facility

,8

Tool confi%uration 8 9ditor 8 $ po&erful debu%%er To %et start here are some several e+ample pro%rams

Bu%$'%.1 a. A**$%(at%/. %. U<%s%/.2:


To build compile# assemble# and lin61 an application in u@ision,# you must; 8 Select .ro:ectU>pen .ro:ect For e+ample# DC1AADE5AMPLE!DHELLODHELLO.U221 8 Select .ro:ect ! Rebuild all tar%et files or /uild tar%et. ?@ision, compiles# assembles# and lin6s the files in your pro:ect.

Creat%.1 )/ur O7. A**$%(at%/. %. U<%s%/.2:


To create a ne& pro:ect in u@ision,# you must; 8 Select .ro:ect ! Ae& .ro:ect. 8 Select a directory and enter the name of the pro:ect file. 8 Select .ro:ect ! Select Device and select an 8051# ,51# or )1*+CST10 from the Device 8 Database 8 )reate source files to add to the pro:ect. 8 Select .ro:ect ! Tar%ets# <roups# and Files. $ddCFiles# select Source and add the source files to the pro:ect. 8 Select .ro:ect ! >ptions and set the tool options. Aote &hen you select the tar%et device from the Device Database all!special options are set automatically. 5ou only need to confi%ure the memory map of your tar%et hard&are. Default memory model settin%s are optimal for most. <roup1# device

A**$%(at%/.s:
8 Select .ro:ect ! Rebuild all tar%et files or /uild tar%et.

DeBu11%.1 a. A**$%(at%/. %. U<%s%/.2:


To debu% an application created usin% u@ision,# you must; 8 Select Debu% ! StartCStop Debu% Session. 8 ?se the Step toolbar buttons to sin%le!step throu%h your pro%ram. 5ou may enter <# main in the >utput Gindo& to e+ecute to the main ) function.

,(

8 >pen the Serial Gindo& usin% the Serial V1 button on the toolbar. 8 Debu% your pro%ram usin% standard options li6e Step# <o# /rea6# and So on.

,.13 PROTEU!:
.roteus is the embedded system simulation and developin% platform developed by /ritain -ab center )ompany# this soft&are has the follo&in% characteristics; 8 )an carry on the intellectual principle /ututB The ones that paid soft&are debu%%in% and one!chip computer and peripheral circuit of the one!chip computer# in coordination &ith emulationB 2eet the standard of the one!chip computer soft&are simulation system. 8 Support common one!chip computer type and .'I-I.S )o. $R2D series -.)1 .rocessor and common peripheral device# li6e 8,55# $D)080(. 8 )an &ith 7 4eil @ersion# $DSl t&o inte%rated development environment combine# until and after the pro%ram compilin% that lan%ua%e ) &rite &ith collect# carry on the system simulation that the soft&are and hard&are combines.

,.11 L2+3D IC
*00m$ >?T.?T )?RR9AT )$.$/I-IT5 .9R )'$AA91.,$ .9$4 >?T.?T )?RR9AT non repetitive1 .9R )'$AA99A$/-9 F$)I-IT5 >@9RT92.9R$T?R9.R>T9)TI>A -><I)$- P0P IA.?T @>-T$<9 ?. T> 1.5 @ 'I<' A>IS9 I22?AIT51 IAT9RA$- )-$2. DI>D9S

DE!CRIPTION The Device is a monolithic inte%rated hi%h volta%e# hi%h current four channel driver desi%ned toaccept standard DT- or TT- lo%ic levels and drive inductive loads such as relays solenoides# D) and steppin% motors1 and s&itchin% po&er transistors. To simplify use as t&o brid%es each pair of channels is e"uipped &ith an enable input. $ separate supply input is provided for the lo%ic# allo&in% operation at a lo&er volta%e and internal clamp diodes are included.

70

This device is suitable for use in s&itchin% applications at fre"uencies up to 5 6'3. The -,(7D is assembled in a 1* lead plastic pac6aa%e &hich has = center pins connected to%ether and used for heatsin6in% The -,(7DD is assembled in a ,0 lead surface mount &hich has 8 center pins connected to%ether and used for heatsin6in%.

Fi%; 5.11 /loc6 dia%ram of -,7(D

,.12 E=UIPMENT! RE=UIRED


The various tools and e"uipments re"uired for construction of an intercom are %iven belo&; ! 1. Solder 6it consist of; a. b. c. ,. 7. =. 5. *. D. Solderin% iron. Solderin% &ire. Flu+.

)ombination pliers. T&ee3ers -on% nose pliers .en 6nife /rushes. Scre& drivers.

71

8. (. 10. 11.

Small files. )utter )lipper /readboard.

PRECAUTION!
1. ,. 7. =. The "uantity of solderin% of component on .)/ should be %ood "uantity. The component fitted on the .)/ should loosely fit. Do not touch the .)/ layer &ith hands and for fittin% component use lon% nose liers only. ?se ,5 & pencil bit solderin% iron only.

7,

CHAPTERA. CODING
VincludeWre%51.hX sfr ldataS0+0a0B sbit enS.7YDB sbit r&S .7Y*B sbit rsS.7Y5B int msdelay void1B int delay void1 B sbit s1S.1Y0B sbit s,S.1Y1B sbit s7S.1Y,B sbit s=S.1Y7B sbit vtS.1Y=B int "B unsi%ned char lcddata unsi%ned char1B unsi%ned char lcdcmd unsi%ned char1B unsi%ned char arivZ[S\L/?S $T -$ST ST>.L]B unsi%ned char ariv1Z[S\L D>>R >.9A L]B unsi%ned char ariv,Z[S\L D>>R )->S9D L]B unsi%ned char &elZ[S\L^^^^ G9-)>29 ^^^L]B void main void1 \ int iB lcdcmd 0+781B delay 1B lcdcmd 0+0e1B delay 1B lcdcmd 0+011B delay 1B

77

lcdcmd 0+0*1B delay 1B lcdcmd 0+801B delay 1B CC .1S0+ffB vtS1B &hile 11\ "S0B &hile vtSS11\ if "SS01\ s1S1B s,S0B ] "QQB delay 1Bdelay 1Bdelay 1Bdelay 1Bdelay 1Bdelay 1Bdelay 1B delay 1Bdelay 1Bdelay 1Bdelay 1Bdelay 1Bdelay 1Bdelay 1B s1S0B s,S0B lcdcmd 0+011B delay 1B lcdcmd 0+801B delay 1B for iS0BiWS15BiQQ1\ lcddata ariv1Zi[1B delay 1B ]

] s1S0B s,S0B lcdcmd 0+011B delay 1B

7=

lcdcmd 0+801B delay 1B for iS0BiWS15BiQQ1\ lcddata ariv,Zi[1B delay 1B ] ] ] unsi%ned char lcdcmd unsi%ned char value1 \ ldataSvalueB rsS0B r&S0B enS1B msdelay 1B enS0B return B ] unsi%ned char lcddata unsi%ned char value1 \ ldataSvalueB rsS1B r&S0B enS1B msdelay 1B enS0B return B ] int delay void1 \ int iS0#:S0B for iS0BiW100BiQQ1 \

75

for :S0B:W100B:QQ1 \] ] ] int msdelay void1 \ int iS0B for iS0BiW500BiQQ1 \] ]

7*

CHAPTER?. APPLICATION
^ RFID is used for many applications such as;$utomated electronic toll stations &hich can identifyvehicles passin% throu%h &ithout havin% to stop and then debits their account. Identify and monitor railcars and containers. RFID ta%s help farmers trac6 their farm animals# and is used in &ildlifeconservation. $lso helps to identify our animalcompanions if they should ever become lost. ^ )ustomerscan pay for their fuel at the pump &ith :ust a &ave of their 6ey ta%. $n increase in demand has beenseen for security applications such as homeland security# employee identification# %ainin% entrance andcontrollin% access of vehicles to buildin%s# %ated communities# corporate campuses and airports. ^ Some other current uses for RFID include &aste mana%ement# automatin% par6in% and mana%in%traffic# the dispensin% of all types of products# providin% s6i lift access# the trac6in% of library boo6s andmore. ^ 2a:or %ro&th in the future of RFID &ill come from real!time location systems RT-S1# assetmana%ement# ba%%a%e handlin% and cash less payment systems. /usiness se%ments such as retail#lo%istics# &arehousin% and manufacturin% &ill %reatly benefit from an increase in supply chain.

7D

CHAPTER -. COCLU!ION
In conclusion# the ob:ective to build an RFID based attendance system &ith a door unit &as successfully achieved. In terms of performance and efficiency# this pro:ect has provided a convenient method of attendance mar6in% compared to the traditional method of attendance system. /y usin% databases# the data is more or%ani3ed. This system is also a user friendly system as data manipulation and retrieval can be done via the interface# ma6in% it a universal attendance system. Thus# it can be implemented in either an academic institution or in or%ani3ations. 'o&ever# some further improvements can be made on this RFID in order to increase its reliability and effectiveness. ^/y incorporated an indicator or an -)D screen in the system to indicate &hen an unre%istered card is scanned. ^$n I. camera can be inte%rated into this system to enable the monitor to vie& the person &ho ma6es the transaction to avoid a problem of a person scannin% in for another person. ^$ reminder alert also can be developed to effectively trac6 any ID that has been absent for an unacceptable times in a ro&. ^Finally# this attendance system can be improved by addin% a feature &here the attendance system indicates &hen an employee or a student is late for &or6 or classes as the case maybe.

78

CHAPTER+. REFERENCE!
TE5T BOOK! REFERED:
1. OThe 8051 2icrocontroller and 9mbedded SystemsP by 2uhammad $li 2a3idi and Tanice <illispie 2a3idi# .earson 9ducation. ,. 8051 2icrocontroller $rchitecture# pro%rammin% and application by 49AA9T' T$5$-$ 7. $T29- 8()51 Data sheet

"EB!ITE! 2IE"ED:
8 777.at9e$.(/9 8 777.'a$$asse9%(/.'u(t/rs.(/9 8 777.9aE%98%(.(/9 8 777.a$$'atas6eets.(/9 8 777.'%1%.(/9 8 777.7%:%*e'%a./r1

7(