You are on page 1of 27

CHAPTER 1

INTRODUCTION
1.1Objective of project
This RFID Based Toll Collection System project aimed to develop a wireless system to
detect and allow only the authorized persons inside office, factories, etc. Nowadays it is very
commonly used in Office, BPO companies, Banks, Insurance companies, etc. An RFID
system consists of a reader device and a transponder. This project is based on Radio
Frequency Identification (RFID) technology and consists of a passive RFID tag. After
inserting Tag ID to RFID kit it receives decodes and checks the information available in its
Database or not. Each persons Tag ID contains with unique numbers.
Most educational institution administrators are concerned about student security. The
conventional method allowing access to students inside a college/educational campus is by
showing photo I-cards to security guard is very time consuming and insecure, hence
inefficient.
Radio Frequency Identification (RFID) based security system is one of the solutions to
address this problem. This system can be used to allow access for student in school, college,
and university. It also can be used to take attendance for workers in working places. Its ability
to uniquely identify each person based on their RFID tag type of ID card make the process of
allowing security access easier, faster and secure as compared to conventional method.

1.2Embedded system
An embedded system is a special-purpose system in which the computer is completely
encapsulated by the device it controls. Unlike a general-purpose computer, such as a personal
computer, an embedded system performs pre-defined tasks, usually with very specific
requirements. Since the system is dedicated to a specific task, design engineers can optimize
it, reducing the size and cost of the product. Embedded systems are often mass-produced, so
the cost savings may be multiplied by millions of items.

Handheld computers or PDAs are generally considered embedded devices because of the
nature of their hardware design, even though they are more expandable in software terms.
This line of definition continues to blur as devices expand.
Physically, embedded systems range from portable devices such as digital watches and MP3
players, to large stationary installations like traffic lights, factory controllers. Complexity
varies from low, with a single microcontroller chip, to very high with multiple
units, peripheralsand networks mounted inside a large chassis or enclosure.
Embedded systems contain processing cores that are either microcontrollers or digital signal
processors (DSP). The key characteristic, however, is being dedicated to handle a particular
task. Since the embedded system is dedicated to specific tasks, design engineers can optimize
it to reduce the size and cost of the product and increase the reliability and performance.
Some embedded systems are mass-produced, benefiting from economies of scale
1.2.1Characteristics of Embedded System

Embedded systems are designed to do some specific task, rather than be a generalpurpose computer for multiple tasks. Some also have real-time performance
constraints that must be met, for reasons such as safety and usability; others may have
low or no performance requirements, allowing the system hardware to be simplified

to reduce costs.
The program instructions written for embedded systems are referred to as firmware,
and are stored in read-only memory or Flash memory chips. They run with limited
computer hardware resources: little memory, small or non-existent keyboard or

screen.
Many embedded systems consist of small, computerized parts within a larger device
that serves a more general purpose. For example- a line follower autonomous robot

which follows a specific path and moves accordingly to the path.


The embedded systems are special purpose computer systems designed to perform
only the specific purposes. For Example- a system designed to display numbers

cannot be used to operate motors.


Embedded systems range from no user interface at all dedicated only to one task
to complex graphical user interfaces that resemble modern computer desktop
operating systems. Simple embedded devices use buttons, LEDs, graphic or
character LCDs (for example popular HD44780 LCD) with a simple menu system.
2

1.2.2 Applications
Embedded systems are finding their way into robotic toys and electronic pets, intelligent cars
and remote controllable home appliances. All the major toy makers across the world have
been coming out with advanced interactive toys that can become our friends for life. . In
AIBO first two letters stands for Artificial Intelligence. Next two letters represents robot. The
AIBO is robotic dog. Embedded systems in cars also known as Telemagic Systems are used
to provide navigational security communication & entertainment services using GPS,
satellite. Home appliances are going the embedded way. LG electronics digital DIOS
refrigerator can be used for surfing the net, checking e-mail, making video phone calls and
watching TV.IBM is developing an air conditioner that we can control over the net.
Embedded systems cover such a broad range of products that generalization is difficult. Here
are some broad categories.

Aerospace and defence electronics: fire control, radar, robotics/sensors, sonar.


Automotive: Aero body electronics, auto power train, auto safety, car information
systems.

Broadcast & entertainment:Analog and digital sound products, cameras, DVDs


Set top boxes, virtual reality systems, graphic products.

Consumer/internet appliances: Business handheld computers, business network


computers/terminals, electronic books, internet smart handheld devices, PDAs.

Data communications:Analog modems, ATM switches, cable modems, XDSL


modems, Ethernet switches, concentrators.

Digital imaging: Copiers, digital still cameras, Fax machines, printers, scanners.

Industrial measurement and control: Hydro electric utility research & management
traffic management systems, train marine vessel management systems.

Medical electronics: Diagnostic devices, real time medical imaging systems, surgical
devices, critical care systems.

Server I/O: Embedded servers, enterprise PC servers, PCI LAN/NICControllers

1.3 Microcontroller
3

A microcontroller, or MCU, is a computer implemented on a single very large scale


-integrated (VLSI) circuit. In addition to those components contained in a microprocessor, an
MCU also contains some of the following peripheral components.
Microcontrollers are designed to perform specific tasks. Specific means applications where
the relationship of input and output is defined. Depending on the input, some processing
needs to be done and output is delivered. For example, keyboards, mouse, washing machine,
digital cam, pen drive, remote, microwave, cars, bikes, telephone, mobiles, watches, etc.
Since the applications are very specific, they need small resources like RAM, ROM, I/O ports
etc. and hence can be embedded on a single chip. The microcontrollers operate from a few
MHz to 30 to 50 MHz. The microcontroller is designed for embedded applications.
Microcontrollers are used in automatically controlled products and devices, such as
automobile engine control systems, implantable medical devices, remote controls, office
machines, appliances, power tools, toys and other embedded systems.

CHAPTER 2
4

BLOCK DIAGRAM AND CIRCUIT DIAGRAM


2.1 Block diagram

POWER
SUPPLY

Fig 2.1 Block diagram of RFID based security system

2.2 Circuit diagram


5

R1
10k

C3
0.1UF

C1

U1
1

22PF

X1
CRYSTAL

C2
22PF

LCD2
RV2

2
3
4
5
6
7
14
13
33
34
35
36
37
38
39
40

RE3/MCLR/VPP

RC0/T1OSO/T1CKI
RC1/T1OSI/CCP2
RA0/AN0/ULPWU/C12IN0RC2/P1A/CCP1
RA1/AN1/C12IN1RC3/SCK/SCL
RA2/AN2/VREF-/CVREF/C2IN+ RC4/SDI/SDA
RA3/AN3/VREF+/C1IN+
RC5/SDO
RA4/T0CKI/C1OUT
RC6/TX/CK
RA5/AN4/SS/C2OUT
RC7/RX/DT
RA6/OSC2/CLKOUT
RA7/OSC1/CLKIN
RD0
RD1
RB0/AN12/INT
RD2
RB1/AN10/C12IN3RD3
RB2/AN8
RD4
RB3/AN9/PGM/C12IN2RD5/P1B
RB4/AN11
RD6/P1C
RB5/AN13/T1G
RD7/P1D
RB6/ICSPCLK
RB7/ICSPDAT
RE0/AN5
RE1/AN6
RE2/AN7

TXD
RTS
CTS

B3

19
20
21
22
27
28
29
30
8
9
10

PIC16F887

LM016L

RXD

15
16
17
18
23
24
25
26

10k

12V

U2
1
2
3
4
5
6
7

1B
2B
3B
4B
5B
6B
7B

COM
1C
2C
3C
4C
5C
6C
7C

9
16
15
14
13
12
11
10

R2
10k

RS
RW
E

VSS
VDD
VEE

12V

LED-BLUE

D0
D1
D2
D3
D4
D5
D6
D7
7
8
9
10
11
12
13
14

4
5
6

1
2
3

RL1

DIODE

ULN2004A

50%

D2

D1

BUZ1

R4

RL2

10k

D3
DIODE
BUZZER

D4
LED-BLUE

Fig 2.2 Proteus design

CHAPTER 3
6

12V

COMPONENTS USED
3.1 List of components

Microcontroller(PIC16f887)
Regulated power supply
LCD
Relay
Motor
Buzzer
IC-ULN2004A

3.2 Description of components


3.2.1 Microcontroller(PIC16F887)
The PIC16F887 is one of the latest products from Microchip. It features all the components
which modern microcontrollers normally have. For its low price, wide range of application,
high quality and easy availability, it is an ideal solution in applications such as: the control of
different processes in industry, machine control devices, measurement of different values etc.
Features of PIC16F887:

RISC architecture
o

Only 35 instructions to learn

All single-cycle instructions except branches

Operating frequency 0-20 MHz

Precision internal oscillator

Factory calibrated

Software selectable frequency range of 8MHz to 31KHz

Power supply voltage 2.0-5.5V


o

Consumption: 220Ua (2.0V, 4MHz), 11Ua (2.0 V, 32 KHz) 50Na (stand-by


mode)

Power-Saving Sleep Mode

Brown-out Reset (BOR) with software control option

35 input/output pins
o

High current source/sink for direct LED drive


7

software and individually programmable pull-up resistor

Interrupt-on-Change pin

8K ROM memory in FLASH technology


o

In-Circuit Serial Programming Option


o

Chip can be reprogrammed up to 100.000 times

Chip can be programmed even embedded in the target device

256 bytes EEPROM memory


o

Data can be written more than 1.000.000 times

368 bytes RAM memory

A/D converter:
o

14-channels

10-bit resolution

3 independent timers/counters

Watch-dog timer

Analogue comparator module with


o

Two analogue comparators

Fixed voltage reference (0.6V)

Programmable on-chip voltage reference

PWM output steering control

Enhanced USART module

Supports RS-485, RS-232 and LIN2.0

Auto-Baud Detect

Master Synchronous Serial Port (MSSP)


o

supports SPI and I2C mode

Pin diagram of PIC16F887:-

Fig3.1 Pin diagram of PIC16F887


Description of pins:As seen in Fig 3.1 above, the most pins are multi-functional. For example, designator
RA3/AN3/Vref+/C1IN+ for the fifth pin specifies the following functions:

RA3 Port A third digital input/output

AN3 Third analog input

Vref+ Positive voltage reference

C1IN+ Comparator C1positive input

This small trick is often used because it makes the microcontroller package more compact
without affecting its functionality. These various pin functions cannot be used simultaneously,
but can be changed at any point during operation.
The following tables, refer to the PDIP 40 microcontroller.

10

11

Table3-1 Pin description of PIC16F887

12

Memory organization in PIC16F887:Program Memory Organization


The PIC16F887 has a 13-bit program counter capable of addressing a 8K x 14 (0000h1FFFh) program memory space. Accessing a location above these boundaries will cause
a wraparound within the first 8K x 14 space. The Reset vector is at 0000h and the interrupt
vector is at 0004.

Fig 3.2Program memory map and stack for the PIC16f887


Data Memory Organization
The data memory (see Figure) is partitioned into four banks which contain the General
Purpose Registers (GPR) and the Special Function Registers (SFR). The Special Function
Registers are Located in the first 32 locations of each bank. The General Purpose Registers,
implemented as static RAM, are located in the last 96 locations of each Bank. Register
13

locations f0h-ffh in Bank 1, 170h-17Fh in Bank 2 and 1f0h-1ffh in Bank 3, point to addresses
70h-7Fh in Bank 0. The actual number of General Purpose Resisters (GPR) implemented in
each Bank Depends on the device. Details are shown in Figures 2-5 and 2-6. All other RAM
is unimplemented And returns 0 when read. RP<1:0> of the STATUS Register are the bank
select bits:
RP1 RP0
0 0 Bank 0 is selected
0 1 Bank 1 is selected
1 0 Bank 2 is selected
1 1 Bank 3 is selected
3.2.2 Regulated power supply
A variable regulated power supply, also called a variable bench power supply, is one where
you can continuously adjust the output voltage to your requirements. Varying the output of
the power supply is the recommended way to test a project after having double checked parts
placement against circuit drawings and the parts placement guide. This type of regulation is
ideal for having a simple variable bench power supply. Actually this is quite important
because one of the first projects a hobbyist should undertake is the construction of a variable
regulated power supply. While a dedicated supply is quite handy e.g. 5V or 12V, it's much
handier to have a variable supply on hand, especially for testing. Most digital logic circuits
and processors need a 5 volt power supply. To use these parts we need to build a regulated 5
volt source. Usually you start with an unregulated power supply ranging from 9 volts to 24
volts DC (A 12 volt power supply is included with the Beginner Kit and the Microcontroller
Beginner Kit.). To make a 5 volt power supply, we use a LM7805 voltage regulator IC .

14

Fig 3.3 Voltage regulator IC- LM7805

The LM7805 is simple to use. You simply connect the positive lead of your unregulated DC
power supply (anything from 9VDC to 24VDC) to the Input pin, connect the negative lead to
the Common pin and then when you turn on the power, you get a 5 volt supply from the
Output pin.

3.2.3 LCD
A liquid crystal display(LCD) is a thin, flat display device made up of any number of colour
or monochrome pixels arrayed in front of a light source or reflector. It is often utilized in
battery powered electronic devices because it uses very small amounts of electric power.

Fig 3.4 LCD display


15

LCD pins:8 data pins D7:D0


Bi-directional data/command pins.Alphanumeric
characters are sent in ASCII format.
RS:Register Select
RS = 0 -> Command Register is selected
RS = 1 -> Data Register is selected
R/W: Read or Write
0 -> Write,1 -> Read
E: Enable (Latch data)
Used to latch the data present on the data pins.
A high-to-low edge is needed to latch the data.
VEE : contrast control
Control contrast

Fig 3.5 LCD pin description


3.2.4 Relay
It is often desirable or essential to isolate one circuit electrically from another, while still
allowing the first circuit to control the second. One simple method of providing electrical
isolation between two circuits is to place a relay between them.

16

Relays are either normally open or normally closed.


3.6(a) Relay on

3.6(b) Relay off

Fig 3.6 Mechanical operation of relay


3.2.5 Motor
Motion Control, in electronic terms, means to accurately control the movement of an object
based on either speed, distance, load, inertia or a combination of all these factors. There are
numerous types of motion control systems, including; Stepper Motor, Linear Step Motor, DC
Brush, Brushless, Servo, Brushless Servo, DC motor and more.
DC

motor is

mechanically

commutated electric

motor powered

current (DC). DC motors can operate directly from rechargeable batteries.

A 60 rpm DC motor is used in this project.

It is used to open the gate for a valid card detection.

It is rotated with the help of relay.

Fig 3.7 DC Motor


17

from

direct

3.2.6 Buzzer
Buzzer or Burglar alarms have become standard equipment in stores and other businesses,
and they're becoming increasingly common in private homes as well. There are a wide
variety of options available. Most alarm systems are actually built around the same basic
design concepts.

Fig 3.8 Buzzer


A buzzer is used in this project to produce a beep sound for invalid detection.
3.2.7 IC-ULN2004A
ULN2004 IC is used to increase the driver current. It includes seven Darlington pairs Weneed
darlington pairs to interface relays with the microcontroller because the max current that
PIC16F887 can provide is 22-25mA which is not at all sufficient to drive a Relay.

Fig 3.9 Pin description of ULN2004A

18

CHAPTER 4
RFID SYSTEM AND WORKING
4.1 RFID system
4.1.1 What is RFID technology?
Radio-frequency identification (RFID) is a technology that uses radio waves to transfer
data from an electronic tag, called RFID tag or label, attached to an object, through a reader
for the purpose of identifying and tracking the object. Some RFID tags can be read from
several meters away and beyond the line of sight of the reader. The application of bulk
reading enables an almost-parallel reading of tags.

19

RFID is a superior and more efficient way of identifying objects than manual system or use
of bar code systems that have been in use since the 1970s. Furthermore, passive RFID tags
(those without a battery) can be read if passed within close enough proximity to an RFID
reader. It is not necessary to "show" the tag to the reader device, as with a bar code. In other
words it does not require line of sight to "see" an RFID tag, the tag can be read inside a case,
carton, box or other container, and unlike barcodes RFID tags can be read hundreds at a time.
Bar codes can only be read one at a time. In 2011, the cost of passive tags started at US$0.05
each and special tags, meant to be mounted on metal or withstand gamma sterilization, can go
up to US$5. Active tags for tracking containers, medical assets, or monitoring environmental
conditions in data centers all start at US$50 and can go up over US$100 each. Battery
Assisted Passive (BAP) tags are in the US$310 range and also have sensor capability like
temperature and humidity
Radio frequency identification (RFID) is a generic term that is used to describe a system that
transmits the identity (in the form of a unique serial number) of an object or person
wirelessly, using radio waves. It's grouped under the broad category of automatic
identification technologies.
Unlike ubiquitous UPC bar-code technology, RFID technology does not require contact or
line of sight for communication. RFID data can be read through the human body, clothing
and non-metallic materials.
4.1.2 RFID reader module
An RFID reader is a device that is used to interrogate an RFID tag. The reader has an
antenna that emits radio waves; the tag responds by sending back its data.
The tag's information is stored electronically. The RFID tag includes a small RF transmitter
and receiver. An RFID reader transmits an encoded radio signal to interrogate the tag. The tag
receives the message and responds with its identification information. Many RFID tags do
not use a battery. Instead, the tag uses the radio energy transmitted by the reader as its energy
source. The RFID system design includes a method of discriminating several tags that might
be within the range of the RFID reader.

20

Fig 4.1 RFID reader module

MAX232- Reader module IC:-

Fig4.2 Pin diagram of MAX232


21

The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply
TIA/EIA-232-F voltage levels from a single 5-V supply. Each receiver converts TIA/EIA232-F inputs to 5-V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V, a
typical hysteresis of 0.5 V, and can accept 30-V inputs. Each driver converts TTL/CMOS
input levels into TIA/EIA-232-F levels. Its 10th pin is connected to RX pin of pic16f887.
4.1.3 RFID tag
A typical RFID tag consists of a microchip attached to a radio antenna mounted on a
substrate. The chip can store as much as 2 kilobytes of data.

Fig 4.3 Examples of RFID cards


A RFID tag contain two parts:1. One is an integrated circuit for storing and processing information, modulating and
demodulating a radio-frequency (RF) signal, and other specialized functions.
2. Second is an antenna for receiving and transmitting the signal.
4.1.4 Components of RFID system
A basic RFID system consists of three components:

An antenna or coil

A transceiver (with decoder)

A transponder (RF tag) electronically programmed with unique information.

22

The antenna emits radio signals

to activate the tag and to read and write data to it.

The reader emits radio waves in ranges of anywhere from one inch to 100 feet or
more, depending upon its power output and the radio frequency used. When an RFID
tag passes through the electromagnetic zone, it detects the reader's activation signal.

The reader decodes the data encoded in the tag's integrated circuit (silicon chip) and
the data is passed to the host computer for processing.

The purpose of an RFID system is to enable data to be transmitted by a portable device,


called a tag, which is read by an RFID reader and processed according to the needs of a
particular application. The data transmitted by the tag may provide identification or location
information, or specifics about the product tagged, such as price, color, date of purchase, etc.
RFID technology has been used by thousands of companies for a decade or more. . RFID
quickly gained attention because of its ability to track moving objects. As the technology is
refined, more pervasive - and invasive - uses for RFID tags are in the works.

4.2 Working
Steps:1. RFID tag is punched to the reader module, it receives, decodes and checks the
information available in its Database or not.
2.

Each Tag ID contains unique numbers.

3. RFID Card reader reads the unique number from the RFID cards and sends it to the
microcontroller which is the CPU of the project.
4. Microcontroller reads the digital input from RFID reader.
5. Then it will turn on the buzzer for invalid card and turn on the motor and open the
gate if the card is valid
23

Communication:When the RFID Card Reader is active and a valid RFID transponder tag is placed within
range of the activated reader, the unique ID will be transmitted as a 12-byte printable ASCII
string serially to the host in the following format:

The start byte and stop byte are used to easily identify that a correct string has been received
from the reader (they correspond to a line feed and carriage return characters, respectively).
The middle ten bytes are the actual tag's unique ID.
For example, for a tag with a valid ID of 0F0184F07A, the following ASCII data would be
sent 0F0184F07A
Same data in HEX bytes can be interpreted as:
0x0A, 0x30, 0x46, 0x30, 0x31, 0x38, 0x34, 0x46, 0x30, 0x37, 0x41, 0x0D
All communication is 8 data bits, no parity, 1 stop bit, and least significant bit first (8N1). The
baud rate is configured for 9600 bps, a standard communications speed supported by most
any microprocessor or PC, and cannot be changed. The RFID Card Reader initiates all
communication. This allows easy access to the serial data stream from any programming
language that can open a COM port.

CHAPTER 5
ADVANTAGES AND APPLICATIONS
5.1 Advantages

This system doesnt require contact or line of sight communication.

24

A RFID tag can be read through


- human body
- clothing
- non - metallic materials

A tag can be affixed to any object and used to track and manage inventory, assets,
people, etc.

RFID is a superior and more efficient way of identifying objects than manual system
or use of bar code systems that have been in use since the 1970s.

5.2Applications

In Educational institutes
-It is used for the security in colleges, schools and universities.
In industry/companies - for security purpose
Can be used in home or office.

The Healthcare industry has used RFID to reduce counting, looking for things and
auditing items.

Access management

Tracking of goods

Tracking of persons and animals

Machine readable travel documents

Smartdust (for massively distributed sensor networks)

Tracking sports memorabilia to verify authenticity

Airport baggage tracking logistics

25

Fig 5.1 Examples of RFID system

26

FUTURE ENHANCEMENT

We can send this data to a remote location using mobile or internet.


We can add the module of voice alarm system to indicate valid or invalid card entry.

27

You might also like