exam hall automation

Upload: anil-maddu

Post on 04-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 Exam Hall Automation

    1/63

    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 exam hall. Earlier, there was the conventional system using board and chart. Now, it can be

    carried using non-contact devices, with the help of Radio Frequency Identification (RFID).

    RFID cards are provided to students, 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 student 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 can add a keypad for entering a

    password in the next level of project. 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 students and colleges.

    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 students of different

    exam halls inside the same building.

  • 7/29/2019 Exam Hall Automation

    2/63

    CONTENTS

    NAME OF THE C H APTER PAGE NO.

    1. ABSTRACT

    2. LIST OF TABLES

    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

  • 7/29/2019 Exam Hall Automation

    3/63

    5. INTRODUCTION

    1.1 EXISITING TECHNOLOGIES & NEED FOR RFID -

    1.2 RFID TECHNOLOGY -

    1.3 WORKING OF RFID TAGS -1.4 WORKING OF THE RFID READER

    6. 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 -

  • 7/29/2019 Exam Hall Automation

    4/63

    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.

  • 7/29/2019 Exam Hall Automation

    5/63

    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 ContinentalAirlines 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.

  • 7/29/2019 Exam Hall Automation

    6/63

    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

  • 7/29/2019 Exam Hall Automation

    7/63

    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 application-

    specific 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

    j t

  • 7/29/2019 Exam Hall Automation

    8/63

    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

  • 7/29/2019 Exam Hall Automation

    9/63

    TAG ICS

    Figure 1.3: BASIC TAG IC ARCHITECTURE

    RFID tag ICs are designed and manufactured using some of the most advanced andsmallest 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

  • 7/29/2019 Exam Hall Automation

    10/63

    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 chipsizes, 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

  • 7/29/2019 Exam Hall Automation

    11/63

    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.

  • 7/29/2019 Exam Hall Automation

    12/63

    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 severalkilometers.

    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

  • 7/29/2019 Exam Hall Automation

    13/63

    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

  • 7/29/2019 Exam Hall Automation

    14/63

    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.

  • 7/29/2019 Exam Hall Automation

    15/63

    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.

  • 7/29/2019 Exam Hall Automation

    16/63

    igure

    EMBEDDED ACCESS CONTROL AND SECURITY SYSTEM USING RFID

    1.4WORKING OF THE RFID READERThe 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

  • 7/29/2019 Exam Hall Automation

    17/63

    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

  • 7/29/2019 Exam Hall Automation

    18/63

    * 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.

  • 7/29/2019 Exam Hall Automation

    19/63

    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 d hi h i l k d h i h i d

  • 7/29/2019 Exam Hall Automation

    20/63

    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

  • 7/29/2019 Exam Hall Automation

    21/63

    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 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 denyentry. 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

  • 7/29/2019 Exam Hall Automation

    22/63

    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 radiotransmitter 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

  • 7/29/2019 Exam Hall Automation

    23/63

    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.

  • 7/29/2019 Exam Hall Automation

    24/63

    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 operational characteristics for centralized or decentralized systems are

    determined from the specific implementing organizations 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 fewbits 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

  • 7/29/2019 Exam Hall Automation

    25/63

    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

  • 7/29/2019 Exam Hall Automation

    26/63

    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

    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.

  • 7/29/2019 Exam Hall Automation

    27/63

    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 processingoperations Visual basic 6 is used in our Project.

    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.

  • 7/29/2019 Exam Hall Automation

    28/63

    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

  • 7/29/2019 Exam Hall Automation

    29/63

    MICROCO NTROLLER (AT89S52)

    4.4.1 CR I TER I A F OR CHOOSI N G 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 microcontrollersupports.

    (b) P a c ka g in g : It may be a 40-pin DIP (dual inline package) or a QFP (quad

    flatpackage), or some other packaging format. This is important in terms ofspace,assembling, and prototyping the endproduct.

    (c) Power c o nsumptio n : 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) C o s t per uni t: 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 productsaround it. Key considerations include the availability of an assembler, debugger, compiler,

  • 7/29/2019 Exam Hall Automation

    30/63

    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

    producerbesides the originator of the microcontroller. In the case of the 8051, this has

    originatedby 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

    DE SC RI P T I O N :

    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

  • 7/29/2019 Exam Hall Automation

    31/63

    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 thebase architecture for a company's entire

    line of products since it can perform many functions and developers will only have to

    learn this oneplatform.

    The AT89S52 is a low-power, high-performance CMOS 8-bit microcontrollerwith

    8K bytes of in-system programmable Flash memory. The device is manufactured using

    Atmels high-density nonvolatile memory technology and is compatible with the industry-

    standard 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 ahighly-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

    F EA T U R ES:

    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

  • 7/29/2019 Exam Hall Automation

    32/63

    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 P IN CONFIGURAT ION

    Fig. 4.16 Pin di ag ram ofAT89S52

  • 7/29/2019 Exam Hall Automation

    33/63

    Fig. 4 .17 B lo ck diag ram of the mic ro co ntro ller

  • 7/29/2019 Exam Hall Automation

    34/63

    4.4.6 P I N 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-orderaddress/data bus during accesses to external program and data memory.

    In this mode, P0 has internalpull-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 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. Asinputs, Port 3 pins that are externally being pulled low will source current (IIL)

  • 7/29/2019 Exam Hall Automation

    35/63

    Alt er nate funct io ns of Port 3:

    T a ble 4 .2 Alt e rn a t e fun c ti o ns 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 afterthe watchdog times out.

    4.4.6.1 Po we r- On R eset ci rcuit

    Fig. 4 .18 Po wer -on re set ci rcu it

    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 latchingthe low byte of the address during accesses to external memory. This pin is also

  • 7/29/2019 Exam Hall Automation

    36/63

    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 Flashprogramming.

    XTAL1: Input to the inverting oscillator amplifier and input to the internalclockoperating circuit.

    XTAL2: Output from the inverting oscillatoramplifier.

    4.4.6.2 The A T89 S52 o sci lla tor clo ckc ir cuit

    It uses a quartz crystal oscillator.

    We can observe the frequency on the XTAL2pin.

  • 7/29/2019 Exam Hall Automation

    37/63

    MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

    C2

    30pF

    C1

    30pF

    XTAL2

    XTAL1

    GN D

    Fig 4 .19 T he AT89 S52 oscillator clockcircuit

    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 SP EC IAL F U NC T I ON REGISTERS

    The Special Function Registers (SFRs) contain memory locations that are used

    forspecial 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 operationsand

    Boolean Bit manipulations.

    Register B is used for multiplication & division and can also be used for

    generalpurpose 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.

  • 7/29/2019 Exam Hall Automation

    38/63

    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 areset. This causes the stack to begin at location 08H.

    DPTR or data pointer is a special 16-bit register that is accessible as two 8-

    bit registers: DPL and DPH, which are used to used to furnish memory

    addresses forinternal 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 serialport.

    Timer Registers: Register pairs (TH0, TL0) and (TH1, TL1) are the 16-bit

    Counter registers for Timer/Counters 0 and 1, respectively.

    4.4.8 ME MO RY OR GANI ZATI ON

    MCS-51 devices have a separate address space for Program and Data Memory. Upto

    64K bytes each of external Program and Data Memory can beaddressed.

    P r og r am M e m o r y : 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.

    D a ta M e mo ry: The AT89S52 implements 256 bytes of on-chip RAM. Theupper

    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 Instr ctions hich se direct addressing access the SFR space The

  • 7/29/2019 Exam Hall Automation

    39/63

    bytes of RAM can be divided into threeegments:

    1. R e g i st e r B a n k s 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 registerbank.

    2. B it Address a b l e Ar e a : 16 bytes have been assigned for this segment 20H-

    2FH. Each one of the 128 bits of this segment can be directly addressed (0-7FH).

    Each ofthe 16 bytes in this segment can also be addressed as abyte.

    3. Sc r a tch P a d Area: 30H-7FH are available to the user as data RAM.

    However, ifthe data pointer has been initialized to this area, enough bytes should

    be left aside toprevent SP data destruction.

    Fig. 4 .20 I n ter n a l m e m o ry block

  • 7/29/2019 Exam Hall Automation

    40/63

    4.4.9 WATCHDOG TIMER (One-time Enabled wit h 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

    Reset (WDTRST) SFR. The WDT is defaulted to disable from exiting reset. To enablethe

    WDT, a user must write 01EH and 0E1H in sequence to the WDTRST register (SFRlocation

    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 HIGHpulse at the RSTpin.

    4.4.10 TI M E RS A N D

    COUNTERS

    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

    computeractions. Both of these tasks can be accomplished using software techniques,

    but software loops for counting or timing keep the processor occupied so that, otherperhaps 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 astimer

    2. Count external - acting ascounter

    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 modesbits

    M1 and M0 in the TMODregister:

    TIMER MODE 0: Setting timer mode bits to 00b in the TMOD register results in using

  • 7/29/2019 Exam Hall Automation

    41/63

    TIMER MOD E - 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 M O DE- 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 TLoverflows.

    TIMER MOD E - 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

    I N T E R RU P TS

    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 hardwaresignals, 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 tookplace. Program resumption is done by storing the interrupted PC address on

    to stack.

    RETI instruction at the end of ISR will restore the PCaddress.

    4.4.12 MICROCON TRO LL ER CONFIGURAT ION U SED IN THE SET-UP

  • 7/29/2019 Exam Hall Automation

    42/63

    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

    LIQU I D CRY S TAL DISPLAY

    A liquid crystal display (LCD) is a thin, flat display device made up of any number

    ofcolor 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 4-

    bit 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 162 LCD, the addresslocations

    are:

    First line 80 81 82 83 84 85 86 through 8F

    Second line C0 C1 C2 C3 C4 C5 C6 through CF

    Fig 4 .22 A ddr ess lo cations for a 2 x16 li ne LCD

    4.5.1 SIGNALS TO THE LCD

    The LCD also requires 3 control lines from the microcontroller:

  • 7/29/2019 Exam Hall Automation

    43/63

    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 andmicrocontroller.

    4.7 R E L A YS

    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

    orclose 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.

  • 7/29/2019 Exam Hall Automation

    44/63

    Fig . 4.26 Suga r 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 suchproduct 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.N o rmally - open (N O) 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.N o rmally - c lo s ed (N C) 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.Cha n g e - o ver or dou b l e -th r ow contacts control two circuits ; one normally open

    contact and one normally closed contact with a common terminal. It is also called a

    Form C transfercontact.

    The following types of relays are commonly encountered:

  • 7/29/2019 Exam Hall Automation

    45/63

    "C" denotes the common terminal in SPDT and DPDT

    types

    Fi g . 4 .27 Di f ferent ty p e s of

    R e la y s

    SPST - Sin g le Pole Sin g le Thr o w : 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 - Sin g le Pole Dou b le Thr o w : A common terminal connects to either of

    two others. Including two for the coil, such a relay has five terminals in total.

    DPST - Dou b le Pole Sin g le Thr o w : 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 ofeach.

    DPDT - Dou b le Pole Dou b le Throw: These have two rows of change-overterminals.

    Equivalent to two SPDT switches or relays actuated by a single coil. Such a relay

    has eight terminals, including the coil.

    QPDT - Quadr up le Po l e Do uble Th r ow : Often referred to as Quad Pole Double

    Throw, or 4PDT. These have four rows of change-over terminals. Equivalent to

    fourSPDT switches or relays actuated by a single coil, or two DPDT relays. In

    total, fourteen terminals including the coil.

  • 7/29/2019 Exam Hall Automation

    46/63

    When it is low, data is written to the LCD. When it is high, data is read fromthe

    LCD.

    3) R e gi ster s e le ct (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 s t atus on c o n t r o l lines:

    E - 0 Access to LCD disabled

    - 1 Access to LCD enabled

    R/W - 0 Writing data to LCD

    - 1 Reading data fromLCD

    RS - 0 Instruction

    - 1 Character

    4.5.1.2 W r i t i n g a n d r e ad ing the d a t a f r om 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 orcharacter)

    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 orcharacter)

    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 P I N 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).

  • 7/29/2019 Exam Hall Automation

    47/63

    Fig 4 .23 Pin d i a g ram o f 2 x 16 li ne LCD

    Table 4 .23 P in descrip tion o f t he LCD

    4.6 A LARM C IR CUITRY

    BUZ Z ER:

    A buzzer or beeper is a signaling device, usually electronic, typically used

    in automobiles, household appliances such as a microwave oven.

    Fig . 4.24 Elec trical symbol of a bu zzer

  • 7/29/2019 Exam Hall Automation

    48/63

    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 ofexcessive 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.

    Fi g. 4 .25 Buzzer circuitry

    4.7 R E L A YS

    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

    orclose 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.

  • 7/29/2019 Exam Hall Automation

    49/63

    Fig . 4.26 Suga r 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 suchproduct 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.N o rmally - open (N O) 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.N o rmally - c lo s ed (N C) 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.Cha n g e - o ver or dou b l e -th r ow contacts control two circuits ; one normally open

    contact and one normally closed contact with a common terminal. It is also called a

    Form C transfercontact.

    The following types of relays are commonly encountered:

  • 7/29/2019 Exam Hall Automation

    50/63

    "C" denotes the common terminal in SPDT and DPDTtypes

    Fi g . 4 .27 Di f ferent typ e s of

    R e la y s

    SPST - Sin g le Pole Sin g le Thr o w : 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 - Sin g le Pole Dou b le Thr o w : A common terminal connects to either of

    two others. Including two for the coil, such a relay has five terminals in total.

    DPST - Dou b le Pole Sin g le Thr o w : 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 ofeach.

    DPDT - Dou b le Pole Dou b le Throw: These have two rows of change-overterminals.

    Equivalent to two SPDT switches or relays actuated by a single coil. Such a relay

    has eight terminals, including the coil.

    QPDT - Quadr up le Po l e Do uble Th r ow : Often referred to as Quad Pole Double

    Throw, or 4PDT. These have four rows of change-over terminals. Equivalent to

    fourSPDT 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:

  • 7/29/2019 Exam Hall Automation

    51/63

    1N4148

    Fig. 4 .28 R el ay ci rcuitry

    4.8 PO W ER S UP P LY 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 forregulated 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 thepowersupply 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.

  • 7/29/2019 Exam Hall Automation

    52/63

    1Vin 7805 Vout

    GND2

    230V,50Hz

    1000

    uf 10

    uf1uf

  • 7/29/2019 Exam Hall Automation

    53/63

    Fi g . 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 thegate for the day, accidental or deliberate presence of a person can be found by noting the

  • 7/29/2019 Exam Hall Automation

    54/63

    IMPLEMENTED APPLICATION OF THE PROJECT

    Selective Access control

    This is the application that our project is mainly focused on. In this, the students are

    given access only into certain places inside the building and are restricted from entering into

    certain other places demanding security. In any examhall, 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 thisapplication.

    "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

  • 7/29/2019 Exam Hall Automation

    55/63

    Industrial Monitoring

    In the plant environment, RF systems are ideally suited for the identification of high-

    unit-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.

  • 7/29/2019 Exam Hall Automation

    56/63

    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

  • 7/29/2019 Exam Hall Automation

    57/63

    MTP-125K4 Series Low Cost Proximity ReaderSize26.5 x 16.5 x 6.9 mm

    Power5V@44mA nominal

    Frequence125KHz

    Read CardEM4001/4102

    CodingManchester 64bitmodulus 64

    I/O output 25mA sink/source

    Annte 150Volt PKPK

    Read Rangemax. 25cm

    Read time100ms

    Output FormatWeigen26/RS232 TTL ASCII

    Pin Def. Photo

    26.5mm

    6.9mm

    2.54 mm Pin 1---9

    ASCIIRS232:

    RS232/TTL (ASCII) Output

    Pin3 Strap to +5

    Pin1 Antenna 1 To External Antenna

    Pin2 Antenna 2 To External Antenna (L:680uH)

    16.5mm

    1 2 3 4 5 6 7 8 9

    K4

  • 7/29/2019 Exam Hall Automation

    58/63

    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 VCC +4.6 through +5.5V

    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 bpsN81(b) PIN5TX Output(c) For exampleCard ID Number 62E3086CEDSend HEX as:

    10ASCII DATA36H,32H 45H,33H 30H,38H 36H,43H 45H,44H

    (6 2 H E 3 H 0 8 H 6 C H E D H)

    CHECKSUM(62H) XOR (E3H) XOR (08H) XOR (6CH) XOR (EDH)=08H

    So MTP-K4 Output AS02 36 32 45 33 30 38 36 43 45 44 08 03

    (d) Every Byte output as:

  • 7/29/2019 Exam Hall Automation

    59/63

    104us 104us 208us

    PIN6

    Start Bit Bit0 Bit1 Bit7 StopBit

    104us 104us 208us

  • 7/29/2019 Exam Hall Automation

    60/63

    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 0V

    Pin9 VCC +4.6 through +5.5V

    Pin3 Strap to +0V

    Data Structure Wiegand 26 Bit

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

    P(1) E E E 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

    P(2)=Parity Stop Bit

    Wiegand(Pin3Low)(a) Output Result is the last 3 bytes of the IDNumber(62E3086CED)08H6CHEDHWiegand26,16Bit, Bit0 =1: D0=1,D1=0

    Bit23=0: D0=0,D1=1

  • 7/29/2019 Exam Hall Automation

    61/63

    b)

    50us 1ms

    DATA1

    DATA0

    P(1) Bit23 Bit22 Bit1Bit0 P(2)

    1 0 0

    1 1

    MSB LSB

    Motorola 26 bit wiegand format (50us/1ms)

    K4 Annte

  • 7/29/2019 Exam Hall Automation

    62/63

  • 7/29/2019 Exam Hall Automation

    63/63