You are on page 1of 38

Rfid based security access control system

1. INTRODUCTION

In this developing world, safety and security is given prime importance. In the day to day
life there come various situations in which security is being challenged. The need for developing
an error free and cheap security access control system is greatly demanding. It will be a boon in
many sectors like banking, defense, and finance. There are situations in which access must only be
granted to certain authorized persons. Absence of reliable security systems can lead to
catastrophe. Our project ‘security access control system using rfid ’ is a reasonable solution in
terms of security and access control .this type of security systems are now used in many private
sectors.

Rfid radio frequency identification is a general term that is used to describe a system that
transmits the identity (in the form of a unique serial number) of an object wirelessly, using radio
waves. rfid technologies are grouped under the more generic automatic identification (auto
id)technologies. Radio-frequency identification (rfid) is an automatic identification method,
relying on storing and remotely retrieving data using devices called RFID tags or transponders.

RFID stands for radio frequency identification, and is contact less storage of small
amounts of data on trivial circuits powered by the reader infrastructure itself. Its most commonly
deployed now a days as a replacement for magnetic swip oriented system, as the lack of an
expensed data structure and the absence of contact during scanning make RFID astonishingly
reliable.

An RFID tag is an object that can be attached to or incorporated in to a product, animal or


person for the purpose of identification using radio waves. All RFID tags contain at least two
parts. One is an integrated circuit for storing and processing information, modulating and
demodulating a radiofrequency signal and perhaps other specialized functions. The second is an
antenna for receiving and transmitting the signal. The RFID tag can automatically be read from
several meters away and does not have to be in the line of sight of the reader. An RFID tag
consists of small silicon microchip attached to an antenna. The chip itself can be as small as half a
millimeter squares roughly the size of a tiny seed. Some RFID tags are thin enough to be
embedded in paper.

1
Rfid based security access control system

2. Security Access Control System Using Rfid

In the present scenario security access control system are of different type. It includes security
system using keypad, barcode systems and Magnetic card systems. Swiping of card is necessary
for verification of card. There is a chance of occurring error. error may occur due to the speed of
the swiping and angle of the swiping.

There are many disadvantages in using only keypad access.

• Anyone who knows the passwords can access the system

• Possibility of hacking is high

• Once you forget the password the whole system needs to be reset

• There is a possibility of tampering with the keypad

Using the rfid, we can overcome the limitations. In our system there is no need for swiping. So the
error probability is very low compared to other systems. Thus the system is more reliable .it
consists of an rfid reader and rfid tags.

A person who needs to access a door must have an rfid tag with him. The tag is shown to
the reader when a ready message is displayed on the LCD. The microcontroller compares each
digit of number received from the reader and set a flag. For the demonstration purpose we divided
it into three categories. The first is for our HOD, second for our project GUIDE, and the third one
cannot be accessed. in our system the card belonging to HOD gets accessed showing the message
“MR THAJUDDIN WELCOME “ and the door is opened .our PROJECT GUIDE shows a
message “MR SOMASUNDARAN WELCOME” when the corresponding card was shown and
the door is accessed. The third card was denied access to the door. In all the conditions, when the
access is granted, the relay circuit is activated.

2
Rfid based security access control system

Here an 89c52 microcontroller is used. As this microcontroller has an internal ROM there
is no need for an external ROM. Display used is a 16 x 2 line display capable of displaying
alphanumeric characters. the relay used is a 5 v

3. Requirements of the Project


1. Hardware Requirements

semiconductor

RFID/ACCESS CONTROL

Item Quantity Reference Description

1 12 C1,C2,C4,C6,C9,C11,C12, CAPACITOR 0.1MFD


C13,C14,C15,C16,C17
2 1 C3 CAPACITOR 10MFD
3 1 C5 CAPACITOR 2200/16V
4 2 C8,C7 CAPACITOR 30PFD
5 1 C10 CAPACITOR 100MFD
6 6 D2,D3,D6,D7,D8,D9 DIODE 1N4007
7 2 JP1,JP2 2PIN SHOWEDED HEADER
WITH CABLE
8 1 JP3 6PIN SHOWEDED HEADER
WITH CABLE
9 1 JP4 15PIN SHOWEDED HEADER
WITH CABLE
10 1 J2 8PIN SHOWEDED HEADER
WITH CABLE
11 1 J4 3PIN HEADER
12 1 LS1 RELAY DS2E-S-DC5V
13 1 Q1 TRANSISTOR BC548
14 1 RN1 ( 8x1 RESISROR PACK)
RESISTOR 10K
15 1 R1 RESISTOR
16 1 R2 RESISTOR 100K
17 1 U1 IC 40PIN AT89C52
18 2 U12,U2 IC 20PIN 74HC373
19 1 U3 IC 28PIN HM62256
20 1 U6 IC 14PIN 74HC20
21 1 U7 IC 14PIN 74HC14
22 1 U9 IC 8PIN MAX485
23 1 U10 IC 14PIN 74HC08
24 1 U11 IC 16 PIN DM74LS138
25 1 U13 IC 20PIN 74LS244
26 1 U14 IC 28PIN 27C256

3
Rfid based security access control system

27 1 U8 IC LM7812C/TO220
28 1 U5 IC LM7805C/TO220
29 1 Y1 CRYSTAL 11.059MHz
30 IC SOCKETS

COMPONENTS OUTSIDE PCB

1 1 TRANSFORMER 12V
2 1 DISPLAY

3.2 Software Requirements

We first of all require software to draw the circuit diagram. In the present market
there is much software for drawing the circuit and it can also be used to check
any errors in the circuit diagram. We also need software to draw the PCB layout of
the circuit so that the desired PCB can be obtained having less complexity. The
different software requirements are listed below.

Operating system:

We require an operating system to write the program. OS is essential for the working
of other software such as ORCAD and Kiel. Here the operating system used is
windows XP professional.

ORCAD

This software is very useful in drawing the circuit and making the PCB layout. The
main advantage of using ORCAD is its function is simple. It can be very adaptable for

4
Rfid based security access control system

a completely new user to this software. We can try out different combinations of PCB
layout of a single circuit and can obtain a more organized layout.

Kiel software

Kiel software is used to convert the program written using 8051 instructions to its
hex format so that it could be embedded to the microcontroller .keil software is
very helpful in debugging the program.

4.BLOCK DIAGRAM

5
Rfid based security access control system

Microcontroller

Here an 89c52 microcontroller is used. As this microcontroller has an internal


ROM there is no need for an external ROM. It has an internal Rom of 8K which is
sufficient for the inclusion of the program requiring for this project. If the program
memory is greater then is an additional facility to keep an external ROM.

RFID reader and tags

Rfid reader module continuously produces radio frequency signals. These tags are
passive ones and it contains a embedded circuit and a coil. when the tag come near
the field produced by the reader it gets activated .the data present in the card is
send to the reader .the reader gives the details of the card that is a 26 bit data as
output in both Weigand format and RS 485 format.

5. Hardware Description

The main unit is 89c52 microcontroller. The crystal oscillator circuitries


generate the clock pulse by which all internal operations are synchronized. The reset
pin of 89c52 is active high. In order to provide this a reset circuitry is provided.
Crystal oscillator used is having a frequency of 11.059MHz. This particular frequency
crystal oscillator is used to make serial communication easy for further development
of the project.

5.1 Memory Space Decoding

External memory is added to the microcontroller by using port as data and lower
order address bus and port 2 as the higher order address bus. The data and lower
address are time multiplexed on port 0. An external 74HC273 address octal latch is
connected to port 0 to store the lower address byte whenever external memory is
accessed. The low order address is gated in to transparent latch by the address latch
enable pulse from the 89c52.ALE is applied to the latch enable pin of 74373.

6
Rfid based security access control system

When internal ROM is not used or if the memory fewer versions, 8051 is used the EA
(external access) pin is connected to Vcc. when 89c52 is used, there is no need for
an external ROM since it has 8k of external ROM.

Entirely different control lines from the microcontroller address RAM and ROM. PSEN
for the ROM and RD and RD and WR for the RAM differentially select the components
according to the instructions executed.

5.2 Accessing External RAM

External RAM is to be connected in parallel sharing the same address latch output,
except pins CE, OE, and W. In this case the CE RAM pin is not connected to an
“external output decoding circuit that activates low level whenever the 89c52
devices RD or WR low meaning READ from or WRITE to the external RAM chip.

To write into the RAM the 89C52 post the high order address 8 bit at P2 the low order
address 8 bit at P0, pulse up ALE to store P0 at the latches, then post the data to be
written at P0 and pulse WR low this WR low need to be translated the “external
address decoding circuit “into –W, +OE and –CE to the RAM .this stores the byte from
P0 into the RAM addressing by P2 and the output of 74HC373.

To read from the RAM, the 89C52 does the same addressing , but now it only
pulses low and RD pin and the “external address decoding unit” translates it into
+W, +OE and –CE to the RAM. This reads the ram and its contents are posted at
the RAM output ,so 89C52 reads this byte available at the port P0 input pins.0000h
to 7ffffh is the memory locations address of the interfaced external SRAM .apart
from the RAM ,the 64 k module is a 16 character x 2 line output device .it is also
addressed by the MOVX instruction .so in order to select the correct components
decoding is done.

The upper 4 bits of the address bus is A15, A14, A13, A12 are given into a four input
NAND gate. The output of this is fed as t he enable signal E, for a 3 to 8
decoder (74LS138) the output of the NAND gate is inverted (using 74HC20)
and is used as the chip enable (CE) line of the RAM.

When CE of RAM is enabled and if the WR or RD pin goes low then writing or reading
of data from the addressed memory location takes place

In the 74138, 3 to 8 decoder, address line A8, A9, A10 are the input lines .the Y1
output line of the Decoder is used as the enable line for the LCD module. So
the enabling of LCD is done when the bit assignment of address is F100 done
when the address bus is F100h.

In order to write data that has to be displayed on the LCD RAM an octal latch that is
selected on WR signal (low) is used .to input the instruction and data

7
Rfid based security access control system

separately into the LCD, register select (RS) input is given as the 7th bit of port 1
P1.6 is high data input is taken as the ASCII data that is to be displayed.

RFID tags are used as a key to open a lock and RFID reader is taken as a lock. When
the tag is shown to the reader, it identifies the tag and sends a corresponding
data to the microcontroller.

Interfacing of RFID reader with microcontroller is done with the help o f an AND gate.
We used WEIGAND output format. When data is available on the output pin of
the reader, the microcontroller will get interrupted. The data pins are
connected to 0th pin and 1st pin of PORT1.fromthese pins microcontroller reads
the 26 bit data and process the same.

Microcontroller

A microcontroller is a computer on chip or, if you prefer, a single chip computer.


micro suggests that the device might be used to control objects, processors or
events. Another term to describe a microcontroller is embedded
microcontroller because the microcontroller and its support circuits are often
built into, or embedded in, the device they control.

A microcontroller is similar to the microprocessor inside a personal computer.


Example of microprocessor includes Intel’s 8086, Motorola‘s 68000, and zilog’s
Z80 ATM9C51. The microprocessor and controller contain a processing unit, or
CPU. The CPU executes instructions that perform the basic logic math and
data moving functions of a computer. To make a complete computer, a
microprocessor requires memory for storing data and programs, and
input/output (I/O) interface for connecting external devices like keyboards and
displays.

In contrast, a microcontroller is a single chip computer because it contains memory


and I/O interfaces in addition to the CPU. because the amount of memory and
interfaces that can fit on a single chip is limited, microcontroller tend to used
in smaller systems that require little more than the microcontroller and a few
support components.

Figure below shows the block diagram of a typical microcontroller.

ARITHEMETIC TIMER/ I/O PORTS

AND LOGIC COUNTER

ACCUMALATER I/O PORTS

REGISTERS INTERNAL ROM INTRUPT

CIRCUITS

8
Rfid based security access control system

INTERNAL RAM

STACK PROGRAM CLOCK

COUNTER CIRCUITS

5.3.1THE 8051 FAMILY

The 8051 family of microcontroller is based on an architecture, which is highly


optimized for embedded control system. It is used in a wide variety of
application from military equipments to automobile to keyboard your P.C
second only to motorola68HC11in 8 bit processor sales, the 8051 family of
Atmel, Intel, Philips and Siemens. These manufactures have added numerous
features and peripherals to 8051such as I2C interfaces, analog to digital
converters, watchdog timers and pulse width modulation outputs. Variation of
the clock seed up to 40 MHz and voltage requirements down to 1.5 volts are
available

The basic architectures consist of the following features.

8bit CPU with registers A (accumulator) and B

16 bit program counter (PC) and data pointer (DPTR)

18 bit program status word (PSW)

8 bit stack pointer (SP)

Internal ROM or EEPROM

Internal RAM of 128 bytes

4 register bank each containing 8 registers

16 bytes which may be addressed at byte

8 bytes for general purpose memory

30 two input /output pins arranged as 4 eight bit ports: P0-P3

Two 16 bit timer / counter T0 and T1

Full duplex serial data receiver/transmitter: SBUF

Control registers: TCON, TMOD,SCON,PCON,IP, and IE

Two external and three internal interrupt sources

PIN DESCRIBTION

9
Rfid based security access control system

The AT89c51 is low power high performance CMOS and bit micro computer with 4K
bytes of flash programmable and erasable read memory (PEROM). The device
is manufactured using Atmel’s high density non volatile memory technology
and is compactable with the industry standard MCS 51 instruction set and pins
out. The on chip flash allows the program memory to e reprogrammed in
system or by a conventional non volatile memory programmer. By combining
a versatile 8 bit cpu with flash on a monolithic chip, the Atmel AT89c51 is a
power micro computer which provides a highly flexible and cost effective
solution to many embedded control applications.

VCC

Supply voltage

GND

Circuit ground potential

Input/output pins, Ports :

Port 0

Port 0 is an 8 bit open –drain bidirectional I/O port. As an output port each pin can
sink 8 TTL inputs. When 1’s are written to port 0 pin the pin can be used as
high-impedance circuits. Port 0 may also be configured to be the multiplexed
low order address/data bus during accesses to external program and data
memory. In this mode P0 has pull-ups

Port0 also receives the code bytes during flash programming and outputs the code
byte during program verification. External pull-ups are required during
program verification.

Port1

Port1 is an 8 bit bidirectional I/O port with internal pull-ups. The port1 output buffers
can sink/source4 TTL inputs. When 1’s are written to port1 pins they are pulled
high by the internal pull-up scan be used as inputs. As inputs port1 pins that
are extremely being pulled low will source current because of the internal pull
ups.port1 also receives the low order address bytes during flash programming
and verification.

Port2

Port2 is an 8 bit bidirectional I/O port with internal pull-ups. The port 2 output buffers
can sink/source four TTL inputs. When 1’s are written to port2 pins they are
pulled high by the internal pull-ups and can be used as inputs. As input,port2
pins that are extremely being pulled low will source current because of the
internal pull-ups.port2 emit the high order address bytes during fetches from

10
Rfid based security access control system

external program memory and during accesses to external data memory that
uses 16 bit addresses (MOVX@DPTR), in this application it uses strong internal
pull ups when emitting 1’s. During access to external data memory that uses 8
bit addresses (MOVX@R1) port 2 emits the content of the p2 special function
register. Port 2 also receives the high order address bits and some control
signals during flash programming and verification.

Port3

Port3 is an 8 bit bi-directional I/O ports which internal pull-ups. The port3 output
buffers can sink/sources four TTL inputs. When 1’s are written to port3 pins
they are pulled high by the internal pin ups and can be used as inputs as
input, port pin alternate functions. Port3 pins that are extremely being pulled
low will source current because of the pull ups . Port3 also serves the functions
of various special features of the AT89c51 is listed below.port3 also receives
some control signals for flash programming and verification.

P3.0 RXD (serial input port)

P3.1 TXD (serial output port)

P3.2 INT0(external interupt0)

P3.3 INT1(external interupt1)

P3.4 T0(timer0 external input)

P3.5 T1(timer1 external input)

P3.6 WR(external data memory write strobe)

P3.7 RD(external data memory read strobe)

RST:

Reset input, a high on this pin for two machine cycles. While the oscillator is running
reset the device.

ALE/PROG:

Address Latch enable output pulse for latching the low byte of the address during
accesses to external memory. This pin is also the program pulse input (PROG)
during flash programming.

In normal operation ALE is emitted at a rate of 1/6 the oscillator frequency, and may
be used for external timing or clocking purposes. Note however that one ALE
pulse is skipped during each access to external data memory. If desired ALE
operation can be disabled by setting bit0 of SFR location 8EH.

11
Rfid based security access control system

PSEN: program store enable is the read strobe to external program memory. When
the AT89c51 is executing code from external program memory, PSEN is
activated twice each machine cycle, except that two PSEN activation are
skipped during access to external data memory.

EA/VPP:

External access enable. EA must be strapped to GND in order to enable the device to
fetch code from external program memory locations starting at 000h up to
FFFFh. Note, however that if lock bit 1 is programmed. EA will be internally
latched on reset. A will be strapped to internal program executions.

This pin also receives the 12-volt programming enable voltage (VPP) during, flash
programming for parts that require 12-v VPP.

XTALL1:

Input to the inverting oscillator amplifier and input to the internal clock operating
circuit.

XSTALL2:

Output from the inverting oscillator amplifier.

5.3.3.Block Diagram

Memory Organization

Basic Registers

12
Rfid based security access control system

RADIO frequency identification(RFID)

RADIO frequency identification

RFID - RADIO frequency identification(RFID) is a technology that is rapidly


crossing over from being expensive and experimental to universal usefulness .the
basic concept is quite simple :attach small coiled radio antenna to a microchip and
implant it in anything that needs to be read ,scanned ,monitored ,warehoused or
alerted . RADIO frequency identification (RFID) is a wireless communication
technology with advanced features ideal for making contact less payments, item
tracking, and automatic data collection.

Chip tags usually made to work at specific frequencies which are license free.
The tolerated power levels and regulations for these vary from country

13
Rfid based security access control system

to country. For example ,the maximum permitted legal power level (the power
level at which the interrogator is set at ) for 2.45 GHz in US is 100 times higher
than in the Europe . This creates a huge difference in read range –a range in the
U.S may only be a 1 centimeter range in Europe, all else being equal. Therefore,
much work still needs to be done to balance these regulatory issues worldwide,
though there is some progress. Similar to barcode technology RFID has several
advantages including more data capacity (up to 16 kbits ),scanning multiple tags
simultaneously ,tag data is read and write , and no line of sight is required between
the tags and the reader.

RFID TAGS

RFID tags are categorized as either active or passive. Active RFID tags are provided
by an internal battery and are typically read/write, i.e., tag data can be rewritten
and/or modified. An active tag’s memory size varies according to application
requirements; some systems operate with up to 1MB of memory. In atypical
read/write RFID work in process system, a tag might give a machine a set of
instructions, and the machine would report its performance to the tag. The encoded
data would then become part o the tagged part’s history. The battery supplied power
of an active tag generally gives it a longer read range. The trade off is greater size,
greater cost, and a limited operational life.

Passive RFID tags operate without a separate external power source and obtain
operating power generated from the reader. Passive tags are consequently much
lighter than active tags, less expensive, and offer a virtually unlimited operational
lifetime. The trade off is that they have shorter read ranges than the active tags and
require a higher powered reader.

Read only tags are typically passive and are programmed with a unique set of data
(usually 32 to 12 bits) that cannot be modified. Read only tags most often operate as
a license plate into a database, in the same way as linear barcode reference a
database containing modifiable product specific information.

Passive tag can be made very small and attached to anything that needs a memory
or an ID number. RFID tags come in many shapes and sizes such as thin disks, credit
cards or paper labels called smart labels.

RFID READERS

RFID readers can read from and write to RFID tags without contact, even through
walls. Read range can vary from centimeters to several meters, depending on the
tags and readers used. Whether portable or fixed position, readers can read and
write multiple tags at one time.

How RFID works

14
Rfid based security access control system

It is a generic term for technologies that use radio waves to automatically identify
people or object. There are several methods of identification but the most common
is to store a serial number that identifies a person or object and perhaps other
information on a microchip that is attached to an antennae ( the chip and the
antennae together called an RFID transponder or an RFID tag). An RFID system
consists of that tag which is made up of a microchip with an antennae , and an
interrogator or reader with an antenna. The antenna enables the chip to transmit
the identification information to a reader. The reader sends out electromagnetic
waves. The tag antenna is tuned to receive these waves. There are three types of
RFID tags –active, passive, semi passive. An active RFID tags have a battery ,which
is used to run the microchip’s circuitry and to broad cast a signal to a reader (the
way a cell phone transmits signals to a base station). A passive RFID tag draws
power from field created by the reader and uses it to power the microchips circuits.
Semi passive tag use a battery to run the chips circuitry, but communicative by
drawing power from the reader. The chip then modulates the wave that the tag
sends back to the reader. The reader converts the radio waves reflected back from
the RFID tag in to digital information that can then be passed on to computers that
can make use of it.

When the RFID tag is activated by a reader device, it transmits information from the
chip to a central computer system which can be about 2kilo bytes of information(less
than one tenth of the size of its document in my word processor) can be held on a
single chip.

Inside an RFID tag is a microchip connected to an antenna. The microchip can store
the modest amount of information up to about 2K bytes.tag come in a variety of from
factors and can be attached to anything. RFID tag can often then used to store a
simple identification number. In more sophisticated systems the tag can function as
a portable travelling data base for the item to which it is attached.

RFID readers control the wireless reading and writing of information stored on a RFID
tag. Rfid readers generate an RF field around its antenna. The RF field gives the tag
power, a clock and a way to transfer data to the reader. The tag modulates the
readers RF field and the reader detect this, similarly the reader turns the RF field on
and off in the right sequence in the order to write the tag.

5.4.5. A Look at RFID Technology

15
Rfid based security access control system

“RFID at present appears to be an evolutionary rather than revolutionary technology


“as Prof Charley fine said.

Radio frequency identification is a method of remotely storing and retrieving data


using devices called RFID tags the basic technology has been around for several
years and it is only recently y that –driven by the standardization activities and other
industry initiatives –RFID has started to gain visibility.

RFID can be broadly categorized to an ‘e-tagging ‘technology. at the fundamental


level RFID can be seen as an evolution from barcodes. Barcodes are the simplest
forms of tagging. Using barcodes information about an item can be captured using
optical barcode scanners used in the case of barcodes.

5.4.6. Technological Advantage

Because radio waves are used to sense the tag, RFID has the advantage that no line
of sight alignment is required between the RFID tag and the reader. The RFID reader
can read multiple tag simultaneously and instantly. The tags may be embedded
inside an object such as a container or in a garment. Further more RFID tags can
store a lot more information than barcodes. The range of sensing RFID tags from a
RFID reader can vary from a few centimeters to a few meters, depending on the
frequency of operation and type of tags (active or passive). The versatilities of RFID’s
can be gauged from the fact that RFID can even be fabricated to be embedded in a
piece of paper.

5.4.7. POTENTIAL OF RFID

There are several application areas where RFID is becoming popular. Some of the
application areas where RFID pilots, or limited rollouts have been initiated, include
areas such as fleet management, inventory and asset management, asset tracking,
quality control (tracking and counting articles using RFID) , packaging ,security and
access control, hazardous material management, advertising and promotion
,delivery and smart card based payment systems. The technology is making
significant inroads in new and innovative application areas such as location
identification ,keyless vehicle operations, spare part management, preventive
maintenance(RFIDs with integrated temperature/pressure /humidity sensors), a

16
Rfid based security access control system

telemetry etc. the most significant factor, limiting the use of RFID is the cost of tags
and readers.

PICTURES

Film label RFID tag strip, ………………..

5.4.8RFID READERS AND TAGS USED IN THE PRESENT PROJECT

Here the diagrams and specifications of the RFID reader and tags which are
affordable to common citizens.

FIGURES

5.5. Interfacing an LCD to Microcontroller

In the recent years LCD is finding wide spread use replacing LED’s(seven segment
LED’s or multisegment LED’s) this is due to the following reasons

1. Declining prices of LCD’s

2. The ability to display numbers graphic and characters

3. Incorporation of a refreshing controller to the LCD , there by releavi ng the CPU of


the task of refreshing the LCD

4. Ease of programming for characters and graphics.

5.5.1 LCD pin description.

17
Rfid based security access control system

VCC ,VSS,&VEE

While vcc &vss provides +5v and ground respectively.vee is used for controlling the
contrast of the LCD

RAS, register select:

There are two very important registers in is side the LCD. The RS pin is used for their
selection. If RS=0 ,the instruction command code register is selected ,allowing the
user to send a command such as clear display ,cursor at home, etc . If RS = 1 the
data register is selected, allowing the user to send data which is to be displayed on
the LCD.

R /W, read /write ;

R/W input allows the user to write the information to the LCD or read the
information from it .R/W =0 when writing

E,enable :

The enable pin is used by the LCD to latch the information presented to its
data pins. When data is supplied to the data pins , a high to -low pulse must be
applied to this pin in order for then LCD to latch in the data present at the data
pins. This pulse must be reduced to a minimum of 450ns wide.

D0-D7:

The eight bit data pins are used to send information to the LCD or read
the contents of the LCD’s internal registers . to display letters and numbers , we
send ASCII codes of letters A-Z and 0-9 to these pins while making RS=1

18
Rfid based security access control system

Software description

19
Rfid based security access control system

Programming language section

The next unavoidable section in software design is the programming


language. In this project the selected language is assembly language. Assembly
language is unlike the high level programming is tied very closely to the physical
make up of the processing chip.

Assembly language is usually written in instruction mnemonics. Once a


program has been written in mnemonics, it is translated into machine code by a
process called assembling the program.

Reasons for selecting assembly language

 Increase the speed of execution

 To reduce the size of the program

The instruction set used is 8051 instruction set and the assembler used is 8051
assembler.

PROGRAM

:pogram for access control system

Org 0h

20
Rfid based security access control system

readflag bit 20h.1

ljmb start

org 0003h

JNB p1.0, HERE

setb c

rlc a

inc r6

cjne r6,#26,next2

sjmb exit

next2:djnz b, intback

sjmb byte

HERE: clr c

rlc a

inc r6

cjne r6,#26, next 1

sjmb exit

next 1:djnz b,intback

sjmb byte

exit:setb readflag

ret i

intback :reti

byte:mov @R1,a

inc r1

mov b,#8

reti

21
Rfid based security access control system

; initialization of display

Start: lcall delay 1

clr p1.6

mov dptr,#0f100h

mov a,#30h

movx @dptr,a

lcall delay

mov a,#30h

movx @dptr,a

lcall delay

mov a,#38h

movx @dptr,a

lcall delay

mov a,#0ch

movx @dptr,a

lcall delay

mov a,#02h

movx @dptr,a

lcall delay

mov a,#01h

movx @dptr,a

lcall delay

mov a,#80h

movx @dptr,a

lcll delay

setb p1.6

22
Rfid based security access control system

;displaying ready message

Ready: mo a,#80h

local cmd

mov a,#01h

lcall cmd

mov a,#52h ; ‘R’

lcall dwr

mov a,#45h ‘e’

lcall dwr

mov a,#41h ‘a’

lcall dwr

mov a,#44h ‘d’

l call dwr

clr readflag

clr p1.2

mov R0,#31h

mov R1,#31h

mov R7,#00h,

mov b,#08

mov R6,#00h

clr a

mov tcon,#01h

init:mov ie#81h

: port reading

yy:jb readflag,SS

23
Rfid based security access control system

sjmb yy

SS:ljmb dis

dis clear readflag

r1 a

r1 a

r1 a

r1 a

r1 a

r1 a

mov R1,#33h

mov !@R1,a

;discarding bits

rlc a

dec R1

mov a,@R1

rlc a

mov @R1,a

dec R1

mov @a,R1

rlc a

mov @R1,a

dec R1

mov a,@R1

rlc a

mov @R1,a

24
Rfid based security access control system

; display

mov a,#01h

lcall cmd

mov r0,#30h

aga : mov a,@r0

ani a,#0f0h

rr a

rra

rra

rra

mov b,a

subb a,#09h

jc dec1

mov a,b

add a,#37h

sjmb u1

dec1: mova,b

add a,#30h

u1:lcall dwr

mov a,@r0

an1 a,#0fh

mov b,a

sub a,#09h

jc dec2

mov a,b

add a,#37h

25
Rfid based security access control system

sjmb U2

dec 2:mov a,b

add a,#30h

U2:lcall dwr

inc r0

cjne r0,#33h,aga

mov a,32h

cjne a,#6Bh ,invalid

lcall mrtag

sjmp valid

;display access granted

valid: mov a,#80h

lcall cmd

mov a,#01h

lcall cmd

setb p1.0

setb p1.2

mov a,# ‘w’

lcall dwr

mov a, ‘E’

lcall dwr

mov a,# ’L’

lcall dwr

mov a,# ‘C’

lcall dwr

mov a,# ‘O’

26
Rfid based security access control system

lcall dwr

mov a,# ‘M’

lcall dwr

mov a,# ‘E’

lcall dwr

lcall delay1

lcal delay1

lcall delay1

lcall delay1

lcall delay1

jmp ready

;display access denied

Invalid :mov a,#80h

lcall cmd

setb p1.1

mov a,#41h;’a’

lcall dwr

mov a,#43h;’c’

lcall dwr

mov a,#43h;’c’

lcall dwr

mov a,#45h;’e’

lcall dwr

mov a,#53h;’s’

lcall dwr

mov a,#20h; ‘ ‘

27
Rfid based security access control system

lcall dwr

mov a,#44h,’d’

lcall dwr

mov a,45h,’e’

lcall dwr

mov a,4eh,’n’

lcall dwr

mov a,49h,’i’

lcall dwr

mov a,45h,’e’

lcall dwr

mov a,44h,’d’

lcall dwr

lcall delay2

lcall delay2

lcall delay2

lcall delay2

lcall delay2

mov a,#01h

lcall cmd

jmp ready

Mr som: mova,#80h

lcall cmd

setb p1.1

mov a,#’m’

lcall dwr

28
Rfid based security access control system

mov a,# ‘r’

lcall dwr

mov a,# ‘ ‘

lcall dwr

mov a,# ’S’

lcall dwr

mov a,# ‘O’

lcall dwr

mov a,# ‘M’

lcall dwr

mov a,# ‘A’

lcall dwr

mov a,#’S’

lcall dwr

mov a,# “U’

lcall dwr

mov a,# ‘N’

l call dwr

mov a,# ‘D’

l call dwr

mov a,# ‘A’

lcall dwr

mov a,#’R’

lcall dwr

mov a,#’A’

lcall dwr

29
Rfid based security access control system

mov a,#’N’

lcall dwr

lcall delay1

lcall delay1

lcall delay1

lcall delay1

lcall delay1

lcall delay1

lcall deiay1

ret

Mr taj:mov a,#80h

Lcall cmd

Setb p1.1

Mov a,# ’M’

Lcall dwr

mov a,# ’r’

lcall dwr

mov a,# ’ ’

lcall dwr

mov a,# ’T’

lcall dwr

mov a,# ‘H’

lcall dwr

mova,# ‘A’

lcall dwr

mov a,# ‘D’

30
Rfid based security access control system

lcall dwr

mov a,# ‘D’

lcall dwr

mov a,#’I’

lcall dwr

mov a,#’N’

lcall dwr

lcall delay1

lcall delay1

lcall delay1

lcall delay1

lcall delay1

lcall delay1

ret

cmd,mov dptr,#0f100h

clr p1.6

movx @dptr,a

lcall delay

setb p1.6

ret

dwr: mov dptr,#0f100h

movx @dptr,a

lcall delay 2

ret

delay: clr psw.4

mov r4,#10h

31
Rfid based security access control system

dly1 :mov r3,#0ffh

dly2:dec r3

cjne r3,#00h,dly2

dec r4

cjne r4,#00h dly1

ret

delay1:mov r5,#03h

dloop3:mov r4,#0ffh

dloop2:mov r3,#0ffh

dloop1:dec r3

cjne r3,#00h,dloop1

dec r4

cjne r4,#00h,dloop2

dec r5

cjne r5,#00h,dloop3

ret

delay2:mov r4,#09h

dloop5:mov r3,#0ffh

dloop4:dec r3

cjne r3,#00h,dloop4

dec r4

cjne r4,#00h,dloop5

ret

delay#:mov r4,#30h

dloop7:mov r3,#0ffh

dloop6:dec r3

32
Rfid based security access control system

cjne r3,#00h,dloop6

dec r4

cjne r4,#00h,dloop7

ret

end

Result and discussion

The circuit for ‘security access control system using RFID ‘ as per the
circuit has been set up . Circuit diagram and the PCB layout were developed in
the ORCAD software. This has been successfully interfaced with the
microcontroller.

The user has to show the RFID tags. The program in the microcontroller
analyses whether he is our HOD, PROJECT guide or stranger. If he is a stranger
he is denied access.

When the access is granted, corresponding message is displayed and the door is
opened. The RFID reader will detect the RFID tag efficiently at a maximum
distance of 30 cm.

33
Rfid based security access control system

Conclusion and future scope

Our project “security access control system using RFID ‘ has been
successfully completed and it prove to be a prime runner in the existing
security control systems . The reader detects the tag and it is successfully
operating the door. The entire system can be fixed in front which has to be
accessed.

The system can be easily converted into a toll collecting system. E-Z passes
uses this technology to collect tolls in toll gates which deduct the toll amount
from the RFID enabled credit card and allows you to pass the toll gate. All
these are done in a span of few seconds. This technology can also be used in
petrol pumps where car entering is scanned to check pumps where car
entering is scanned to check whether it is RFID enabled and if it is the gate
opens tills in the petrol and deducts the amount from the card thee
customer is having . major developing are happening particularly in the Europe
where short rage transponder magnetic coupling ) are being included I motor
cars keys , allowing the on board management computer to the verify the
authenticity of the key to try to reduce motor car theft .

By counting the number of entries which the system has been accessed
,the number of the people entered can be calculated . This facility will be
helpful in high security areas such as in the press meet ,board meetings et c.

34
Rfid based security access control system

This system can also be used as an attendance counting mechanism. This will be
most useful in offices. Most of the MNC uses RFID door locking in the offices. Here
it not only provides as a security mechanism but also as an attendance counter.

\chapter{PCB Fabrication}

\section{The PCB Design}

Design of printed circuit board (PCB) can be considered as the last step in
electronic circuit design as well as the first step in production of PCB. It plays
important role in the performance and reliability of electronic circuits, the
productivity of the PCB’s its assembling, and its serviceability depends on design.
All these factors get reflected in a piece of electronic equipment. It is clear that
task of PCB design is not very simple or always straightforward. The schematic is
follower by layout generation. Layout design is the stage where engineering
capacity combined with creativity is the governing inputs.

\section{Electronic Design Automation Tools}

Most product testing is being done with the help of computer programs. The
term Electronic Design Automation (EDA) is being used to describe the use of
these tools. With the help of advanced powerful computing systems and
interactive software tools and development of electronic circuits has undergone
automation. Thus the software and hardware tools, which enables this automation
includes PCB designing, IC design, circuit simulation etc. These tools help us in
such a way that we can draw the circuit; test the functioning of the circuit in
response to test inputs in simulation software.

After successfully simulation we can get the PCB artwork done by replacing the
routing software. The design automation tool used here is EAGLE (Easily
Applicable Graphics Layout Editor).

\section{PCB Design Procedures}

The PCB designing procedure consists of following steps:

35
Rfid based security access control system

\begin{description}

\item[Drawing the circuit schematic]

Drawing of circuit is done through EAGLE schematic. It includes many libraries


with thousands of component symbols. We can select the required symbol from
the library and place if in the schematic page. After placing the component
symbols, we can complete the interconnection using wire or bus control.

The next step is to assign part reference. Each component has to be assigned
footprint or PCB pattern name. The footprint gives the actual size physical,
representation of components on the PCB artwork. The component symbol and
foot symbol should correspond in all respects.

\item[Design Rule check and net list creation]

After the circuit schematic is completed with all required information such as
part reference and footprints, the design rule check can be used for checking
errors in the design. It will check for duplicate symbols, overlapped lines and
dangling lines.

After the schematic design file passes the DRC check, it is processed by a
program called an electric rule checker (ERC) that checks for wiring errors. The
final operation to be done before starting PCB artwork is the net list creation.

A net list creation of the components and interconnection along with other
information such as foot prints, track width, etc. A net list software or tool can
take the circuit schematic as input and generate net list. The net list can be used
as an information source for the remaining stages.

\item[Creating the PCB artwork ]

36
Rfid based security access control system

In automatic design, the net list obtained from the previous stages is used for
getting the required foot print and interconnections. The software used for the
PCB artwork design in the EAGLE layout.

\item[PCB Fabrication]

The PCB consists of insulating base material on which conductors are attached by
photographic method or screen-printing method or manual method. The PCB with
conductors only one side of the base material is called single sided PCB and with
conductors on both sides called double-sided PCB. The insulating material gives
mechanical rigidity and electrical isolation for the printed conductor. The following
steps are involved in the fabrication of the PCB.

\begin{enumerate}

\item Preparation of the layout.

\item Transfer the layout in to copper.

\item Etching to remove the copper from the copper clad wherever it is not

required.

\end{enumerate}

\end{description}

First step in the drawing of the layout on the copper clad. The layout is coated
with a material such as paints, to retain the copper lines on the PCB. After
painting the clad sheet is dipped in the solution of ferric chloride. After some time
it can be seen that uncoated copper is etched out. The reaction, taking place can
be expressed by following equation.

\\FeCl3 + Cu ((CuCl3 + Fe)).

\\There are some conditions for layout making. They are the following:

The negative track must be larger than the positive track.

37
Rfid based security access control system

Positive track should be upper side of the PCB and the negative track is at the
lower side of the PCB.

Positive and negative track should not cross.

Tinning angle of conductors should not be less than 90°.

Layout should be developing in the direction of the signal flow as far as possible.

Larger components should be placed first and then decreasing order of the size.

Components required input and output connection should near the end
connections.

While preparing layout draw the conductor lines only on grid lines.

Spacing between conductors must be confirmed.

In the case of transformer, connects it on the out side of the PCB and connect the
leads on the PCB.

38

You might also like