Rfid Project Report
Short Description
Download Rfid Project Report...
Description
UNIVERSITY NAME
PROJECT REPORT ON EMBEDDED ACCESS CONTROL AND SECURITY SYSTEM USING RFID
A Project report submitted in partial fulfillment of the requirement for the award of Bachelor of Engineering In ELECTRONICS AND COMMUNICATION Submitted by: TARUN(Regd No.0501229084) Under the guidance of Prof. Subhendu Behera Dept. of Applied Electronics & Instrumentation Engineering Dhaneswar Rath Institute of Engineering & Management Studies, Cuttack.
DHANESWAR RATH INSTITUTE OF ENGINEERING & MANAGMENT STUDIES CUTTACK (Affiliated To Biju Patnaik University of Technology) Dept. of Applied Electronics & Instrumentation Engineering Certificate
Certified that the project work entitled “Monitor Environment” is a bonafide work carried out by:
and Control of Greenhouse
Chinmayananda Das (Regd No.0501229084) in partial fulfillment for the award of the degree of Bachelor of Engineering in Applied Electronics and Instrumentation Engineering under Biju Pattnaik University Of Technology, Rourkela, during the year 2005-2009. It is certified that all corrections/ suggestions indicated for Internal Assessment have been incorporated in the report and deposited in the departmental library. The project report has been approved as it satisfies the academic requirements in respect of the project work prescribed for the said degree. Signature :
Project Guide:
HOD Dept. of AE&I:
Project Incharge:
Name:
Name:
Name:
Date:
Date:
Date:
Internal examiner: examiner: Name:
External Name:
ACKNOWLEDGEMENT
The completion of any project brings with it a sense of satisfaction, but it is never complete without thanking those people who made it possible and whose constant support has crowned our efforts with success. One cannot even imagine the power of the force that guides us all and neither can we succeed without acknowledging it. Our deepest gratitude to Almighty God for holding our hands and guiding us throughout our lives. I would also like to express our gratitude to Prof. Subhendu Behera Head of the Department, Applied Electronics and Instrumentation DRIEMS, Cuttack for encouraging and inspiring us to carry out the project in the department lab. I would also like to thank our guide, Er. J. N Mishra Dept. of A p p l i e d Electronics and Communication for his expert guidance, encouragement and valuable suggestions at every step. We also would like to thank all the staff members of AE&I dept. for providing us with the required facilities and support towards the completion of the project. We are extremely happy to acknowledge and express our sincere gratitude to our parents for their constant support and encouragement and last but not the least, friends and well wishers for their help and cooperation and solutions to problems during the course of the project. Also our friends at 8051projects.net who provided solutions at times when we were against the wall in need of help.
iii
EMBEDDED ACCESS CONTROL AND SECURITY SYSTEM USING RFID
SYNOPSIS The ongoing growth of technology has necessitated the use of more simpler and effective systems as a replacement to the existing ones. Our project is based on automating the access control and security operations involved in an organization. Earlier, there was the conventional swiping system using bar code readers. Now, it can be carried using non-contact devices, with the help of Radio Frequency Identification (RFID). RFID cards are provided to employees, these cards carry their own identification number in a coded format, which can be retrieved by the reader only. By means of this the authentication of the employees can be verified. Then is the access control at various points inside the organization. In order to avoid tress passing and in cases of theft of cards, we have added a keypad for entering a password. Thereby it achieves a two level security. Acting as a substitute for security personnel, this gives a better reliability and ease of use, both for the employees and the operator. It finds quite an important application in Pay roll calculation, libraries; defense weapons storage places (where only certain persons are authorized to enter), industrial monitoring and so on. Our primary application that we have focused on is access control of employees of different grades inside the same building.
CONTENTS
NAME OF THE CHAPTER
1.
ABSTRACT
2.
LIST OF TABLES
PAGE NO.
2.2 Features of the 125 kHz RFID reader 3.
LIST OF FIGURES
3.1 Typical RFID System
-
3.2 Basic Tag assembly
-
3.3 Basic Tag IC architecture
-
3.4 How Tags communicate
-
3.5 Creation of tow higher frequency side bands
-
3. 6 Typical pin details of the Chip inside the RFID card 3.7 Block diagram of the Chip
-
3.8 Modulation Signal and modulated signal
-
3.9 Block diagram of 125kHz RFID reader
-
3.10Output signal from reader
-
3.11 Typical application
-
3.12Block diagram of Access control 3.13Block diagram of the system 3.14 Circuit Diagram of the system 4.
LIST OF SYMBOLS AND ABSRIVIATION
-
5.
INTRODUCTION 1.1 EXISITING TECHNOLOGIES & NEED FOR RFID
6.
-
1.2 RFID TECHNOLOGY
-
1.3 WORKING OF RFID TAGS 1.4 WORKING OF THE RFID READER
-
RF BASED ACCESS CONTROL 2.1 BLOCK DIAGRAM
-
2.2 WORKING 2.3 CIRCUIT DIAGRAM 2.4 DESCRIPTION 7.
MICROCONTROLLER-AT89S52 3.1 DISCRIPTION
8.
APPLICATION & CONCLUSION
APPENDICES REHERENCES
-
-
CHAPTER 1 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
EXISTING TECHNOLOGIES & NEED FOR RFID We have seen the security personnel checking the employees’ identification cards at the
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 employee’s 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
WORKING OF THE RFID TAGS
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:
BASIC TAG ASSEMBLY
TAG IC’S
Figure 1.3:
BASIC TAG IC ARCHITECTURE
RFID tag IC’s 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.
* See Appendix 1 for picture of the card employed in the project
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
CLASS 0 – READ ONLY. – Factory programmed These are the simplest type of tags, where the data, which is usually a simple ID number, (EPC) is written only once into the tag during manufacture. The memory is then disabled from any further updates. Class 0 is also used to define a category of tags called EAS (electronic article surveillance) or anti-theft devices, which have no ID, and only announce their presence when passing through an antenna field.
CLASS 1 – WRITE ONCE READ ONLY (WORM) – Factory or User programmed In this case the tag is manufactured with no data written into the memory. Data can then either be written by the tag manufacturer or by the user – one time. Following this no
further writes are allowed and the tag can only be read. Tags of this type usually act as simple Identifiers
CLASS 2 – READ WRITE This is the most flexible type of tag, where users have access to read and write data into the tags memory. They are typically used as data loggers, and therefore contain more memory space than what is needed for just a simple ID number.
CLASS 3 – READ WRITE – with on board sensors These tags contain on-board sensors for recording parameters like temperature, pressure, and motion, which can be recorded by writing into the tags memory. As sensor readings must be taken in the absence of a reader, the tags are either semi-passive or active.
CLASS 4 – READ WRITE – with integrated transmitters. These are like miniature radio devices that can communicate with other tags and devices without the presence of a reader. This means that they are completely active with their own battery power source.
ACTIVE AND PASSIVE TAGS
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.
HOW TAGS COMMUNICATE Near and Far fields
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 it’s 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
EMBEDDED ACCESS CONTROL AND SECURITY SYSTEM USING RFID
1.4 WORKING OF THE RFID READER The reader is the one of the key element in the system it is responsible for initiating the operation of the system. The reader is a complete transponder, which implements all the important functions for the system. It consists of a plastic tube that accommodates the read only integral circuit (IC) and the antenna realized by the LC circuit. The identifying data are stored in the 128-bit PROM realized as an array of laser programmable fuses. The data are sent bit serially as a code. Figure 1.9: BLOCK DIAGRAM OF THE 125 KHZ RFID READER
Figure 1.10: OUTPUT SIGNAL FROM READER
Table 1:
FEATURES
TYPICAL APPLICATION CIRCUIT The block diagram shown below describes a typical application circuit. The circuit is similar to circuits employed it RFID systems, the card and the reader interaction shown. The frequency of operation is selected by tuning the reader by means of the LC circuit. Figure 1.11:
Typical Application
* See Appendix 2 for picture of the Reader employed in your project CHAPTER 2 RFID BASED ACCESS CONTROL Managing access to resources is assuming increasing importance for organizations everywhere, from small entrepreneurial companies to large corporate enterprises and government bodies of all sizes. Administering access to resources means controlling both physical access and logical access, either as independent efforts or through an integrated approach. The Physical access control protects both tangible and intellectual assets from theft or compromise. Logical access control enables enterprises and organizations to limit access to data, networks and workstations to those authorized to have such access.
2.1
OVERVIEW OF THE RFID BASED ACCESS CONTROL SYSTEM
The access control system is composed of three elements: •
A card (an identity credential) that is presented to a door reader.
•
A door reader, which indicates whether the card is valid and entry, is authorized.
•
A door or gate, which is unlocked when entry is authorized.
Behind the scenes is a complex network of computers and software that incorporates robust security functionality.
ACCESS CONTROL SYSTEM COMPONENTS The system is made up of the following components •
ID credential
•
Door reader
•
Door lock
•
Control panel
•
Access control server
•
Software
•
Database
Figure 2.1:
Block Diagram of Access control
ACCESS CONTROL PROCESS The access control process begins when the user presents the card to the reader, which is usually mounted next to a door or entrance portal. The reader extracts data from the card, processes it and sends it to the control panel.
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 user’s 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.
The access control system components are described in detail ID credential A number of different id technologies are currently in use for access control: magnetic stripe, wiegand strips, barium ferrite, 125 kHz proximity card technology, contact smart cards and contact less smart cards.
Some credential technologies are read only. Information is permanently recorded on the credential and when the credential is presented to a reader the information is send to the system. This type of credential only validates that the information is authentic. It does not confirm that the person presenting the credential is the person authorized to possess it.
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 person’s 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 operational characteristics for centralized or decentralized systems are determined from the specific implementing organization’s access control requirements.
ACCESS CONTROL SYSTEM DATA FORMATS
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 vendor’s 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 system’s design specifications and the environment in which the reader is placed. Factors that affect the operational range are:
•
Antenna shape
•
Number of antenna turns
•
Antenna material
•
Surrounding materials
•
Credential orientation to the reader
•
Electrical parameters of the chip
•
Anti-collision features
•
Field strength of the reader BLOCK DIAGRAM
Figure 2.2: Block Diagram of System
WORKING
COMPONENTS SETUP The system is constructed by means of the following major components. •
125 KHZ RFID card
•
125 kHz Proximity card reader
•
At89S52 Micro controller
•
3 X l matrix keypad
•
16 X 2 LCD module
•
Relay control
•
RS 232 interface cable
•
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.
CONTROL PANEL (OR) CONTROLLER SECTION
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.
PC SECTION (OR) SERVER
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
Figure 2.3: Circuit Diagram of the System CIRCUIT DIAGRAM DESCRIPTION The circuit diagram consists of the following parts:
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.
Interfacing with the server: The server, generally a computer, usually communicates with
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 Atmel’s 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
• Three 16-bit Timer/Counters • Eight Interrupt Sources • Full Duplex UART Serial Channel • Low-power Idle and Power-down Modes • Interrupt Recovery from Power-down Mode • Watchdog Timer • Fast Programming Time •
Flexible ISP Programming (Byte and Page Mode)
4.4.4 PIN CONFIGURATION
Fig. 4.16 Pin diagram of AT89S52
4.4.5 BLOCK DIAGRAM
Fig. 4.17 Block diagram of the microcontroller
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:
Table 4.2 Alternate functions of Port 3 • RST: Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. This pin drives high for 98 oscillator periods after the watchdog times out. 4.4.6.1 Power-On Reset circuit
Fig. 4.18 Power-on reset circuit M In order for the RESET input to be effective, it must have a minimum duration of two machine cycles.
•
ALE/PROG: Address Latch Enable (ALE) is an output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external data memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.
• PSEN: Program Store Enable (PSEN) is the read strobe to external program memory. When the AT89S52 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. •
EA: External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming.
• XTAL1: Input to the inverting oscillator amplifier and input to the internal clock operating circuit. •
XTAL2: Output from the inverting oscillator amplifier.
4.4.6.2 The AT89S52 oscillator clock circuit •
It uses a quartz crystal oscillator.
•
We can observe the frequency on the XTAL2 pin.
MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT
C2 XTAL2 30pF C1 XTAL1 30pF GN D
Fig 4.19 The AT89S52 oscillator clock circuit •
The crystal frequency is the basic internal frequency of the microcontroller.
•
The
internal
counters
must
divide
the
basic
clock
rate
to
yield
standard communication bit per second (baud) rates. •
An 11.0592 megahertz crystal, although seemingly an odd value, yields a crystal frequency of 921.6 kilohertz, which can be divided evenly by the standard communication baud rates of 19200, 9600, 4800, 2400, 1200, and 300 hertz.
4.4.7 SPECIAL FUNCTION REGISTERS The Special Function Registers (SFRs) contain memory locations that are used for special tasks. Each SFR occupies internal RAM from 0x80 to 0xFF.They are 8-bits wide. • The A (accumulator) register or accumulator is used for most ALU operations and Boolean Bit manipulations. • Register B is used for multiplication & division and can also be used for general purpose storage. • PSW (Program Status Word) is a bit addressable register • PC or program counter is a special 16-bit register. It is not part of SFR. Program instruction bytes are fetched from locations in memory that are addressed by the PC.
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
used to furnish memory
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
interrupt system, the Timer/Counters, and the serial port. • Timer Registers: Register pairs (TH0, TL0) and (TH1, TL1) are the 16bit Counter registers for Timer/Counters 0 and 1, respectively. 4.4.8 MEMORY ORGANIZATION MCS-51 devices have a separate address space for Program and Data Memory. Up to 64K bytes each of external Program and Data Memory can be addressed. • Program Memory: If the EA pin is connected to GND, all program fetches are directed to external memory. On the AT89S52, if EA is connected to VCC, program fetches to addresses 0000H through 1FFFH are directed to internal memory and fetches to addresses 2000H through FFFFH are to external memory. • Data Memory: The AT89S52 implements 256 bytes of on-chip RAM. The upper 128 bytes occupy a parallel address space to the Special Function Registers. This means that the upper 128 bytes have the same addresses as the SFR space but are physically separate from SFR space. When an instruction accesses an internal location above address 7FH, the address mode used in the instruction specifies whether the CPU accesses the upper 128 bytes of RAM or the SFR space. Instructions which use direct addressing access the SFR space. The lower 128
bytes of RAM can be divided into three egments:
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.
Fig. 4.20 Internal memory block
4.4.9 WATCHDOG TIMER (One-time Enabled with Reset-out)
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
Many microcontroller applications require the counting of external events such as the frequency of a pulse train, or the generation of precise internal time delays between computer actions. Both of these tasks can be accomplished using software techniques, but software loops for counting or timing keep the processor occupied so that, other perhaps more important, functions are not done. Hence the better option is to use interrupts & the two 16- bit count- up timers. The microcontroller can programmed for either of the following: 1. Count internal - acting as timer 2. Count external - acting as counter All counter action is controlled by the TMOD (Timer Mode) and the TCON (Timer/Counter Control) registers. TCON Timer control SFR contains timer 1& 2 overflow flags, external interrupt flags, timer control bits, falling edge/low level selector bit etc. TMOD timer mode SFR comprises two four-bit registers (timer #1, timer #0) used to specify the timer/counter mode and operation. The timer may operate in any one of four modes that are determined by modes bits M1 and M0 in the TMOD register: TIMER MODE-0: Setting timer mode bits to 00b in the TMOD register results in using the TH register as an 8-bit counter and TL as a 5-bit counter. Therefore mode0 is a
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.
4.4.12 MICROCONTROLLER CONFIGURATION USED IN THE SETUP The microcontroller is interfaced with the ADC in polling mode. INT0 is used for the
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
LIQUID CRYSTAL DISPLAY A liquid crystal display (LCD) is a thin, flat display device made up of any number of color or monochrome pixels arrayed in front of a light source or reflector. Each pixel consists of a column of liquid crystal molecules suspended between two transparent electrodes, and two polarizing filters, the axes of polarity of which are perpendicular to each other. Without the liquid crystals between them, light passing through one would be blocked by the other. The liquid crystal twists the polarization of light entering one filter to allow it to pass through the other. Many microcontroller devices use 'smart LCD' displays to output visual information. LCD displays designed around Hitachi's LCD HD44780 module, are inexpensive, easy to use, and it is even possible to produce a readout using the 8x80 pixels of the display. They have a standard ASCII set of characters and mathematical symbols. For an 8-bit data bus, the display requires a +5V supply plus 11 I/O lines. For a 4bit data bus it only requires the supply lines plus seven extra lines. When the LCD display is not enabled, data lines are tri-state and they do not interfere with the operation of the microcontroller. Data can be placed at any location on the LCD. For 16×2 LCD, the address locations are: First line
80
81
Second line C0 C1
82
83
84
85
C2 C3
C4
C5
86
through
8F
C6 through CF
Fig 4.22 Address locations for a 2x16 line LCD 4.5.1 SIGNALS TO THE LCD The LCD also requires 3 control lines from the microcontroller: 1) Enable (E) This line allows access to the display through R/W and RS lines. When this line is low, the LCD is disabled and ignores signals from R/W and RS. When (E) line is high, the LCD checks the state of the two control lines and responds accordingly. 2) Read/Write (R/W) This line determines the direction of data between the LCD and microcontroller.
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.
Fig. 4.26 Sugar cube relay Despite the speed of technological developments, some products prove so popular that their key parameters and design features remain virtually unchanged for years. One such product is the ‘sugar cube’ relay, shown in the figure above, which has proved useful to many designers who needed to switch up to 10A, whilst using relatively little PCB area Since relays are switches, the terminology applied to switches is also applied to relays. A relay will switch one or more poles, each of whose contacts can be thrown by energizing the coil in one of three ways: 1.Normally - open (NO) contacts connect the circuit when the relay is activate d; the circuit is disconnected when the relay is inactive. It is also called a FORM A contact or “make” contact. 2.Normally - closed (NC) contacts disconnect the circuit when the relay is activated ; the circuit is connected when relay is inactive. It is also called FORM B contact or” break” contact 3.Change-over or double-throw contacts control two circuits ; one
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:
"C" denotes the common terminal in SPDT and DPDT types Fig. 4.27 Different types of Relays • SPST - Single Pole Single Throw: These have two terminals which can be connected or disconnected. Including two for the coil, such a relay has four terminals in total. It is ambiguous whether the pole is normally open or normally closed. The terminology "SPNO" and "SPNC" is sometimes used to resolve the ambiguity. • SPDT - Single Pole Double Throw: A common terminal connects to either of two others. Including two for the coil, such a relay has five terminals in total. • DPST - Double Pole Single Throw: These have two pairs of terminals. Equivalent to two SPST switches or relays actuated by a single coil. Including two for the coil, such a relay has six terminals in total. It is ambiguous whether the poles are normally open, normally closed, or one of each. • DPDT - Double Pole Double Throw: These have two rows of change-over terminals. Equivalent to two SPDT switches or relays actuated by a single coil. Such a relay has eight terminals, including the coil. • QPDT - Quadruple Pole Double Throw: Often referred to as Quad Pole Double Throw, or 4PDT. These have four rows of change-over terminals. Equivalent to four SPDT switches or relays actuated by a single coil, or two DPDT relays. In total, fourteen terminals including the coil.
MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT When it is low, data is written to the LCD. When it is high, data is read from the LCD. 3) Register select (RS) With the help of this line, the LCD interprets the type of data on data lines. When it is low, an instruction is being written to the LCD. When it is high, a character is being written to the LCD. 4.5.1.1 Logic status on control lines: •
E - 0 Access to LCD disabled - 1 Access to LCD enabled
•
R/W - 0 Writing data to LCD - 1 Reading data from LCD
•
RS - 0 Instruction - 1 Character
4.5.1.2 Writing and reading the data from the LCD: Writing data to the LCD is done in several steps: 1) Set R/W bit to low 2) Set RS bit to logic 0 or 1 (instruction or character) 3) Set data to data lines (if it is writing) 4) Set E line to high 5) Set E line to low Read data from data lines (if it is reading): 1) Set R/W bit to high 2) Set RS bit to logic 0 or 1 (instruction or character) 3) Set data to data lines (if it is writing) 4) Set E line to high 5) Set E line to low 4.5.2 PIN DESCRIPTION Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins (two pins are extra in both for back-light LED connections).
Fig 4.23 Pin diagram of 2x16 line LCD
Table 4.23 Pin description of the LCD 4.6 ALARM CIRCUITRY BUZZER: A buzzer or beeper is a signaling device, usually electronic, typically used in automobiles, household appliances such as a microwave oven.
Fig. 4.24 Electrical symbol of a buzzer
It is connected to the control unit through the transistor that acts as an electronic switch for it. When the switch forms a closed path to the buzzer, it sounds a warning in the form of a continuous or intermittent buzzing or beeping sound. The transistor acts as a normal controlled by the base connection. It switches ON when a positive voltage from the control unit is applied to the base. If the positive voltage is less than 0.6V, the transistor switches OFF. No current flows through the buzzer in this case and it will not buzz. As can be seen in the buzzer circuitry given below, a protection resistor of 10k ohm is used in order to protect the transistor from being damaged in case of excessive current flow. In our system, the buzzer is designed to give a small beep whenever one of the devices such as a cooler or a bulb turns on in order to alert the user.
Fig. 4.25 Buzzer circuitry 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.
Department of AE & I
Page 47
2009-2010
Fig. 4.26 Sugar cube relay Despite the speed of technological developments, some products prove so popular that their key parameters and design features remain virtually unchanged for years. One such product is the ‘sugar cube’ relay, shown in the figure above, which has proved useful to many designers who needed to switch up to 10A, whilst using relatively little PCB area Since relays are switches, the terminology applied to switches is also applied to relays. A relay will switch one or more poles, each of whose contacts can be thrown by energizing the coil in one of three ways: 1.Normally - open (NO) contacts connect the circuit when the relay is activate d; the circuit is disconnected when the relay is inactive. It is also called a FORM A contact or “make” contact. 2.Normally - closed (NC) contacts disconnect the circuit when the relay is activated ; the circuit is connected when relay is inactive. It is also called FORM B contact or” break” contact 3.Change-over or double-throw contacts control two circuits ; one
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:
"C" denotes the common terminal in SPDT and DPDT types Fig. 4.27 Different types of Relays • SPST - Single Pole Single Throw: These have two terminals which can be connected or disconnected. Including two for the coil, such a relay has four terminals in total. It is ambiguous whether the pole is normally open or normally closed. The terminology "SPNO" and "SPNC" is sometimes used to resolve the ambiguity. • SPDT - Single Pole Double Throw: A common terminal connects to either of two others. Including two for the coil, such a relay has five terminals in total. • DPST - Double Pole Single Throw: These have two pairs of terminals. Equivalent to two SPST switches or relays actuated by a single coil. Including two for the coil, such a relay has six terminals in total. It is ambiguous whether the poles are normally open, normally closed, or one of each. • DPDT - Double Pole Double Throw: These have two rows of change-over terminals. Equivalent to two SPDT switches or relays actuated by a single coil. Such a relay has eight terminals, including the coil. • QPDT - Quadruple Pole Double Throw: Often referred to as Quad Pole Double Throw, or 4PDT. These have four rows of change-over terminals. Equivalent to four SPDT switches or relays actuated by a single coil, or two DPDT relays. In total, fourteen terminals including the coil. The Relay interfacing circuitry used in the application is:
1N4148
Fig. 4.28 Relay circuitry
4.8 POWER SUPPLY CONNECTION The power supply section consists of step down transformers of 230V primary to 9V and 12V secondary voltages for the +5V and +12V power supplies respectively. The stepped down voltage is then rectified by 4 1N4007 diodes. The high value of capacitor 1000 µF charges at a slow rate as the time constant is low, and once the capacitor charges there is no resistor for capacitor to discharge. This gives a constant value of DC. IC 7805 is used for regulated supply of +5 volts and IC 7812 is used to provide a regulated supply of +12 volts in order to prevent the circuit ahead from any fluctuations. The filter capacitors connected after this IC filters the high frequency spikes. These capacitors are connected in parallel with supply and common so that spikes filter to the common. These give stability to the power supply circuit. As can be seen from the above circuit diagrams, the rectified voltage from the 4 diodes is given to pin 1 of the respective regulators. Pin 2 of the regulators is connected to ground and pin 3 to Vcc. With adequate heat sinking the regulator can deliver 1A output current. If internal power dissipation becomes too high for the heat sinking provided, the thermal shutdown circuit takes over preventing the IC from overheating.
1 Vin 7805 Vout GND 2
230V, 50Hz
1000 uf
10 uf
1uf
Fig. 4.29 +5V Power supply circuit
Fig. 4.30 +12V Power supply Circuit
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.
IMPLEMENTED APPLICATION OF THE PROJECT
Selective Access control
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
•
Credit card size flexible labels with adhesive backs
•
Tokens and coins
•
Embedded tags – injection molded into plastic products such as cases
•
Wrist band tags
•
Hard tags with epoxy case
•
Key fobs
•
Tags designed specially for Palettes and cases
•
Paper tags
VIEW OF THE 125 kHz CARD EMPLOYED IN OUR PROJECT
MTP-125K4 Series Low Cost Proximity Reader 技术性能参数: Size:26.5 x 16.5 x 6.9 mm Power:5V@44mA nominal Frequence:125KHz Read Card:EM4001/4102 或兼容卡 Coding:Manchester 64bit,modulus 64 I/O output : 25mA sink/source Annte: 150Volt PKPK Read Range:max. 25cm Read time:100ms 工作温度:-15℃~75℃ 储存温度:-25℃~85℃ 储存湿度:5-95﹪RH Output Format:Weigen26/RS232 TTL (ASCII) ※Pin Def.
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
To External Antenna (L:680uH)
Pin3 Strap to +5V Pin4 BEEP/LED
2.7KHz Logic
Pin5 DATA1(TTL)
Serial Output (ASCII)
Pin6 DATAO(TTL) Serial Output inverted (ASCII inverted) Pin7 /Reset
Low Active
Pin8 Ground
0V
Pin9
+4.6 through +5.5V
VCC
Output Format-Serial Output
02
10ASCII Data Characters
Checksum
03
The checksum is the result of the ‘exclusive or’ of the 5 Binary Data bytes(the 10 ASCII data characters)
※RS232 Output(Pin3 to High) (a) 9600 bps,N,8,1 (b) PIN5:TX Output (c) PIN6:TX 反相输出。 (d) For example:Card ID Number 62E3086CED,Send HEX as: 10ASCII DATA:36H,32H 45H,33H 30H,38H 36H,43H 45H,44H (6 2 H
E3H
08H
6CH
E D H)
CHECKSUM:(62H) XOR (E3H) XOR (08H) XOR (6CH) XOR (EDH)=08H Checksum 为二进制格式数据 So MTP-K4 Output AS:02 36 32 45 33 30 38 36 43 45 44 08 03 (e) Every Byte output as: PIN5 Start Bit
104us
PIN6
Bit0
Bit1
104us
Bit7
StopBit
208us
Start Bit
104us
Bit0
Bit1
104us
Bit7
StopBit
208us
Wiegand 26: Weigen26 Output AS:
※ Wiegand Output
(Pin3 To Low)
Pin1 Antenna 1
To External Antenna
Pin2 Antenna 2
To External Antenna (L:680uH)
Pin3 Strap to +0V Pin4 BEEP/LED
2.7KHz Logic
Pin5 One Output Pin6 Zero Output Pin7 /Reset
Low Active
Pin8 Ground Pin9 VCC
0V +4.6 through +5.5V
※Pin3 Strap to +0V Data Structure Wiegand 26 Bit 1 2 P(1) E
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)
P(1)=Parity Start Bit,第 1 位为 2—13 位的偶校验位。 P(2)=Parity Stop Bit,第 26 位为 14-25 位的奇校验位。
※ Wiegand 输出(Pin3 接 Low) (a) Output Result is the last 3 bytes of the ID Number(62E3086CED):08H,6CH,EDH。 注:Wiegand26 输出时,将去除原卡片号码的高 16Bit 的数据, Bit0 =1: D0=1,D1=0 Bit23=0: D0=0,D1=1 (c) 输出波形 50us 1ms
DATA1
DATA0
P(1)
Bit23
Bit22 1
1
Bit1……Bit0
P(2)
0
1 MSB
LSB
註:Motorola 26 bit wiegand format (50us/1ms)
K4 Annte: 680uH Size:65mm×55mm×3mm,φ0.20mm, for 67rings
0
View more...
Comments