You are on page 1of 62

A PROJECT REPORT

ON
RFID BASED ATTENDENCE SYSTEM USING GSM

Submitted by
RAM BHAROSH RAUT
GHANSHYAM KUMAR
LOKESH MEHLAWAT
RAHUL BISHNOI

Under the Guidance of

Mr RAVI GOEL
ASSISSTANT PROFESSOR

in partial fulfilment for the award of the degree of


BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND COMMUNICATION ENGINEERING

Faculty of Engineering & Technology


Manav Rachna International University, Faridabad
MAY, 2014
Acknowledgement

We would like to express our sincere gratitude to our project guide “Mr RAVI GOEL” for
giving us the opportunity to work on this topic. It would never be possible for us to take this
project to this level without her innovative ideas and his relentless support and encouragement.

1. RAM BHAROSH RAUT 10/FET/EC(S)/2102


2. GHANSHYAM KUMAR 10/FET/EC(S)/2100
3. LOKESH MEHLAWAT 10/FET/EC(S)/2095
4. RAHUL BISHNOI 10/FET/EC(S)/2082

I
Declaration

I hereby declare that this project report entitled “RFID BASED ATTENSENCE SYSTEM
USING GSM” by RAM BHAROSH RAUT 10/FET/EC(S)/2102, GHANSHYAM KUMAR
10/FET/EC(S)/2100, LOKESH MEHLAWAT 10/FET/EC(S)/2095, RAHUL BISHNOI
10/FET/EC(S)/2082being submitted in partial fulfilment of the requirements for the degree of
Bachelor of Technology in ECE under Faculty of Engineering & Technology of Manav Rachna
International University Faridabad, during the academic year 2010 - 2014 is a bonafide record of
our original work carried out under guidance and supervision of Mr RAVI GOEL, , Professor ,
ECE DEPARTMENT and has not been presented elsewhere.

1. RAM BHAROSH RAUT 10/FET/EC(S)/2102


2. GHANSHYAM KUMAR 10/FET/EC(S)/2100
3. LOKESH MEHLAWAT 10/FET/EC(S)/2095
4. RAHUL BISHNOI 10/FET/EC(S)/2082

II
Manav Rachna International University, Faridabad
Faculty of Engineering & Technology
Department of ECE

Certificate
This is to certify that this project report entitled “RFID BASED ATTENDENCE
SYSTEM USING GSM” by RAM BHAROSH RAUT (10/FET/EC(S)/2102),
GHANSHYAM KUMAR(10/FET/EC(S)/2100), LOKESH MEHLAWAT
(10/FET/EC(S)/2095), RAHUL BISHNOI (10/FET/EC(S)/2082), submitted in
partial fulfilment of the requirements for the degree of Bachelor of Technology in
ELECTRONICS AND COMMUNICATION ENGINEERING under Faculty of
Engineering & Technology of Manav Rachna International University Faridabad,
during the academic year 2010-2014, is a bonafide record of work carried out under
my guidance and supervision.

Mr Ravi goel
Assistant Professor
Faculty of Engineering & Technology
Manav Rachna International University, Faridabad

Dr Dipali Bansal
HOD ECE

III
TABLE OF CONTENTS

Acknowledgement I

Declaration II

Certificate III

Table of Contents IV

List of Figures V

List of Tables VI

Abstract VII

Chapter Page No

I. Introduction 1-6

1.1 Introduction
1.2 Goals and Objectives
1.3 Overview of the technical area
1.4 AT89c51 microcontroller
1.5 Overview of the report

II. Literature Review 7-10

2.1 Introduction
2.2 Systems performance
2.3 Survey
2.4 Conclusion

IV
III. Problem Definition and Requirement Analysis 11-14

3.1 Problem Definition


3.2 Requirements

IV. Design and Implementation 15-21

4.1 Introduction
4.2 Functional Decompositions
4.3 Different Design Options
4.4 CKT Design using Microcontroller

V. Testing and Deployment 22

5.1 Verification
5.2 Validation
5.4 Evaluation

VI. Conclusion and Future Enhancements 23


6.1Summary of work done
6.2 Proposal/scope of future enhancement

References 24
Appendix 25

V
LIST OF TABLES

Table Page No

1 LCD PIN DESCRIPTIONS 21

VI
LIST OF FIGURES

Figure Page No

1 RFID SYSTEM 1
2 BLOCK DIGRAM 2
3 PIN DIAGRAM OF MC 5
4 RFID TAG SYSTEM 7
5 RFID TRANSMISSION TECHNIQUE 8
6 CKT DIAGRAM OF PROJECT 16
7 CRYSTAL OSCILLATOR CKT 20
8 CKT DIAGRAM OF LCD 21

VII
ABSTRACT

Nowadays, due to the easy availability of almost all information on the internet these days,
students are less motivated to attend the lecture. This project is to simplify attendance recorder
system by using Radio Frequency Identification (RFID) technology. RFID based Parent SMS
Alert and Attendance System is a web based application that will be developed to overcome this
problem. With the RFID kit, the system will be developed by using .NET technology and
database support. The systems also have integrated with the RFID Database Handling System for
a fully functional system. The information from RFID Database handling System will be used
for attendance and for SMS Alert also. The RFID based Parent SMS Alert and Attendance
System also interacts with parents using SMS system. Therefore, the system functionality is not
only records the student attendance, but also sends alert SMS to their parents. Basically
attendance is manually done and record is maintained in files. Our main idea of approach is to
reduce manual work and to automate the attendance system The attendance system is basically
an embedded one. Embedded stands for hardware controlled by software. Here, the software
using a Microcontroller controls all the hardware components. The microcontroller plays an
important role in the system. The main objective of the system is to uniquely identify and to
make attendance for a person. This requires a unique product, which has the capability of
distinguishing different person. This is possible by the new emerging technology RFID (Radio
Frequency Identification).
The main parts of an RFID system are RFID tag (with unique ID number) and RFID reader (for
reading the RFID tag). In this system, RFID tag and RFID reader used are operating at 125 KHz.
The EEPROM used for storing the details has the capability of storing 256 person details at a
time. The PC can be used for restoring all the details of attendance made. This report provides a
clear picture of hardware and software used in the system. It also provides an overall view with
detailed discussion of the operation of the system.

VIII
CHAPTER 1

1.1 INTRODUCTION

The attendance system is basically an embedded one. Embedded stands for ‘hardware controlled
by software’. Here, the software using a Microcontroller controls all the hardware components.
The microcontroller plays an important role in the system. The main objective of the system is to
uniquely identify and to make attendance for a person. This requires a unique product, which has
the capability of distinguishing different person. This is possible by the new emerging
technology RFID (Radio Frequency Identification). The main parts of an RFID system are RFID
Tag (with unique ID number) and RFID reader (for reading the RFID tag). In
this system, RFID tag and RFID reader used are operating at 125KHz. The EEPROM used for
storing the details has the capability of storing 256 person details at a time. The PC can be used
for restoring all the details of attendance made.

Fig -1 RFID system

In this particular project we show that how we provide a advance attendance system with time
management system. In this project we use one hardware circuit with RF reader interface and RF

1
passive card for attendance system. RF reader system is connected to the PC via COM port. We
install visual basic base GUI software in the computer with data base in access. Whenever we
show any card to the hardware system then reader gets the data of RF card with the help of 125
KHz frequencies. Reader gets the data and transfers this data to MCU (89s52). Microcontroller
immediate processes this data and transfers this data to the PC via com port. PC gets this data
and compares the data with data base in access. In data base we already register the Passive card
code number with ID number. For every card we issue a special ID number. In this software we
use RTC time interface. In the data base system we enter the in/out for entry. If the employee
show his card before time then computer show a present, but same card exit the premises before
time then same data base is store as absent. Every time when we show the card to the RF reader
then LCD connected with the microcontroller show its name. If the card is not registered with
the data base then LCD display show a sorry message. We register the new card entry with
software any time. In/out timing for entry is also to be change in data

We can also resonators instead of costly capacitor can be avoided. But the frequency of the
resonators varies a lot. And it is strictly not advised when used for communications projects
base.

Fig -2 Block diagram

2
RFID, which is an acronym for Radio Frequency Identification, is not a new technology. It was
first used in the late 1960's, but it has only become more widespread with advances in
technology. RFID Systems consist of a transponder, also known as a tag, which is basically a
microchip connected to an antenna. The tag is mounted to an item, such as a pallet of goods in a
warehouse, and a device called a reader communicates with the tag via radio waves. Depending
on the type of tag that is used, the reader can receive detailed information or it can receive data
as simple as an identification number. RFID is similar to barcode systems in which data, such as
a price, is accessed when the barcode is read .

1.2 Goal and Objectives:


The aim of the project is to utilize RFID system in a different and developmental side. We all
know that RFID is used in each and every industrial and manufacturing field. Our major focus is
to utilize this tool towards the residents and commercial users especially the old and disabled
ones. This form of system is called RFID based attendance system which focuses on making it
possible for the elderly and disabled to remain at school, safe and comfortable. Attendance
system is becoming a viable option for the elderly and disabled who would prefer to stay in the
comfort of their homes rather than move to a healthcare facility.

1.3 Overview of the technical area


We are expressing this development tool as an example to illustrate how this RFID system thing
can be invested for future. We are going to show this large scale automation on small scale via
PCB (Printed Circuit Board) manufacturing respectively. On PCB we will attach components
that are required to provide an example of automation. These components soldered onto PCB
will function in such a way to illustrate RFID system. Over and above this is the fundamental or
basic step to illustrate RFID system to our viewers.

1.4 AT89c51 Microcontrollers

The series is an Intel8051-compatible family of 8 bit microcontrollers (µCs) manufactured by


the Atmel Corporation. Based on the Intel 8051 core, the AT89 series remains very popular as
general purpose microcontrollers, due to their industry standard instruction set, and low unit cost.

3
This allows a great amount of legacy code to be reused without modification in new applications.

While considerably less powerful than the newer AT90 series of AVR RISC microcontrollers,
new product development has continued with the AT89 series for the aforementioned
advantages. More recently, the AT89 series has been augmented with 8051-cored special
function microcontrollers, specifically in the areas of USB, IC(two wire
interface), SPI and CAN bus controller While AT89C51 has two timers (Timer0 & Timer1),
AT89C52 also has Timer2. Corresponding to Timer2, there are extra SFRs (Special Function
Registers) T2CON & T2MOD. Also there are registers RCAP2H & RCAP2L to configure 16 bit
Capture & Auto-reload modes of Timer2.

Features

Compatible with MCS-51™ Products

4K Bytes of In-System Reprogrammable Flash Memory

Endurance: 1,000 Write/Erase Cycles

Fully Static Operation: 0 Hz to 24 MHz

Three-Level Program Memory Lock

128 x 8-Bit Internal RAM

32 Programmable I/O Lines

Two 16-Bit Timer/Counters

Six Interrupt Sources

Programmable Serial Channel

Low Power Idle and Power Down Modes

4
Low-power, high-performance CMOS 8-bit microcontroller with 8KB of ISP flash memory. The
device uses Atmel high-density, nonvolatile memory technology and is compatible with the
industry-standard 80C51 instruction set and pin out. On-chip flash allows the program memory
to be reprogrammed in-system or by a conventional nonvolatile memory programmer. This
powerful microcontroller is suitable for many embedded control applications.
8051 is the name of a big family of microcontrollers. The device which we used in our project
was the 'AT89S52' which is a typical 8051 microcontroller manufactured by Atmel™. The block
diagram provided by Atmel in their datasheet that showed the architecture of 89S52 device
seemed a bit complicated. A simpler architecture can be represented below.

Fig -3 Pin diagram of microcontroller

5
1.5 Overview of the report

As mentioned above that we are providing an example to display one kind of automation.
Throughout this report will cover the complete package towards the introduction to RFID
system, example to display RFID based attendance system on PCB(s), components required to
build the same system, components declaration, definition and explanation. Over and above we
are covering all the technical topics which are associated with this major project. We hope that
after reading this project report readers will be benefited and will build smart home system for
better future. This project report comprises simple English and therefore nontechnical
background or people who are unaware of RFID based attendance system using GSM will be
benefited of the boons of this technology that is touching lives everywhere. This project report
will be beneficial to not only the technical pupil but also to nontechnical friends. The report will
cover firstly the introduction of student particulars like certificate, declaration etc. After that
introduction section is present in which we have laid our best efforts to make you understand
what RFID based attendance system using GSM is.
Aftermath consists of goals and objectives, motivation, overview of technical area and report.
Then literature review is available in which elaboration of RFID based attendance system using
GSM is written. The next sections are problem solving and design implementation. After design
implementation testing & deployment, conclusion and future enhancements will be covered.
References and Bibliography will be available on the later part of the project report. Special
section of appendix is also there in the report in order to gain extra and trivial knowledge
regarding the project. We hope that this content will be sufficient enough to make you
understand and have better ideas towards RFID based attendance system using GSM. At last of
the overview we hope that after these coverage readers who knew earlier regarding the same will
be more technical and unaware will become aware of the RFID based attendance system using
GSM. This is a small seed that we have sown into the ground to illustrate you how small things
will become and count big in the long term. After all PCB implementation will motivate you to
control your home, office, and living environment very easily and accordingly. At last thanks for
your attention till kindly follow the literature part now.

6
CHAPTER 2

2.1 INTRODUCTION

It is predicted that RFID use will continue to increase. It is unlikely to ever be as cost-effective
as barcoding, but it will become dominant in areas where barcoding and other optically read
technologies are not effective. RFID Tag Categories The basic types of RFID tags can be
classified as read/write and read only. The data stored on read/write tags can be edited, added to,
or completely rewritten, but only if the tag is within the range of the reader. The data stored on a
read only tag can be read, but cannot be edited in any way. Read/write tags are much more
expensive than read only tags, so they are not used for tracking most commodity items. RFID
tags are further categorized as: Active tags, which contain a battery that powers the microchip
and allows it to transmit a signal to the reader. Semi-active (or semi-passive) tags, which contain
a battery to run the circuitry of the chip, but must draw power from the magnetic field created by
the reader in order to communicate with the reader. Passive tags, which rely solely on the
magnetic field created by the radio waves sent out by the reader to create a current that can be
received by the antenna within the passive tag. RFID Construction RF-ID Technology Overview

A RF-ID reader sends out a radio frequency wave to the 'Tag' and the 'Tag' broadcasts back its
stored data to the reader. The system works basically as two separate antennas, one on the 'Tag'
and the other on the reader.

Fig -4 RF-ID tag system

7
The data collected from the 'Tag' can either be sent directly to a host computer through standard
interfaces, or it can be stored in a portable reader and later uploaded to the computer for data
processing. The automatic reading and direct use of the 'Tag' data is often called 'automatic data
capture' and with a RF-ID tag system, which works just as effectively in environments with
excessive dirt, dust, moisture and poor visibility, you can be assured that it overcomes the
limitations of other automatic identification approaches.

How the Low Frequency Tag system works

When the transponder, which is battery free, is to be read, the reader sends out a 134.2 KHz
power pulse to the antenna lasting approximately 50ms. The magnetic field generated is
'collected' by the antenna in the transponder that is tuned to the same frequency. This received
AC energy is rectified and stored on a small capacitor within the transponder. When the power
pulse has finished the transponder immediately transmits back its data, using the energy stored
within its capacitor as its power source.
In total 128 bits are transmitted (including error detection information) over a period of 20ms.
This data is picked up by the receiving antenna and decoded by the reader unit. Once all the data
has been transmitted the storage capacitor is discharged resetting the transponder to make it
ready for the next read cycle. The period between transmission pulses is known as the 'sync time'
and lasts between 20ms and 50ms depending on the system setup.

Fig 5 RFID transmission technique used between the transponder and the reader

8
The transmission technique used between the transponder and the reader is Frequency Shift
Keying (FSK) with transmissions between 134.2kHz and 124.2kHz. This approach has
comparatively good resistance to noise while also being very cost effective to implement.

2.2 System Performances

Reading Distance - one of the key benefits of the TIRIS system is its superior reading range with
low power consumption. The actual reading distance that can be achieved depends on many
factors, transponder type, electromagnetic noise, transponder orientation, antenna type, and
government regulations. In general a standard 32mm glass capsule can be read with a stationary
reader and a gate antenna from a distance of up to 1 meter Larger transponders can achieve
ranges up to 2 meters with handheld readers offering lower ranges up to 250mm.
Data Accuracy The TIRIS system uses a 16-bit Cyclic Redundancy Check algorithm (CRC-
CCITT) which ensures that only 'valid' data is sent from the reader to its associated controller. To
date there have been no cases of an incorrect identification number being read from a
transponder.
Antenna Selection Of the two standard antenna types (ferrite rod and gate) the larger gate
antennas give the best reading range. Although in some environments an overall better
performance can be achieved with smaller antennas.
Each antenna has its own specific 'readout pattern' i.e. the electromagnetic field emanating from
the transponder during its reply stage. The shape and size of this pattern depends on the specific
readout antenna selected and a country's government regulations that define the amount of
electromagnetic field strength that can be generated. Electromagnetic noise in the environment
can also affect readout ranges.
Transponder Orientation The orientation of the transponder with respect to the antenna also
impacts the reading range. For maximum range the orientation of the antenna with respect to the
transponder must be optimized to achieve maximum coupling.

2.3 Surveys

As we all know that RFID based attendance system using GSM is the demand of the hour and is
used in hotels, hospitals, office environments, homes, workshops, campuses, universities etc. The

9
project we are building is the miniature from of automation used nowadays. The components
utilized and soldered on PCB are of sufficient parameters compared to large scale automation.
This same smart home project that we have built by our own knowledge and experience on
purchasing from a manufacturing shop or Engineering project selling shop will cost you Rs 7000
to 8000 /- INR excluding their additional charges. These shops vendors can plant electronic
components on the PCB of low cost but on the paper they will show you a terrific cost. We
searched on Internet, roamed into the markets in our quest to have an acknowledgment of the
required components and PCB(s). We build the same project on our own which one can purchase
after paying an unreasonable cost to the vendor.

2.4 Conclusions
The conclusion is that RFID based attendance system using GSM is not as complex as it sounds.
It is much easier, friendly and fun to implement. Any individual can purchase the electronic
components listed in the later section of report and can solder it on a PCB to view the example of
automation. RFID based attendance system using GSM aims at making our lives automatic
rather than manual. After reading this we request to build a same project as we did to
demonstrate smart home system. The first step is to purchase all the required components from a
component selling shop and then solder it to burn a program into the microcontroller.
After burning the program into the microcontroller the project will work automatically.
The output will be displayed by yellow colored LEDs. The 4 LEDs will correspond to the
particular extension port of the power strip attached. User can plug in any electrical appliance
like mobile phone charger, table fan, or any other circuit like Digital Visitor Counter also. User
can plug out any electrical appliance corresponding its indicating LED also. These operations
can simultaneously take place through transferring SMS to the 89S52 Microcontroller
respectively.

10
CHAPTER 3

3.1 Problem Definition


As starts the real problem is now what we have to build on our PCB. What are the electronic
components required, what is the software used to build and how to burn the program into our
brain i.e. microcontroller such that our problem gets solved. First of all the need is to memorize
the definition of RFID based attendance system using GSM back again one more time i.e. to
build one room having appliances controlled automatically rather than manually. The
components, PCB(s), burner, software etc need to be assembled in such a way that our goal to
achieve smart hone built on a PCB is done.
3.2 Requirements

The requirements include both hardware and software parts respectively. Down under are the
components specified:-

1) AT command supporting GSM mobile phone


2) 89S52 microcontroller
3) Max 232 IC
4) Voltage regulator 7805
5) GSM Modem
6) Electrolytic capacitors
7) Resistors
8) Crystal Oscillator
9) Pull Up resistor
10) Transistors
11) Power strip
12) LCD and LEDs
13) Connecting Wires

Software required to burn program into the 89S52 microcontroller is Keil u-Vision 3.0.
System specifications include the elaboration of hardware and software components used in the
11
project.

1) AT commands supporting GSM mobile phone

AT commands are used to control MODEMs. AT is the abbreviation for Attention.


These commands come from Hayes commands that were used by the Hayes smart
modems. The Hayes commands started with AT to indicate the attention from the
MODEM. The dial up and wireless modems (devices that involve machine to machine
communication) need AT commands to interact with a computer. These include the
Hayes Command set as a subset, along with other extended AT commands.

2) 89S52 microcontroller

AT89C52 is an 8-bit microcontroller and belongs to Atmel's 8051 family. AT89C52 has
8KB of Flash programmable and erasable read only memory (PEROM) and 256 bytes of
RAM. AT89C52 has an endurance of 1000 Write/Erase cycles which means that it can
be erased and programmed to a maximum of 1000 times. Though very slight difference
between the features of AT89C51 and AT89C52, they are very similar in their pin
configurations* and operations.
3) Max 232 IC
The MAX232 is an IC, first created in 1987 by Maxim Integrated Products, that converts
signals from an RS232 serial port to signals suitable for use in TTL compatible digital
logic circuits.

4) Voltage regulator 7805

7805 is a voltage regulator integrated circuit. It is a member of 78xx series of fixed


linear voltage regulator ICs. The voltage source in a circuit may have fluctuations and
would not give the fixed voltage output. The voltage regulator IC maintains the output
voltage at a constant value. The xx in 78xx indicates the fixed output voltage it is
designed to provide. 7805 provides +5V regulated power supply. Capacitors of suitable
values can be connected at input and output pins depending upon the respective voltage
levels.

12
5) GSM Modem

This GSM Modem can accept any GSM network operator SIM card and act just like a
mobile phone with its own unique phone number. Advantage of using this modem will
be that you can use its RS232 port to communicate and develop embedded applications.
Applications like SMS Control, data transfer, remote control and logging can be
developed easily.

6) Resistors

A resistor is a passive two terminal electrical component that implements electrical


resistance as a circuit element. Resistors act to reduce current flow, and, at the same
time, act to lower voltage levels within circuits. Resistors are common elements
of electrical networks and electronic circuits and are ubiquitous in electronic equipment.

7) Crystal Oscillator

A Crystal Oscillator is an electronic oscillator circuit that uses the mechanical resonance
of a vibrating crystal of piezoelectric material to create an electrical signal with a very
precise frequency.

8) Pull Up Resistor

Pull up Resistor are used in electronic logic gates to ensure that inputs to logic systems
settle at expected logic levels if external devices are disconnected or high impendence is
introduced. Pull up resistor are used to solve the dilemma for the microcontroller by
pulling the value to logic high state Pull up resistors are resistors which are used to
ensure that a wire is pulled to a high logical level in absence of an input signal.

9) Transistors

A transistor is a semiconductor device used to amplify and switch electronic signals and
electric power. It is composed of semiconductor material with at least three terminals for
connection to external circuit. If base is of N-type and emitter and collector are of P-type

13
then transistor is called P-N-P transistor and vice versa transistor is called N-P-N
transistor.

10) Power strip

A Power strip is a block on the end of a power cable with a number of sockets usually 3
or more often arranged in a line.

11) LCD & LEDs

LCD is the most common device attached to a microcontroller. Some of the most
common LCDs connected are 16*2 and 20*2 displays. This means 16 characters per line
by 2 lines and 20 characters per line by 2 lines. LED is basically a P-N junction diode
particularly designed to emit visible light. The LEDs are available in red, green and
yellow colors.

12) Connecting wires

Connecting wires are required for assembling these components on the PCB.

Specification of Software used in this project

Keil Micro vision software is used developing and compiling program in this project. Program is
first compiled in Keil and then burned into microcontroller.

14
CHAPTER 4

4.1 Introduction
As discussed in the previous section all the components required will be assembled right
now to design and implement our project. A Solder, soldering wire and solder holder will
be required to assemble these components according to the circuit diagram listed below. In
addition Keil Micro vision software, a burner kit should be made available to achieve
designing and implementation. Many times we wonder if all the devices can be
automatically switched on or off at a particular time.
4.2 Functional Decompositions
In our major project on RFID based attendance system using GSM we divided the
workload into 3 major categories. I, Ram bharosh raut was responsible for innovating new
ideas into the project and planning & implementation of project. Lolesh mehlawat was
implementing microcontroller applications. Rahul bhisnoi and ghanshyam Kumar played
the role of monetary and meeting financial needs.
4.3 Different Design Options
RFID based attendance system using GSM can be developed accordingly using variety of
technologies. It can be developed using Bluetooth technology, GSM technology, RTC
model which also can be used, Home automation protocol (HAP) etc. There are different
design options available in the world to develop ASHS. However we are using ASHS
towards old people we selected RTC method as it is convenient to them.
4.4 Circuit design
The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K
bytes of in-system programmable Flash memory. The device is manufactured using
Atmel’s high-density non-volatile memory technology and is compatible with the industry-
standard 80C51 instruction set and pin out. The on-chip Flash allows the program memory
to be reprogrammed in-system or by a conventional non-volatile memory pro-grammar. By
combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip,

15
the Atmel AT89S52 is a powerful microcontroller, which provides a highly flexible and
cost-effective solution to many, embedded control applications. The AT89S52 provides the
following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog
timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt
architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the
AT89S52 is designed with static logic for operation down to zero frequency and supports
two software selectable power saving modes. The Idle Mode stops the CPU while allowing
the RAM, timer/counters, serial port, and interrupt system to continue functioning. The
Power-down mode saves the RAM con-tents but freezes the oscillator, disabling all other
chip functions until the next interrupt.

Figure-6 Circuit diagram of RFID based attendance system using GSM

In this particular project we use 89s52controller to interface all input and output devices. With
the help of this project we can on/off up to 4 different appliances with the help of different sms
format. We use 5 volt regulated supply for the LCD display and max 232 IC. For this purpose we
use 7805 regulator with filter capacitor to provide a ripple free regulated voltage to controller

16
and LCD display. We use MAX232 driver IC to provide an interface between GSM modem and
controller. MAX 232 IC converts the rs232 logic to TTL logic. Output of the max 232 is directly
connected to the RX pin of the controller. Pin no 18 and 19 of the microcontroller is connected to
external crystal oscillator to provide an external clock to microcontroller by which we set the
machine cycle of the controller.
Power Supply

In this project we use one 5 volt regulated power supply to convert the 220 volt ac in to 5 volt
dc with the help of the 5 volt regulator circuit. First OF all we step down the 220 volt ac into 6
volt ac with the help of step down transformer. Step down transformer step down the voltage
from 220 volt ac to 9 volt ac. This ac is further converted into the dc voltage with the help of the
full wave rectifier circuit. Output of the diode is pulsating dc. So to convert the pulsating dc into
smooth dc we use electrolytic capacitor. Electrolytic capacitor converts the pulsating dc into
smooth dc. This Dc is further regulated by the IC 7805 regulator. IC 7805 regulator provide a
regulated 5 volt dc to the microcontroller circuit and LCD circuit. Pin no 40 of the controller is
connected to the positive supply. Pin no 20 is connected to the ground. Pin no 9 is connected to
external resistor capacitor to provide an automatic reset option when power is on.

Reset Circuit

Pin no 9 of the controller is connected to the reset circuit. On the circuit we connect one resistor
and capacitor circuit to provide a reset option when power is on. As soon as you give the power
supply the 8051 doesn’t start. You need to restart for the microcontroller to start. Restarting the
microcontroller is nothing but giving a Logic 1 to the reset pin at least for the 2 clock pulses. So
it is good to go for a small circuit which can provide the 2 clock pulses as soon as the
microcontroller is powered. This is not a big circuit we are just using a capacitor to charge the
microcontroller and again discharging via resistor. In general, at the input of the power supply,
there is a power transformer. It is followed by a diode circuit called Rectifier. The output of the
rectifier goes to a smoothing filter, and then to a voltage regulator circuit. The rectifier circuit is
the heart of a power supply.

17
Rectification circuit

Rectification is a process of rendering an alternating current or voltage into a unidirectional one.


The component used for rectification is called ‘Rectifier’. A rectifier permits current to flow only
during the positive half cycles of the applied AC voltage by eliminating the negative half cycles
or alternations of the applied AC voltage. Thus pulsating DC is obtained. To obtain smooth DC
power, additional filter circuits are required. A diode can be used as rectifier. There are various
types of diodes. But, semiconductor diodes are very popularly used as rectifiers. A
semiconductor diode is a solid-state device consisting of two elements is being an electron
emitter or cathode, the other an electron collector or anode. Since electrons in a semiconductor
diode can flow in one direction only-from emitter to collector- the diode provides the unilateral
conduction necessary for rectification. Out of the semiconductor diodes, copper oxide and
selenium rectifier are also commonly used.

Bridge Rectifier

A more widely used full-wave rectifier circuit is the bridge rectifier. It requires four diodes
instead of two, but avoids the need for a centre-tapped transformer. During the positive half-
cycle of the secondary voltage, diodes D2 and D4 are conducting and diodes D1 and D3 are non-
conducting. Therefore, current flows through the secondary winding, diode D2, load resistor RL
and diode D4. During negative half-cycles of the secondary voltage, diodes D1 and D3 conduct,
and the diodes D2 and D4 do not conduct. The current therefore flows through the secondary
winding, diode D1, load resistor RL and diode D3. In both cases, the current passes through the
load resistor in the same direction. Therefore, a fluctuating, unidirectional voltage is developed
across the load.

Filter Circuit

The rectifier circuits we have discussed above deliver an output voltage that always has the same
polarity: but however, this output is not suitable as DC power supply for solid-state circuits. This
is due to the pulsation or ripples of the output voltage. This should be removed out before the
output voltage can be supplied to any circuit. This smoothing is done by incorporating filter
networks. The filter network consists of inductors and capacitors. The inductors or choke coils
are generally connected in series with the rectifier output and the load. The inductors oppose any

18
change in the magnitude of a current flowing through them by storing up energy in a magnetic
field. An inductor offers very low resistance for DC whereas; it offers very high resistance to
AC. Thus, a series connected choke coil in a rectifier circuit helps to reduce the pulsations or
ripples to a great extent in the output voltage. The fitter capacitors are usually connected in
parallel with the rectifier output and the load.

As AC current passes through a capacitor but DC cannot, the ripples are thus limited and the
output becomes smoothed. When the voltage across its plates tends to rise, it stores up energy
back into voltage and current. Thus, the fluctuations in the output voltage are reduced
considerable. Filter network circuits may be of two types in general. If a choke coil or an
inductor is used as the ‘first- components’ in the filter network, the filter is called ‘choke input
filter’. The D.C. along with AC pulsation from the rectifier circuit at first passes through the
choke (L). It opposes the AC pulsations but allows the DC to pass through it freely. Thus AC
pulsations are largely reduced. The further ripples are by passed through the parallel capacitor C.
But, however, a little nipple remains unaffected, which are considered negligible. This little
ripple may be reduced by incorporating a series a choke input filters. If a capacitor is placed
before the inductors of a choke-input filter network, the filter is called capacitor input filter. The
D.C. along with AC ripples from the rectifier circuit starts charging the capacitor C. to about
peak value. The AC ripples are then diminished slightly. Now the capacitor C discharges through
the inductor or choke coil, which opposes the AC ripples, except the DC. The second capacitor C
by passes the further AC ripples. A small ripple is still present in the output of DC, which may
be reduced by adding additional filter network in series.

Crystals Oscillator circuit

Pin no 18 and 19 is connected to external crystal oscillator to provide a clock to the circuit.
Crystals provide the synchronization of the internal function and to the peripherals. Whenever
ever we are using crystals we need to put the capacitor behind it to make it free from noises. It is
good to go for a 33pf capacitor.

19
Figure 7 – Crystal Oscillator Circuit

We can also resonators instead of costly crystal which are low cost and external capacitor can be
avoided. But the frequency of the resonators varies a lot. And it is strictly not advised when used
for communications projects.

Time Calculation through Crystal Oscillator

The speed with which a microcontroller executes instructions is determined by what is known as
the crystal speed. A crystal is a component connected externally to the microcontroller. The
crystal has different values, and some of the used values are 6MHZ, 10MHZ, and 11.059 MHz
etc. Thus a 10MHZ crystal would pulse at the rate of 10,000,000 times per second.
The time is calculated using the formula -No of cycles per second = Crystal frequency in HZ /
12. For a 10MHZ crystal the number of cycles would be, 10,000,000/12=833333.33333 cycles.
This means that in one second, the microcontroller would execute 833333.33333 cycles. Pin no 1
to pin no 8 is PORT 1 and Pin no 10 to 17 is PORT 3. Pin no 18 and 19 of the IC is connected to
the external crystal to provide an external clock to run the internal CPU of controller. Pin no 20
is ground pin. Pin no 21 to 28 is PORT 2 pins. Pin no 29, 30, 31 is not use in this project. We use
these pin when we require a extra memory for the project. If we internal memory of the 89s51
(which is 4k ROM) then we connect pin no 31 to the positive supply.

Interfacing LCD

Frequently, an 89s52 program must interact with the outside world using input and output
devices that communicate directly with a human being. One of the most common devices
attached to an 8051 is an LCD display. Some of the most common LCDs connected to the 8051
are 16x2 and 20x2 displays. This means 16 characters per line by 2 lines and 20 characters per
line by 2 lines, respectively.

20
Figure 8 – Circuit Diagram of 16*2 LCD

The main application of LCD in this project is to display the status of MODEM, status of sensor
etc. for example if the microcontroller is initializing the MODEM, if any case MODEM failed to
initialize the user don’t know what is happening in the system, so we are using the LCD to
display the status.

TABLE-1 LCD PIN DESCRIPTIONS

21
CHAPTER 5
5.1 Verification
The project has been fully verified and checked. The program burned into the 8952
microcontroller when plugged into the PCB is interactive with the other components already
placed in the circuit.
5.2 Validation
What we wanted in the project is to have control over the extension board. At last we were
finally able to control the extension board via GSM modem, MAX232 and 8952 microcontroller.
Further we will be able to connect whatever appliance we want to control by simply cabling it to
extension board. The validity of the electronic components deployed in the respective circuit is
reasonable and genuine to our knowledge.
5.3 Evaluation
Simple evaluation can take place via what we wanted out of RFID based attendance system
using GSM and what we illustrate you are the same thing. We showed how simple automation
can be introduced from a small scale to large industries, manufacturing sectors, technical areas
etc.
Via using modern communication standard i.e. GSM we are able to control the electronic areas.
Our project has the mixture of electronics & communication and this blend is useful to achieve
automation in a developmental manner. Evaluation and judgment is only possible when you will
seek the working model having communication standards like GSM and electronic components
like Relays, LCDs, GSM modem, smart phone, Transistors, Diodes, and LEDs etc. The SMS
send through smart phone is trans received by GSM modem containing a SIM card. The GSM
modem is connected to 8952 Microcontroller via MAX232 IC. LCDs and LEDs are working
properly for indication purposes. LCD shows regular messages time to time based on given input
respectively. In this project in future we can add a multimedia camera to see what is going inside
the home by sitting in office or somewhere. With Home Automation, the consumer can select
and watch cameras live from an Internet source to their home or business. Security cameras can
be controlled, allowing the user to observe activity around a house or business right from a
Monitor or touch panel. Security systems can include motion sensors that will detect any kind of
unauthorized movement and notify the user through the security system or via cell phone. This
category also includes control and distribution of security cameras (see surveillance).

22
CHAPTER 6

6.1 Summary of the work done


The summary and moral of the story is that we bought a PCB. Connections are made according
to the blueprint i.e. circuit diagram. GSM modem, Relays, Relay driver circuit, smart phone,
SIM card, Transformer, LCD, Max232 etc. were soldered onto the PCB in such a way to attain
full communication between the smart phone user and the extension board respectively. We
fabricated in such a way to achieve automation on the small scale.
6.2 Proposal and scope of Future enhancement

Our proposal was to achieve automation in an example form. We succeeded in our goals of
doing it. We are able to transmit messages via smart phone to GSM modem and SIM Card.

At the receiver side the entire circuit is built in such a way that our messages are received to
power on / off the extension board. Scope of RFID based attendance system using GSM is that it
can be used at homes to regulate electricity, home appliances, to monitor and provide security of
the office, industry etc. The possibilities are endless in RFID based attendance system using
GSM. We tried to enhance the extension board by simply adding a digital visitor counter to our
extension board. RFID based attendance system using GSM can be built with the help of
Bluetooth, GSM, or providing RTC and DTMF. As we said the possibilities are endless.
Different technologies can be used to achieve automation but each technology has its own mark
of presence. Like ways we used GSM modem because it is related to communication and is used
throughout the country. Bluetooth and DTMF are simpler to implement that is why we employed
GSM modem in our model. Automation is a household term nowadays and can be used in
homes, hospitals, office environments, industries, high security zones, malls, restaurants, hotels,
universities, campuses, schools, workshops, manufacturing sectors, roadway regulation etc.
RFID based attendance system using GSM is the demand of the hour. We have built a prototype.
A lot more can be seen in the future if we utilize automation towards automation protocol. Great
interest will be seen when mechanical, civil, IT, computers, electronics etc will merge towards
building HAP i.e. Home Automation Protocol. From our cell phones we will be able to view
our house or office environment on the screen, additional security will be provided via HAP. The
evolution of HAP is near and brighter than ever.
23
REFERENCES

[1] Muhammad Ali Mazidi, The 8051 Microcontroller and Embedded Systems Using Assembly
and C, 2/E, Pearson Publications.

[2] Shefali Chopra & Chitra Gaba, Microprocessor and Interfacing, Manav Rachna Publishing
House Private Limited.

24
Appendices

Concise Project Code

#include<reg51.h>

#include<string.h>

#include<intrins.h>

#define lcd P0

sbit rs=P2^7;

sbit en=P2^6;

sbit sda=P2^0;

sbit scl=P2^1;

sbit store_button=P1^0;

sbit button1=P1^1;

sbit button2=P1^2;

sbit blue = P2^3;

25
sbit green = P2^4;

sbit red = P2^2;

sbit change = P3^7;

bit ack;

unsigned char read_id[12],store_id[10];

unsigned char reead;

unsigned int data_out,temp;

unsigned int flag[4]={0,0,0,0};

void delay(unsigned long int count) //Function to provide delay

while(count--);

26
}

void lcd_cmd(unsigned char comm) //Lcd command funtion

rs=0;

lcd=comm;

en=1;

delay(40);

en=0;

delay(100);

void lcd_data(unsigned char disp) //Lcd data function

rs=1;

lcd=disp;

en=1;

delay(40);

en=0;

27
delay(100);

void lcd_string(unsigned char *disp) reentrant //Function to send string

int x;

for(x=0;disp[x]!=0;x++)

lcd_data(disp[x]);

void lcd_ini() //Function to initialize the LCD

lcd_cmd(0x38);

lcd_cmd(0x01);

lcd_cmd(0x0E);

lcd_cmd(0x80);

28
void recieve() //Function to recieve data serialy from RS232

unsigned char k;

for(k=0;k<6;k++)

while(RI==0);

read_id[k]=SBUF;

RI=0;

read_id[k]='\0';

void aknowledge() //acknowledge condition

29
{

scl=1;

_nop_();

_nop_();

scl=0;

void start() //start condition

sda=1;

scl=1;

_nop_(); //No operation

_nop_();

sda=0;

scl=0;

void stop() //stop condition

sda=0;

scl=1;

_nop_();

30
_nop_();

sda=1;

scl=0;

void send_byte(unsigned char value) //send byte serially

unsigned int i;

unsigned char send;

send=value;

for(i=0;i<8;i++)

sda=send/128; //extracting MSB

send=send<<1; //shiftng left

scl=1;

_nop_();

_nop_();

scl=0;

ack=sda; //reading acknowledge

sda=0;

31
}

unsigned char read_byte() //reading from EEPROM serially

unsigned int i;

sda=1;

reead=0;

for(i=0;i<8;i++)

reead=reead<<1;

scl=1;

_nop_();

_nop_();

if(sda==1)

reead++;

scl=0;

sda=0;

return reead; //Returns 8 bit data here

32
void save(unsigned char address) //save in EEPROM

start();

send_byte(0xA0); //device address

aknowledge();

send_byte(address); //word address

aknowledge();

send_byte(store_id[0]); //send data

aknowledge();

send_byte(store_id[1]);

aknowledge();

send_byte(store_id[2]); //send data

aknowledge();

send_byte(store_id[3]);

aknowledge();

send_byte(store_id[4]); //send data

aknowledge();

send_byte(store_id[5]);

aknowledge();

33
stop();

delay(100);

aknowledge();

void read(unsigned char address)

start();

send_byte(0xA0);

aknowledge();

send_byte(address);

aknowledge();

start();

send_byte(0xA1); //device address

aknowledge();

store_id[0]=read_byte();

aknowledge();

store_id[1]=read_byte();

aknowledge();

store_id[2]=read_byte();

aknowledge();

34
store_id[3]=read_byte();

aknowledge();

store_id[4]=read_byte();

aknowledge();

store_id[5]=read_byte();

aknowledge();

stop();

delay(100);

aknowledge();

void clear_data()

store_id[0]=0;store_id[1]=0;store_id[2]=0;store_id[3]=0;store_id[4]=0;store_id[5]=0;

save(0x10);

delay(1000);

save(0x20);

delay(1000);

save(0x30);

35
delay(1000);

save(0x40);

delay(1000);

save(0x50);

delay(1000);

save(0x60);

delay(1000);

save(0x70);

delay(1000);

save(0x80);

delay(1000);

save(0x90);

delay(1000);

save(0xA0);

delay(1000);

void transmit_char(char txmt) // Funtion to transmit serial data

36
{

SBUF=txmt;

while(TI==0);

TI=0;

void transmit_string(unsigned char *txs)

unsigned char itx=0;

while(txs[itx]!='\0')

transmit_char(txs[itx]);

delay(1000);

itx++;

37
void sms(unsigned char idno);

void main()

unsigned char k,id;

TMOD=0x20; //Enable Timer 1

TH1=0XFD; //timer 1 in 8 bit autoreload mode

SCON=0x50;

TR1=1; // start baud rate generation

red=0;

green=0;

blue=0;

lcd_ini();

if(button1==0&&button2==0)

clear_data();

38
red=1;

green=1;

blue=1;

lcd_cmd(0x80);

lcd_string(" DATA BASED ");

lcd_cmd(0xc0); //Place cursor to first position of second line

lcd_string(" CLEARED ");

delay(40000);

delay(40000);

red=0;

green=0;

blue=0;

lcd_string(" RFID BASED ");

lcd_cmd(0xc0); //Place cursor to first position of second line

lcd_string("ATTENDENCE SYSTEM");

39
delay(40000);

delay(40000);

lcd_cmd(0x01); //Place cursor to first position of first line

lcd_string("PLEASE SCAN CARD");

while(1)

RI=0;

recieve();

lcd_cmd(0x01);

for(k=0;k<6;k++)

store_id[k]=read_id[k];

/*

if((read_id[k]/16)<10)

lcd_data((read_id[k]/16)+0x30);

40
else

lcd_data(((read_id[k]/16)-10)+0x41);

if((read_id[k]%16)<10)

lcd_data((read_id[k]%16)+0x30);

else

lcd_data(((read_id[k]%16)-10)+0x41);

*/

id=0x00;

read(0x10);

if(store_id[0]==read_id[0] && store_id[1]==read_id[1] && store_id[2]==read_id[2] &&


store_id[3]==read_id[3] && store_id[4]==read_id[4] && store_id[5]==read_id[5])

41
{

id=0x10;

if(id==0x00)

read(0x20);

if(store_id[0]==read_id[0] && store_id[1]==read_id[1] &&


store_id[2]==read_id[2] && store_id[3]==read_id[3] && store_id[4]==read_id[4] &&
store_id[5]==read_id[5])

id=0x20;

if(id==0x00)

read(0x30);

if(store_id[0]==read_id[0] && store_id[1]==read_id[1] &&


store_id[2]==read_id[2] && store_id[3]==read_id[3] && store_id[4]==read_id[4] &&
store_id[5]==read_id[5])

id=0x30;

42
}

if(id==0x00)

read(0x40);

if(store_id[0]==read_id[0] && store_id[1]==read_id[1] &&


store_id[2]==read_id[2] && store_id[3]==read_id[3] && store_id[4]==read_id[4] &&
store_id[5]==read_id[5])

id=0x40;

if(id==0x00)

read(0x50);

if(store_id[0]==read_id[0] && store_id[1]==read_id[1] &&


store_id[2]==read_id[2] && store_id[3]==read_id[3] && store_id[4]==read_id[4] &&
store_id[5]==read_id[5])

id=0x50;

43
}

if(id==0x00)

read(0x60);

if(store_id[0]==read_id[0] && store_id[1]==read_id[1] &&


store_id[2]==read_id[2] && store_id[3]==read_id[3] && store_id[4]==read_id[4] &&
store_id[5]==read_id[5])

id=0x60;

if(id==0x00)

read(0x70);

if(store_id[0]==read_id[0] && store_id[1]==read_id[1] &&


store_id[2]==read_id[2] && store_id[3]==read_id[3] && store_id[4]==read_id[4] &&
store_id[5]==read_id[5])

id=0x70;

44
if(id==0x00)

read(0x80);

if(store_id[0]==read_id[0] && store_id[1]==read_id[1] &&


store_id[2]==read_id[2] && store_id[3]==read_id[3] && store_id[4]==read_id[4] &&
store_id[5]==read_id[5])

id=0x80;

if(id==0x00)

read(0x90);

if(store_id[0]==read_id[0] && store_id[1]==read_id[1] &&


store_id[2]==read_id[2] && store_id[3]==read_id[3] && store_id[4]==read_id[4] &&
store_id[5]==read_id[5])

id=0x90;

45
if(store_button==0)

delay(2000);

while(store_button==0);

if(id==0x00)

lcd_cmd(0x01); //Place cursor to first position of first line

lcd_string(" ENTER ID NO. ");

while(store_button==1)

if(button1==0)

delay(2000);

id=id+0x10;

if(id==0xa0)

id=0x90;

lcd_cmd(0xc0);

lcd_data(id%16+0x30);

lcd_data(id/16+0x30);

while(button1==0);

46
}

if(button2==0)

delay(2000);

id=id=0x10;

if(id==0)

id=0x10;

lcd_cmd(0xc0);

lcd_data(id%16+0x30);

lcd_data(id/16+0x30);

while(button2==0);

read(id);

if(store_id[0]==0)

for(k=0;k<6;k++)

store_id[k]=read_id[k];

save(id);

lcd_cmd(0x01); //Place cursor to first position of first line

47
lcd_string(" ID REGISTERD ");

lcd_cmd(0xC0); //Place cursor to first position of first line

lcd_string(" SUCCESSFULLY ");

green=1;

else

lcd_cmd(0x01); //Place cursor to first position of first line

lcd_string(" ID NO. ALREADY");

lcd_cmd(0xC0); //Place cursor to first position of first line

lcd_string(" REGISTERD ");

red=1;

else

lcd_cmd(0x01); //Place cursor to first position of first line

48
lcd_string(" ID ALREADY ");

lcd_cmd(0xC0); //Place cursor to first position of first line

lcd_string(" REGISTERD ");

red=1;

delay(40000);

delay(40000);

lcd_cmd(0x01); //Place cursor to first position of first line

lcd_string("PLEASE SCAN CARD");

green=0;

red=0;

else if (id!=0x00)

lcd_cmd(0x01); //Place cursor to first position of first line

lcd_string(" ATTENDANCE ");

lcd_cmd(0xC0); //Place cursor to first position of first line

49
lcd_string(" REGISTERD ");

green=1;

lcd_cmd(0xcd);

lcd_data(id%16+0x30);

lcd_data(id/16+0x30);

transmit_char(id%16+0x30);

transmit_char(id/16+0x30);

transmit_char('\r');

transmit_char('\n');

delay(40000);

delay(40000);

change=0;

delay(10000);

lcd_cmd(0x01); //Place cursor to first position of first line

lcd_string(" SENDING MSG ");

lcd_cmd(0xC0); //Place cursor to first position of first line

lcd_string(" ............ ");

sms(id);

lcd_cmd(0x01);

change=1;

50
lcd_string("PLEASE SCAN CARD");

green=0;

else

lcd_cmd(0x01); //Place cursor to first position of first line

lcd_string(" CARD IS NOT ");

lcd_cmd(0xC0); //Place cursor to first position of first line

lcd_string(" REGISTERD ");

blue=1;

delay(40000);

delay(40000);

lcd_cmd(0x01); //Place cursor to first position of first line

lcd_string("PLEASE SCAN CARD");

blue=0;

51
}

void sms(unsigned char idno)

transmit_string("AT+CMGF=1\r");

delay(60000);

delay(60000);

delay(60000);

transmit_string("AT+CMGS=");

delay(2000);

delay(2000);

transmit_char(0X22);

delay(2000);

delay(2000);

transmit_string("+919716012390");

transmit_char(0X22);

transmit_char('\r');

52
delay(60000);

delay(60000);

delay(60000);

delay(60000);

transmit_char(idno%16+0x30);

transmit_char(idno/16+0x30);

transmit_string(" CARD'S ATTENDANCE ");

transmit_string(" REGISTERED ");

transmit_char(0x1A);

transmit_char(0x1A);

delay(60000);

delay(60000);

delay(60000);

delay(60000);

delay(60000);

53

You might also like