CHAPTER ONE
INTRODUCTION
1.1 BACKGROUND OF STUDY
Access Control is a term that describes the limiting of access to a
restricted area, substance or information. This restriction which may be
physical or logical, with respect to what is being restricted. Physical access
control presents itself in the form of gates, turnstile and locks. Modern
methods of physical access control employs identification techniques that
determines who should access where or what, these include: biometric
recognition, swipe cards and motion sensors. However, despite the modern
approaches to access control, there are still reservations as regards the
identification procedures that should be employed to effect the intended
control of access. Most notably is the motion detectors; this employs motion
sensors that could be microwave or infrared, to sense the motion of any
object and send electrical signals to actuators that opens or closes a door.
This means of access control has not proven to be effective, because it is not
restrictive in its operation. Meanwhile, there are other means as afore
mentioned that can be used in physical access control. Swipe cards and
biometric recognition are somewhat effective in their ways of application in
which opens and closes the door and perhaps entry and exit registers. In the
acquisition and implementation of these techniques, the primary concern of
property owners or managers will be effectiveness and comfort the system
provides to its users and mangers. In terms of effectiveness, one can say that
swipe cards and biometric recognition techniques as used in access control,
should be outstanding, though concerns linger in the area of its offer of
comfort. For instance, a member of staff with registered swipe card or body
part hurry’s to an access way, only to begin the process of scan interrogation
before eventually finding his way through. The precious time wasted on
interrogation can be avoided if the scans were done distances before he gets
to the access way, and besides the stress of fondling pockets for cards and
swiping are not needed.
The snag with the afore mentioned modern system is that they require
a proper line of sight to operate effectively. This makes it compulsory for
access seekers to approach the interrogation device and let themselves be
scrutinized before gaining clearance. The big question now is: can’t there be
a system that does not require a proper line of sight for interrogation to take
place? Simply put, can’t the comfort of distance interrogation and access
control effectiveness be put together?
The objective of this design project is to develop an access control
system which is efficient as well as comfortable. A system that provides the
solution to the discomfort the line of sight presents to other well known
techniques of access control, using a radio frequency identification scan.
With this scan, the interrogator gets the registered information needed
within predefined approaching distance, to grant or deny access.
1.3 SIGNIFICANCE OF STUDY
It is of essence that foremost access control methods though efficient,
shouldn’t be cumbersome as to depend on a line of sight for
interrogation. A solution to the setback caused by the need for a proper
line of sight will definitely save time and space, whilst it provides comfort
for its users. Having a system that works effectively without requiring a
line of sight for interrogation in access control will be very appreciated by
office buildings that require management offices to be discrete from the
general offices. Vault development firms will also find this new technique
interesting as it can be incorporated into pre-existing vault systems.
This work would not go beyond the demonstration of the possibility
that radio frequency identification can actually grant or deny access, without
needing a defined line of sight. RFID systems can be in various forms with
respect to operational performance, coupled with the fact that the read
range varies with design parameters such as frequency, RF power level;
reader’s receiving sensitivity, size of antenna, data rate, communication
protocol, current consumptions of the silicon device, etc. Due to the
undergraduate nature of our study, passive tags are made the subject of
interrogation while the design frequency is limited to the low frequency of
125kHz, considering that 125kHz falls within the unregulated band of
frequencies managed by the Nigerian Communication Commission.
1.5 ORGANISATION OF THE REPORT
This report gives description of how radio frequency identification can
be utilised as a method to improve access control systems. Firstly stated is
the background to the study which highlights the pre-existing cases in access
control and the problem it faces, that incites this study. Afterward, the
objective and significance of the study are emphasized, torching questions as
to why a solution is needed and who really wants a solution? Lastly stated is
the limitation of this study. Stating what should not be expected as regards
previous attempts in developing this sort of system. Chapter three describes
the actual method and design proceeding taken to achieve the stated
objective. Chapter four describes the implementation of the design and
CHAPTER TWO
LITERATURE REVIEW
2.1 EVOLUTION OF RADIO FREQUENCY IDENTIFICATION
The roots of radio frequency identification technology can be traced
back to World War II. The Germans, Japanese, Americans and British were all
using radar systems which had been discovered in 1935 by the Scottish
physicist Sir R. Watson-Watt to warn of approaching planes while they were
still distances away. But there was no way of identifying which planes
belonged to the enemy and which were a country’s own pilots returning
from a mission. The Germans discovered that if pilots rolled their planes as
they returned to base, it would change the radio signal reflected back. This
crude method alerted the radar crew on the ground that these were German
planes and not Allied aircraft (this is, essentially, the first
passive RFID system). Under Sir R. Watson-Watt, the British developed the
first active identify friend or foe (IFF) system, where they put a transmitter
on each British plane so that when it received signals from radar stations on
the ground, it began broadcasting a signal back that identified the aircraft as
friendly. RFID works on this same basic concept. A signal is sent to
a transponder, which wakes up and either reflects back a signal (passive
The 1960s were the prelude to the RFID explosion of the 1970s with
R.F. Harrington’s studies on the electromagnetic theory related to RFID in his
papers including “Theory of Loaded Scatterers” in 1964. This inspired
RFID-related inventions such as Robert Richardson’s “Remotely activated radio
frequency powered devices,” and J. H. Vogelman’s “Passive data
transmission techniques utilizing radar echoes.”Advances in radar and RF
communications systems continued through time, as scientists and in the
United States, Europe and Japan did research and presented papers
explaining how radio frequency energy could be used to identify objects
remotely, companies began commercializing anti-theft systems that used
radio waves to determine whether an item had been paid for or not.
Over time, companies commercialized the low frequency (125 kHz)
systems and then moved up the radio spectrum to high frequency (13.56
MHz), which was unregulated and unused in most parts of the world. High
frequency offered greater range and faster data transfer rates.
In the early 1990s, IBM engineers developed and patented an ultra-high
frequency (UHF) RFID system. UHF offered longer read range (up to 20 feet
under good conditions) and faster data transfer. UHF RFID got a boost in
1999, when the Uniform Code Council, EAN International, Procter &
Gamble™ and Gillette™ put up funding to establish the Auto-ID Center at the
Brock and Prof. Sanjay Sarma, had been doing some research into the
possibility of putting low-cost RFID tags on all products made with the idea
of keeping track of them on a supply chain. Between 1999 and 2003, the
Auto-ID Center gained the support of more than 100 large end-user
companies, plus the U.S. Department of Defense and many key RFID
vendors. RFID technology has passed through many phases over the last few
decades.
2.2 RFID TECHNOLOGY
RFID stands for radio frequency identification and it is strongly
connected to radio technology. RFID is a contact-less identification
technology working on the physical basis of alternating electromagnetic
fields. RFID systems consist of three main components, as shown in the RFID
schematic above: an antenna, a transceiver and a transponder (passive tag).
FIGURE 2.1 SCHEMATIC REPRESENTATION OF A RFID SYSTEM COURTESY OF
The antenna enables communication between the tag and the transceiver,
which is also called reader. The tags are usually built using CMOS circuitry
while other technologies can be used such as surface acoustic wave (SAW)
devices or tuned resonators. These tags are usually powered by a battery or
by rectification of the radio signal sent by the reader. According to Karma
Ashan et al’ (2010), they are also capable of sending data to the reader by
changing the loading of the tag antenna in a coded manner or by generating,
modulating, and transmitting a radio signal. RFID systems can be read-only
(data is transferred only in one direction, from the tag to the reader) or
read-write (two-way communication). A typical RFID system can use the principle
of modulated backscatter. In this type of RFID system, to transfer data from
the tag to the reader, the reader sends an un-modulated signal to the tag
which reads its internal memory of stored data and changes the loading on
the tag antenna in a coded manner corresponding to the stored data. The
signal reflected from the tag is thus modulated with this coded information.
The modulated signal is received by the reader, demodulated using a
homodyne receiver, and decoded and output as digital information that
contains the data stored in the tag. To send data from the reader to the tag,
the reader amplitude modulates its transmitted radio signal. This modulated
2.3 PHYSICAL PRINCIPLES OF RFID TECHNOLOGY
2.3.1 ELECTROMAGNETIC THEORY
British physicist James Clerk Maxwell, considered one of the 19th
century’s most important scientists, was the first to demonstrate that light
consists of electromagnetic waves. Building upon the ideas of British scientist
Michael Faraday, Maxwell developed his electromagnetic theory of light.
This and other works by Maxwell helped pave the way for some of the major
advances in physics in the 20th century. Maxwell’s treatise “A Dynamical
Theory of the Electromagnetic Field” (1864), contains the fundamental
equations that describe the electromagnetic field. When a magnetic field in
space varies in time, it induces an electric field with closed field lines. The
same thing happens with a varying electric field in space. It creates a
magnetic field with closed lines. This effect of a varying electric and magnetic
fields in space is what is called electromagnetic waves, where the
wavelength is calculated by λ=c/f, where c is the speed of light, 300000
km/s, and f is the frequency of the radiation.
Generally, introductions to basic electromagnetism begin with
Maxwell’s equations. Maxwell’s equations which are usually in integral or
differential form, provides the foundations upon which all of
electromagnetic theory is based. These equations help to describe the
their two sources: the electric current density ‘J’ and the electric charge
density ‘ρ’. According to Jin Au Kong, (2000), the derivations of Maxwell’s
equations are as follows:
̅ (̅ ) (̅̅̅̅̅ ) (̅ ) ( )
̅( ̅ )
(̅̅̅ ̅ ) ( )
̅ (̅ ) (̅ ) ( ) ̅ ( )
Equations (2.1) - (2.4) are linear, but not independent. By taking the
divergence of equation (2.1), we can derive the continuity of charge law:
̅( ̅ ) - ( ̅ ) ( )
This law simply states that the decrease in charge density at a single point is
equivalent to the divergence of current from an infinitesimal volume around
that point. From this point on, the field dependencies on space and time will
be assumed and left out of the notation. The constitutive equations
characterize the media that electromagnetic waves travel through, by
relating the electric field and magnetic field intensities to the electric and
magnetic flux densities. In their most general form, they are:
̅ ̿ ̅ ̿ ̅ ( ) ̅ ̿ ̅ ̿ ̅ ( )
In general, most transmission media can be modelled as isotropic media,
when the cross coupling does not exist and the permittivity tensor ̿ and the
permeability tensor ̿ are replaced by scalar values:
̅ ̅ ( )
̅ ( )
In isotropic free space, - and
- . If a source free region of space is considered,
where ̅ , equations (2.1) - (2.4) are now simplified to obtain:
̅ ̅ ( ) ̅ - ̅ ( ) ̅ ( ) ̅ ( ) By substituting equation (2.11) into equation (2.10), and doing some rearrangement, we arrive at the Helmholtz wave equation:
̅-
̅ ( )
From this equation, we can solve for the electric field and consequently, the
magnetic field. If we choose our coordinate system such that the
electromagnetic wave propagates in the z-direction and the electric field
points in the x-direction, the simplest solution takes the form:
where k is the spatial frequency of the electromagnetic wave or wave
number and is the temporal or angular frequency. K is related to the
wavelength by:
( )
The angular frequency is related to the Hertzian frequency of by:
( )
Substitute equation (2.15) into (2.14), yields the dispersion relation for free
space:
( )
The dispersion relation provides insight as to how the electromagnetic wave
will propagate through a particular medium. By planting the solution for the
electric field of equation (2.15) into equation (2.11), we find a solution for
the magnetic field:
√ ( - ) ( )
The Poynting vector, calculated as the cross product of the electric and
magnetic fields, defines the direction of energy flow for an electromagnetic
wave, with its magnitude equal to the power density through a surface
normal to its direction. For the electric and magnitude fields in equation
(2.15) and (2.19), the Poynting vector is:
2.3.2 RFID ANTENNA
For RFID applications, passive RFID tags utilize an induced antenna coil
voltage for operation. This induced AC voltage is rectified to provide a
voltage source for the device. As the DC voltage reaches a certain level, the
device starts operating. By providing an energizing RF signal, a reader can
communicate with a remotely located device that has no external power
source such as a battery. Since the energizing and communication between
the reader and tag is accomplished through antenna coils, it is important
that the device must be equipped with a proper antenna circuit for
successful RFID applications.
Antennas convert electromagnetic waves into electrical currents and
vice versa and their behaviour can usually be mathematically predicted.
Ronald J Marhefka et al’(2002), defines a radio antenna as a structure
associated with the region of transition between a guided wave and a
free-space wave or vice-versa. With respect to RFID, antenna is the
communication link between the transmitter and receiver via free space.
Antenna does not only provide means of transmitting data from reader to
tag, but power as well. The topic of antenna is very vast and detailed; this
section aims to review the main parameters that characterize the antenna.
According to Michael Redemske(2005), one key parameter that
employ a simple antenna like the isotropic emitter, with a point source
emitting perfectly spherical electromagnetic waves. This is an ideal antenna
that is ideal, though non-existent in reality, but provides a useful comparison
bases for real antennas. If we define the total radiated power by an isotropic
emitter as PEIRP, where EIRP stands for the effective isotropic radiated power.
We can now calculate the power density at a given distance r as:
( )
Since the radiated power density is equivalent in all directions for a
particular distance r, this antenna has a spherical radiation pattern, but in
reality spherical radiation pattern is not achievable. In the case of a dipole
antenna, the radiation pattern takes on a torus-like shape. Klaus
Finkenzella(2003).
Two other useful quantities of antenna are: directivity and gain. Gain
of an antenna is the ratio between the radiated power density of the
antenna of interest in a particular direction and some reference antenna of
known gain that possesses the same transmission power. Directivity is the
ratio between the maximum power density of a particular antenna over its
average directional power density which is usually greater than unity, with
values corresponding to stronger directional antennas. In practice, directivity
power in one particular direction. While gain is an actual quantity that
pertains not just the radiation pattern, but also losses that are caused by
impedance mismatch and heat dissipation in the antenna. An antenna’s
efficiency factor is the ratio of the antenna’s gain to its directivity, which is
always less than unity. Another antenna parameter is its input impedance.
This is the impedance of the circuit seen by the antenna. If the impedance of
the antenna and the corresponding circuit are not matched i.e the real
components are equal and the imaginary components are opposite in
direction (sign), power can be reflected or dissipated, thus lowering the
antenna’s effective gain and efficiency. This is a very important parameter to
tag antennas, where maximum power transfer is needed to achieve the
greatest possible read distance. Therefore, with design parameters like gain
and directivity, EIRP (effective isotropic radiated power), ERP (equivalent
radiated power), input impedance, radiation resistance, effective aperture,
scatter aperture and effective length result in different types of antennas:
I. Dipole Antenna - One example is the extended half-wave dipole ( /2),
consisting of a straight piece of copper wire, which is interrupted half
way along. This is where it is supplied. The 2-wire folded dipole is
another example.
II. Yagi-Uda Antenna - is a directional antenna consisting of directors and
III. Patch or Micro-strip Antenna - is used in the latest generations of GPS
receivers and mobile telephones, but also in RFID systems.
IV. Slot Antenna - consists of a metal surface, with a slot of length /2 cut
out. Advantages are its size, its design simplicity and robustness.
V. Array Antenna - is used in beam forming for direction of arrival
measurements
2.3.3 OPERATING FREQUENCY
Studies have shown that inductive coupling systems normally use
frequencies of 100KHz-30MHz while electromagnetic coupling systems use
2.45-5.8GHz. Lower frequency systems have better penetration of objects.
The absorption rate is for example 100,000 times higher for 1GHz than for
100kHz. Microwave systems have normally a range of 2-15m and they
usually require a backup battery for the transponder to work. They are
known to have a high memory capacity; up to 32Kbytes, and a high
temperature resistance. Microwave systems are less sensitive for
electromagnetic interference fields generated by strong electric motors
compared to inductive transponders.
Because RFID is classified as a radio system, interference with other radio
services must be avoided. Thus RFID uses only frequency ranges that have
These are called ISM frequency ranges (Industrial-Scientific-Medical). The
most important frequency ranges are 0-135kHz, and the ISM frequencies
around 6.78MHz, 13.56MHz, 27.125MHz, 40.68MHz, 433.92MHz, 869.0MHz,
915MHz (not in Europe), 2.45GHz, 5.8GHz and 24.125GHz.
2.3.4 RFID TAG
RFID tags contain micro-chip that store the unique identification of
each object. The ID is a serial number stored in the RFID memory. The chip is
made up of integrated circuit and embedded in a silicon chip. CAENRFID
(2008). RFID memory chip can be permanent or changeable depending on
the read/write characteristics. Read-only and re-write circuits are different
as read-only tags contain fixed data and can not be changed without
re-program electronically S. Garfinkel et al’ (2005). On the other hand, re-write
tags can be programmed through the reader at any time without any limit.
RFID tags can be of different sizes and shapes depending on the application
and the environment at which it will be used. A variety of materials are
integrated on these tags. For example, in the case of the credit cards, small
plastic peaces are stuck on various objects, and the labels. Labels are also
embedded in a variety of objects such as documents, cloths and
manufacturing materials, T. Frank et al’ (2006). There are three types of
combination of active and passive tags characteristics. So, mainly two types
of tags (active and passive) are being used by industry and most of the RFID
system CAENRFID (2008). The essential characteristics of RFID tags are their
function to the RFID system. This is based on their range, frequency,
memory, security, type of data and other characteristics. These
characteristics are core for RFID performance and differ in
usefulness/support to the RFID system operations, Karma Ashan (2009).
While considering these characteristics,
figure 2.2 compares the active
and passive tags.
2.3.4.2 Tag Frequencies
The range of the RFID tags depends on their frequency. This frequency determines the resistance to interference and other performance attributes
E. Ziesel (2006). The use/selection of RFID tag depends on the application; FIGURE 2.2 RFID ACTIVE AND PASSIVE TAGS COMPARISON
different frequencies are used on different RFID tags, A. Narayanan (2005). EPCglobal and International Standards Organization (ISO) are the major organizations working to develop international standards for RFID technologies in the UHF band. These two organizations are still evolving and are not fully compatible with each other. In order to avoid the use of different radio frequencies standards, most of the international communities are obligated to comply with the International Telecommunication Union (ITU) standards. The following are the commonly used frequencies:
* Microwave works on 2.45 GHz, it has good reader rate even faster than
UHF tags. Although at this frequency the reading rate results are not the
same on wet surfaces and near metals, the frequency produce better
results in applications such as vehicle tracking (in and out with barriers),
with approximately 1 meter of tags read range CAENRFID (2008).
* Ultra High Frequency works within a range of 860-930 MHz, it can
identify large numbers of tags at one time with quick multiple read rate
at a given time. So, it has a considerable good reading speed. It has the
same limitation as Microwave when is applied on wet surface and near
metal. However, it is faster than high frequency data transfer with a
reading range of 3 meters, CAENRFID (2008).
* High Frequency works on 13.56MHz and has less than one meter reading
identifications on sales points etc as it can implanted inside thin things
such as paper L. Srivastava (2005).
* Low Frequency works on 125 kHz, it has approximately half a meter
reading range and mostly used for short reading range applications such
as shops, manufacturing factories, inventory control through in and out
counts, access control through showing a card to the reader. These low
frequency tags are mostly not affected when applied on wet and near
metal surfaces T. Frank et al’ (2006).
2.3.5 RFID READER
RFID reader works as a central place for the RFID system. It reads tags
data through the RFID antennas at a certain frequency, T. Frank et al’ (2006).
Basically, the reader is an electronic apparatus which produce and accepts
radio signals. The antennas contains an attached reader, the reader
translates the tags radio signals through antenna, depending on the tags
capacity, K. Ashan (2009). The readers consist of a build-in anti-collision
schemes and a single reader can operate on multiple frequencies. As a
result, these readers are expected to collect or write data onto tag and pass
to computer systems. For this purpose readers can be connected using
RS-232, RS-485, USB cables as a wired option (called serial readers) and connect
which also known as network readers, L. Sandip (2005). Readers are
electronic devices which can be used as standalone or be integrated with
other devices and the following components/hardware into it E Ziesel (2006).
:power for running reader, communication interface, microprocessor,
channels, controller, receiver, transmitter and memory.
Readers use near and far fields method to communicate to the tag
through its antennas. If a tag wants to respond to the reader then the tag
will need to receive energy and communicate with a reader. For example,
passive tags use either one of the two following methods CAENRFID (2008).
* Near Fields: Near field uses method similar to transformer, and
employs inductive coupling of the tag to the magnetic field circulating
around the reader antenna (see figure 2.6).
* Far Field: Far field uses method similar to radar, backscatter reflection
by coupling with the electric field. The distinction between the RFID
systems with far fields to the near
fields is that the near fields use LF
(lower frequency) and HF (higher frequency) bands, Y. Meiller et
al’(2009).
2.4 Coding and Modulation
Modulation is about varying a periodic waveform to use that signal to
deliver a message. There are different ways of doing this. In amplitude shift
keying (ASK), for example, the amplitude is used, while two frequency shift
keying (2FSK), is a modulation where the frequency is switched between two
frequencies. In two phase shift keying (2PSK), the signal is switched between
the phase states 0o and 180 o. In backscatter modulation, often used in
electromagnetic coupling systems, waves are reflected back from a
transponder after having been "shaped" by impedance in the circuit.
Demodulation is simply the inverse of modulation. The message to be
transmitted is usually coded by one of the following procedures: NRZ,
Manchester, Unipolar RZ, DBP, Miller, differential coding or pulse coding.
2.5 PREVIOUS WORKS
David Skynar of KSH Stockholm, Sweden in his master’s degree thesis of 2008 took a step further in the application of RFID technology for access
control system. He recognised the problem of identity collision in access control systems employing RFID technology. This inspired his work that developed a simple algorithm for the detection of direction of movements surrounding a door. The solution algorithm obtained interesting results, though presented in Matlab simulation.
This project differs from the one stated above, as it tries not to simulate, but actually design the reader or interrogator that will utilize RFID and demonstrate the ease of RFID technology in improving access control. Considering that the work of Kornbrekke et al’ provides anonymity with the use of infrared transmitters and sensors, which makes access control somewhat limited.
CHAPTER 3
This chapter aims to define the design goals as well as analyse the
fundamental blocks and part sections required for the development of a
radio frequency identification system to be implemented for improving
access control as discussed in previous chapters. Discussions here are on the
architecture design of the RFID reader. Also in view are the functional
designs at a lower abstraction level of the different functional blocks of the
reader coupled with the algorithm flowchart of the microcontroller.
3.1 Design Goals
The goals of the project need to be defined before an attempt at the
construction or in this case an adaptation of a design can begin. The goals set
for the project are the following:
i. The construction of a RFID reader that operates within the 125kHz
bandwidth that can read or detect a 125kHz tag.
ii. The construction of a reader according to the Frequency Shift Key
Modulation pattern of the obtained tags.
iii. The construction of a reader that keeps records of all the enquiries on
the reader. These records should be remotely accessible so that they
can be audited by a trusted third party. Because of this logging facility
the reader won’t require full-time connection to the network
infrastructure. This facility increases the flexibility of the reader and
Microcontrol ler Carrier Signal Amplifier RF Choke Envelope Detector Filter & Amplifier Pulse Shaping Circuit Tag Antenna R FID Tag Reader Antenna
not constantly available, e.g. during flight on an airplane. Obviously, it
should not be possible to forge these records in any way.
3.2 Functional Block Diagram
This design which comprise mainly of two parts outside the RFID tag to be obtained is with the motive of achieving the expected read range offered by the 125kHz un-regulated frequency. Notably seen in the depiction above is the freely hanging capacitor that is situated just outside the design. This capacitor, though out of any particular functional block, plays a role of
differentiating the transmitted signal from received signal, so as to eliminate confusion as regards signal reception.
3.2.2 Functional Block Description
The choice of component blocks for this design is based on the
functionality of the individual block and its respective role in the overall Serial Interface
(RS-232)
Figure 3.1 Functional Block Diagram for RFID Reader Design
To Access Control Interface
design purpose. Although each individual part of the circuit will be described
in detail later, the general idea for circuit operation is as such: The
microcontroller provides a timer-driven 125 KHz square wave for the carrier
frequency that is sent through the RF choke, which is essentially a passive
low-pass filter with steep drop-off to knock out the upper harmonics and
leave only a sine wave. Since the reader antenna coil is a series resonant L-C
circuit, maximum resonance is achieved at minimum impedance, so it is very
important that adequate current amplification is done as to not overdrive
the microcontroller. The sine wave is then amplified to maximize current. On
the receiving end, the signal is first put through the envelope detection block
where it is first half-wave rectified, and is then fed through a half-wave R-C
filter to help knock out most of the 125 KHz carrier and detect the envelope
signal. This signal is then band-pass filtered using a series of Twin-T active
band-pass filters, and low-pass filtered with an active Butterworth filter to
further decrease gain in frequencies outside of the 10-20 KHz area and
increase gain of the envelope signals such that it saturates the op-amps of
the filters. At a final stage the signal is put through the pulse-shaping circuit
which comprise of the comparator and resistive divider to produce a nice
square wave at logic levels, which are fed to some D-flip flops and a decade
counter to extract data from the modulating square waves. The signal is then
The following are the individual blocks and reasons behind their selection:
i. Microcontroller: Performs digital signal processing, communicates
with the host computer and provides the timer driven 125kHz square
wave for the carrier frequency using an attached 4MHz crystal
oscillator.
ii. RF Choke: Simply a passive low-pass filter whose task is to knock off
the upper harmonics of the square wave from the microcontroller and
output a clean 125kHz signal.
iii. Carrier Signal Amplifier: In an effort to match impedance with the
RFID tag antenna coil and ensure the maximum transfer of power
through the antenna coil through magnetic coupling, it is important to
amplify the power of the signal while reducing the impedance of the
circuit. Hence this component block was attached to the signal before
the antenna coil.
iv. Reader Antenna Coil: It is a fundamental principle that when an
electric current flows through a conductor, it generates a magnetic
field in a direction normal to the direction of the current flowing in the
conductor. Because the medium of communication between the
reader circuit and tag coil is by magnetic coupling, it was paramount to
Hence this component block of antenna coil need be attached to the
tip end of the circuit’s transmitting section.
v. Envelope detection: Since the receive antenna coil is also the transmit
antenna coil, a circuit to detect the modulated signal from the tag is
attached to receive the backscattering signal and filter some of the
125kHz carrier signal still attached to it.
vi. Filter and Amplifier: To uncover the information on the received
signal, there is need to filter the signal and then pass it on through a
signal amplifier to boost its strength before signal processing.
vii. Pulse shaping: This component block is required to make the received,
filtered and amplified signal digital. This means that we need to make
the signal ready for processing by the microcontroller. This is done be
pulse shaping the signal into a square wave of digital levels using
comparators and digital logic combinations.
viii. Serial Interface: As part of the design goal is to make the reader
capable of administration, a serial interface is designed to connect the
microcontroller and the processed signal to a host computer that will
be man managed.
3.3 Individual Block Design
A microcontroller is used to handle the digital signal processing
aspects of this project. Considering the fact that the intention is to limit the
number of component items, the idea is then to eliminate the conventional
signal generator used to provide signal of a preset frequency. Research
uncovered a powerful and dynamic microcontroller with features that fit
well with the design needs and dynamic enough to provide the carrier signal
from the output of a 4MHz crystal oscillator. The ATmega32 is a low-power
CMOS 8-bit microcontroller based on the AVR enhanced Reduced Instruction
Set Computer(RISC) architecture. By executing powerful instructions in a
single clock cycle, the ATmega32 achieves throughputs approaching one
Million Instruction Per Second(MIPS) per MHz allowing the system designer
to optimize power consumption versus processing speed. The AVR core
combines a rich instruction set with 32 general purpose working registers. All
the 32 registers are directly connected to the Arithmetic Logic Unit (ALU),
allowing two independent registers to be accessed in one single instruction
executed in one clock cycle. The resulting architecture is more code efficient
while achieving throughputs up to 10X faster than conventional Complex
Instruction Set Computer(CISC) microcontrollers. The ATmega32 provides
the following other features:
32Kbytes of In-System Programmable Flash Program memory with
32 general purpose I/O lines
32 general purpose working registers
JTAG interface for Boundary-scan
On-chip Debugging support and programming
Three flexible timer/counters with compare modes, internal and external
interrupts
Serial programmable USART.
The Idle mode stops the CPU while allowing the Universal Synchronous
Asynchronous Receive and Transmit(USART), two-wire interface, A/D
Converter, SRAM, timer/counters, SPI port, and interrupt system to continue
functioning. The Power-down mode saves the register contents but freezes
the Oscillator, disabling all other chip functions until the next external
interrupt or hardware reset.. By combining an 8-bit RISC CPU with In-System
Self-Programmable Flash on a monolithic chip, the Atmel ATmega32 is a
powerful microcontroller that provides a highly-flexible and cost-effective
solution to many embedded control applications like this RFID reader design
project, needed to demonstrate the improvement of access control with RFID
technology.
This is designed to be a low-pass filter that knocks off the upper
harmonics of the incoming 125kHz square wave signal, thereby turning the
square wave signal into a 125kHz sine wave signal. This component block is
designed similar to the conventional L-C low-pass filter. The design
consideration for the choke was guided by the fact that the microcontroller
provides a 125kHz signal with an amplitude of 5V. In other not to over work
the microcontroller, a suitable R1 needs to be selected whose impedance is
right enough to pass the current. Also to be considered is the fact that the
value of the current needs to be high enough to drive the antenna. Hence
due to its availability and little impedance size, an 82Ω resistor is expected to
give us appreciable impedance. As depicted in the schematic, a 125kHz
square wave is generated from a signal generator and passed on to the RF
Choke. For the L-C low-pass filter with the output coming off the capacitor
C2, the transfer function for low-pass filters, which is given in equation (3.1)
⁄
√
⁄
But at resonance frequency of 125kHz
⁄
That is
Solving mathematically, equation 3.1 becomes:
⁄ ⁄√ From which we obtain:
- c2 c ⁄
√
⁄
Using equation 3.2, we now obtain:
- c (- c ) √ ⁄
Using an available and common inductor of 1mH as L, C1 can be obtained
from equation 3.2 as follows: ⁄ ⁄
Then with C1 = 1.62nF, R = 82Ω and L as 1mH, the value of C2 can be obtained
from equation 3.4 by proper substitution and evaluation as follows:
( ) √ ⁄
Then (- ) √
Therefore; ( - )
From which C2 is obtained to be:
( - )
⁄
The expectation is that this capacitance will provide the needed gain for the filtering process.
3.3.3 Carrier Signal Amplifier
The signal is amplified before it is fed into the antenna coil. A
complementary power amplifier circuit is typically used to boost the
transmitting signal level. This design incorporates the power amplifier circuit
design of Microchip®. Since the expected current level with respect to
transmit power for the 125kHz signal lies between 0.66A and 0.8A, it is then
expected that their amplifier circuit will fit into this design. With reference to
figure 3.3, R2 and R3 act as voltage divider coupled with R4 to bias Q2. D1
and D2 are used in the half bridge to help reduce crossover distortion caused
from differing points of either transistor Q1 or Q3 in the complementary
push-pull amplifier circuit. R7 and R8 are temperature-compensation
"feedback" resistors in the emitter legs of the push-pull transistor circuit,
3.3.4 Reader Antenna Coil
An RF signal can be radiated effectively if the linear dimension of the
antenna is comparable with the wavelength of the operating frequency. In
an RFID application like this which is utilizing the LF (125kHz) band, the
wavelength of the operating frequency is about 2.4km. Because of this long
wavelength, a perfect antenna can never be formed in a limited space of the
device. Alternatively, a small loop antenna coil that is resonating at the
frequency of interest (i.e., 125 kHz) is used. This type of antenna utilizes near
field magnetic induction coupling between transmitting and receiving
antenna coils. The field strength falls off with r-3 (where r = distance from the
antenna). This near field behaviour (r-3) is the main limiting factor of the read
range in RFID applications.
In RFID applications, the antenna coil is an element of resonant circuit and
the read range of the device is greatly affected by the performance of the
resonant circuit. The resonance frequency (fo) of the circuit is determined by:
√
where fo is the resonant frequency (in Hertz), L is inductance (in Henry) and C
is capacitance (in Farads). The resonant circuit can be formed either series or
parallel. The series resonant circuit has minimum impedance at the
resonance frequency. As a result, maximum current is available in the circuit.
This series resonant circuit is typically used for the reader antenna. On the
other hand, the parallel resonant circuit has maximum impedance at the
resonance frequency, because it offers minimum current and maximum
voltage at the resonance frequency. This parallel resonant circuit is used for
the tag antenna.
The first consideration as adapted from H. Hardy (1976) for the antenna design is that the data rate for FSK(Frequency Shift Keying) signal is 12.5kHz, then a bandwidth of 25kHz is needed for a full data recovery. The quality factor ‘Q’ is then obtained from the relation:
⁄
Also we can now obtain the inductance of our antenna from the relation:
⁄
With Q=5, r=82Ω and our resonance frequency remains the same, we obtain
L: ⁄
Which is approximately 0.5mH. To obtain the value of the coupling capacitor,
we substitute the value of ‘L’ and the resonant frequency into equation (3.4),
Firstly, we realise that
Then C
Then the value of the coupling capacitor to be in series with the inductor to
make up the series resonant antenna is about 3.2nF. Since the C2 is
grounded, the carrier signal (125 kHz) is filtered out to ground after passing
the antenna coil. The circuit provides minimum impedance at the resonance
frequency which results in maximizing the antenna current, and therefore,
the magnetic field strength is maximized. In order to determine the coil
parameters, we by optimisation with respect to the expected read range of
our reader circuit obtain the gain of our antenna using equation (3.9) below
√
Where λ=wavelength, Pt=power of transmitter, Gt=gain of transmitter,
Gr=gain of tag and Pth is the tag response threshold. Knowing that the
expected read range is about 0.1524m, λ is also known to be 2.4km, Pth is
0.16X10-6, Gr is 0.12dB, and Pt is 0.3mW, we can then compute the value for
Gt: Firstly, we make Gt the subject of the formulae of equation (3.9) to
obtain: ( ) equation 3.10
Now, substituting the already known values into equation (3.10)
( ) 0.16 10-6
( ) 2.83206X10
-9dB.
Then the gain of the transmitter to be approximately equal to 2.83X10-9dB.
With this gain we can now employ the expression relating antenna gain and antenna width which is given as:
Where d is the width or diameter of antenna with regards to its nature: rectangular loop or circular loop. Using the obtained gain, the antenna diameter can now be obtained as follows: From equation 3.11, we make d
the subject of the formulae which is: √
this is about 3.6cm. With this width and with a proportionate length, coupled with the value for inductance already obtained, we can now estimate our required number of coil turns for the antenna design using the expression shown in equation (3.12) below as adapted from F. Grover,(1946).
( ) (( ) )
Where L is the inductance (in milli-Henry), x and y are the width and length
of the coil (in cm), h is the height of the coil (in cm), b is the width across the
conducting part of the coil (in cm) and N is the number of turns. In this
design case, the estimations are: y=13.8 cm, h=1 cm and b=0.3cm. With
these estimates and the width x = 3.6cm, the numbers of turns are then
calculated from equation (3.12).
Firstly, we make N (number of turns of loop antenna) the subject of the
formulae from equation (3.12).
From which we obtain:
√ ( ) √ ( ) Therefore, √
That is approximately 90 turns. Although these are estimates, fine tuning is expected during implementation.
3.3.5 Envelope Detection
The envelope detector is the first component of the receiver
sub-system whose main task is to collect and process the modulated carrier wave
in the electromagnetic field around the antenna. For the obvious fact that
the transmitted wave is sent as an unguided wave, a receiving module must
be used to convert the impinging field to an electronic waveform, which is
then passed to the front end components for proper signal processing.
Although the transmitting antenna and receiving antenna are the same, it is
also a task for the reader antenna to detect the amplitude variation of the
tag and extract the modulation data. In this design a linear diode detector or
peak detector is employed, which is a series connection of a diode and a
capacitor outputting a DC voltage equal to the peak value of the applied AC
voltage. The obvious reason for its utilization is that the peak diode detector
uses the rectification property of a diode and maintains a linear relationship
between the carrier amplitude and the detected output voltage. According
to the schematic shown in figure 3.5, L1 is the receiving antenna coil; C1 is
the resonant capacitor which makes sure that transmitted signals are not let
through the receiving section. Diode D1 is a small signal fast recovery diode
rectifier; it is a demodulator which detects the envelope of the
backscattering signal. D1 and C2 form a half-wave capacitor-filtered rectifier
discharge path for the voltage charged in the C2. As is the norm for filtering
AC signals in this manner there is some 125 KHz ripple, but choosing good
values we could make the enveloping frequencies stand out from the ripple.
For this we chose R=390kΩ and C= 2.2nF, with respect to proven RC filter
design from Microchip®. Once signal leaves this stage, it passes through the
capacitor C3 to knock out the DC offset and into the next set of filters. Once
signal leaves the envelope detector, it is passed through a capacitor to knock
out the DC offset, before getting to the next stage of signal processing.
3.3.6 Filter and Amplifier
This stage of our device is required to pass the amplitude modulated
band of frequencies, as modulated by the obtained RFID tags. Recalling that
the modulation type used in the cards is Frequency Shift Keying (FSK), where
the modulation is done by essentially multiplying a lower amplitude, lower
frequency signal with the carrier signal, creating an AM-like effect; the lower
frequency enveloping the carrier frequency. To switch between a "1" and a
"0", the tag switches the modulating frequency. The two frequencies used by
obtained cards are 12.5 KHz (125 KHz/10) and 15.625 KHz (125 KHz/8), which
correspond to 1 and 0 respectively. Armed with this, it is expedient to design
efficient filters to pass only a band of frequency carrying the data needed in
the modulated signal. This act of band passage should also be
accommodating of attenuation gain.
Using the Matlab Filter Design Tool, it is possible to fuse in expected
specifications and parameters as regards the functionality of the filter. The
figure shown in figure 3.6 is the filter builder dialog box that helps to design
the filter needed. With the band pass parameters, the plot of magnitude
against frequency showing gain paths is illustrated in figure 3.7.
Having a response as depicted above, it is also possible to utilize the filter
coefficients obtained from the Matlab Filter Design Tool to compute the
transfer function from which the active and passive parameters of the filter
could be obtained. But considering the large number of filter coefficients
presented, it will be wise to search for an already designed filter with
responses that resembles the above response. An almost perfect fit is the
design presented on Discovercircuits.com by Jonathan Westhues. The bode
plot of this design and circuit schematic are as shown below. This picked
filter design comprise of a pair of active Twin-T filters and an active
Butterworth filter with the TL084 Operational Amplifier as the gain element.
As can be seen from the Bode Plot, the first filter mostly isolate before the
pass band (10-20 KHz), with roughly unity gain for all frequencies outside the
pass band. The second filter further accentuates gain in the pass-band while
Figure 3.7 Bode Plot from Matlab Filter Design Tool
0 10 20 30 40 50 60 -70 -60 -50 -40 -30 -20 -10 0 Frequency (kHz) M a g n it u d e ( d B )
Magnitude (dB) and Phase Responses
-17.5823 -14.3415 -11.1007 -7.8599 -4.6191 -1.3783 1.8625 5.1033 P h a s e ( ra d ia n s )
slightly reducing the magnitude of frequencies outside the pass band. After
this, the signal goes through a massive Butterworth Low-Pass filter to
drastically increase gain of lower frequencies already in the pass band and
virtually eliminate the higher frequencies, including the 125 KHz carrier
signal.
Figure 3.9 Filter Design Schematic, Courtesy Of Jonathan Westhues
Figure 3.10 Comparator Circuit with Op-Amp as Gain Element
3.3.7
Pulse Shaping Circuit
In communication systems, amplitude modulation is done with respect
to the information to be embedded in the carrier signal. For this design, it
has been possible to filter out the unnecessary aspects of our signals while
attenuating the band of frequency carrying the required signal. The first
component part of the circuit is required to pulse shape the signal into digital
pulses as can be understood by the micro-controller. In this design, an
op-amp as a comparator with a high voltage gain as shown in figure 3.10, is
used. Here, with reference input set to the inverting input of the op-amp, a
sinusoidal signal applied to the non-inverting input will cause the output to
switch between its two output states. If the input sinusoidal signal goes a
fraction of a millivolt above the reference level, it will be amplified by a very
high voltage gain so that the output rises to its positive output saturation
falls below the reference level, the output is driven to its lower saturation
level and stays there while the input remains below Vref. The design
expectations clearly are that the input signal are linear, while the output
signal is digital. Concerning the range of values of resistance used as R3 and
R4, it is easier to use the voltage divider relationship for Vdd and the
reference voltage given as:
ref
DD equation 3.14
With VDD as 5V as illustrated in the schematic above, Vref as 0.05V(very small
to enable comparison), and choosing R3 for a small impedance of 100Ω, R4
can be computed: from equation 3.13, making R4 subject of the formulae to
obtain:
(
- )
Now, substituting the values for ref = 0.05, R3=100 Ω, VDD = 5V into equation
(3.14), Then (
)
This is seen as approximately 10kΩ.
Technically, from the output of the comparator it is possible to read and
interpret data from the card using a timer interrupt. However, implementing
this would cripple the functionality of the system. That is, in order to
accurately measure the frequency of the incoming data stream, sampling
required to output a clock rate of 128 clock cycles to compute everything
before the next sampling interrupt fired. This would be extremely difficult to
implement. An easier design was published by Microchip, which makes use
of flip-flops and decade (Johnson) counter. This circuit can be seen in figure
3.11
The comparator output serves as the clock for the first D flip-flop, which also
takes logic 1 as its D value. On the rising edge of the comparator clock, Q is
immediately set to 1. However, simultaneously goes low and clears the
flip-flop. This creates an extremely short pulse which serves as a reset for the
decade counter and clock for the second flip-flop. The decade counter is a
counter which takes a 125 KHz clock. With every rising edge of this clock, the
counter outputs the next pin to logic 1; so typical output would look like (if
one were looking at output pins 0-9 of the counter) 1000000000
0100000000 00100000000 etc. However, this counter is being reset with
every rising edge of the comparator output. Thus, since its already been
determined that 125 KHz/10 = 12.5 KHz is to be the frequency that
represents logic 1, all that should be done is to check for the output on pin9
to confirm that frequency. If the system is operating at either one of the
other possible frequencies, the counter will be reset before pin9 can go
active. The pin9 output serves as input to the second flip-flop and also to the
clock inhibitor, which keeps the 9th pin high until the counter is reset.
Because of this set-up, the Q output of the second flip-flop will remain logical
1 so long as modulating frequency is 12.5 KHz and will drop down to 0 if its
anything else.. The 100kΩ resistor on the first flip-flop serves to lengthen the
time it takes for the signal to get to CLEAR. Since all transistors have some
amount of natural capacitance, this forms an RC circuit of sorts with a set RC
time constant for the signal to rise or fall.
3.3.8 Serial Interface
The concept of serial communication is the process of
sending data one bit at a time, sequentially, over a communication
channel or computer bus. This is in contrast to parallel communication,
where several bits are sent as a whole, on a link with several parallel
channels where the cost of cable and synchronization difficulties makes
Serial communication is a popular means of transmitting data between a
computer and a peripheral device such as a programmable instrument or
even another computer. Serial communication uses a transmitter to send
data, one bit at a time, over a single communication line to a receiver. You
can use this method when data transfer rates are low or you must transfer
data over long distances. Serial communication is popular because most
computers have one or more serial ports, so no extra hardware is needed
other than a cable to connect the instrument to the computer or two
computers together. Serial communication requires that you specify the
baud rate of the transmission, which is a measure of how fast data are
moving between instruments that use serial communication. The popular
registered standard cable RS-232 uses only two voltage states,
called MARK and SPACE. In such a two-state coding scheme, the baud rate is
identical to the maximum number of bits of information, including control
bits that are transmitted per second.
Devices that use serial cables for their communication are split into
two categories. These are DCE(Digital Communication Equipment) and
DTE(Digital Termination Equipment). DCE are devices such as a modem,
plotter, and so on, while a DTE is a computer or terminal. RS-232 serial ports
connector. Both of these connectors are male on the back of the PC. Table
3.1 shows the pin connections for the 9-pin and 25-pin D-Type connectors.
Table 3.1
Function Signal PIN DTE DCE
Data TxD 3 Output Input
RxD 2 Input Output
Handshake RTS 7 Output Input
CTS 8 Input Output
DSR 6 Input Output
DCD 1 Input Output
STR 4 Output Input
Common Com 5 --
--Other RI 9 Output Input
In this design, the baud rate is 9600bps with respect to the functional capacity of our transmitting microcontroller.
3.4 Software Design
As explained in previous sections of this chapter, the microcontroller is
basically a computer system that carries out processing tasks internally and
communicates its results with output and input pins. For this design, the
microcontroller does most of its processing actions by the activation of
interrupts. It is then clear that the bulk of the program and software design
will be based on interrupts. On initialisation, the various interrupts, timers,
following are the expected flow of program for the interrupts after
initialisation:
3.4.1 Main Operation
This main operation is in two modes: read mode and configuration
mode which can also be termed the remote operation mode.
a. Read mode: In this mode, when a full period of the looping card response
is captured, the microcontroller tries to decode the response by executing
the following steps until 3 identical codes are obtained in a row.
i. turn off the external pin interrupt since the microcontroller isn’t going to
be reading anything in this window of time
ii. look for a start code and take only data
iii. reduce the bit sequence to 90 bits
iv. Manchester decode to 45 bits. Upon receipt of 3 identical codes,
comparison is made with the code bank to see if the code is currently
allowed access to the facility. If so, a green LED blinks for 3 seconds. If
not, a red LED blinks for three seconds.
In order to prevent false reads, sampling is done until the microcontroller
successfully reads 3 consecutive identical codes. A statement is also printed
to the administrative terminal providing the card code, whether the card was
No
Yes
Power ON and Initialization
Mode select
Is it Add or Update?
Is ID stored in the ID BANK?
Configuration Mode Read Mode
Get Tag ID
Add Tag Update Tag ID
Get Tag ID Read ID Deny Access Compare ID Grant Access Add Update
Figure 3.13 Main Program Flowchart.
b. Configuration Mode: This mode can also be referred to as the remote
operation mode. In this mode, the administrator has a choice of remotely
adding a code to a specific code bank position or remotely adding any
number of codes (bound between 1 and 20 inclusive). When adding a
code to a specific code bank position, the External Interrupt2 is activated
and the card responses are read. Just like in normal mode, the
microcontroller finds the start code, reduces the sequence, and
Manchester decodes the sequence. This is done until five consecutive
identical codes are read and then stored into the specified position in the
Indexed character Receive character from
Administrator Is character 8bit Is character indexed Is character indexed
Indexed character Send character to buffer
code bank is first searched to find an unused position. Then remote add
can be done by position mode and the code is added at the first unused
position. This is done until either the specified quantity of codes are
stored or until the code bank is full.
After either of these modes finishes executing, the reader goes back to
its normal mode, but now with the new stored codes in the code bank. The
end of the main loop serves as a scheduler that checks the timers for certain
tasks and executes the task. It executes the function to check the
receive-ready flag, turns off the LED's after 3 seconds, and executes the counter that
keeps track of time and date.
3.4.2 USART Receive Interrupt
This interrupt handles any typed characters received from the administration terminal through the RS-232 connection and stores it into a buffer. It also echoes the character to the terminal. Once a carriage return is detected, the receive-ready flag is set indicating that a line command has been entered by the user via the terminal.
3.4.3 USART Transmit Interrupt
This interrupt handles transmitting characters to the terminal. It simply loops through the transmit buffer until the last character is sent and then is ready for another transmission.
3.5 Power Supply
Owing to the digital nature of this design, it is cheaper and easier to make
use of a 12V power, whose design is as shown below:
The aim of this design is to obtain 120V/220V AC power supply from a utility
outlet, and convert to a steady 12V DC power supply after transformer
action. With reference to conventional designs, a step-down transformer
with turns ratio of 7 is employed, coupled with the diode rectifier array of
Figure 3.15 Program Flowchart for USART Transmit Interrupt. Character from buffer to be
transferred to terminal
Is character ready for transmit Send Character to buffer
Figure 3.18 12V Power Supply Circuit
C2 470u U1 1N4004 IN GND OUT LM7812C C 1 5 0 0 n N1 N2 TR1 -+ VG1 R1 100 Load
1N4004 diodes and a 7812 voltage regulator IC. Since it is a full-wave
rectifier, the ripple can be calculated as follows, given these constant values:
Vdc = 0.636c, Vr (rms) = 0.308Vm
And that
Where ‘r’ represents the ripple magnitude, and Vm represents the peak
magnitude. Then for full wave rectification, r = 48%
Since Vdc is 12V, then Vm = 18.87V, while Vr = 5.81V.
To obtain C1, we use:
Obtained from the IC datasheet: Idc (max) is 1.5A, and then C1 can be obtained
as
3.6 Final Design Schematic
After all the proper and required analysis and design of individual component parts, the final design circuit schematic is obtained and represented below.