rfid based access control and attendence system

7 downloads 0 Views 2MB Size Report
security at educational institutes of Pakistan but also easier to employ. ... RIFD reader, and it would subsequently save the administration as well as the faculty of .... Bar Code System . ..... Figure 12: Antenna of Passive Tag . .... Figure 28: Classes Data Packer Project . ...... the device, which allow communication via TCP/IP.
RFID BASED ACCESS CONTROL AND ATTENDENCE SYSTEM

Muhammad Junaid

2005-CPE-12

Hafiz AsimSaeed

2005-CPE-24

Adnan Ghaffar

2005-CPE-08

BAHAUDDIN ZAKARIYA UNIVERSITY MULTAN

RFID BASED ACCESS CONTROL AND ATTENDENCE SYSTEM

Muhammad Junaid

2005-CPE-12

Hafiz AsimSaeed

2005-CPE-24

Adnan Ghaffar

2005-CPE-08

Submitted in partial fulfillment of the requirements for the degree of B.Sc. Computer Engineering at the faculty of Engineering & Technology , BahauddinZakariya University, Multan

ABSTRACT The present system emanated from the growing needs of security in the educational institutes threatened off and on by the perpetrators. In the backdrop of terrorist attack on the International Islamic University Islamabad, we sought to evolve such a security system as could ensure not only fool proof security at educational institutes of Pakistan but also easier to employ. Keeping in view the commonly employed tactics of the terrorists, our system uses the radio frequency as a procedure to track the activity of the people entering or leaving such institutions. It ensures maximal check on the movement of the suspected. It is relatively a new technology, which is flawless as no it is not replicable. Each vehicle or person, on entry, would be given a RF tag to record information during the time the vehicles remain in the jurisdiction of the institution. The system, comprising a computer and RFID reader-writer and tags, would maintain all data and detect all unauthorized entries by giving signals through buzzer. The same system could also be used for students and employee attendance on the campus. Instead of the student/employee identity card, each student/employee would be issued a similar RFID tag, which would be automatically detected by the RIFD reader, and it would subsequently save the administration as well as the faculty of maintaining and keeping the attendance record.

i

(Acceptance by the Viva Voce Committee)

The Faculty of Engineering & Technology, Bahauddin Zakariya University, accepts RF Technology in partial fulfillment of the requirements for the Bachelor of Computer Engineering.

Viva Voce committee

___________________________ Chairperson of the Department

________________ External examiner

________________ Internal Examiner

_________________ (Day / Month / Year)

ii

ACKNOWLEDGEMENT Praise and glory be to ALMIGHTY ALLAH, the most Merciful, Compassionate and Gracious who guides us in the oceans of darkness and enables us to overcome the difficulties. In crucial situations, who blesses us with the courage and power to complete this project and all respect and love for our beloved Holy Prophet HAZRAT MUHAMMAD (PBUH), whoenabled us to recognize our creator and to understand the philosophy of life. “He who does not thank to the people is not thankful to Allah” In the light of above saying of Holy Prophet (PBUH), we are highly obliged to our respected teacher Engr. Ahsan Khalil for his keen interest, guidance, untiring help and encouraging attitude. We are proudly grateful to our Parents for showing us the right way.

Authors

iii

FORWARDING SHEET

The Thesis entitled “RFID BASED ACCESS CONTROL AND ATTENDENCE SYSTEM”has been completed under my guidance and I am satisfied with the quality of student‟s research work.

Date:____________

______________________________ (Name and Signatures of the Adviser)

iv

TABLE OF CONTENT 1.INTRODUCTION ....................................................................................................................................1 1.1

Back Ground Of Project ................................................................................................................1

1.2

Objectives ......................................................................................................................................2

1.3

Problem Statement.........................................................................................................................2

1.4

Scope Of Project ............................................................................................................................3

1.4.1

Electronic Hardware ..............................................................................................................3

1.4.2

Software Development ..........................................................................................................4

1.5

Work Contribution.....................................................................................................................4

2LITERATURE REVIEW .........................................................................................................................5 2.1

Identification System .....................................................................................................................5

2.1.1

Automated Finger Print Identification ...................................................................................5

2.1.2

Bar Code System ...................................................................................................................6

2.1.3

Radio Frequency Based Identification System (RFID) .........................................................7

2.1.4

RFID Vs Bar Code System....................................................................................................8

2.2

RFID System .................................................................................................................................8

2.2.1

RFID Reader – Writer .........................................................................................................10

2.2.2

RIFD Tags ...........................................................................................................................13

2.2.3

Classification Of RFID Tags ...............................................................................................20

2.3

RIFD Access Control And Attendence System ...........................................................................21

2.4

Vehicle Access Control Using RFID...........................................................................................23

2.5

Existingattendance Systems ........................................................................................................24

2.5.1

Time Attendance System By Tutis Technology Ltd ...........................................................24

2.5.2

Smart Clock .........................................................................................................................25

2.5.3

Automation Of Time And Attendance Using RFID System ...............................................25

3 METHODLOGY ...................................................................................................................................27 3.1

Software Development ................................................................................................................27

3.1.1

Requirement Analysis .........................................................................................................27

3.1.2

Design Specification ............................................................................................................28

3.1.3

Implementation ....................................................................................................................29

v

TABLE OF CONTENT (cont..) 4RESULTS AND DISCUSSIONS............................................................................................................48 4.1.

Introduction .................................................................................................................................48

4.2.

Program Debugging.....................................................................................................................48

4.3.

Interface Test ...............................................................................................................................49

4.4.

Test Result ...................................................................................................................................54

5.CONCLUSION AND RECOMMENDATIONS..................................................................................55 5.1.

Conclusion ...................................................................................................................................55

5.2.

Problems ......................................................................................................................................55

5.3.

Recommendations .......................................................................................................................55

5.3.1.

Hardware Improvement .......................................................................................................56

5.3.2.

Software Improvement ........................................................................................................56

REFERENCES ..........................................................................................................................................57 A.SOURCE CODE .............................................................................. Ошибка! Закладка не определена. B.RFID PASSIVE TAG S50 & S70 Reference Sheet ....................... Ошибка! Закладка не определена.

vi

LIST OF TABLES Table 1: Technical Parameters of RFID reader writer ..................................................................................3 Table 2: Comparison b/w RIFD and Bar Codes System ...............................................................................8 Table 3: Comparison among different RFID Reader-Writers .....................................................................28

vii

LIST OF FIGURES Figure 1: The fingerprint created by that friction ridge structure. .................................................................5 Figure 2: A fingerprint scan ..........................................................................................................................6 Figure 3: An example of barcode ..................................................................................................................6 Figure 4: Drawing of the transponder from the original patent .....................................................................7 Figure 5: An example of long range RFID Reader and its applications. .......................................................8 Figure 6: RFID Reader Components .............................................................................................................9 Figure 7: A Working RFID system ...............................................................................................................9 Figure 8: RFID Reader/Writer.....................................................................................................................10 Figure 9: RFID Reader/Writer Components ...............................................................................................11 Figure 10: Components of passive Tag .......................................................................................................14 Figure 11: Microchip ...................................................................................................................................15 Figure 12: Antenna of Passive Tag .............................................................................................................16 Figure 13: Active Tag..................................................................................................................................18 Figure 14: Semi-Active Tag ........................................................................................................................19 Figure 15: RFID Access Control for a department......................................................................................22 Figure 16: Vehicle Access Control Using RFID .........................................................................................23 Figure 17: Vehicle Access Control using RFID Explained .........................................................................24 Figure 18: A Times Attendance System device ..........................................................................................25 Figure 19: A Smart Clock using magnet stripe as identification. ................................................................25 Figure 20: Automation of Time and Attendance using RFID Systems System Architecture. ....................26 Figure 21: Reader Writer Class Diagram ....................................................................................................30 Figure 22: Memory Class ............................................................................................................................31 Figure 23: Modes.........................................................................................................................................32 Figure 24: Memory Number ........................................................................................................................33 Figure 25: Card Type Enumeration .............................................................................................................33 Figure 26: ReaderWriterState ......................................................................................................................33 Figure 27: Switch ........................................................................................................................................34 Figure 28: Classes Data Packer Project .......................................................................................................35 Figure 29: List of Control Handler ..............................................................................................................37 Figure 30: Conversion Class .......................................................................................................................39 Figure 31: Overview of writing operation ...................................................................................................40 Figure 32: Level 2 Writing Operation .........................................................................................................40 Figure 33: Level 3 Writing Operation .........................................................................................................42 Figure 34: Hardware Level Writing Operation 1 ........................................................................................42 Figure 35: Writing Operation Level 2 .........................................................................................................43 Figure 36: Harare Level 3 Writing Operation .............................................................................................43 Figure 37: Employee Interface ....................................................................................................................44 Figure 38: Attendance Sheet .......................................................................................................................46 Figure 39: Search & Report .........................................................................................................................46 Figure 40: Access Control Interface ............................................................................................................47 Figure 41: Object Test Bench ......................................................................................................................48 Figure 42: Invoking Method........................................................................................................................49

viii

LIST OF FIGURES (cont..) Figure 43: Method Call Result ....................................................................................................................49 Figure 44: Employee Interface ....................................................................................................................50 Figure 45: Checking Employee Interface ....................................................................................................50 Figure 46: Attendance Record Interface......................................................................................................51 Figure 47: Testing Attendance Record ........................................................................................................51 Figure 49: Testing Attendance Record ........................................................................................................52 Figure 50: Testing Search and Report Section ............................................................................................53 Figure 51: Access Control Testing ..............................................................................................................54

ix

1. INTRODUCTION 1.1. BACK GROUND OF PROJECT The objective is to make university safe from terrorist attacks and at the same time is functional, aesthetically pleasing, and meet the need of the students, staff, administration, and general public. Protecting educational institutions from physical attacks is a significant challenge because the ability to design, construct, renovate, operate, and maintain the facility is spread across numerous building users, infrastructures systems and many building design codes. There is a strong interest in Pakistan in ensuring the safety of students, faculty, and the staff in our educational institutions. Universities are the integral parts of our communities. On any weekday, thousands of students attend the public and private universities, adults work as teachers or staff. Additionally, universities are resource for our communities .Many institutions used as shelters, command centers, or meeting place in times of crisis. Educational institutions are also widely used for polling and voting functions. Educational institutions may or may not be the targets of terrorism, but they are certain to be affected by terrorism, whether directly or indirectly. On October 20, 2009, two audacious suicide attacks severely damaged two blocks of International Islamic University Islamabad. Three girls were among six people killed in twin attacks. This was the first time that militants have targeted women and a prestigious Islamic educational institution. The students not in the immediate vicinity experienced a great deal of anxiety. The incident took place amid reports about threats to educational institutions, some of which had decided to close their facilities for a few days. Attacking universities could be a highly emotional and high profile event. Protecting a university against terrorist attack, we took as a challenging task. That became the reason for developing access control system for educational institutions. The other part of the project includes the attendance system that is also an integral part of every institution. Attendance is defined as the act of being present at a meeting or event, the frequency with which a person is present, or the number of people that are present. Attendance is one of the important factors the affect the student‟s performance in class. Meanwhile, RFID stands for Radio Frequency Identification, a technology that shares a similar concept with bar code. With RFID, the electromagnetic or electrostatic coupling in the RF portion of the electromagnetic spectrum is used to transmit signals. An RFID system consists of an antenna and a transceiver, which read the radio frequency and transfer the information to a processing device, and a transponder, or tag, which is an 1

integrated circuit containing the RF circuitry and information to be transmitted.RFID Based Attendance System is the implementation of the RFID technologyin attendance system. The purpose of this is to replace the current methods, a paper based attendance system that still used by most university in Pakistan. The aims of this project is to develop a portable RFID based attendance system which can help lectures record the absentees data without the hassle to print the list of his/her students and ask the students to sign their name on the list as a method of tracking the absentees. Data in this context consists of the students name and ID number. This project is develop based on tracking the absentees, as the numbers of absentees are usually less than the presences.

1.2OBJECTIVES The objective of this project is to develop a RFID based Access control and attendance system that is able to: •

Enhance security to limit access to restricted areas in the university



Allow access only to authorized students, employees to enter the premises of the department.



Uniquely identify the student/employee data and Store student/employee ID and name when he/she enters the department and show on the screen of monitor of the administrator and mark the attendance of student as he attended the lecture in the classroom.

1.3PROBLEM STATEMENT Aforementioned fragile security situation is the educational institution areneed to be addressed.Now, there is no such mechanism to authorizing access to the premises of the institutions. There should be an access control at the entrance of the institutions and departments to avoid any malicious activity. The previous access control did not have enough capability to avoid access on of unauthorized persons. Therefore, there should be a system that can guarantee of stopping unauthorized access. Therefore, to tackle this fragile situation we thought to implement access control system with RIFD technology.RIFD Access control systems (ACS) are just one means that could authorize any number of personnel to get in as well as out of parts of a specific organization or area concurrently keeping others out. These devices have the ability to secure a single door up to a huge networked system of many buildings, which occasionally do include the parking area gates. The access system could also be used in combination with time and attendance systems, and other manifold levels of security. Currently, the method used by lecturers in universities to take the attendance is byaccessing the database of their students and print it on paper. Lecturer will then submit the paper to his/her students to 2

sign their name during the lectures as a proof that they attend the lectures. To trace the students who break the rules and regulations of universities regarding to attendance in lectures, lecturer had to check the name manually and submit it to the disciplinary department. The processes involved in managing the student attendance using the paper-based method consume precious time during the teaching and wasting papers and ink. A system, which can record the attendance automatically, will surely be helpful. Thus, RFID Based Attendance system was designed to uniquely identify the studentsand record their attendance. This system is flexible, which means, it can be applied in every type of class and doesn„t use papers. This system will automate all the process and save the time in taking attendance-using papers. RFID Bases Attendance System aimed to tackle all of the problems mentioned. In designing the circuit, one must remember to take into account the cost and portability of the system. Based on that, the system is designed to use lower resource as possible and portable to be located on each lecture room.

1.4

SCOPE OF PROJECT There are two main parts involved in developing the RFID Based Access control

andAttendanceSystem. The parts are electronic hardware and software. Both of these parts are crucial in developing the RFID Based Attendance System as each part is related to each other.

1.4.1 ELECTRONIC HARDWARE The electronic hardware parts can be further divided into three parts, which isinput, control system and output. The RFID reader and tag are the devices used as theinput and output as well. The main computer acts as a control system, which authenticates the record of the tags and gives output to the buzzer to alarm the unauthorized access. The monitor screen and the buzzer are chosen as the output of the system. We used RFID CRT 602-U READER WRITER in our project. The technical specification of the following model is giving as: Scanner Model: MR2200 Protocol

ISO14443A and Mifare 1

Power Consumed

0.45W

Frequency Range

ISM13.56MHz

Reading Clue

Buzzer and LED

RF Power Output

200mW

Antenna

Built-in small round polarization Antenna

Reading Range

0~10cm for PVC card

Power Supply

USB interface to get power from computer

Communication Port

USB

Dimension

104*68*10mm

Reading Clue

Buzzer & LED

Avoirdupois

0.1kg

Antenna

Built-inside integrative antenna

Operation Temp

-20℃~+80℃

Table 1: Technical Parameters of RFID reader writer

3

1.4.2 SOFTWARE DEVELOPMENT Software development phase was completed in two steps. First, we managed to develop firmware for the card that was responsible for the communication between the card reader writer and the tag. For this purpose, the best choice was C# as a programming language. The second phase of software development correspond the development of the user interface, that required a good teamwork for the requirement analysis of various companies that needed access control, attendance system and the payroll. We chose .net framework for the development of user interface. We made our user interface software good enough to make session with reader writer firmware.

1.5WORK CONTRIBUTION RFID Based Access control and Attendance System which is able to uniquely identify students/employees entering and leaving the department and marking their attendance and avoiding the unauthorized access of people and track the absentees was successfully developed. The major contributions of this workare: i.

Defining and implementing Classes for RFID Reader/Writer

ii.

Defining supporting classes for RFID reader/writer

iii.

Data Handling for RFID Tag by defining Data Packing classes

iv.

Data Handling for database

v.

Designing user interfaces for attendance and access control system.

vi.

Testing and debugging the software

4

2 LITERATURE REVIEW

2.1IDENTIFICATION SYSTEM Identification is defined as the capability to find, retrieve, report, change, orDelete specific data without ambiguity. Some of the identification system that exists and widely used nowadays are automated fingerprint identification, barcode system and radio frequency identification. In my project, identification system is used to identify the students and employees entering the department and students attending the lectures.

2.1.1 AUTOMATED FINGER PRINT IDENTIFICATION Automated fingerprint identification is the process of automatically matchingone or many unknown fingerprints against a database of known and unknown prints. In this system, fingerprint is used in the identification system. A friction ridge or also knows as a raised portions of the epidermis on the palm or digits, is unique to each people. The basic idea behind fingerprint identification is to capture and measure the physical difference between ridges and valleys and thus help the system to identify the fingerprint. Automated fingerprint identification systems are primarily used by lawEnforcement agencies for criminal identification initiatives, the most important ofwhich include identifying a person suspected of committing a crime or linking aSuspect to other unsolved crimes. Usually, electronic hardware is used to accompany the process of identifying fingerprint.

Figure 1: The fingerprint created by that friction ridge structure.

5

Figure 2: A fingerprint scan

2.1.2 BAR CODE SYSTEM Barcode system consists of an electronic hardware and software for scanning a barcode and an optical machine-readable which represent certain data. Optical scanners or special software‟s are used to scan and read the barcode. Barcode are widely adopted by companies to mark their products. Nowadays, various softwares to generate or read barcodesexist in the market.This includes the online web site that generates barcode according to the input keyed in by the user. There are also many alternatives to read the barcode. For example, user can take a picture of the barcode, save it in computer and using special software, the barcode can be read. This system is not relevant to be used in secured area as it can be easily faked.

Figure 3: An example of barcode

6

2.1.3 RADIO FREQUENCY BASED IDENTIFICATION SYSTEM (RFID) RFID technology originated from a long and complex history. Scientists deduce that there are four unified fundamental forces in our universe which is gravity, Electromagnetism and the strong and weak nuclear forces. The first form in the Universe was electromagnetic energy. During the first few seconds or so of the universe, protons, neutrons and electrons began formation when photons (the quantum element of electromagnetic energy) collided converting energy into mass. The electromagnetic energy is the source of energy of RFID.The Thing which is also known as the Great Seal Bug is a technology usedBy the USSR to spy on the USA conversation at the U.S Ambassadors MoscowResidential Office is considered to be the predecessor of RFID technology because it uses passive techniques to transfer signals, being energized and activated by electromagnetic waves from an outside source. It was invented by Lon Theremin and consists of a tiny capacitive membrane connected to a small quarter-wavelength antenna. It uses no electric power supply or active electronic components to operate. In 1973, Martin Cordullo patented his Transponder Apparatus and System whichresembles the modern RFID technology, a passive radio transponder with memory. This is followed by the first patent that associated to abbreviation of RFID that was granted to Charles Walton.

Figure 4: Drawing of the transponder from the original patent

Nowadays, most RFID technology consists of a reader and tag. The tagcontains an integrated circuit for storing and processing information and an antenna to receive and transmit signal. Generally, there are three types of RFID tag which are active (contain battery), passive (no external source to activate signal transmission) and battery assisted passive. RFID is commonly used in animal identification, attendance system, inventory system, human identification, and hospital operating room. In our project, a passive RFID tag will be used as identification. The operating frequency of the RFID reader is 13.56 MHz with 10cm reading range. 7

Figure 5: An example of long range RFID Reader and its applications.

2.1.4 RFID VS BAR CODE SYSTEM 

RFID share similar in concept to bar coding.



Bar code Systems use a Reader and Coded Labels that are attached to an item, while 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 while RFID uses RF signals to transfer information from the RFID device to the Reader.

The key features of RFID system is described in the given table with comparison with Barcodes. System Parameters

Bar Codes

RFID systems

1-100

2-64k

Low

Very Good

Limited

Impossible

Very High

No influence

Influence of distance and position

Low

No influence

Operating Cost

Low

None

Slight

impossible

Low

Very fast

0-50cm

0-15 meters(depending upon tag and frequency)

Typical data Quantity (Bytes) Data Density Readability by people Influence of dirt

Unauthorized Copying Reading Speed Maximum distance b/w data careers and reader

Table 2: Comparison b/w RIFD and Bar Codes System

2.2RFID SYSTEM An RFIDsystem is an integrated collection of components that implement an RFID solution. An RFID system consists of the following components (in singular form) from an end-to-end perspective:

8



Tag. This is a mandatory component of any RFID system.



Reader. This is a mandatory component, too.



Reader antenna. This is another mandatory component. Some current readers available today have built-in antennas.



Controller. This is a mandatory component. However, most of the new-generation readers have this component built in to them.



Sensor, actuator, and annunciator. These optional components are needed for external input and output of the system.



Host and software system. Theoretically, an RFID system can function independently without this component. Practically, an RFID system is close to worthless without this component.



Communication infrastructure. This mandatory component is a collection of both wired and wireless network and serial connection infrastructure needed to connect the previously listed components together to effectively communicate with each other.

Figure 6: RFID Reader Components

Figure 7: A Working RFID system

9

2.2.1 RFID READER – WRITER An RFID reader, also called an interrogator, is a device that can read from and write data to compatible RFID tags. Thus, a reader also doubles up as a writer. The act of writing the tag data by a reader is called creating a tag. The process of creating a tag and uniquely associating it with an object is called commissioning the tag. Similarly, decommissioning a tagmeans to disassociate the tag from a tagged object and optionally destroy it. The time during which a reader can emit RF energy to read tags is called the duty cycle of the reader. International legal limits apply to reader duty cycles.

Figure 8: RFID Reader/Writer

The reader is the central nervous system of the entire RFID hardware system establishing communication with and control of this component is the most important task of any entity which seeks integration with this hardware entity. A reader has the following main components:     

  

Transmitter Receiver Microprocessor Memory Input/output channels for external sensors, actuators, and annunciators (Although, strictly speaking, these are optional components, they are almost always provided with a commercial reader.) Controller (which may reside as an external component) Communication interface Power 10

Figure 9: RFID Reader/Writer Components

Transmitter The reader's transmitter is used to transmit AC power and the clock cycle via its antennas to the tags in its read zone. This is a part of the transceiver unit, the component responsible for sending the reader's signal to the surrounding environment and receiving tag responses back via the reader antenna(s). The antenna ports of a reader are connected to its transceiver component. One reader antenna can be attached to each such antenna port. Currently, some readers can support up to four antenna ports.

Receiver This component is also part of the transceiver module. It receives analog signals from the tag via the reader antenna. It then sends these signals to the reader microprocessor, where it is converted to its equivalent digital form (that is, the digital representation of the data that the tag has transmitted to the reader antenna).

Microprocessor This component is responsible for implementing the reader protocol to communicate with compatible tags. It performs decoding and error checking of the analog signal from the receiver. In addition, the microprocessor might contain custom logic for doing low-level filtering and processing of read tag data.

11

Memory Memory is used for storing data such as the reader configuration parameters and a list of tag reads. Therefore, if the connection between the reader and the controller/software system goes down, not all read tag data will be lost. Depending on the memory size, however, a limit applies as to how many such tag reads can be stored at any one time. If the connection remains down for an extended period with the reader reading tags during this downtime, this limit might be exceeded and part of the stored data lost (that is, overwritten by the other tags that are read later).

Input/output Channels for External Sensors, Actuators, and Annunciators Readers do not have to be turned on for reading tags at all times. After all, the tags might appear only at certain times in the read zone, and leaving readers perpetually on would just waste the reader's energy. In addition, as mentioned previously, regulatory limits apply to the reader duty cycle, too. This component provides a mechanism for turning a reader on and off depending on external events. A sensor of some sort, such as a motion or light sensor, detects the presence of tagged objects in the reader's read zone. This sensor can then set the reader on to read this tag. Similarly, this component also allows the reader to provide local output depending on some condition via an annunciator (for example, sounding an audible alarm) or an actuator (for example, opening or closing a security gate, moving a robot arm, and so forth). Sensors, actuators, and annunciators.

Controller A controller is an entity that allows an external entity, either a human or a computer program, to communicate with and control a reader's functions and to control annunciators and actuators associated with this reader. Often, manufacturers integrate this component into the reader itself (as firmware, for example). However, it is also possible to package this as a separate hardware/software component that must be bought together with the reader.

Communication Interface The communication interface component provides the communication instructions to a reader that allow it to interact with external entities, via a controller, to transfer its stored data and to accept commands and send back the corresponding responses. You can assume that this interface component is either part of the controller or is the medium that lies between a controller and the external entities. This entity has important characteristics that make it necessary to treat this as an independent component. A

12

reader could have a serial as well as a network interface for communication. A serial interface is probably the most widespread type of reader interface available, but next-generation readers are being developed with network interfaces as a standard feature. Sophisticated readers offer features such as automatic discovery by an application, embedded Web servers that allow the reader to accept commands and display the results using a standard Web browser, and so forth.

Power This component supplies power to the reader components. The power source is generally provided to this component through a power cord connected to an appropriate external electrical outlet. Like tags, readers can also be classified using two different criteria. The first criterion is the interface that a reader provides for communication. Based on this, readers can be classified as follows: 

Serial



Network

2.2.2 RIFD TAGS An RFID tag is a device that can store and transmit data to a reader in a contactless manner using radio waves. RFID tags can be classified in two different ways. The following list shows the first classification, which is based on whether the tag contains an on-board power supply and/or provides support for specialized tasks: 

Passive



Active



Semi-active (also known as semi-passive)

2.2.2.1PASSIVE TAGS This type of RFID tag does not have an on-board power source (for example, a battery), and instead uses the power emitted from the reader to energize itself and transmit its stored data to the reader. A passive tag is simple in its construction and has no moving parts. As a result, such a tag has a long life and is generally resistant to harsh environmental conditions. For example, some passive tags can withstand corrosive chemicals such as acid, temperatures of 400°F (204°C approximately), and more.

13

In tag-to-reader communication for this type of tag, a reader always communicates first, followed by the tag. The presence of a reader is mandatory for such a tag to transmit its data. A passive tag is typically smaller than an active or semi-active tag. It has a variety of read ranges starting with less than 1 inch to about 30 feet (9 meters approximately).A passive tag is also generally cheaper compared to an active or semi-active tag. A contactless smart card is a special type of passive RFID tag that is widely used today in various areas (for example, as ID badges in security and loyalty cards in retail). The data on this card is read when it is in close proximity to a reader. The card does not need to be physically in contact with the reader for reading.

Figure 10: Components of passive Tag

A passive tag consists of the following main components: 

Microchip



Antenna

Microchip The power control/rectifier converts AC power from the reader antenna signal to DC power. It supplies power to the other components of the microchip. The clock extractor extracts the clock signal from reader antenna signal. The modulator modulates the received reader signal. The tag's response is embedded in the modulated signal, which is then transmitted back to the reader. The logic unit is responsible for implementing the communication protocol between the tag and the reader. The microchip memory is used for storing data. This memory is generally segmented (that is, consists of several blocks or fields).Addressability means the ability to address (that is, read or write) the individual memory of a tag's microchip. A tag memory block can hold different data types, such as a portion of the tagged object 14

identifier data, checksum (for example, cyclic redundancy checks [CRC]) bits for checking the accuracy of the transmitted data, and so on. Recent advances in technology have shrunk the size of the microchip to less than the size of a grain of sand. However, a tag's physical dimensions are not determined by the size of its microchip but by the length of its antenna.

Figure 11: Microchip

Antennas A tag's antenna is used for drawing energy from the reader's signal to energize the tag and for sending and receiving data from the reader. This antenna is physically attached to the microchip. The antenna geometry is central to the tag's operations. Infinite variations of antenna designs are possible, especially for UHF, and designing an effective antenna for a tag is as much as an art as a science. The antenna length is directly proportional to the tag's operating wavelength. Adipole antenna consists of a straight electric conductor (for example, copper) that is interrupted at the center. The total length of a dipole antenna is half the wavelength of the used frequency to optimize the energy transfer from the reader antenna signal to the tag. A dual dipole antenna consists of two dipoles, which can greatly reduce the tag's alignment sensitivity. As a result, a reader can read this tag at different tag orientations. A folded dipole consists of two or more straight electric conductors connected in parallel and each half the wavelength (of the used frequency) long. When two conductors are involved, the resulting folded dipole is called 2-wire folded dipole. A 3-wire folded dipole consists of three conductors connected in parallel.

15

Figure 12: Antenna of Passive Tag

A tag's antenna length is generally much larger than the tag's microchip, and therefore ultimately determines a tag's physical dimensions. An antenna can be designed based on several factors, such as the following: 

Reading distance of the tag from the reader



Known orientation of the tag to the reader



Arbitrary orientation of the tag to the reader



Particular product type(s)



Speed of the tagged object



Specific operating condition(s)



Reader antenna polarization The connection points between a tag's microchip and the antenna are the weakest links of the tag.

If any of these connection points are damaged, the tag might become nonfunctional or might have its performance significantly degraded. An antenna designed for a specific task (such as tagging a case) might perform poorly for a different task (such as tagging an individual item in the case). Changing antenna geometry randomly (just "hacking around;" for example, cutting or folding it) is not a good idea because this can detune the tag, resulting in suboptimal performance. However, someone who knows what he is doing can deliberately modify a tag's antenna to detune it (drilling a hole into it, for example) and actually increase the readability of the tag. Currently, a tag antenna is constructed with a thin strip of a metal (for example, copper, silver, or aluminum). In the future, however, it will be possible to print antennas directly on the tag label, case, and

16

product packaging using a conductive ink that contains copper, carbon, or nickel. Effort is also currently underway to determine whether the microchip might be printed with such an ink, too. These future enhancements may enable you to print an RFID tag just as you do a bar code on the case and item packaging. As a result, the cost of an RFID tag might drop substantially below the anticipated $.05 per tag. Even without the ability to print a microchip, a printed antenna can be attached to a microchip to create a complete RFID tag much faster than attaching a metal antenna.

2.2.2.2ACTIVE TAGS Active RFID tags have an on-board power source (for example, a battery; other sources of power, such as solar, are also possible) and electronics for performing specialized tasks. An active tag uses its onboard power supply to transmit its data to a reader. It does not need the reader's emitted power for data transmission. The on-board electronics can contain microprocessors, sensors, and input/output ports powered by the on-board power source. Therefore, for example, these components can measure the surrounding temperature and generate the average temperature data. The components can then use this data to determine other parameters such as the expiry date of the attached item. The tag can then transmit this information to a reader (along with its unique identifier). You can think of an active tag as a wireless computer with additional properties (for example, like that of a sensor or a set of sensors). In tag-to-reader communication for this type of tag, a tag always communicates first, followed by the reader. Because the presence of a reader is not necessary for data transmission, an active tag can broadcast its data to its surroundings even in the absence of a reader. This type of active tag, which continuously transmits data with or without the presence of a reader, is also called a transmitter. Another type of active tag enters a sleep or a low-power state in the absence of interrogation by a reader. A reader wakes up such a tag from its sleep state by issuing an appropriate command. This state saves the battery power, and therefore, a tag of this type generally has a longer life compared to an active transmitter tag. In addition, because the tag transmits only when interrogated, the amount of induced RF noise in its environment is reduced. This type of active tag is called a transmitter/receiver (or a transponder). As you can understand from this discussion, you cannot accurately call all tags transponders. The reading distance of an active tag can be 100 feet (30.5 meters approximately) or more when the active transmitter of such a tag is used. An active tag consists of the following main components: 

Microchip. The microprocessor size and capabilities are generally greater than the microchips found in passive tags.

17



Antenna. This can be in the form of an RF module that can transmit the tag's signals and receive reader's signals in response. For a semi-active tag, this is composed of thin strip(s) of metal such as copper, similar to that of a passive tag.



On-board power supply.



On-board electronics.

Figure 13: Active Tag

On-Board Power Supply All active tags carry an on-board power supply (for example, a battery) to provide power to its on-board electronics and to transmit data. If a battery is used, an active tag generally lasts for about 2 to 7 years depending on the battery life. One of the determining factors of the battery life is the datatransmission rate interval of the tagthe larger the interval, the longer the battery and hence the tag life. For example, suppose that an active tag is made to transmit once every few seconds. If you increase this so that the tag transmits once every few minutes or even once every few hours, you extend the battery life. The on-board sensors and processors consume power and can shorten the battery life, too. When the battery of an active tag is completely discharged, the tag stops transmitting messages. A reader that was reading these messages does not know whether the tag's battery has died or whether the tagged product has disappeared from its read zone unless the tag transmits its battery status to this reader.

On-Board Electronics The on-board electronics allow the tag to act as a transmitter, and optionally allow it to perform specialized tasks such as computing, displaying the values of certain dynamic parameters, acting as a sensor, and so on. This component can also provide an option for connecting external sensors. Therefore, depending on the sensor type attached, such a tag can perform a wide variety of sensing tasks. In other

18

words, the range of functionality of this component is virtually limitless. Note that as the functionality and hence the physical size of this component grows, the tag might grow in size. This growth is acceptable because no hard limit applies to the size of an active tag as long as it can be deployed (that is, properly attached to the object that needs to be tagged). This means active tags can be applied to a wide range of applications, several of which might not even exist today.

2.2.2.3SEMI-ACTIVE TAGS Semi-active tags have an on-board power source (for example, a battery) and electronics for performing specialized tasks. The on-board power supply provides energy to the tag for its operation. However, for transmitting its data, a semi-active tag uses the reader's emitted power. A semi-active tag is also called a battery-assisted tag. In tag-to-reader communication for this type of tag, a reader always communicates first, followed by the tag. Why use a semi-passive tag over a passive tag? Because a semiactive tag does not use the reader's signal, unlike a passive tag, to excite itself, it can be read from a longer distance as compared to a passive tag. Because no time is needed for energizing a semi-active tag, such a tag could be in the read zone of a reader for substantially less time for its proper reading (unlike a passive tag). Therefore, even if the tagged object is moving at a high speed, its tag data can still be read if a semi-active tag is used. Finally, a semi-active tag might offer better readability for tagging of RFopaque and RF-absorbent materials. The presence of these materials might prevent a passive tag from being properly excited, resulting in failure to transmit its data. However, this is not an issue with a semiactive tag. The reading distance of a semi-active tag can be 100 feet (30.5 meters approximately) under ideal conditions using a modulated backscatter scheme (in UHF and microwave).

Figure 14: Semi-Active Tag

19

2.2.3 CLASSIFICATION OF RFID TAGS The classification is based on the capability to support data rewrites: 

Read-only (RO)



Write once, read many (WORM)



Read-write (RW) Both active and passive tags can be RO, WORM, and RW. The following sections discuss these classifications in detail.

2.2.3.1READ ONLY (RO) An RO tag can be programmed (that is, written) just once in its lifetime. The data can be burned into the tag at the factory during the manufacturing stage. To accomplish this, the individual fuses on the tag microchip are burned permanently using a fine-pointed laser beam. After this is done, the data cannot be rewritten for the entire lifetime of the tag. Such a tag is also called factory programmed. The tag manufacturer supplies the data on the tag, and the tag users typically do not have any control over it. This type of tag is good for small applications only, but is impractical for large manufacturing or when tag data needs to be customized based on the application. This tag type is used today in small pilots and business applications.

2.2.3.2WRITE ONCE, READ MANY (WORM) A WORM tag can be programmed or written once, which is generally done not by the manufacturer but by the tag user right at the time when the tag needs to be created. In practice, however, because of buggy implementation, it is possible to overwrite particular types of WORM tag data several times (about 100 times is not uncommon)! If the data for such a tag is rewritten more than a certain number of times, the tag can be damaged permanently. A WORM tag is also called field programmable. This type of tag offers a good price-to-performance ratio with reasonable data security, and is the most prevalent type of tag used in business today.

20

2.2.3.3READ WRITE (RW) An RW tag can be reprogrammed or rewritten a large number of times. Typically, this number varies between 10,000 and 100,000 times and above! This rewrite ability offers a tremendous advantage because the data can be written either by the readers or by the tag itself (in case of active tags). An RW tag typically contains a Flash or a FRAM memory device to store its data. An RW tag is also called field programmable or reprogrammable. Data security is a challenge for RW tags. In addition, this type of tag is most expensive to produce. RW tags are not widely used in today's applications, a fact that might change in the future as the tag technology and applicability increases with a decrease in tag cost.

2.2.3.4SAW (SURFACE ACOUSTIC WAVE) TAGS A SAW tag differs fundamentally from microchip-based tags. SAW tags have started appearing on the market, and might be widely used in the future. Currently, SAW devices are widely used in cell phones, color televisions, and so on. SAW tags use low-power RF waves in the ISM 2.45 GHz frequency range for their operation. Unlike a microchip-based tag, a SAW tag does not need DC power to energize itself for data transmission.

2.3RIFD ACCESS CONTROL AND ATTENDENCE SYSTEM Most organizations today require a performing and efficient access control system. There are many reasons for having such a system and these include: Enhanced security to limit access to restricted areas Tracking employee activity, Improve loss prevention and Compliance to higher internal or government regulated security measures post 9-11. RFID technology is quickly becoming a popular choice since the advancement in technology makes a variety of solutions available to any organization. An RFID access control system can provide an easy and efficient solution. RFID badges can be read from much further distances than other traditional technologies and the embedded electronic information for each badge can be over-written repeatedly. The increased reading distance thus enables other tracking technologies like surveillance cameras to be activated in conjunction with an employee being in their vicinity. Furthermore, multiple RFID badges can be read all at the same time. Information about employee access, attendance, and duties performed, can be easily and efficiently monitored and stored in a database. Access information can also be tied to a

21

Windows Active Directory for user authentication and therefore be synchronized to an authorized access scheme.

Figure 15: RFID Access Control for a department.

RFID has recently launched a hands-free RFID attendance tracking system for ID badge identification at meetings, conferences and schools, etc. The RFID attendance system allows people to enter a room without delay or human interaction while automated capture of attendees‟ data. The walk-through RFID attendance tracking system is an automated solution for customers to capture time and attendance. It combines RFID gate reader DL8220 and passive RFID tags, such as smart card and key fob, to automated record valuable attendees‟ data to help with future conference planning or school students‟ attendance. The installation place and number of the RFID gate reader depends upon the goal and scale of the RFID attendance program. The RFID gate reader DL8220 is a self-intellectual integrated device with read range of up to 120cm, eliminating the need to handle the badge. That means only the person with authorized passive RFID tag who passes through the gate DL8220 is automated recognized. The walk-through RFID attendance tracking system is capable of reading and writing most 13.56MHz ISO/IEC 15693 protocol tag such as TI,PHILIPS. And it includes several innovations that improve performance and suitability for access control use, such as infrared detect sensors, stay targeting police equipment. The RFID Attendance Tracking System provides users with hands-free, walk-through access for badge identification. And its data communication interface can be customized.

22

2.4VEHICLE ACCESS CONTROL USING RFID At present, there is no access control mechanism to authenticate the cars, vehicles and buses entering the university. The vehicles use to enter the university without any proper procedure. There is no system to maintain the records of the vehicles entering and leaving the university. It is a major flaw in the security planning. Any explosive laden vehicle can easily enter the premises of the university. The access control systems cannot be run on only a sticker like mechanism where any car can enter with fake university named sticker. No one can say that whose car has entered or leave the university and at what time it happened. This Problem can be solved by using RFID parking access control system. The system consists of an RFID Reader installed at the entrance point of the university and Tag like sticker are glued at the front window of the vehicle. As the car enter in the interrogation region i.e., 15 meters(reading distance can be increased) of the RFID Reader. The vehicle is easily identified because tag transfers the required information stored in it to the reader. The reader sends this information to the main frame computer which maintains the record of each entry. The reading distance can be adjusted as per requirement. The check in and checkout time is stored as a record which can easily be checked and authenticated. The important thing about the tag is that it can‟t be duplicated and user can‟t change the information stored in it. So, unauthorized can‟t enter the university without a proper procedure. The tag attached to the car transfer the basic information about the car, its owner‟s Name, image, CNIC No. department, Car number plate etc. If someone found suspicious, then to ensure satisfaction, the drivers RFID Card would also be checked.

Figure 16: Vehicle Access Control Using RFID

23

Figure 17: Vehicle Access Control using RFID Explained

There would be no waiting queue on the entrance because the Reader identifies the things with in fraction of seconds. The completer function is elaborated in the figure below. The following system ensures proper authentication about each entry to university. Moreover, CCTV cameras are also here to help in making decision about the authentication at the satisfaction level. If someone try to intercept the procedure, He would be stopped with strict hand and with communication system with main network .The sufficient steps can be taken to avoid any loss.

2.5EXISTINGATTENDANCE SYSTEMS 2.5.1 TIME ATTENDANCE SYSTEM BY TUTIS TECHNOLOGY LTD The Time Attendance System is a commercial attendance system developed byTutis Technologies Limited. The dimension of the device is 221x180x57mm. It can accurately identify and record up to 50000 transaction records using its robust in build optical scanner. It uses fingerprint in its identification system. It has user capacity of1500 identities and provides SDK for software customization. The device supports multiple input units installed for one company and also provide customization of company rules, and time management parameters. There are also RS232 and Ethernet port provided on the device, which allow communication via TCP/IP. The output dalais available in excel/html/ASCII format for further calculation. Perhaps this technology‟s focusing on the serious time and labor distribution of a big company.

24

Figure 18: A Times Attendance System device

2.5.2 SMART CLOCK Smart Clock is one of the popular attendance systems available in the market. It provides various type of identification in its system such as magnet stripe, fingerprint, barcode, proximity, and keypad. Smart Clock uses high impact ABS for its housing. The baud rate, clock ID, and parity can be configured within the system. It also support multitasking work like read employees card while communicates with the computer at the same time. It utilizes a 22MHz 80C32 Intel microprocessor in its system. It also provides lithium battery in case of power failure. To store data, it uses flash memory with size of 128 KB.

Figure 19: A Smart Clock using magnet stripe as identification.

2.5.3 AUTOMATION OF TIME AND ATTENDANCE USING RFID SYSTEM Automatic control of students‟ attendance in classrooms using RFID is developed by Francisco Silva, Vctor Filipe and Antnio Pereira from Superior School of Technology and Management Polytechnic Institute of Leiria, Portugal.The system provides a database called RFID DB that stores the records of student attendance, in particular, the student number, the lesson and subject. Identification, the date/time and the identification of the reader that carried out the reading. This server also stores all the readers‟ settings, particularly the IP address, the port, the building and the classroom number.The system implemented Web Services Server, which provides some web Methods that can be made use of by external applications like the frontend. To obtain the data, the server queries the RFID DB Server to obtain attendance records and queries the Middleware to obtain

25

subjects, lessons and students records. The DBMS of the institution contain all the databases related to the students, teachers, the classroom sand the schedules of each subject. One of the most important components of the system‟s architecture is the middleware, which takes the form of a library of functions,i.e., a Dynamic-Link Library (DLL) files. The system‟s return the result fetchfromWebsite via middleware in XML format. The implementation of DLL in the system provides an easier modification such as adding extra features‟ on the system to obtain data from the RFID DB.

Figure 20: Automation of Time and Attendance using RFID Systems System Architecture.

26

3 METHODLOGY 3.1SOFTWARE DEVELOPMENT 3.1.1 REQUIREMENT ANALYSIS Requirement gathering was the first and foremost task for us. For this purpose, we visited different institutions, International Islamic University Islamabad, Riphah International University Islamabad and BahauddinZakariya University Multan. We met Rectors and vice chancellor of the universities and they responded well and directed us to their security in charge and administrators. We met them and they behaved cordially and fully guided us regarding their requirement. International Islamic University, victim of terrorism showed more keenness towards this project and our proposal of RFID Access Control and attendance system. At that moment, the security arrangements were not up to the merit in International Islamic University because of having no boundary wall. They described their requirements regarding access control and attendance system. The problem discussed there was to make the main entrance secured because there was no such good mechanism to authenticate the entry of students and employees and visitors. They told us that they required access control system for each of the department but for the moment they asked us to implement it on their administration block .We asked many questions from them and wrote down the answers and further we asked their requirements. They asked many questions regarding RFID technology like comparison with bar code .We suggested making RFID ACS more effective to use it CCTV cameras, and Electronic Intrusion detections systems. Then , we moved towards attendance system and asked many questions like what is their criteria regarding attendance system, How they used to take attendance now a days, How they managed to maintain the records, why they needed new attendance system etc. They answered it cordially and we wrote down their answers and suggested them RFID based Attendance system to get rid of manually paper like attendance system. We got their requirement and wrote down. The summary of the requirement is given as: •

Enhanced security for institution



Authenticate and validate the entry of persons



No unauthorized person should enter the premises of institution



The university card for students, employees should include the following information to be authenticated and validated: Student ID, Name, Roll No, Department, Session, entry time , Leaving time of student

27

Employee ID, Name,Department,EntryTime,Leaving time of employees. For visitor, Name, department to visit, Entry time, Leaving time etc.

3.1.1.1

SECURITY AND COST ANALYSIS After requirement analysis, we visited like www.marktrace.com , www.therfidshop.com and got

the price list of the RFID Reader/Writer and tags equipments and analyzed them for the our project.We selected 13.56MHz as an operating frequency for short range i.e., 10cm .Some of the models of different companies for this frequency is given as: Model

Parameters

Price

MR 2200 Mifare reader Writer

Frequency :13.56MHz , Protocol: ISO 14447 A Range : 8cm Power Consumed : DC+12v

30 USD /pc

MR 701 Reader

Frequency :13.56MHz , Protocol: ISO 15693A Range : 90cm Power Consumed : DC+12v

1076USD/pc

MR 700 Reader

Frequency :13.56MHz , Protocol: ISO 15693A Range : 10-30cm Power Consumed : DC+12v

307USD/pc

Table 3: Comparison among different RFID Reader-Writers

3.1.1.2

CONCLUSION (RIFD 14443A PROTOCOL, CRT 602-U READER WRITER) Owing to affordable cost and compromising reading distance,we selected MR2200 i.e., CRT 602-

U Reader Writer .and selected ISO 14443A protocol to implement.

3.1.2 DESIGN SPECIFICATION 3.1.2.1

HARDWARE SPECIFICATION (COMPUTER, READER, TAGS) We used Dual-Core as a mainframe system where the main software be installed and act as a

control system which decides what to do. We selected MR 2200 RFID reader writer and S50 and S70 RFID passive tags.

28

3.1.2.2

SOFTWARE SPECIFICATION (operating system, application programming language) We selected Windows XP because of flexibility and ease main operating systems because it is

mostly used in most of the firms.Now, the most important question raised in our mind was that which programming language we should have used. There are so many programming languages like C, C++, C# , Java ,Visual Basic etc.. But we selected C# for our project .The Main reasons for its selection are given as: 1. C# is a modernized version of C++. 2. Type-safety 3. Object-oriented 4. Simplified syntax 5. XML comments (XML comments can actually turn into your documentation) 6. All about components 7. Cross Language capabilities

3.1.3 IMPLEMENTATION 3.1.3.1

DEVICE DRIVER DESIGN We were provided by a simulator model that described the command structure and the memory

architecture for different cards. We were to make a device driver using the instruction set provided by the device simulator. Depending upon the functions, CR 602 U could perform there were corresponding buttons. The device reader provided by the china creator gave us a remarkable support in writing the device driver for our application.

3.1.3.1.1 CLASS READER WRITER Class Reader Writer is the ground of all the transactions on the reader writer. Here the transaction refers to all the functions we can perform on the reader writer. Class Reader writer is basically a class whose object can directly interact with the reader writer. All the functionalities provided in the creator software are gathered programmatically here so we could be able to interact with the reader writer in the same way creator software does. Following is the brief introduction to the class reader writer package. It has many supporting classes that we will discuss later.

29

Figure 21:Reader Writer Class Diagram

The core of class reader writer is a handful of public functions that are responsible for essential operations of the card reader writer. The core functions are listed below with a brief introduction to each, publicvoid buzzerOn(): This function is responsible to start the buzzer of reader writer. Once the buzzer on the reader writer is started you have to stop it. publicvoid buzzerOff(): BuzzerOff is the function that stops the buzzer sound if it is already started. publicvoid buzzerOnOff(): BuzzerOnOff makes the buzzer on for the specified duration. The duration is given in seconds. public ClassReaderWriter(): ClassReaderWriter is the constructor for the object of ClassReaderWriter. It doesn‟t take arguments. It does initialize all the components essential for reader writer operations. string readblock(byte sectorno, byte

blocknumber):

readblock function is responsible for reading a block from specified sector in the given block number. Sector number and the block number are specified the parameters, sector No and block number respectively.

30

byte[] readBlocksFromTag(MemoryNumber Memnum): readBlocksFromTag is responsible for reading all the bytes from specified memory number. The tag Memory is divided logically in three section. MemoryNumber enumeration describes the memory number we are going to refer for reading the blocks. There are three memory partitions naming first, second and third. First: takes 720 bytes Second:second takes 768 bytes. Third: takes 1920 bytes. bool writeBlocksToTag(byte[]data,MemoryNumber MemNumber): This function is responsible for writing the byte array of data to a specified number of memory partitions. It returns true if the writing process was successfully performed.

3.1.3.1.2 SUPPORTING ITEMS Following are the supporting functions for the tag reader writer, 3.1.3.1.2.1

MEMORY

Figure 22: Memory Class

31

Memory class is responsible for handling and editing the memory buffer that is the exact representation of RF Tag memory in computer memory.Most important functions in Memory class are add and getBytesArray. You can add your value in Memory as a temporary storage before writing to actual memory in RF Tag. publicbyte[] getBytesArray(): It gets the bytes from the memory in byte array form. The resulting memory is in encrypted form. publicvoid add(byte[] byteArrayToStore, int size): It adds the byte array in the memory buffer. You can add data array in the last updated location of the memory buffer. internalbyte[] getAvailableBytes(): It takes the byte array that has meaning in the memory buffer. 3.1.3.1.2.2

MODE MANAGER

Figure 23: Modes

This class manages the modes of the reader writer.

Fields: Mode: It‟s of enumeration type, describes the mode of the reader writer.

Methods: Modes Manager: This is the constructor of the following class and manages the modes of the reader writer.

32

3.1.3.1.2.3

MemoryNumber

Figure 24: Memory Number

It is an enumeration which tells about the memory number of the tag. We have divided the memory of the tag into three parts given as First Second Third 3.1.3.1.2.4

CardType

Figure 25: Card Type Enumeration

Card Type is the enumeration that represents the card type on the reader writer. Our reader writer is capable of detecting card types of either S50 or S70. S50: It is a passive card and its memory size is 1KB. S70: It is also a passive card and its memory size is 4KB. 3.1.3.1.2.5

ReaderWriterState

Figure 26: ReaderWriterState

33

ReaderWriterState is the enumeration that presents state of the reader writer on data receive function. When you receive back the answer after putting some command you get one of above states. Read Block: When the Reader Writer is reading any block of the tag then it will be in read block state. Write Block: When the Reader Writer is writing any block of the tag then it will be in Write block state. TestRFCard: When the reader writer tests the cards, It will be in this state. SerialNoDetect: When the serial number of the tag is detected. The reader will be in this state. Buzzer on: The reader writer will be in this state when the buzzer is on. Buzzer off: When the buzzer is off, the reader writer will be in this state. Nothing: This state tells that reader writer is doing nothing. Write Blocks: When the reader writer is writing blocks to tag, it will be in this state. ReadBlocksOne: When the reader Writer is reading the blocks of first memory of the tag, then it will be in this state. ReadblocksTwo: When the reader Writer is reading the blocks of the second memory of the tag, then it will be in this state. Password Detect: When the password is detected. This state goes on. Card Type: This state defines the card type whether it is S50 or S70.It is also an enumeration which tells about the type of the tag or card. S50: It is a passive card and its memory size is 1KB. S70: It is also a passive card and its memory size is 4KB. 3.1.3.1.2.6

Switch:

Figure 27: Switch

Switch is either on or off for readerwriter card detection function. If this switch is on the reader writer is functioning for card detection. If this switch is off the reader writer is passive.It is an enumeration which tells that whether the reader writer is on or off. If it is on then it is ready to perform the operation. If it is off, then it is unable to perform any operation.

34

On Off

3.1.3.2

APPLICATION MODEL

3.1.3.2.1 DATA HANDLING TECHNIQUES The more important task was how the user will interact with the system, before going in details it is necessary to have a look into the data handling techniques we are adopting in the ground level of the application. The Data handling techniques goes as under,

3.1.3.2.2 DATA HANDLING MODELS Data handling is a two way process, 1. Handling data for database 2. Handling data for RFID Tags The detail of the two goes as under, 3.1.3.2.2.1

DATA HANDLING FOR DATA BASE

Data is handled in database in the form of tables, which is the key entity in relational database management systems. We are using SQL Serverfor the management of the records in a working environment. This end of data handling is a set of some data tables and queries. 3.1.3.2.2.2

DATA HANDLING FOR RFID TAGS

Data handling for RFID Tags is the set of some basic packing classes. The key functions of these classes are given as under, 3.1.3.2.2.2.1

DATA PACKER PROJECT

Figure 28: Classes Data Packer Project

35

3.1.3.2.2.2.2

PACKER CLASS

This class performs the Conversion of data between list of controls and byte array.

Methods: Pack It converts object to the byte array and serializes the source object then compress the serialized version of source object. byte[] pack(object source)

PackControlsToArray It packs the controls to array. It takes List of controls as input and returns the array of data of type byte.Its signature is byte[]PackControlsToArray(refList ListOfControls)

Unpack Its functionality is opposite to pack method. It takes the source and decompress it and returns the object. Simply, it convert byte array to the object. Its signature is object unpack(byte[] source)

UnpackArrayToControls It unpacks the contents of the tag and converts to specific control on the form. Its signature is void unpackArrayToControls(byte[] data, refList ListOfControls)

36

3.1.3.2.2.2.3

LIST OF CONTROLLER HANDLER CLASS

Figure 29: List of Control Handler

PROPERTIES: Controls SIZEOVER1STPART: It is used when you need to know the status of the memory in use. It tells us whether we are out of memory or we are still within the memory bounds. METHODS: Add: It adds controls to list of controls available in list of control handler. ClearFields: This method clears all the form fields. Its signature is void clearFields()

37

ClearFieldsOtherThanGridView: It clears all the fields other than Data Grid View. Its signature is void clearFieldsOtherThanGridView() DeserialisedListofControls: It de-serializes the list of controls. Its signature is void DeserialisedListofControls(Product p) ListofControlsHandler: It is constructor of the following class. Its signature is ListofControlsHandler() LoadForm: It reads the tag and populate list of controls in the form. Its signature is void LoadForm(ref ReaderWriter .ClassReaderWriter rw) SaveForm: It saves the list of control data in the tag.Its signature is void SaveForm(ref ReaderWriter .ClassReaderWriter rw,byte[] passwordHandlerfirst15values) Teststart: After the call of testStart the data on the form is optimized for memory Overflow.Its signature is void teststart() EVENTS: DataExceeds720: It occurs when data size exceeds 720 bytes. DataFitIn720: It occurs when data size is within 720 bytes.

3.1.3.2.2.2.4

CONVERSION CLASS

It is a Supportive Class for conversion functionalities (Conversion technique applies to following data types). 1. Byte array, string 2. String, string array.

38

Figure 30: Conversion Class

METHODS:BytearrayToString: It converts the given bytes to string. Its signature is staticstring bytearrayToString(byte[] bytes) StringToByte: This method converts string to byte array. Its signature is byte[] stringToByte(string str) ToArrayofStrings: It makes the array of strings. State diagram is drawn in Conversion documentation.Its signature is staticstring[] toArrayofStrings(string stringofcontrols) ToSingleString: It converts the array of string to a single string. Its signature is staticstring toSingleString(string[] dataarray)

3.1.3.2.2.3

WRITING TO & READING FROM TAG

3.1.3.2.2.3.1

TOP LEVEL VIEW

This top level presents bird‟s eye view of process of writing data to tag. The objects of controls of the form is sent to the list of control handler class whose “packer handler” object converts controls of the form to list then it is converted into array byte of data. When we call saveform ( ) function .The information is saved into tag. The

reading

process

is

reverse

of

writing

process.

When

we

call

function

Packerhandler.loadform ( ) .The function UnpackArraytocontrols ( ) converts the array into list of controls and fills the specified fields with desired information.

39

Figure 31: Overview of writing operation

3.1.3.2.2.3.2

SECOND LEVEL VIEW

Second level view presents the process in detail. The controls of the form or the panel of the form is sent as a object to the list of control handler which makes a list of control. This list of control is converted into byte array from list of control. After it the byte array of data is concatenated with the first block which is actually the label of the form. This is done because of identifying the right from to load /save. Then, this byte array is sent to tag and written on the first block of the tag.

Figure 32: Level 2 Writing Operation

40

3.1.3.2.2.3.3

3RD LEVEL VIEW

3rd level view presents the complete picture of the process and elaborates the whole process in detail. The controls of the form1 are passed to list of control handler. The process is described as: 

The controls of the forms i.e., ID Textbox, Name Textbox , dept. Textbox , address Textbox, phone Textbox are sent as a object of form to the list of control handler. Same process can be done by sending the panel of the form to the list of control handler.



List of control handler‟s object “data packer” makes the list of the controls of the form. The reason for making the list is that the size of the array is always static. So, we convert the controls into list to proceed further.



The Lists of controls are converted into arrays of strings named data string using function packer.controlstoarray ( ).



The Lists of controls are concatenated into one single string array.



Compression is performed to reduce the size of the array. It returns the string of controls.



This string of control is converted into byte array of data.



The encryption is performed to secure the data from unauthorized access. The password is added to the byte array of data.



The size of the byte array is concatenated with the array of data using sizer. concatenation ( ) function.



Now, the data is ready to be sent to the tag. Reader Writer class object “rw” write this byte array to tag using the function writedatatotag(first block) .

41

Figure 33: Level 3 Writing Operation

3.1.3.2.2.4

HARDWARE LEVEL IMPLEMENTATION

3.1.3.2.2.4.1

1ST LEVEL VIEW

Figure 34: Hardware Level Writing Operation 1

42

3.1.3.2.2.4.2

2ND LEVEL VIEW

Figure 35: Writing Operation Level 2

3.1.3.2.2.4.3

3RD LEVEL VIEW

Figure 36:Harare Level 3 Writing Operation

3.1.3.2.2.5

USER INTERFACE

There are two applications in the following project. 1-Attendance System 2- Access Control

43

3.1.3.2.2.6

ATTENDANCE SYSTEM

Main interface of attendance system consists of four linked labels. 

Employee



Search and Report



Attendance Sheet



Close

Employee When User clicks on Employee, A new window opens. It contains the four fields named as 

Employee ID



Name



Dept.



Address



Phone

This section designed to write the aforementioned fields into the RFID tag and to store the database about the employee in the main frame system. When the user click on the Label named “Write data on tag”, The data written in the fields is written on the tag.ID field is uniquely assigned to each employee. When User clicks on Save Button, the data written in the fields is saved in the database of the system. User can easily delete the record of any employee by clicking on “Delete” button. User can also navigate the records of the employees by clicking arrow shaped button of navigator. The “Plus” sign is used to add a new record in the database or in the tag.

Figure 37: Employee Interface

44

Attendance Sheet When User clicks on Attendance Sheet Label, It opens a new window named as “Attendance Sheet”. It containstwo tables, one Tag label and an analog clock. When the reader identifies the tag, the tag id is displayed in the field of “Tag Number”. The Table named “Employee in The Department” contains the following field. 

Employee ID



Name



Department



Entrance Time



Duration

As the employee enters the department, the reader identifies the tag and the fields of this table corresponding to that employee get populated with the information stored in the tag and also the entrance time. When the employee leaves the department at specified time, the table named “Attendance Sheet” gets populated with the information about the employee. The following table contains the following information. 

ID



Employee Name



Department



Entrance Time



Leave Time

Now, the attendance of the employee is marked and his entrance and leaving time are also stored along with his name, department and employee id.

45

Figure 38: Attendance Sheet

Search and Report When user clicks on the “Search and Report”, a new window opens in which the user can easily track the attendance record of the specific employee. This section generates the reports on the attendance record of the employees.

Figure 39: Search & Report

46

3.1.3.2.2.7

ACCESS CONTROL

Access control interface contains two data grid view. One for Employees who are allowed to access or enter in the department and other data grid view is for who are not allowed to enter the premises of the department and beeps buzzer indicating that unauthorized person is trying to enter the department. The beep alerts the security guard to take action against it. Access Control shares the same data base that is being used by the Attendance record and employee record. Access Control may also allow the user to make any of the employees unauthorized and avoids his access to the specific field. The attendance of the unauthorized person would not be marked. It would also be indicated by the Attendance Sheet.

Figure 40: Access Control Interface

47

4 RESULTS AND DISCUSSIONS 4.1. INTRODUCTION Testing is one of the important and foremost tasks to check the correctness of the functions and working. Firstly, testing was performed to check the functionality of the Reader Writer classes, data packer classes and other supporting classes. The results were found good. Unit testing was performed on each function of the project then collective testing was also performed to assess the performance as a whole. Result was found according to our inclination. We divided the testing into two parts. First part checks the attendance system and other part checks the access control. Here, we are presenting user interface testing.

4.2. PROGRAM DEBUGGING Debugging is a methodical process of finding and reducing the number of bugs, the defects, in a computer program or a piece of electronic hardware thus making it behave as expected. The code was compiled in visual studio and debugged using its own tools like break points; watch etc. to check the flow of the program. We dynamically created the objects of the classes and checked the functionality of its methods as shown in the figure.

Figure 41: Object Test Bench

48

Figure 42: Invoking Method

Figure 43: Method Call Result

As we started translating specifications into coding. Meanwhile we started debugging the programs as smaller units. One of us used to perform exhaustive testing to point out the errors. It was one of the most difficult we faced. Especially many problems occurred when we began to debugged data packer class where handling the list controls was a challenge for us and keeping the size of the data as minimum as we can. To remove many errors, we used finite automata to solve the logical errors. One by one we tested the classes by writing small amount of information to tag and to retrieve from the tag and move further to integrate different classes and got their results. After examining the results, we modified the source code to meet our requirements. In the end, as a whole, we found the programs approximately error free.

4.3. INTERFACE TEST We start with Attendance system. When we click on the icon of the software .It opened a main window where first we clicked on the “Employee”. As it opened, it was clear with no record as shown in the figure.

49

Figure 44: Employee Interface

When we click on the “plus” Sign button. So, we entered the record of the employee and entered the record i.e. ID, Name, Dept.,

Address and Phone and clicked on the “Save” icon. The record was

saved successfully and so on and one by one after entering the record. When we click on “Write data on tag”, the data was transferred to tag and stored in it successfully by showing the message box having message “Information Saved”. We clicked on the “Delete” button, the record saved of particular employee was deleted.

Figure 45: Checking Employee Interface

When we click on the “Attendance Record” on the main panel of the software. It opened a new window named as Attendance Record as shown in the figure. 50

Figure 46: Attendance Record Interface

Initially, it contains empty tables. When we bring the tag in the interrogation area of the reader. It filled the entry in the table named as “Employee in the Department” and tag number was also shown on the window in front of “Tag Number.”

Figure 47: Testing Attendance Record

51

When we again bring the same tag after some time. It shifts the record to attendance sheet where his/her id, name, department, entrance and leaving time were saved. We performed it several time and got the desired results.

Figure 48: Testing Attendance Record

Then, we began to test the “Search and Report Section” by clicking it main interface of the software. It showed the list of the employees who entered and left the department and their corresponding timings accordingly.

52

Figure 49: Testing Search and Report Section

In the last, we began to test the Access Control Interface. We make some employees unauthorized, then as we brought near those tags, It beeps buzzer to alert the security guard. Fake cards were easily detected as unauthorized because information pattern of the card, did not match with the interface of the software.

53

Figure 50:Access Control Testing

4.4. TEST RESULT After an exhaustive testing, the individual results are combined. On the basis of test results it can be said that the results are satisfactory.

54

5. CONCLUSION AND RECOMMENDATIONS 5.1. CONCLUSION A recent development in technology allows many things to be done automatically and this includes the automation of attendance taking and controlling the access. The Implementation of RFID in attendance taking and Access control and the objectives stated on previous sections have been achieved. The RIFD based attendance system able to store the employee/student data in the main frame data base and on the tag as well. The system can also uniquely identify the employee/student based on the assigned ID and name stored inside the tag. The process of tracking the absentees was also done properly by the system. The unauthorized access has been avoided with the help of RFID based Access Control. The main interface and sub interfaces are checked properly and verified. This system is portable with other scenarios. The portability of the system allows it to be placed on every type of class rooms and offices.

5.2. PROBLEMS There are several problems noticed in the development of RFID based Access Control & Attendance System. The first one is that the RFID Reader Writer used doesn‟t support long range scanning. Thus, students/employees need to place his/her tag near the RFID reader. This could be a problem if there are many students attending a class because they have to take turn placing their card on the RFID reader. The database of the student/employee is stored on the main frame computer. So, main frame computer should always be working to store the data. The electricity outage can cause a major threat to the working of the system. The tag theft and its usage by the intruder is also a challenge for it. If it does, then it would be difficult for the system to track that one. In RFID based attendance system, lecturer still need to come to mainframe computer to check the record of the particular student/employee. Thus, some hand held RFID reader having capability to show the record of the specific student is also required to facilitate the lecturer. For Access Control , it would be far better if the RFID reader read the tag from a long distance to make the decisions in terms of intruder‟s inclusion. So, long range RFID reader will be appropriate for main entrances of the institutions.

5.3. RECOMMENDATIONS Based on the problems stated on the previous section, this part will explain a method or improvement that can be made on the system in order to tackle the problems. 55

5.3.1. HARDWARE IMPROVEMENT By replacing the RFID reader with long range reader, the process of scanning and identifying can be done automatically without requiring students/employees to put his/her tag on the RFID reader. Besides that, it can also increase the portability of the system as it can be placed literally any place in its range of reading. The main frame system can be replaced by laptop assisted with battery backup. So, the electricity outage harms can be minimized. For authentication of the visitor, the handheld RFID readers can also be used to track the visitors. Our system identifies only one tag at a time, this problem can be solved by using RFID reader having capability of identifying more than 25 tags at a time without any collision. The RFID Access Control system can be made more effective if CCTV camera, Intrusion detection systems are also installed along with it to assist it. The image can also be stored in the tag to help the security officers to identify the person easily.

5.3.2. SOFTWARE IMPROVEMENT An interface between the system and other networked systems can also be developed so that the maintenance and editing can also be done easily. Lastly, a communication between the system to the internet or LAN via TCP/IP can also be developed in RFID Access Control and attendance system so that it allows the security in-charge to be notified about the unauthorized access and allows the lecturer to be notified of the absentees in her/his class room via e-mail and other kind of messaging using internet.

56

REFERENCES 1- Wrox.Beginning.Microsoft.Visual.C.Sharp.2008.May.2008 2- RFID-Handbook-Fundamentals-and-Applications second edition by Klaus Finkenzeller 3- Cambridge.Press.RFID.Technology.and.Applications.Jun.2008 Edited By Stephen B. Miles , Sanjay E. Sarma and John R. Williams 4- RFID Source Book by SandipLahiri ,Publisher: Prentice Hall PTRISBN: 0-13-185137-3 5- RFID Based Monitoring and Access Control System by Filipie Lourenco and Carlos Almeida 6- Francisco Silva, Vctor Filipe and AntnioPereira.Automatic Control of students attendance in class rooms using RFID. The Third International Conference on Systems and Networks Communications .Silema, Malta. 2008. 7- Wikipedia, RFID radio Frequency identification. URL:http://en.wikipedia.org/wiki/Radio-frequency_identification 8- Wikipedia , Finger Print .URL: http://en.wikipedia.org/wiki/Finger_print 9- Wikipedia,Barcode. URL : http://en.wikipedia.org/wiki/Barcode

57

B1