Download View/Open - Library@Atmiya

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Current source wikipedia , lookup

Electronic paper wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Voltage optimisation wikipedia , lookup

Alternating current wikipedia , lookup

Power electronics wikipedia , lookup

Mains electricity wikipedia , lookup

Two-port network wikipedia , lookup

Surge protector wikipedia , lookup

Metadyne wikipedia , lookup

Rectifier wikipedia , lookup

Diode wikipedia , lookup

Semiconductor device wikipedia , lookup

P–n diode wikipedia , lookup

Buck converter wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Liquid-crystal display wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Opto-isolator wikipedia , lookup

Radio-frequency identification wikipedia , lookup

Transcript
“Transforming Live, inventing Future”
A
Project Report
On
RFID BASE SECURITY SYTEM
By
1. BANSIKALARIA (106030311024)
2. BHAVI PARMAR (106030311018)
DEPARTMENT OF ELECTRONICS & COMMUNICATION
ENGINEERING
ATMIYA INSTITUTE OF TECHNOLOGY AND SCIENCE FOR
DIPLOMA STUDIES, RAJKOT- 360005.
[2012– 2013]
A
Project Report
On
RFID BASE SECURITY SYSTEM
In partial fulfilment of requirements for the degree of
Diploma of Engineering
In
EC Engineering
Submitted By:
Under the Guidance of
1. Bansi kalaria-106030311024Mr.Nirajbhardwani
2. Bhavi parmar-106030311018
DEPARTMENT OF ELECTRONICS & COMMUNICATION
ENGINEERING
ATMIYA INSTITUTE OF TECHNOLOGY AND SCIENCE FOR
DIPLOMA STUDIES, RAJKOT- 360005.
[2012 – 2013]
CERTIFICATE
This is to certify that the project entitled “RFID base door lock security system”
has been carried out by the team under my guidance in partial fulfilment of the
Diploma of Engineering in Electronics & Communication in GTU during the
academic year 2012-2013 (Semester-5).
Team:
1.
2.
BansiKalaria
BhaviParmar
Date:
Place:
Guide
(Prof.Niraj Bhardwani)
Head, EC Department
Principal
External guide
ACKNOWLEGEMENT
I greatly thank my faculty guide of the college Mr.NirajBhardwani. I’m also thankful to my
external guide and chairperson of the industry I visited Mr. Viral Panchasara. Mr. Viral
Panchasara is a very genuine person and gave me training giving time from his busy
schedule. Lastly I heartily thank all my friends, parents and who have guided and Motivated
us directly or indirectly to complete my project successfully.
BansiKalaria
Bhavi Parmar
ABSTRACT
Radio-frequencyidentification (RFID) based access-control system allows only authorised
persons to enter a particular area of an establishment. The authorised persons are provided
with uniquetags, using which they can access that area.
The system is based on microcontroller AT89C52 and comprises an RFID module for
displaying the status and a relay for opening the door. User trying to open the door by placing
an RFID tag near the RFID reader.
Mightbe familiar with RFID systems as seen in access control, contactless payment systems,
product tracking and inventory control, etc. basically, an RFID system consists of three
components antenna or coil, a transreceive (with decoder) and a transponder (RFID tag)
electronically programmed with unique information.
It is a very typical RFID system. In every RFID system, the transponder tags contain unique
identifying information. This information can be as little as a single binary bit or a large array
of bits representing such things as an identity code, personal medical information or literally
any type of information that can be stored in digital binary format.
LIST OF FIGURE
Figure 1 Basic block diagram of RFID ................................................................................................. 13
Figure 2 PCB layout.............................................................................................................................. 14
Figure 3 Component of pcb layout ....................................................................................................... 15
Figure 4 Circuit diagram of RFID......................................................................................................... 16
Figure 5 RFID reader Modual ............................................................................................................... 18
Figure 6 Internals diagram of RFID antenna ......................................................................................... 19
Figure 7 AT89c8051 .............................................................................................................................. 20
Figure 8 PIN diagram of AT89c8051...................................................................................................... 21
Figure 9 MAX232 ................................................................................................................................... 24
Figure 10 Pin diagram of MAX232 ........................................................................................................ 25
Figure 11 Lcd display ............................................................................................................................. 26
Figure 12 Sin pin connector .................................................................................................................. 27
Figure 13 Pull-up resistor ...................................................................................................................... 28
Figure 14 LED ........................................................................................................................................ 29
Figure 15 RFID tag ................................................................................................................................. 30
Figure 16 Diode ..................................................................................................................................... 31
Figure 17 Capacitor ............................................................................................................................... 33
ABRIVATION USED IN REPORT
1. RFID-Radio frequency identification system
2. LCD-Liquid crystal display
3. LED-Light emitting diode
4. ALE-Address latch enable
5. RST-Reset enable
6. PSEN-Program store enable
7. EA-External access enables
8. ATM-Automatic tailor machine
9. DVD-Digital Versatile Disc
Contents
ACKNOWLEGEMENT ..................................................................................................................... 4
ABSTRACT........................................................................................................................................ 5
LIST OF FIGURE............................................................................................................................... 6
ABRIVATION USED IN REPORT ................................................................................................... 7
CHAPTER-1 ....................................................................................................................................... 9
1.1 Introduction ................................................................................................................................... 9
1.2 What is RFID? .............................................................................................................................. 9
1.3 What can RFID are used for?...................................................................................................... 11
1.4 RFID limitation ........................................................................................................................... 11
CHAPTER-2 ..................................................................................................................................... 13
2.1 Basic block diagram .................................................................................................................... 13
2.2 PCB layout .................................................................................................................................. 14
CHAPTER-3 ..................................................................................................................................... 16
3.1 Circuit diagram ........................................................................................................................... 16
3.2Circuit description ........................................................................................................................ 17
CHAPTER-4 ..................................................................................................................................... 20
4.1 Components description.............................................................................................................. 20
CHAPTER-5 ..................................................................................................................................... 35
5.1 Coding ......................................................................................................................................... 35
Advantages........................................................................................................................................ 40
Future scope ...................................................................................................................................... 40
Other application............................................................................................................................... 41
Conclusion ........................................................................................................................................ 42
Reference .......................................................................................................................................... 43
CHAPTER-1
1.1 Introduction
This project aimed to develop a wireless system to detect and allow only the
authorized persons. The system was based on RFID technology and consists of a passive
RFID tag. The passive micro transponder tag collects power from the 125 KHz magnetic
field generated by the base station, gathers information about the tag ID and sends this
information to the base station. The base station receives, decodes and checks the information
available in its database and Manchester code was used to send those, information. The
system performed as desired with a 10cm. diameter antenna attached to the transponder. The
base station is built by using the popular 8051 family micro controller. It gets the tag ID and
if the tag is stored in its memory then the microcontroller will allow the person inside.
RFID reader module, are also called as interrogators. They convert radio waves
returned from the RFID tag into a form that can be passed on to controllers, which can make
use of it. RFID tags and readers have to be tuned to the same frequency in order to
communicate. RFID systems use many different frequencies, but the most common and
widely used reader frequency is 125 KHz.
The L-sp2 and L-sp3 security gates are part of an advanced security system to protect
the assets of public or private institutions. Using the most advanced technology, these barriers
detect and accurately identify items marked with RFID tags, providing libraries, museums
and archives with a modern and flexible security system.
1.2 What is RFID?
The RFID device serves the same purpose as barcode or a magnetic strip on the back of a
credit card or ATM card; it provides a unique identifier for that object. And, just as a Barcode
or magnetic strip must be scanned to get the information, the RFID device must be scanned to
retrieve the identifying information.
RFID stands of RFID. The acronym refers to small electronic device that consists of a
small chip and an antenna. The chip typically is capable of carrying 2,000 bytes of data or
less.
 How RFID works?
Three parts

-
A scanning antenna.
-
A transceiver with a decoder to interpret the data.
-
A transponder the RFID tag that has been programmed with information
RFID works better than barcodes.
A significant advantage of RFID devices over the others mentioned above is that the RFID
device does not need to be positioned precisely relative to the scanner. We are all familiar
with the difficulty that store checkout clerks sometimes have in making sure that a barcode
can be read. And obviously, credit cards and ATM cards must be swiped through a special
reader.
Sr. no
Barcode
RFID
1
Rely on the user to make contact to the
Do not require contact with reader,
reader, hence cannot be read from a hence can be read from a distance.
distance
2
In Barcode, only one card read at a time Multiple read at a time is permitted
is allowed.
3
Embedded
information
cannot
be Embedded information can be updated;
updated, hence the restriction of the this allows the repeated over-writing if
repeated overwriting if the embedded embedded electronic information for
election information for each card
each card.
It does not allow for the increase RFID has increased technologies like
4
technologies like surveillance cameras to surveillance cameras to be activated in
be activated within employee being in the Conjunction with an employee being in
vicinity.
their vicinity.
It is slower and requires time of sight to
RFID is faster and does not require line
Function.
of sight.
6
It has lower data storage transponder.
It has higher data storage.
7
This transponder is bogus, and cannot be
The transponder is miniaturized, and can be
Incorporated in small items.
Incorporate in other items.
5
1.3 What can RFID are used for?
RFID tags come in a wide variety of shapes and sizes; they may be encased in a variety of
materials.
●
Animal tracking tags, inserted beneath the skin, can be rice sized.
●
Tags can be screw shaped to identify trees or wooden items.
●
Credit-card shaped for use in access applications.
●
The anti-theft hard plastic tags attached to merchandise in stores are also
RFID tags.
●
Heavy duty 120by 100by so millimetre rectangular transponders are used to track
Shipping containers, or heavy machinery, trucks, and railroad cars
RFID devices have been used for years to identify dogs, for a means of
permanent identification. Dog owners had long used tattoos, permanent ink markings,
typically on the ears. However, these can fade with age and it may be difficult to get the
animal to sit still while you examine him for markings.
What have the initial benefits of RFID technology been?
RFID technology can deliver benefits in many areas, from tracking work in
process to speeding up throughput in a warehouse. Visit RFID journals case studies section to
see how companies are using the technology’s potential in manufacturing and other areas. As
the technology becomes standardized, it will be used more and more to track goods in the
supply chain. The aim is to reduce administrative errors;labour costs associated with scanning
bar codes, internal that, errors in shipping goods and overall inventory levels
1.4 RFID limitation
Some common problems with RFID are reader collision and tag collision. Reader collision
occurs when the signals from two or more readers overlap. The tag is unable to respond to
simultaneous queries. Systems must be carefully set up to avoid this problem. Tag collision
occurs when many tags are present in a small area; but since the read time is very fast, it is
easier for vendors to develop systems that ensure that tags respond one at a time.
Unfortunately, not very often in the systems to which consumers are likely to be
exposed. Anyone with an appropriately equipped scanner and close access to the RFID
device can activate it and read its contents. Obviously, some concerns are greater than others.
It someone walks by your bag of books from the bookstore with a 13.56 MHz “sniffer” with
an RF filed that will activate the RFID devices in the books you bought, that person can get a
complete list of what you just bought that’s certainly an invasion of your privacy, but it could
be worse. Another scenario involver a military situation in which the other side scans
vehicles going by, looking for tags that only high-ranking officers can have, and for getting
accordingly.
Companies are more concerned with the increasing use of RFID devices in company
badges. An appropriate RF filed will cause the RFID chip in the badge to “spill the beans” to
whomever activates it. This information can then be stored and replayed to company
scanners, allowing the thief access and your badge is the one that is “credited” with the
access.
The smallest tags that will likely be used for consumer items don’t have enough
computing power to do data encryption to protect your privacy. The most they can do is PINstyle or password based protection.
CHAPTER-2
2.1 Basic block diagram
LCD
Power
supply
Microcontroller
MAX232
RFID Reader
Figure 1 Basic block diagram of RFID
Expiation
 Microcontroller
It is the Heart of the circuit. We will be using ATMEL’s AT89S52microcontroller. The
controller that we will be using is ATMEL’s AT 89s52, which is a 40 pin microcontroller
with 32 I/O lines. The controller communicates with the RFID reader & the PC using RS232
protocol for which MAX 232 IC is required.
 MAX232
Microcontroller communicates with the PC using its inbuilt Serial Port. The voltage levels are
0 & 5 Volts, but for the controller to communicate with the PC we is using RS232 protocolso
for converting the CMOS (0-5) voltage levels into RS232 (±12) voltage levels we will be
using MAX 232.
 LCD
We will be using 2-Line, 16 characters LCD. This will be used to display the real time, scan
successful or not and other such details.
 Power supply
The complete circuit works on 5v this voltage is generated in the power supply section which
basically consists of a step down transformer, a rectifier & a voltage regulator.
2.2 PCB layout
Figure 2 PCB layout
An actual-size, single-side PCB for RFID-based security system is shown in above Fig. And
its component layout I bellow Figs. Assemble the circuit on a PCB sit minimises time and
assembly errors. Carefully assemble the components and double-check for any overlooked
error
Figure 3 Component of PCB layout
CHAPTER-3
3.1 Circuit diagram
Figure 4 Circuit diagram of RFID
3.2Circuit description
Fig. 4 shows the circuit of the RFID based security system. The compact circuitry is built
around
AtmelAT89C52
microcontroller.
TheAT89C52
is
a
low-power,
high-
performanceCMOS 8-bit microcomputer with 8 dB of Flash programmable and erasable read
only memory (PEROM). It has 256bytes of RAM, 32 input/output (I/O) lines, three 16-bit
timers/counters, six-vector two-level interrupt architecture, a full-duplex serial port, an onchip oscillator and clock circuitry. The system clock also plays a significant role in operation
of the microcontroller. An 11.0592MHz quartz crystal connected to pins 18 and19 provides
basic clock to the microcontroller. Power-on reset is provided by the combination of
electrolytic capacitor C4 and resistor R1. Switch S1 is used for manual reset. Port pins
P2.0through P2.7 of the microcontroller are connected to data port pins D0 through D7 of the
LCD, respectively. Port pins P3.7 andP3.6 of the microcontroller are connected to registerselect (RS)and enable (E) pins of the LCD,respectively. Read/write (R/W)pin of the LCD is
grounded to enable for write operation. All the data is sent to the LCDin ASCII format for
display. Only the commands are sent in hex form. Register-select (RS) signal is used to
Distinguish between data (RS=1) and command (RS=0). Present VR1 is used to control the
contrast of the LCD.Resistor R6 limits the current through the backlight of the LCD. Port
pins P3.0RXD) and P3.1 (TXD) of the microcontrollerare used to interface with theRFID
reader. When an authorised person having the tag enters the RF field generated by the RFID
reader, RF signal is generated by the RFID reader to transmit energy to the tag and retrieve
data from theta. Then the RFID reader communicates through RXD and TXD pins of the
microcontroller for further processing.
Thus on identifying the authorised person port pin P3.2 goes high, transistorT2 drives into
saturation, and relayRL1 energises to open the door for the person. Simultaneously, the LCD
shows “access granted” message and port pin P1.7 drives pies buzzer PZ1via transistor T1 for
aural indication. If the person is unauthorised, the LCD shows “access denied” and thedoor
doesn’t open. LED2 and LED3 show presence of the tag in the RFID reader’s
electromagnetic field. To derive the power supply, the230V, 50Hz AC mains is stepped down
by transformer X1 to deliver aSecondary output of 15V, 500 mA. The transformer output is
rectified by a full-wave rectifier comprising diodesD1 through D4, filtered by capacitorC1
and regulated by ICs 7812 (IC2) and7805 (IC3). Capacitor C2 bypasses the ripples present in
the regulated supply.LED1 acts as the power indicator andR2 limits the current through
LED1.
RFID Reader modual
Figure 5RFID ReaderModule
Fig.5shows a typical RFID system. In every RFID system, the transponder tags contain
unique identifying information. This information can be as little as a single binary bit or a
large array of bits representing such things as an identity code, personal medical Information
or literally any type of information that can be stored in digital binary format. The RFID
transceiver communicates with a passive tag. Passive tags have no power source of their own
and instead derive power from the incident electromagnetic field. Commonly, at the heart of
each tag is a microchip. Whenthe tag enters the generated RF field, it is able to draw enough
power from the field to access its internal memory and transmit its stored information. When
the transponder tag draws power in this way, the resultant interaction of the RF fields causes
the voltage at the transceiver antenna to drop in value. This effect is utilised by the tag to
communicate its information to the reader. The tag is able to control the amount of power
drawn from the field and by doing so it can modulate the voltage sensed at the transceiver
according to the bit pattern it wishes to transmit.
Figure 6 Internals diagram of RFID antenna
Antenna. Fig.6shows the internal diagram of a typical RFID antenna. AnRFID antenna
consists of a coil withone or more windings and a matching network. It radiates the
electromagnetic waves generated by the reader to activate the tag and read/write datafrom
itAntennae are the conduits betweenthe tag and the transceiver which control the system’s
data acquisition andcommunication. These are available in a variety of shapes and sizes.
Often, the antenna is packaged with the transceiver and decoder to become a reader, which
can be configured either as a handheld or a fixed-mount device. The reader emits radio waves
in range anywhere from 2.54 cm (one inch)to 30 metres or more, depending upon its power
output and the radio frequency used. When an RFID tag passes through the electromagnetic
zone, itdetects the reader’s activation signal. The reader decodes the data encoded in the tag’s
integrated circuit (silicon chip) and the data is passed to the host computer for processing.
CHAPTER-4
4.1 Components description
AT89c51
Figure 7 AT89c51
The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4Kbytes
of Flash programmable and erasable read only memory (PEROM). The devices manufactured
using Atmel’s high-density non-volatile memory technology and arecompatible with the
industry-standard MCS-51 instruction set and pinout. The on-chipFlash allows the program
memory to be reprogrammed in-system or by a conventionalonvolatile memory programmer.
By combining a versatile 8-bit CPU with Flashon a monolithic chip, the Atmel AT89C51 is a
powerful microcomputer which provides highly-flexible and cost-effective solution to many
embedded control applications. The AT89C51provides the following standard features:
4Kbytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bittimer/counters, a five vector
two-level interrupt architecture, a full duplex serial port, on-chip oscillator and clock
circuitryIn addition, the AT89C51 is designed with static logic for operation down to zero
frequency and supports two software selectable power saving modes. The Idle Modesto’s the
CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue
functioning. The Power-down Mode saves the RAM contents but freezes the oscillator
disabling all other chip functions until the next
Pin diagram
Figure 8 PIN diagram of AT89c8051
Pin Description
VCC
Supply voltage.
GND
Ground.
Port 0
Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight
TTL inputs. When 1sare written to port 0 pins, the pins can be used as highimpedanceinputs.
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 internalpull-ups.Port 0
also receives the code bytes during Flash programming, and outputs the code bytes during
programverification. Externalpull-up’s are required during program verification
Port 1
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups.The Port 1 output buffers can
sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the
internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being
pulled low will source current (IIL) because of the internal pull-ups.Port 1 also receives the
low-order address bytes during Flash programming and verification.
Port 2
Port 2 is an 8-bit bi-directional I/O port with internal pull-ups.The Port 2 output buffers can
sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high bythe
internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being
pulled low will source current (IIL) because of the internal pull-ups.Port 2 emits the highorder address byte during fetches from 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 upwhen emitting 1s. During accesses to external data memory that uses 8bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register.
Port 2 also receives the high-order address bits and somecontrol signals during Flash
programming and verification
Port 3
Port 3 is an 8-bit bi-directional I/O port with internal pullups.The Port 3 output buffers can
sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the
internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being
pulled low will sourcecurrent (IIL) because of the pull-ups.Port 3 also serves the functions of
various special features of the AT89C51 as listed below: Port 3 also receives some control
signals for Flash programming and verification.
RST
Reset input. A high on this pin for two machine cycles while the oscillator is running resets
the device.
ALE
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
Flashprogramming. In normal operation ALE is emitted at a constant rate of 1/6the oscillator
frequency, and may be used for external timing or clocking purposes. Note, however, that one
ALEpulse is skipped during each access to external DataMemory. If desired, ALE operation
can be disabled by setting bit 0 ofSFR location 8EH. With the bit set, ALE is active only
during MOVX or MOVC instruction. Otherwise, the pin isweakly pulled high. Setting the
ALE-disable bit has noeffect if the microcontroller is in external execution mode.
PSEN
Program Store Enable is the read strobe to external programmemory.When the AT89C51 is
executing code from external program memory, PSEN is activated twice each machine cycle,
except that two PSEN activations are skipped duringeach access to external data memory.
EA
ExternalAccess Enable. EA must be strapped to GND in order to enable the device to fetch
code from external programmemory locations starting at 0000H up to FFFFH.Note, however,
that if lock bit 1 is programmed, EA will be internally latched on reset. A should be strapped
to VCC for internal programexecutions. This pin also receives the 12-volt programming
enable voltage (VPP) during Flash programming, for parts that require12-volt VPP.
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2
Output from the inverting oscillator amplifier.
MAX232
Figure 9 MAX232
The MAX232 IC is used to convert the TTL/CMOS logic levels to RS232 logic levels during
serial communication of microcontrollers with PC. The controller operates at TTL logic level
(0-5V) whereas the serial communication in PC works on RS232 standards (-25 V to + 25V).
This makes it difficult to establish a direct link between them to communicate with each
other.
The intermediate link is provided through MAX232. It is a dual driver/receiver that includes
a capacitive voltage generator to supply RS232 voltage levels from a single 5V supply. Each
receiver converts RS232 inputs to 5V TTL/CMOS levels. These receivers (R1& R2) can
accept ±30V inputs. The drivers (T1& T2), also called transmitters, convert the TTL/CMOS
input level into RS232 level.
Figure 10 Pin diagram of MAX232
The transmitters take input from controller’s serial transmission pin and send the output to
RS232’s receiver. The receivers, on the other hand, take input from transmission pin of
RS232 serial port and give serial output to microcontroller’s receiver pin. MAX232 needs
four external capacitors whose value ranges from 1µF to 22µF.
LCD display
Figure 11 LCD display
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of
applications. A 16x2 LCD display is very basic module and is very commonly used in
various devices and circuits. These modules are preferred over seven segments and other
multi segment LEDs. The reasons being: LCDs are economical; easily programmable; have
no limitation of displaying special & even custom characters (unlike in seven segments),
animations and so on.
A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this
LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely,
Command and Data.
The command register stores the command instructions given to the LCD. A command is an
instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting
the cursor position, controlling display etc. The data register stores the data to be displayed
on the LCD. The data is the ASCII value of the character to be displayed on the LCD.
Single pin connector
Figure 12 Single pin connector
They allow me to connect any port pin of the microcontroller to any input or output pin of
any interface section on our boards. These connectors comes handy when you have task to
connect microcontroller's 3 different pins located at a distance a 3 pin connector of some
interface (e.g. RS RW EN lines between microcontroller and LCD section on EEDT5.0 board
or any similar design).I was using these connectors for many months now, and thought of
sharing them with you. Thus simply added these connectors (female to female single pin
connecting cables!!) to our product catalo. They are low cost and will make your life simple.
Use these single pin connectors for logic level connections as they are designed to handle few
mA current (less than 100mA).Standard length of these connectors is 30cm
Pull-up resistor
Pull-up resistors are used in electronic logic circuits to ensure that inputs to logic systems
settle at expected logic levels if external devices are disconnected or impedance. They may
also be used at the interface between two different types of logic devices, possibly operating
at different power supply voltages.
Figure 13 Pull-up resistor
When the switch is open the voltage of the gate input is pulled up to the level of Vin. When
the switch is closed, the input voltage at the gate goes to ground.
A pull-up resistor weakly "pulls" the voltage of the wire it is connected to towards its voltage
source level when the other components on the line are inactive. When all other connections
on the line are inactive, they are high-impedance and act like they are disconnected. Since the
other components act as though they are disconnected, the circuit acts as though it is
disconnected, and the pull-up resistor brings the wire up to the high logic level. When another
component on the line goes active, it will override the high logic level set by the pull-up
resistor. The pull-up resistor assures that the wire is at a defined logic level even if no active
devices are connected to it.
A pull-down resistor works in the same way but is connected to ground. It holds the logic
signal near zero volts when no other active device is connected.
LED
A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator
lamps in many devices and are increasingly used for other lighting. Introduced as a practical
electronic component in 1962, early LEDs emitted low-intensity red light, but modern
versions are available across the visible, ultraviolet, and infrared wavelengths, with very high
brightness.
Figure 14 LED
When a light-emitting diode is forward-biased (switched on), electrons are able to
recombine with electron holes within the device, releasing energy in the form of photons.
This effect is called electroluminescence and the colour of the light (corresponding to the
energy of the photon) is determined by the energy gap of the semiconductor. LEDs are often
small in area (less than 1 mm2), and integrated optical components may be used to shape its
radiation pattern. LEDs present many advantages over incandescent light sources including
lower energy consumption, longer lifetime, improved robustness, smaller size, and faster
switching. LEDs powerful enough for room lighting are relatively expensive and require
more precise current and heat management than compact fluorescent lamp sources of
comparable output.
Light-emitting diodes are used in applications as diverse as replacements for aviation
lighting, automotive lighting (in particular brake lamps, turn signals, and indicators) as well
as in traffic signals. LEDs have allowed new text, video displays, and sensors to be
developed, while their high switching rates are also useful in advanced communications
technology. Infrared LEDs are also used in the remote control units of many commercial
products including televisions, DVD players, and other domestic appliances
RFID Tag
Figure 15 RFID tag
An RFID Tag is an electronic circuit and one or more antennas that use RF waves to
communicate an identifier which allows it be differentiated from other electronic circuits.
RFID tags are attached to, affixed to, or embedded in, inanimate or animate objects for the
purpose of unique identification. Since the tag is what is identified, an association must be
created between the tag and the object. The word "tag" is commonly used because the
electronic circuit is typically designed for the purpose of being associated with something
else. RFID tags are often used to determine the approximate location of the object to which it
is associated.
RFID tags can be categorized by the method in which is it powered. The most common terms
used for differentiation in this manner are:

Passive RFID Tags

Battery-Assisted Passive (BAP) RFID Tags or Semi-passive RFID tags

Active RFID Tags
The parallax RFID reader module can be integrated into any design using only four
connections. Use the following circuit for connecting the parallax RFID reader module to the
BASIC stamp microcontroller.
Pin
Pin name
Type
Function
1
VCC
Power
System power,+5v DC input
2
ENABLE
Input
Module enable pin active LOW DIGITAL input Bring
this pin LOW to enable the RFID reader and activate
the antenna
3
SOUT
Output
Serial out TTL-level interface 2400bps,8 data bits no
pity,1 stop bit
4
GND
Ground
System ground connect to power supply is ground
terminal
Diode
Figure 16 Diode
In electronics, a diode is a type of two-terminal electronic component with nonlinear
resistance and conductance (i.e., a nonlinear current–voltage characteristic), distinguishing it
from components such as two-terminal linear resistors which obey Ohm's law. A
semiconductor diode, the most common type today, is a crystalline piece of semiconductor
material connected to two electrical terminals. A vacuum tube diode (now rarely used except
in some high-power technologies) is a vacuum tube with two electrodes: a plate and a
cathode.
The most common function of a diode is to allow an electric current to pass in one
direction (called the diode's forward direction), while blocking current in the opposite
direction (the reverse direction). Thus, the diode can be thought of as an electronic version of
a check valve. This unidirectional behaviour is called rectification, and is used to convert
alternating current to direct current, and to extract modulation from radio signals in radio
receivers—these diodes are forms of rectifiers.
However, diodes can have more complicated behaviour than this simple on–off
action. Semiconductor diodes do not begin conducting electricity until a certain threshold
voltage is present in the forward direction (a state in which the diode is said to be forwardbiased). The voltage drop across a forward-biased diode varies only a little with the current,
and is a function of temperature; this effect can be used as a temperature sensor or voltage
reference.
Semiconductor diodes' nonlinear current–voltage characteristic can be tailored by
varying the semiconductor materials and introducing impurities into (doping) the materials.
These are exploited in special purpose diodes that perform many different functions. For
example, diodes are used to regulate voltage (Zenger diodes), to protect circuits from high
voltage surges (avalanche diodes), to electronically tune radio and TV receivers (varactor
diodes), to generate radio frequency oscillations (tunnel diodes, Gunn diodes, IMPATT
diodes), and to produce light (light emitting diodes). Tunnel diodes exhibit negative
resistance, which makes them useful in some types of circuits.
Diodes were the first semiconductor electronic devices. The discovery of crystals'
rectifying abilities was made by German physicist Ferdinand Braun in 1874. The first
semiconductor diodes, called cat's whisker diodes, developed around 1906, were made of
mineral crystals such as galena. Today most diodes are made of silicon, but other
semiconductors such as germanium are sometimes used.
capacitor
Figure 17 Capacitor
A capacitor (formerly known as condenser) is a passive two-terminal electrical component
used to store energy in an electric field. The forms of practical capacitors vary widely, but all
contain at least two electrical conductors separated by a dielectric (insulator); for example,
one common construction consists of metal foils separated by a thin layer of insulating film.
Capacitors are widely used as parts of electrical circuits in many common electrical devices.
When there is a potential difference (voltage) across the conductors, a static electric field
develops across the dielectric, causing positive charge to collect on one plate and negative
charge on the other plate. Energy is stored in the electrostatic field. An ideal capacitor is
characterized by a single constant value, capacitance, measured in farads. This is the ratio of
the electric charge on each conductor to the potential difference between them. The
capacitance is greatest when there is a narrow separation between large areas of conductor;
hence capacitor conductors are often called "plates," referring to an early means of
construction. In practice, the dielectric between the plates passes a small amount of leakage
current and also has an electric field strength limit, resulting in a breakdown voltage, while
the conductors and leads introduce an undesired inductance and resistance. Capacitors are
widely used in electronic circuits for blocking direct current while allowing alternating
current to pass, in filter networks, for smoothing the output of power supplies, in the resonant
circuits that tune radios to particular frequencies and for many other purposes.
The simplest capacitor consists of two parallel conductive plates separated by a
dielectric with permittivity ε (such as air). The model may also be used to make qualitative
predictions for other device geometries. The plates are considered to extend uniformly over
an area A and a charge density ±ρ = ±Q/A exists on their surface. Assuming that the width of
the plates is much greater than their separation d, the electric field near the centre of the
device will be uniform with the magnitude E = ρ/ε. The voltage is defined as the line integral
of the electric field between the plates. Solving this for C = Q/V reveals that capacitance
increases with area and decreases with separation
The capacitance is therefore greatest in devices made from materials with a high permittivity,
large plate area, and small distance between plates.
We see that the maximum energy is a function of dielectric volume, permittivity, and
dielectric strength per distance. So increasing the plate area while decreasing the separation
between the plates while maintaining the same volume has no change on the amount of
energy the capacitor can store. Care must be taken when increasing the plate separation so
that the above assumption of the distance between plates being much smaller than the area of
the plates is still valid for these equations to be accurate.
CHAPTER-5
5.1 Coding
#include<reg51.h>
#include<stdio.h>
#include<string.h>
Sfr lcd_data_pin=0xA0; //P2 port
sbit rs=P1^0;
//Register select
sbit rw=P1^1;
//Read/Write
sbit en=P1^2;
//Enable pin
sbit led=P0^0;
unsigned char card_id[13];
void delay(unsigned int count)
//Function to provide delay
{
int i,j;
for(i=0;i<count;i++)
for(j=0;j<1275;j++);
}
void lcd_command(unsigned char comm) //Lcd command funtion
{
lcd_data_pin=comm;
en=1;
rs=0;
rw=0;
delay(1);
en=0;
}
void lcd_data(unsigned char disp) //Lcd data function
{
lcd_data_pin=disp;
en=1;
rs=1;
rw=0;
delay(1);
en=0;
}
lcd_string(unsigned char *disp)
//Function to send string
{
int x;
for(x=0;disp[x]!=0;x++)
{
lcd_data(disp[x]);
}
}
void lcd_ini()
{
lcd_command(0x38);
delay(5);
lcd_command(0x0F);
delay(5);
lcd_command(0x80);
delay(5);
//Function to initialize the LCD
}
void recieve()
//Function to recieve data serialy from RS232
{
unsigned char k;
for(k=0;k<12;k++)
{
while(RI==0);
card_id[k]=SBUF;
RI=0;
}
}
void main()
{
//
int l;
TMOD=0x20;
//Enable Timer 1
TH1=0XFD;
SCON=0x50;
TR1=1;
// Triggering Timer 1
lcd_ini();
P3=0xff;
while(1)
{
delay(200);
lcd_command(0x81);
lcd_string("WELCOME TO RFID");
delay(200);
lcd_command(0xC1);lcd_string("BASED SYSTEM");
delay(200);
lcd_command(0x01);
delay(200);
lcd_command(0x81);
lcd_string("PLZ SCAN YOUR");
delay(200);
lcd_command(0xC1);
lcd_string("CARD ");
recieve();
delay(100);
if(strcmp(card_id,"4E0070297067")==0)
{
delay(100);
lcd_command(0x01);
delay(200);
lcd_command(0x81);
lcd_string("THANK YOU");
delay(200);
led=~led;
delay(1000);
}
else
{
lcd_command(0x01);
delay(200);
lcd_command(0x81);
lcd_string("YOU ARE NOT");
delay(200);
lcd_command(0xC1);
lcd_string("AUTHO PERSON");
delay(200);
lcd_command(0x01);
delay(200);
lcd_command(0x81);
lcd_string("SCAN YOUR ID");
delay(200);
lcd_command(0xC1);
lcd_string("AGAIN");
delay(200);
}
}
}
Advantages
 RFID tags have read/write memory capability
 More data can be stored in an RFID tag
 RFID tags have a longer read range
 Low cost solution
 With little software modification extensible to any other microcontrollers
Future scope
 A hex key pad can be interfaced to microcontroller board by which user can enter his
password then only the lock can be opened. This ensures even if someone has card
then also without the password he can’t get access.
 Connection to PC and development of PC side software to read from microcontroller
 Implementing the security systems with different levels by using different types of
misfire cards.

Cryptanalysis of the link between the card and reader.

Study of other RFID techniques for better service and security.
 Interfacing the system with a GSM so that data can be transmitted through messages.
Other application
 Automotive
 Education & Libraries
 Enterprise
 Food service distribution
 Government
 Health care
 Hospitality
 Law enforcement
 Life science
 Logistics
 Manufacturing
 Postal/parcel
 Public spaces
 Retail
 Security
 Transportation
Conclusion
RFID technology is growing rapidly and widely. Already RFID environment is implemented
everywhere. In the contrary in convenient of RFID, there are threats compromising security
and privacy. The moreRFID is used in daily life and provide important personal information,
the bigger security and privacy issues are increased. Currently many researches related about
RFID security and privacy are being progressed. In order to protect personal information and
provide safe RFID environment, the more researches about RFID privacy and security should
be done
Reference
 RFID security and privacy: a research survey, air juels,RSA laboratories
 Electronics for you
 www.EFYMAG.com
 www.rfidsurvival.com
 www.rsasecurity.com