RFID Based Projects On Passive Keyless Entry For Automobile
RFID Based Projects On Passive Keyless Entry For Automobile
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
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
2.1 Introduction.................................................................................................................................5
3.1 Description................................................................................................................................11
3.3.2 Features...............................................................................................................................12
3.6 Simulation.................................................................................................................................16
3
3.7 Software implementation...........................................................................................................18
Conclusion...........................................................................................................................................19
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.
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.
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.
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
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.
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.
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
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.
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
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
12
Figure: controller Pin Diagram
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]
14
The function of relay driver circuit is to provide the necessary current (typically 25 to 70ma)
to energize the relay coil.
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
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.
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.
While (j<12)
UID= SBUF
If
UID[i]==
VAL[i] 17
Turn off the Motor Turn on the Motor
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