Professional Documents
Culture Documents
INTRODUCTION
The concept of access control is brought about using a card, a corresponding card
reader and a control panel interfaced with the server. The card is a proximity card with a unique
identification number integrated in it. The reader reads the data and sends it to the control
panel, which is the micro controller. This controller checks the validity of the data with the
server, which bears the database. The server is loaded with the details about the employee for
that number, such as the name, designation, his access locations in the organization and other
necessary details.
The control panel checks whether he/she is allowed to enter the particular door or not.
Then he/she is requested for a password. The employee enters it using a keypad interfaced with
the controller. The controller again checks it with the server for authenticity. If the employee is
authentic, then he/she is allowed access in the particular entrance.
The employees can be permitted in a given entrance as per his/her designation. The
access control is employed at this point. When a person of a particular designation is not
supposed to be allowed in a given entrance, he/she is not even requested for a password.
In our project, the card reader is a proximity card reader. The controller used is PIC
AT8952. The server database was created using MS Access and the programming parts were
carried out with VB, whereas the controller was programmed with Hi-tech C.
1.1
entrances to avoid illegal entry. The employees sign a register at the entrance before getting
in. This is still being practiced in most of the companies.
However, the disadvantages are that, when there is a necessity of providing control at
many locations inside the company, a person at each point will not be an economical way of
implementing it.
Then came were the punch cards. Employees possess cards, which are punched when
they enter into the building. But it had disadvantages. Workers started to practice buddy
punching, for their co-workers.
Concerns about buddy punching-the practice where employees fraudulently clock their
co-workers in or out to give them credit for time that wasn't actually worked-led Continental
Airlines to implement a fingerprint ID system to augment their automated employee time and
attendance recording system. The company expanded the system from Control Module after
it saved an estimated $100,000 in the first year. This led to the bar code readers.
It is a much common sight to see a bar code reader in the companies. These are used to
check with the employees identification. The employees swipe the card in the provided slot.
Then the access is given after checking the authenticity of the card. This was a substitute to
the security and emerged as a new technique in access control. This acted as a starting to the
automation of the access control. But, the bar code readers are contact readers where, the
cards are required to touch the readers.
With growth of technology and giant leap in the field of Radio frequency transmission, a
requirement for the same application using RF is desired.
A further improvement is the RF ID card technology, which uses contact less card
readers. Bringing the card nearer to the reader suffices for the reader to read the contents of
the card. This simplifies the usage for the employees. This technology is crawling into the
companies and has the potential to substitute the preceding technologies.
1.2
RFID TECHNOLOGY
RF technology is used in many different applications, such as television, radio,
cellular phones, radar, and automatic identification systems. The term RFID (radio frequency
identification) describes the use of radio frequency signals to provide automatic identification
of items.
Radio frequency (RF) refers to electromagnetic waves that have a wavelength suited
for use in radio communication. Radio waves are classified by their frequencies, which are
expressed in kilohertz, megahertz, or gigahertz. Radio frequencies range from very low
frequency (VLF), which has a range of 10 to 30 kHz, to extremely high frequency (EHF),
which has a range of 30 to 300 GHz.
RFID is a flexible technology that is convenient, easy to use, and well suited for
automatic operation. It combines advantages not available with other identification
technologies. RFID can be supplied as read-only or read / write, does not require contact or
line-of-sight to operate, can function under a variety of environmental conditions, and
provides a high level of data integrity. In addition, because the technology is difficult to
counterfeit, RFID provides a high level of security.
RFID is similar in concept to bar coding. Bar code systems use a reader and coded
labels that are attached to an item, whereas RFID uses a reader and special RFID devices that
are attached to an item. Bar code uses optical signals to transfer information from the label to
the reader; RFID uses RF signals to transfer information from the RFID device to the reader.
Radio waves transfer data between an item to which an RFID device is attached and
an RFID reader. The device can contain data about the item, such as what the item is, what
time the device traveled through a certain zone, perhaps even a parameter such as
temperature. RFID devices, such as a tag or label, can be attached to virtually anything
from a vehicle to a pallet of merchandise.
RFID technology uses frequencies within the range of 50 kHz to 2.5 GHz. An RFID
system typically includes the following components:
An RFID device (transponder or tag) that contains data about an item
An antenna used to transmit the RF signals between the reader and the RFID device
An RF transceiver that generates the RF signals
A reader that receives RF transmissions from an RFID device and passes the data to a host
system for processing
In addition to this basic RFID equipment, an RFID system includes applicationspecific software.
1.3
The RFID tags based on the mode of operation are classified as Active and Passive
tags. The classification is done on basis of the tags ability to transmit the code embedded in
it. Hence an active tag is capable of transmitting to a reader independently, whereas the
passive tag needs an external excitation for to transmit the code. The reader usually provides
the excitation. Further each of the tags either active or passive has their own frequency of
operation. We have used the passive type of tag operating at a frequency of 125 kHz in our
project.
PACKAGING
Tags are manufactured in a wide variety of packaging formats designed for different
applications and environments. The basic assembly process consists of first a substrate
material (Paper, PVC, PET...); upon which an antenna made from one of many different
Conductive materials including Silver ink, Aluminum and copper is deposited. Next the Tag
chip itself is connected to the antenna; using techniques such as wire bonding or flip chip.
Finally a protective overlay made from materials such as PVC lamination, Epoxy Resin or
Adhesive Paper, is optionally added to allow the tag to support some of the physical
conditions found in many applications like abrasion, impact and corrosion.
Figure 1.2:
TAG ICS
Figure 1.3:
RFID tag ICs are designed and manufactured using some of the most advanced and
smallest geometry silicon processes available. The result is impressive, when you consider
that the size of a UHF tag chip is around 0.3 mm2
In terms of computational power, RFID tags are quite dumb, containing only basic
logic and state machines capable of decoding simple instructions. This does not mean that
they are simple to design! In fact very real challenges exist such as, achieving very low
power consumption, managing noisy RF signals and keeping within strict emission
regulations. Other important circuits allow the chip to transfer power from the reader signal
field, and convert it via a rectifier into a supply voltage. The chip clock is also normally
extracted from the reader signal. Most RFID tags contain a certain amount of NVM (Non
volatile Memory) like EEPROM in order to store data.
The amount of data stored depends on the chip specification, and can range from just
simple Identifier numbers of around 96 bits to more information about the product with up to
32 Kbits. However, greater data capacity and storage (memory size) leads to larger chip sizes,
and hence more expensive tags. In 1999 The AUTO-ID center (now EPC Global) based at the
MIT (Massachusetts Institute of Technology) in the US, together with a number of leading
companies, developed the idea of a unique electronic identifier code called the EPC
(Electronic Product Code). The EPC is similar in concept to the UPC (Universal Product
Code) used in barcodes today. Having just a simple code of up to 256 bits would lead to
smaller chip size, and hence lower tag costs, which is recognized as the key factor for wide
spread adoption of RFID in the supply chain.
TAG CLASSES
One of the main ways of categorizing RFID tags is by their capability to read and
write data.
This leads to the following 4 classes. EPC global has also defined five classes
further writes are allowed and the tag can only be read. Tags of this type usually act as simple
Identifiers
Passive tags use the reader field as a source of energy for the chip and for
Communication from and to the reader. The available power from the reader field, not only
reduces very rapidly with distance, but is also controlled by strict regulations, resulting in a
limited communication distance of 4 - 5m when using the UHF frequency Band (860 MHz
930 MHz).
Semi-Passive (battery assisted backscatter) tags have built in batteries and therefore
do not require energy from the reader field to power the chip. This allows them to function
with much lower signal power levels, resulting in greater distances of up to 100 meters.
Distance is limited mainly due to the fact that tag does not have an integrated transmitter, and
is still obliged to use the reader field to communicate back to the reader.
Active tags are battery-powered devices that have an active transmitter onboard.
Unlike passive tags, active tags generate RF energy and apply it to the antenna. This
autonomy from the reader means that they can communicate at distances of over several
kilometers.
In order to receive energy and communicate with a reader, passive tags use one of the
two following methods. These are near field, which employs inductive coupling of the tag to
the magnetic field circulating around the reader antenna (like a transformer), and far field,
which use similar techniques to radar (backscatter reflection) by coupling with the electric
field. The near field is generally used by RFID systems operating in the LF and HF frequency
bands, and the far fields for longer read range UHF and microwave RFID systems.
Figure 1.4: How Tags communicate
LF, HF Tags
Tags at these frequencies use inductive coupling between two coils (reader antenna
and tag antenna) in order to supply energy to the tag and send information. The coils
themselves are actually tuned LC circuits, which when set to the right frequency (ex; 13.56
MHz), will maximize the energy transfer from reader to tag. The higher the frequency the
less turns required (13.56 MHz typically uses 3 to 5 turns). Communication from reader to
tag occurs by the reader modulating (changing) its field amplitude in accordance with the
digital information to be transmitted (base band signal). The result is the well-known
technique called Amplitude modulation (AM). The tags receiver circuit is able to detect the
modulated field, and decode the original information from it. However, whilst the reader has
the power to transmit and modulate its field, a passive tag does not. How communication is
therefore achieved back from tag to reader?
The answer lies in the inductive coupling. Just as in a transformer when the secondary
coil (tag antenna) changes the load and the result is seen in the Primary (reader antenna). The
tag chip accomplishes this same effect by changing its antenna impedance via an internal
circuit, which is modulated at the same frequency as the reader signal. In fact its a little more
complicated than this because, if the information is contained in the same frequency as the
reader, then it will be swamped by it, and not easily detected due to the weak coupling
between the reader and tag. To solve this problem, the real information is often instead
modulated in the side bands of a higher sub- carrier frequency, which is more easily detected
by the reader
Figure 1.5: Creation of two higher frequency side-bands
Anti-collision
If many tags are present then they will all reply at the same time, which at the reader
end is seen as a signal collision and an indication of multiple tags. The reader manages this
problem by using an anti-collision algorithm designed to allow tags to be sorted and
individually selected. There are many different types of algorithms (Binary Tree, Aloha....),
which are defined as part of the protocol standards. The number of tags that can be identified
depends on the frequency and protocol used, and can typically range from 50 tags/s for HF
and up to 200 tags/s for UHF.
Once a tag is selected, the reader is able to perform a number of operations such as
read the tags identifier number, or in the case of a read/write tag write information to it. After
finishing dialoging with the tag, the reader can then either remove it from the list, or put it on
standby until a later time. This process continues under control of the anti collision algorithm
until all tags have been selected.
THE 125 KHZ RFID CARD
The card used in our project is a passive Radio Frequency Identification (RFID)
device for low-frequency applications (100 kHz-400 kHz). The device is powered by
rectifying an incoming RF signal from the reader. The device requires an external LC
resonant circuit to receive the incoming RF signal and to send data. The device develops a
sufficient DC voltage for operation when its external coil voltage reaches approximately 10
Vpp.
This device has a total of 128 bits of user programmable memory and an additional 12
bits in its configuration register. The user can manually program the 128 bits of user memory
by using a contact less programmer. The device is a One-Time Programmable (OTP)
integrated circuit and operates as a read-only device after programming.
Figure 1.6: TYPICAL PIN DETAILS OF THE CHIP INSIDE THE RFID CARD
FEATURES
Factory programming and memory serialization.
One-time contactless programmable (developer kit only)
Read-only data transmission after programming
96 or 128 bits of One-Time Programmable (OTP) user memory (also supports 48 and 64-bit
protocols)
Typical operation frequency: 100 kHz-400 kHz
Ultra low-power operation (5 A @ VCC = 2V)
Modulation options:
- ASK, FSK, PSK
Data encoding options:
- NRZ Direct, Differential Biphase, Manchester Biphase
Figure 1.7:
BLOCK DIAGRAM OF THE CHIP
The configuration register includes options for communication protocol (ASK, FSK,
PSK), data encoding method, data rate, and data length. These options are specified by
customer and factory programmed during assembly. Because of its many choices of
configuration options, the device can be easily used as an alternative or second source for
most of the existing low frequency passive RFID devices available today.
The device has a modulation transistor between the two antenna connections (VA and
VB). The modulation transistor damps or undamps the coil voltage when it sends data. The
variation of coil voltage controlled by the modulation transistor results in a perturbation of
voltage in reader antenna coil. By monitoring the changes in reader coil voltage, the data
transmitted from the device can be reconstructed.
igure
Table 1:
FEATURES
Typical Application
2.1
A door reader, which indicates whether the card is valid and entry, is authorized.
Behind the scenes is a complex network of computers and software that incorporates robust
security functionality.
ID credential
Door reader
Door lock
Control panel
Software
Database
Figure 2.1:
The control panel first validates the reader and then accepts the data transmitted by
the reader. What happens next depends on whether the system is centralized or distributed.
In a centralized system, the control panel transmits the data to the access control
server. The access control server compares the data received from the card with the
information about the user that is stored in a database. Access control software determines the
users access privileges and authorization, the time, date and door entered, and any other
information that a company may require to ensure security. When access is authorized, the
access control sever sends a signal to the control panel to unlock the door. The control panel
then sends out a signal to the appropriate door lock, which unlocks the door.
In a distributed system, the control panel allows or denies entry. The access control
server periodical provides control panels with data that enable the control panel software to
determine whether the user is authorized for access. The control panel then performs the
access control server functions described above and makes the decision to allow or deny
entry. Enabling control panels to perform the decision function has the advantage of requiring
less communication between the control panels and a central access control server.
DOOR READER
The door reader can have one or more interfaces, accommodating some combination
of both the contact less card and the pin pad. How the reader responds depends on the type of
credential presented and the organization security policy.
When the reader is used with a contact less card, it acts as a small, allow power radio
transmitter and receiver, constantly transmitting an RF field called an excite field. When the
card is within the range of the excite field, the internal antenna on the card converts the field
energy into electricity that powers the chip on the card. The chip then uses the antenna to
transmit data to the reader.
When the reader has received all required data, it typically processes the information
in one of the two ways. Either the information is immediately sent to the control panel, or the
reader analyzes the data before sending it to the control panel. Both methods are widely
deployed.
The simplest readers send data directly to the control panel. These readers do nothing
to evaluate the data or determine the legitimacy of the credential. These readers are typically
one-factor readers and are generic, so that they can be stocked in inventory and easily added
to or swapped out of an access control system.
Readers that analyze data must be integrated into the access control system. That is,
they must interpret and manipulate the data sent by the card and then transmit the data in a
form that is usable by the control panel. Such a system can offer an increased level of
security. The reader can determine the legitimacy of the card, compare it with the PIN entry
and manipulate the credential data so that what the reader sends to the control; panel is not
the same as what was read from the card. The process of authenticating the card to the reader
and the reader to the card is called mutual authentication.
CONTROL PANEL
The control panel (often referred to as the controller or simply the panel) is the central
communication point for the access control system. It typically supplies power to the
interfaces with multiple readers at different access points. The controller connects to the
electro-mechanical door lock, a relay switch in our project. It can be connected to different
alarms (example Buzzer, sirens, lights). And finally the control panel is usually controlled
to an access control server.
Depending on the system design, the control panel may process data from the card
reader and the access control server and make the final authorization decision, or it may pass
the data to the access control server to make this decision. Typically, the control panel makes
the decision to turn ON the relay and pass the transaction data to the host computer and
unlocking signal to the reader. It is important for the control panel to generate the unlocking
signal, since the control panel is located inside the facility or in a secure room, while the card
reader is located in an insecure or open area.
Finally, the control panel stores data format information. This information identifies
what portion of the data stream received from a card is used to make access control decisions.
Cards and readers implemented with different technologies can exchange data in different
formats. However, the control panel needs to know how to interpret and process this data. For
example, if a reader sends 35 bits of data and the control panel is designed to read only 26
bits, the panel must either reject the data or truncate 9 bits. The data format control how the
panel interprets received data.
ACCESS CONTROL SERVER
The head end system (also referred to as back-end system or host system) includes
the access control server, software and a database. The database contains updated information
on users access rights.
In a centralized system, the access control sever receives the card data from the
control panel. The software correlates the card data with the data in the database, determines
the persons access privileges, and indicates whether the person can be admitted.
Most systems are decentralized. In a decentralized system, the access control server
periodically sends updated access control information to the control panels and allows them
to operate independently, making the authorization decision for the credential presented
based on data stored in the panel.
The access control systems data format is a critical design element. Data format refers
to the bit pattern that the reader transmits to the control panel. The format specifies how
many bits make up the data stream and what these bits represent. For example, the first few
bits represent the facility code, the next few a unique credential ID number, the next few
parity and so on.
Each access control system has its own format, making every vendors code unique.
Like the pattern of teeth on a door key, the formats are kept secret to prevent an unauthorized
person or company from duplicating a card.
OPERATIONAL RANGE
One important characteristic of access control system operation is the distance from
the reader at which the credential is effective (called the operational range).
The operational range is determined by many factors, including both the systems
design specifications and the environment in which the reader is placed. Factors that affect
the operational range are:
Antenna shape
Antenna material
Surrounding materials
Anti-collision features
2.3 WORKING
COMPONENTS SETUP
The system is constructed by means of the following major components.
3 X l matrix keypad
16 X 2 LCD module
Relay control
Server
USER SECTION
The users, say employees in an organization are provided with the 125 kHz RFID
cards. The user has to flash his card to the reader; the reader in turns detects the card and
checks for the authenticity. If the card is genuine, it prompts the user to enter his password.
The user can enter the password by means of the keypad provided near the reader. If the
password is accepted the door is unlocked and the user is provided access.
This section is about the AT89S52 Micro controller. The coding as per the desired
operation is programmed onto the flash memory of the chip. Hence once the reader detects
the card, and when the user enters the password it reaches the controller. The controller in
turn forwards it to the PC by means of the RS 232 cable interface provided. If the details are
genuine, the PC sends Ok signal to the controller to unlock the door for the user to enter.
A server stores all the details pertaining to the users. The details are initially fed onto
the server database before the cards are issued. Hence each user is allocated a with a definite
access rights as per the requirements. Further when an user gains access after all the
authentication process, the details that pertain to the involved access operation such as date &
time of entry, door entered, etc; are all stored. Thus details of all those who gain entry are
stored. These details can be retrieved at a future point of time for any processing.
The database for the users is created using MS access and for the processing
operations Visual basic 6 is used in our Project.
2.4
CIRCUIT DIAGRAM
Power supply:
The power supply is of two ranges, +5V for the micro controller and +12 V for the
relay switch. This was constructed using 7805 and 7812 IC s respectively. They are provided
with a 9-0-9 V and a 15-0-15 V step-down transformer. After filter circuits, they are given to
the respective components.
LCD:
A 16 X 2 LCD module is used for the display. The LCD is connected to the micro
controller for displaying any text to the user. A potentiometer is used to vary the brightness of
the LCD display.
Keypad:
A 3 X 4 matrix keypad is provided for the user to enter the password, when requested
by the controller. It is interfaced to the Port D of the controller.
Oscillator:
A crystal oscillator of 11.0592 MHz is connected with capacitor combination to
provide the clock frequency for the micro controller.
Relay:
The relay is used to open or close the door. In our project, it is used to switch on a 230
V powered AC electric lamp. The relays are driven using driver circuits. These relays
energize on a signal from the controller. The two electric lamps signify the opening and
closing of an electronic door.
the controller
through RS 232 serial port cable. This is connected through an RS 232 connector and a MAX
232 IC for driving the signals. The connection is given to the COM port in the computer to
connect the controller with the computer. This is the cable through which the controller
accesses the database.
RFID Card Reader
MICROCONTROLLER (AT89S52)
4.4.1 CRITERIA FOR CHOOSING A
MICROCONTROLLER
The basic criteria for choosing a microcontroller suitable for the application are:
1) The first and foremost criterion is that it must meet the task at hand efficiently and cost
effectively. In analyzing the needs of a microcontroller-based project, it is seen whether an
8- bit, 16-bit or 32-bit microcontroller can best handle the computing needs of the task
most effectively. Among the other considerations in this category are:
(a) Speed: The highest speed that the microcontroller supports.
(b) Packaging: It may be a 40-pin DIP (dual inline package) or a QFP (quad
flat package), or some other packaging format. This is important in terms of space,
assembling, and prototyping the end product.
(c) Power consumption: This is especially critical for battery-powered
products. (d) The number of I/O pins and the timer on the chip.
(f) How easy it is to upgrade to higher performance or lower consumption
versions. (g) Cost per unit: This is important in terms of the final cost of the
product in which a microcontroller is used.
2) The second criterion in choosing a microcontroller is how easy it is to develop products
around it. Key considerations include the availability of an assembler, debugger, compiler,
technical support.
3) The third criterion in choosing a microcontroller is its ready availability in
needed quantities both now and in the future. Currently of the leading 8-bit
microcontrollers, the
8051 family has the largest number of diversified suppliers. By supplier is meant a
producer besides the originator of the microcontroller. In the case of the 8051, this has
originated by Intel several companies also currently producing the 8051.
Thus the microcontroller AT89S52, satisfying the criterion necessary for the proposed
application is chosen for the task.
4.4.2
DESCRIPTION:
The 8051 family of microcontrollers is based on an architecture which is
highly optimized for embedded control systems. It is used in a wide variety of
applications from
military equipment to automobiles to the keyboard. Second only to the Motorola 68HC11
in eight bit processors sales, the 8051 family of microcontrollers is available in a wide
array of variations from manufacturers such as Intel, Philips, and Siemens. These
manufacturers have added numerous features and peripherals to the 8051 such as I2C
interfaces, analog to digital converters, watchdog timers, and pulse width modulated
outputs. Variations of the 8051 with clock speeds up to 40MHz and voltage requirements
down to 1.5 volts are available. This wide range of parts based on one core makes the
8051 family an excellent choice as the base architecture for a company's entire line of
products since it can perform many functions and developers will only have to learn this
one platform.
The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller
with
8K bytes of in-system programmable Flash memory. The device is manufactured using
Atmels high-density nonvolatile memory technology and is compatible with the industrystandard 80C51 instruction set and pinout. The on-chip Flash allows the program
memory to be reprogrammed in-system or by a conventional nonvolatile memory
programmer. By combining a versatile 8-bit CPU with in-system programmable Flash
on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller which provides a
highly-flexible and cost- effective solution to many embedded control applications. In
addition, the AT89S52 is designed with static logic for operation down to zero frequency
and supports two software selectable power saving modes. The Idle Mode stops the CPU
while allowing the RAM, timer/counters, serial port, and interrupt system to continue
functioning. The Power-down mode saves the RAM con-tents but freezes the oscillator,
disabling all other chip functions until the next interrupt or hardware reset.
4.4.3
FEATURES:
The basic architecture of AT89C51 consists of the following features:
Compatible with MCS-51 Products
8K Bytes of In-System Programmable (ISP) Flash Memory
4.0V to 5.5V Operating Range
Fully Static Operation: 0 Hz to 33 MHz
256 x 8-bit Internal RAM
32 Programmable I/O Lines
M
4.4.6 PIN DESCRIPTION
VCC: Supply voltage.
GND: Ground.
Port 0: Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each
pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be
used as high-impedance inputs. Port 0 can 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 internal pull-ups.
Port 1: Port 1 is an 8-bit bidirectional 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. In addition, P1.0 and P1.1 can be configured to be the
timer/counter
2 external count input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX),
respectively, as shown in the following table.
Port 2: Port 2 is an 8-bit bidirectional 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 by the 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 high-order address byte during fetches
from external program memory and during accesses to external data memory that
use 16- bit addresses (MOVX @ DPTR). In this application, Port 2 uses strong
internal pull- ups when emitting 1s. During accesses to external data memory that
uses 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2
Special Function register.
Port 3: Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. 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 source current (IIL) because of the pull-
ups. Port 3 receives some control signals for Flash programming an verification.
M
Port 3 also serves the functions of various special features of the AT89S52, as
shown in the following table.
Alternate functions of Port 3:
M
In order for the RESET input to be effective, it must have a minimum duration of
two machine cycles.
XTAL1: Input to the inverting oscillator amplifier and input to the internal
clock operating circuit.
C2
XTAL2
30pF
C1
XTAL1
30pF
GN D
The
internal
counters
must
divide
the
basic
clock
rate
to
yield
M
Stack Pointer (SP) register is eight bits wide. It is incremented before data
is stored during PUSH and CALL executions. While the stack may reside
anywhere in on-chip RAM, the Stack Pointer is initialized to 07H after a
reset. This causes the stack to begin at location 08H.
DPTR or data pointer is a special 16-bit register that is accessible as two 8bit registers: DPL and DPH, which are used to
addresses for internal and external code access and external data access.
Control Registers: Special Function Registers IP, IE, TMOD, TCON, SCON,
and PCON
contain control
and status
bits
for
the
1. Register Banks 0-3: locations 00H through 1FH (32 bytes). The device after
reset defaults to register bank 0. To use the other register banks, the user must
select them in software. Each register bank contains eight 1-byte registers R0-R7.
Reset initializes the stack point to location 07H, and is incremented once to start
from 08H, which is the first register of the second register bank.
2. Bit Addressable Area: 16 bytes have been assigned for this segment 20H2FH. Each one of the 128 bits of this segment can be directly addressed (0-7FH).
Each of the 16 bytes in this segment can also be addressed as a byte.
3. Scratch Pad Area: 30H-7FH are available to the user as data RAM.
However, if the data pointer has been initialized to this area, enough bytes should
be left aside to prevent SP data destruction.
The WDT is intended as a recovery method in situations where the CPU may
be
subjected to software upsets. The WDT consists of a 14-bit counter and the Watchdog
Timer
M
Reset (WDTRST) SFR. The WDT is defaulted to disable from exiting reset. To enable
the
WDT, a user must write 01EH and 0E1H in sequence to the WDTRST register (SFR
location
0A6H). When the WDT is enabled, it will increment every machine cycle while the
oscillator is running. The WDT timeout period is dependent on the external clock
frequency. There is no way to disable the WDT except through reset (either hardware reset
or WDT overflow reset). When WDT over-flows, it will drive an output RESET HIGH
pulse at the RST pin.
4.4.10
TIMERS
COUNTERS
AND
13-bit counter.
TIMER MODE-1: Mode-1 is similar to mode-0 except TL is configured as a full
8-bit counter when the mode bits are set to 01b in TMOD.
TIMER MODE-2: Setting the mode bits to 10b in TMOD configures the timer to use
only the TL counter as an 8-bit counter. TH is used to hold a value that is loaded into
TL every
time TL overflows from FFh to 00h. The timer flag is also set when TL
overflows.
TIMER MODE-3: In mode-3, timer-1 simply hold its count, where as timer 0 registers
TL0 and TH0 are used as two separate 8-bit counters. TL0 uses the Timer-0 control
bits. TH0 counts machine cycles and takes over the use of TR1 and TF1 from Timer-1.
4.4.11
INTERRUPTS
A computer has only two ways to determine the conditions that exist in internal
and external circuits. One method uses software instructions that jump to subroutines
on the states of flags and port pins. The second method responds to hardware
signals, called interrupts that force the program to call a subroutine.
The AT89S52 has a total of six interrupt vectors: two external interrupts (INT0 and
INT1), three timer interrupts (Timers 0, 1, and 2), and the serial port interrupt. Each of
these interrupt sources can be individually enabled or disabled by setting or clearing
a bit in Special Function Register IE. IE also contains a global disable bit, EA, which
disables all interrupts at once.
Each interrupt forces the processor to jump at the interrupt location in the
memory. The interrupted program must resume operation at the instruction where the
interrupt took place. Program resumption is done by storing the interrupted PC address on
to stack.
RETI instruction at the end of ISR will restore the PC
address.
LCD mode selection switch in order to switch between two modes of display:
1) Sensor output display
2) Actuator status display
Port details:
Port 0: Interfaced with the LCD data lines.
Port 1: Interfaced with the ADC data lines
Port 2: Interfaced with the LCD Control lines and AC Interface control
Port 3: Interfaced with the ADC control lines
80
81
Second line C0 C1
82
83
84
85
C2 C3
C4
C5
86
through
8F
C6 through CF
4.7 RELAYS
A relay is an electrical switch that opens and closes under the control of another
electrical circuit. In the original form, the switch is operated by an electromagnet to open
or close one or many sets of contacts. It was invented by Joseph Henry in 1835. Because
a relay is able to control an output circuit of higher power than the input circuit, it can be
considered
to be, in a broad sense, a form of an electrical amplifier.
normally open
contact and one normally closed contact with a common terminal. It is also called a
Form C transfer contact.
The following types of relays are commonly encountered:
RS - 0 Instruction
- 1 Character
Department of AE & I
Page 47
2009-2010
normally open
contact and one normally closed contact with a common terminal. It is also called a
Form C transfer contact.
The following types of relays are commonly encountered:
1N4148
1
Vin
7805 Vout
GND
2
230V,
50Hz
1000
uf
10
uf
1uf
APPLICATIONS
The RF Identification is finding its application in many fields and some of them are
described briefly below:
Access Control and Security
The cards can also be used for many of the work carried out inside the company such as:
Pay-roll calculation:
The employees in time and out time can be noted and their attendance can be
maintained. This in turn helps in calculating the salary that they have to get for the last month.
Human checking:
When somebody has to be traced inside a building, it can be done with the information
about the location he/she had recently checked-in inside the building. Also, in case of closing the
gate for the day, accidental or deliberate presence of a person can be found by noting the
employees checkout information.
This is the application that our project is mainly focused on. In this, the employees are
given access only into certain places inside the building and are restricted from entering into
certain other places demanding security. In any company, there are some restricted locations,
where permission is given only to employees of certain cadre or skill level. The others are
incompetent either on the ground of their cadre or their knowledge about the components and
equipments or objects, present in the location. RF ID provides a good solution to this
application.
"Proximity cards are one of the highest forms of ID, and are considered very secure. But
they can still be used for buddy punching," says Jimmy Bianco, Vice President of sales and
marketing for Control Module Inc.
So, apart from the card, a keypad is provided for entering the password, which is checked
for authenticity. So, this second level of security provides a complementary solution to the
access control inside the building.
The application provides an excellent example of how the technology can provide a
secure foundation upon which additional applications can be built.
OTHER APPLICATIONS
Vehicle Identification
Commercial trucks are fitted with RFID systems to monitor access and egress from
terminal facilities by fixing the RF ID tags in the vehicles.
This can also be used for ships entering the harbor. This helps in maintaining record of
the vehicles that have entered and left.
Industrial Monitoring
In the plant environment, RF systems are ideally suited for the identification of highunit-value products moving through a tough assembly process (e.g., automobile or agricultural
equipment production where the product is cleaned, bathed, painted and baked). RF systems also
offer the durability essential for permanent identification of captive product carriers such as:
Tote boxes, containers, barrels, tubs, pallets, tool carriers, and free conveyor trolleys, lift
trucks, towline carts, and automatic guided vehicles.
This avoids the necessity of human beings having a watch over the products entering
various places, especially those having risk.
Animal Identification
Valuable breeding stock, laboratory animals involved in lengthy and expensive research
projects, meat and dairy animals, wildlife, and even prized companion animals present unique
identification problems that can be solved by innovative applications of RFID technology. They
can be monitored for their position in the breeding place, zoo, and other places.
CONCLUSION
The implementation of RFID based system in access control and security operations are
bound to increase in the future. The advantages, efficiency and reliability of the system have
made it manifest itself over the existing systems. The system achieves a two level security
making the incorporating firm more secure.
Further this system is compatible for the future upgradations like a Finger print scanner,
retina scanner, monitoring camera, etc. making it more versatile. With the introduction of more
smart RFID devices in the near future the system is going to rule the field of access control and
security.
CHAPTER 4
APPENDICES
APPENDIX 1
EXAMPLES OF DIFFERENT FORMAT OF TAGS
Key fobs
Paper tags
Photo
26.5mm
6.9mm
16.5mm
K4
123456789
2.54 mm
Pin 1---9
ASCII RS232 :
RS232/TTL
(ASCII) Output
Pin3 Strap to +5
Pin1 Antenna 1
To External Antenna
Pin2 Antenna 2
2.7KHz Logic
Pin5 DATA1(TTL)
Low Active
0V
VCC
02
Checksum
03
E 3 H
0 8 H
6 C H
E D H)
104us
Bit0
Bit1
Bit7
104us
StopBit
208us
PIN6
Start Bit
Bit0
Bit1
Bit7
StopBit
104us
104us
208us
Wiegand 26:
Weigen26 Output AS
Wiegand Output
(Pin3 To Low)
Pin1 Antenna 1
To External Antenna
Pin2 Antenna 2
2.7KHz Logic
Low Active
Pin8 Ground
Pin9 VCC
0V
+4.6 through +5.5V
3
E
4
E
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
E E E E E E E E E O O O O O O O O O O O O P(2)
EVEN Parity(E)
ODD Parity(O)
DATA1
DATA0
P(1)
Bit23
Bit22
1
Bit1Bit0
0
1
MSB
LSB
K4 Annte
680uH
P(2)
0