Sunteți pe pagina 1din 18

“Design a RFID based passive keyless entry for

Automobile door lock application”

SUBMITTED BY
P.Ravi kiran
(REG.NO. 105344397)
M.Tech–ESD (NOV09)

DEPARTMENT OF
EMBEDDED SYSTEM DESIGN
INTERNATIONAL INSTITUTE OF INFORMATION
TECHNOLOGY, PUNE

1
ABSTRACT

An immobiliser or immobilizer is an electronic device fitted to an automobile which prevents


the user entering into the car unless the correct key is present. The main use of this system is
to protect the vehicle door. An Immobilizer is an electronic device fitted to an automobile
which prevents the user entering into the car, unless the owner of the vehicle has the proper
access to it. This prevents the car being stolen. Early models used a static code in the ignition
key which was recognized by an RFID loop around the lock barrel and checked against the
vehicle's Engine Control Unit (ECU) for a match. If the code is unrecognized, the ECU will
not allow user to enter into the car. When the ECU determines that the coded key is valid then
the ECU activates the door.

The main aim of this project is to Design a RFID based passive keyless entry for Automobile
door lock application. The tag will be in the pocket of the owner when the tag comes into the
EMF field which is surrounded around the Car. The UID present in the tag has to be read by
the reader and compare the id present in the controller. If the id gets matched then the door
will be opened or else not. The user will be having only one ID. In any case if some other
tries to access the car by using other tag having different ID it will not work and the car door
will not open. So here the security will be more.

2
TABLE OF CONTENTS

ABSTRACT......................................................................................................................................2

Chapter 1.INTRODUCTION................................................................................................................5

1.1RFID.............................................................................................................................................5

Chapter 2.RFID TECHNOLOGY.........................................................................................................5

2.1 Introduction.................................................................................................................................5

2.2 Brief History................................................................................................................................6

2.3 Basic RFID system......................................................................................................................7

2.4 RFID Tags/Transponders...............................................................................................................8

2.5 TYPICAL RFID SYSTEM FREQUENCY RANGES..................................................................9

2.6 RFID Reader....................................................................................................................................9

2.7 RFID Advantages......................................................................................................................10

2.8 RFID Applications.....................................................................................................................10

CHAPTER 3.SYSTEM SPECIFICATIONS.......................................................................................11

3.1 Description................................................................................................................................11

3.2 Block Diagram...........................................................................................................................11

3.3 Hardware implementation..........................................................................................................11

3.3.1 Controller overview............................................................................................................11

3.3.2 Features...............................................................................................................................12

3.3.3 Pin Configurations..............................................................................................................13

3.4 RS 232 /Serial port....................................................................................................................13

3.4.1 Serial pin outs [DB 9 Connector]........................................................................................14

3.4.2 Pin Functions......................................................................................................................14

3.5 Relay circuit...............................................................................................................................15

3.6 Simulation.................................................................................................................................16

3
3.7 Software implementation...........................................................................................................18

Conclusion...........................................................................................................................................19

Application Overview image

4
Chapter 1.INTRODUCTION

1.1RFID
Radio Frequency (RF) technology has been around since WWII, when the Allied Forces first
used it to identify friendly aircraft. We will discuss the use of RF in automatic identification
systems. RFID (Radio Frequency Identification) uses radio frequency signals to identify
“tagged” items, cases and pallets as they move through the supply chain. This data is then
collected and transmitted to a host system using an RF Reader. Many things are hidden in the
shrouds of time. The task of tracing history and genealogy is arduous and challenging, but,
ultimately, rewarding. Our past can open doors to our future. RFID is used for hundreds, if
not thousands, of applications such as preventing theft of automobiles, collecting tolls
without stopping, managing traffic, gaining entrance to buildings, automating parking,
controlling access of vehicles to gated communities, corporate campuses and airports,
dispensing goods, providing ski lift access, tracking library books, buying hamburgers, and
the growing opportunity to track a wealth of assets in supply chain management. The
foremost goal of covering RFID is to learn complete technology, its application and study
diverse projects in conjunction with the technology. In this project we will be discussing the
application of the immobilization of the two wheeler using RFID.

Chapter 2.RFID TECHNOLOGY


2.1 Introduction

Whatever you read about packaging, supply chains, or identification, you will come across an
article or advertisement for Radio Frequency Identification (RFID). Why does it seem that
this technology is being touted as the best thing since sliced bread? And is it just another
piece of hype meant to confuse and make us invest money in another piece of technology?

RFID is evolving as a major technology enabler for identifying and tracking goods and assets
around the world. It can help hospitals locate expensive equipment more quickly to improve

5
patient care, pharmaceutical companies to reduce counterfeiting, and logistics providers to
improve the management of moveable assets. It also promises to enable new efficiencies in
the supply chain by tracking goods from the point of manufacture through to the retail point
of sale.

2.2 Brief History


Radio frequency identification has been around for decades. Learn how it evolved from its
roots in World War II radar systems to today's hottest supply chain technology. It’s generally
said that the roots of radio frequency identification technology can be traced back to World
War II. The Germans, Japanese, Americans and British were all using radar—which had been
discovered in 1935 by Scottish physicist Sir Robert Alexander Watson-Watt—to warn of
approaching planes while they were still miles away. The problem was there was no way to
identify which planes belonged to the enemy and which were a country’s own pilots returning
from a mission.

The Germans discovered that if pilots rolled their planes as they returned to base, it would
change the radio signal reflected back. This crude method alerted the radar crew on the
ground that these were German planes and not Allied aircraft.

Figure 1: First RFID device

Under Watson-Watt, who headed a secret project, the British developed the first active
identify friend or foe (IFF) system. They put a transmitter on each British plane. When it
received signals from radar stations on the ground, it began broadcasting a signal back that
identified the aircraft as friendly. RFID works on this same basic concept. A signal is sent to a
transponder, which wakes up and either reflects back a signal (passive system) or broadcasts
a signal.

6
In 1979 the RFID was used for animal tracking and identification. In 1994 RFID tags are
used for identification of rail cars in United States. In recent years the surge has occurred in
RFID technology research, manufacturing , and usage due to the advance in semiconductor
manufacturing , which has reduced the cost of RFID, making their use economically feasible

2.3 Basic RFID system


 RFID Device (transponder, tag, smart label, Card, etc.) – contains data about the
tagged Item
 Antenna – transmits the RF signals between the reader and the RFID device
 Reader – receives RF transmissions from an RFID device and transmits to a host
System for processing

Radio Frequency Identification is a means of capturing data about an object without using a
human to read the data. The physical concept behind RFID is it simply involves applying the
basic laws of electro-magnetism.

Before RFID can be understood completely, it is essential to understand how Radio


Frequency communication occurs. RF (Radio Frequency) communication occurs by the
transference of data over electromagnetic waves. By generating a specific electromagnetic
wave at the source, its effect can be noticed at the receiver far from the source, which then
identifies it and thus the information. In an RFID system, the RFID tag which contains the
tagged data of the object generates a signal containing the respective information which is
read by the RFID reader, which then may pass this information to a processor for processing
the obtained information for that particular application.

A generic RFID system is composed of two different devices a transponder and a reader. The
transponder, or tag, is an electronic device with data storage and the ability to reply to an
electro-magnetic stimulus generated by a reader. The reader is an electronic device able to
generate an electro-magnetic field, following a defined protocol that is able to transmit and
receive information to and from the transponder.

Figure 2: Basic RFID system

7
2.4 RFID Tags/Transponders
Tags are the heart of an RFID system, because they store the information that describes the
object being tracked. Specific object information is stored in the memory of tags and is
accessed via the radio signal of RFID readers. Data is transferred between a tag and a reader
via low-power radio waves, which are tuned to the same frequency. To obtain information
from a tag, a transceiver must send a signal to the RFID tag, causing the tag to transmit its
information to the transceiver. The transceiver then reads the signal, converts it to a digital
format, and transmits it to a designated application.

Tags may be active or passive and read-only, write-once, or read-write. Below is a description
of each:

 Active tags have a battery, which runs the microchip's circuitry and enables the tags to
send a stronger signal to the reader, and have a read range of approximately 100 feet.

 Passive tags have no battery. Instead, they draw power from a reader, which sends
electromagnetic waves that induce a current in the tag's antenna and powers the
microchip's circuits. The chip then modulates the waves the tag sends back to the
reader. Passive tags have a read range of approximately 30 feet.

 Read-only tags contain data, such as a serialized tracking numbers, which are pre-
written onto them by the tag manufacturer or distributor. Read-only tags are generally
the least expensive, because they cannot have any additional information included as
they move throughout the supply chain. Any updates to that information have to be
maintained in the application software that tracks the stock unit's movement and
activity.

 Write-once tags enable a user to write data to the tag one time during production or
distribution. This information can be a serial number or other data, such as a lot or
batch number.

 Full read-write tags allow new data to be written to the tag as needed and written over
the original data.

8
Figure 3: Components of Tag

2.5 TYPICAL RFID SYSTEM FREQUENCY RANGES


RF signals are electromagnetic waves classified according to their wavelength frequency. The
most commonly recognized ranges are low (LF), high (HF), ultra-high (UHF) and micro-
wave (UW). Current RFID technology uses frequency ranges from 50 kHz to 5.8GHz. The
higher the frequency, the higher the throughput or rates of data transfer.

 Low Frequency (125 KHz) has a maximum read range of up to 20 inches


 High Frequency (13.56 MHz) has a maximum read range of up to 3 feet
 Ultra-High Frequency (868 MHz – Europe) (915 MHz – US) has a read range
of 20 feet or more
 Microwave Frequency (2.45 GHz) has a read range of up to 1 meter as a
passive tag or longer range as an active tag.

2.6 RFID Reader


The reader receives RF transmission signals from an RFID tag and transmits to a host system
for processing. The reader has an antenna that emits radio waves the tag responds by sending
back its data. RFID readers are used for automatic data capture and processing of RFID tags
mounted on a large range of products and assets.
RFID Reader kit consists of
 Radio circuitry (RFID Antenna) for generation and detection of radio waves
 Computational device for basic processing and filtering of signals
 Software library deployed on a PC interacting with Reader device
 The RFID readers often replace manual scanning with handheld terminals, based
work processes or manual data entry.

9
2.7 RFID Advantages
 No line of sight required.
 The tag can stand a harsh environment.
 Long read range.
 Non contact.
 Rewritable (not for all tags)
 High data density and transfer (mainly valid for high frequency tags)
 Portable database
 Multiple tags read/write.
 Tracking people, items, and equipment in real time.

2.8 RFID Applications


The major applications are as follows

 Item tracking and tracing


 Inventory monitoring and management
 Asset monitoring and management
 Anti theft
 Electronic payment
 Access control

CHAPTER 3.SYSTEM SPECIFICATIONS

Objective of this project is that the car door can access only when the ID of the RFID tag
matches with the ID in the controller. Based on this the door is opened or closed.

3.1 Description
I have used P89C51RD2XX controller. For communication using serial port and a relay
circuit for turning on /off the motor. Using an RFID reader and the tag for detection. When
the tag is placed near the RFID reader, the reader detects the UID present in the tag.

10
3.2 Block Diagram

Door
A
TAG
LOCK
T

8
RFID
9 RELAY
READER
C CIRCUIT DC MOTOR

Figure: Block Diagram

3.3 Hardware implementation


The actual implementation of the project using AT89C51 controller, RFID reader, RFID tag
and relay circuit for turning on/off the LED.

3.3.1 Controller overview


8KB/16KB/32KB/64KB Flash program memory that is both parallel programmable and
serial In-System and In-Application Programmable. In-System Programming (ISP) allows the
user to download new code while the microcontroller sits in the application. In-Application
Programming (IAP) means that the microcontroller fetches new program code and
reprograms itself while in the system. This allows for remote programming over a modem
link. A default serial loader (boot loader) program in ROM allows serial In-System
programming of the Flash memory via the UART without the need for a loader in the Flash
code. For In-Application Programming, the user program erases and reprograms the Flash
memory by use of standard routines contained in ROM. The device supports 6-clock/12-
clock mode selection by programming a Flash bit using parallel programming or In-System
Programming. In addition, an SFR bit (X2) in the clock control register (CKCON) also
selects between 6-clock/12-clock modes. Additionally, when in 6-clock mode, peripherals
may use either 6 clocks per machine cycle or 12 clocks per machine cycle. This choice is
available individually for each peripheral and is selected by bits in the CKCON register. This
device is a Single-Chip 8-Bit Microcontroller manufactured in an advanced CMOS process
and is a derivative of the 80C51 microcontroller family. The instruction set is 100%
compatible with the 80C51 instruction set. The device also has four 8-bit I/O ports, three 16-

11
bit timer/event counters, a multi-source, four-priority-level, nested interrupt structure, an
enhanced UART and on-chip oscillator and timing circuits. The added features of the
P89C51RA2/RB2/RC2/RD2xx make it a powerful microcontroller for applications that
require pulse width modulation, high-speed I/O and up/down counting capabilities such as
motor control.

3.3.2 Features
 On-chip Flash Program Memory with In-System Programming
 Boot ROM contains Flash programming routines for downloading via UART
 6/12 clocks per machine cycle
 Speed 20MHz/33MHz with 12 clocks per machine cycle
 Fully Static Operation
 RAM expandable externally to 64 Kbytes
 Four Interrupt Priority Levels
 Seven Interrupt Sources
 Four 8-bit I/O ports
 Full-duplex enhanced UART
 Power Control Modes
 Programmable Clock Out
 Asynchronous Port Reset
 Programmable Counter Array
 40-pin DIP

3.3.3 Pin Configurations

12
Figure: controller Pin Diagram

3.4 RS 232 /Serial port


The RS-232 serial communication protocol is a standard protocol used in asynchronous serial
communication. It is the primary protocol used over modem lines. It is the protocol used by
the MicroStamp11 when it communicates with a host PC. These components are the UART,
the serial channel, and the interface logic. An interface chip known as the universal
asynchronous receiver/transmitter or UART is used to implement serial data transmission.
The UART sits between the host computer and the serial channel. The serial channel is the
collection of wires over which the bits are transmitted. The output from the UART is a
standard TTL/CMOS logic level of 0 or 5 volts. In order to improve bandwidth, remove
noise, and increase range, this TTL logical level is converted to an RS-232 logic level of -12
to +12 volts before being sent out on the serial channel.

Figure: RS-232

Frame Most of the bits in a frame are self-explanatory. The start bit is used to signal the
beginning of a frame and the stop bit is used to signal the end of a frame. The only bit that
probably needs a bit of explanation is the parity bit. Parity is used to detect transmission
errors. For even parity checking, the number of 1's in the data plus the parity bit must equal
an even number. For odd parity, this sum must be an odd number. Parity bits are used to
detect errors in transmitted data. Before sending out a frame, the transmitter sets the parity bit
so that the frame has either even or odd parity. The receiver and transmitter have already
agreed upon which type of parity check (even or odd) is being used. When the frame is
received, then the receiver checks the parity of the received frame. If the parity is wrong, then
the receiver knows an error occurred in transmission and the receiver can request that the
transmitter re-send the frame.

13
3.4.1 Serial pin outs [DB 9 Connector]

Figure: DB-9 male connector

3.4.2 Pin Functions

 TD [Transmit Data] - Serial Data Output (TXD).


 RD [Receive Data] - Serial Data Input (RXD)
 CTS [Clear to Send] -This line indicate that the Modem is ready to exchange data.
 DCD [Data Carrier Detect] -When the modem detects a "Carrier" from the modem
at the other end of the phone line, this Line becomes active.
 DSR [Data Set Ready] - This tells the UART that the modem is ready to establish a
link.
 DTR [Data Terminal Ready] -This is the opposite to DSR. This tells the Modem that
the UART is ready to link.
 RTS [Request To Send] -This line informs the Modem that the UART is ready to
exchange data.
 RI [Ring Indicator] - Goes active when modem detects a ringing signal from the
PSTN.

3.5 Relay circuit


The relay circuit is used to turn on door lock system whenever reader detects correct ID. As
soon as when owner want to enter into car, first opens the door lock the system will wait for
detection of Rfid card, when it match the door will be opened, Relay is used to turn the motor
Relays are devices which allow low power circuits to switch a relatively high Current on/off.
For a relay to operate a suitable pull-in & holding current should be passed through its coil.
Generally relay coils are designed to operate from a particular voltage often its 5V or 12V.

14
The function of relay driver circuit is to provide the necessary current (typically 25 to 70ma)
to energize the relay coil.

Figure: Micro controller over relay circuit

The above figure shows the basic relay driver circuit. An NPN transistor BC547 is being used
to control the relay. The transistor is driven into saturation (turned ON) when a LOGIC 1 is
written on the PORT PIN thus turning ON the relay. The relay is turned OFF by writing
LOGIC 0 on the port pin.
A diode (1N4007/1N4148) is connected across the relay coil; this is done so as to protect the
transistor from damage due to the back EMF generated in the relay's inductive coil when the
transistor is turned OFF. When the transistor is switched OFF the energy stored in the
inductor is dissipated through the diode & the internal resistance of the relay coil.
As you can see we have used a pull up resistor at the base of the transistor. AT8951/52/55 has
an internal pull up resistor of 10k so when the pin is pulled high the current flows through
this resistor so the maximum output current is 5v/10K = 0.5ma, the DC current gain of
BC547 is 100 so the maximum collector current we can get is 0.5ma x 100 = 50ma, but most
of the relays require more than 70ma-130ma current depending on the relay that we have
used, 0.5ma of base current is not suitable enough for turning ON the relay, so we have used
an external pull up resistor. When the controller pin is high current flows through the
controller pin i.e. 5v/10k=0.5ma as well as through the pull up resistor. We have used 4.7k
pull up resistor so 5v/4.7k=1.1ma so maximum base current can be 0.5ma + 1.1ma=1.6ma i.e.
collector current =1.6ma x 100 = 160ma which is enough to turn ON most of the relays.
Now in this project Ignition lock is replace by LED or 12 volt bulb. Here LED/bulb is control
by relay and relay controlled by status of microcontroller. Fig 2 shows the circuit diagram for
microcontroller control over relay.

15
3.6 Simulation

Figure: entering the ID of the TAG

In Proteus there is no possibility to use RFID reader module, so using the hyper terminal which is
considered as reader, from this hyper terminal by entering the ID of the tag. So after entering the ID
it will compare with the ID which is already stored in the controller. If the ID gets matched the relay
turns on or else not.

Figure: The ID of the tag got matched

Here this figure shows that when the ID is entered through the hyper terminal it will compare
with the ID stored in the controller. So it got matched with the ID in the controller, and the
relay is turned on and the green LED in on.

16
Figure: The ID of the tag not matched

In this figure the ID is entered through the hyper terminal where it will compare to the ID
stored in the controller. There is mismatch in the ID so the relay is turned off and even green
LED in off.

3.7 Software implementation


Here we discuss the design flow of the software developed for reading the ID, transmitting the ID
receiving the ID and comparing it. And at last turning the led

Unsigned char UID [12]

Serial port initialization

While (j<12)

UID= SBUF

If
UID[i]==

VAL[i] 17
Turn off the Motor Turn on the Motor

Again checks for Door open


the correct ID

In the software I have used the UART for sending and receiving the data. Reading the ID
from the tag with the help of reader and used to receive the data through serial port. DB-9
connector was used for communication. When we receive the data from the tag it is done
through the serial port. The received data is read byte by byte, so this port is connected to the
controller where it will send the data and compare the ID which is present. The data will be
stored in SBUF after each bit is read and after completion of receiving of one complete byte
the flag is set. And the 8051 has only of SBUF and can store only 8 bits, if the data is not
stored there will be loss. The data received has to be stored in another memory location. After
the storing the data we need to compare byte by byte. If all the bytes are equal it displays the
message ID matched. If the ID is not matched it will display the message ID not matched.

Conclusion

RFID based passive keyless entry for Automobile door lock application is one of the methods to
increase the security system for the car. The same application can also be implemented in house,
office doors. Rfid system has more advantage on accuracy of the system. This system is more
advanced and sophisticated to access in the car.

18

S-ar putea să vă placă și