Sei sulla pagina 1di 27

Introduction






RadioFrequency IDentification
Contactless radio subject identification
Fast, efficient and reliable method of identification
Commonly used in:
- automotive industry (key transponders)
- access control systems
- public transport ticketing
- asset management
- ePassports etc.

Hardware architecture
of the RFID electronic lock

RFID reader
ARM7
microcontroller
LPC2148 (NXP)

RFID module
CLRC632
RFID chip (NXP)

Electric lock

RFID transponder
(Mifare 1k card)

Hardware architecture of the RFID electronic lock

Electrical schematic

Hardware architecture of the RFID electronic lock

RFID module
 RFID operates on the following standard frequency carriers:

Low-Frequency (LF) [125 KHz 139 KHz] ISO14443A/B


High-Frequency (HF) [13.56 MHz] ISO14443A/B,ISO15693
Ultra-High-Frequency (UHF) [433 960 MHz]
Microwave [2.45 GHz +]

 The operating distance of the RFID module is directly proportional to the


frequency carrier; higher reading range is achieved on higher frequencies
 Low-Frequency RFID modules are less sensitive to metal objects in the
surroundings compared to higher frequency RFID modules
 Higher operating frequency though provides a larger data throughput and
therefore a faster identification of the subjects.

Hardware architecture of the RFID electronic lock

RFID module
 Mediator between the microcontroller and the RFID user
cards
 Provides the wireless communication link, (de)coding,
(de)modulation of the data being exchanged between the
microcontroller and the contactless RFID cards
 Operating carrier frequency fC=13.56 MHz
 Operating distance od 7cm achieved
 Compliant to the ISO14443A standard
 Why was 13.56 MHz chosen as the carrier frequency?
- RFID cards can be read at a maximum 10cm distance from the reader, which is ideal for an access
control system.
- The modules antenna requires much less loops compared to LF readers antennas
- Relatively fast data exhcange between the module and the card
- RFID cards/transponders intended for 13.56MHz operating frequency commonly have a larger
memory capacity which allows a larger user flexibility

Hardware architecture of the RFID electronic lock

RFID module
Printed Circuit Board Design
 Drawn in Proteus
(ARES) v7.2
 Manufactured in Hitech
Macedonia based on
the generated Gerber
files
 Integrated PCB antenna
made up of 4 turns

Front side view

Back side view

Hardware architecture of the RFID electronic lock

CLRC632 RFID IC
 Basic element of the RFID module
 Made by NXP Semiconductors
 Supports ISO14443A/B, ISO15693, ICODE
 Completely integrated concept of (de)modulation,
(de)coding, parity and error control and data verification
 Internal 512B EEPROM memory
 64 internal 8-bit registers
 Digital, analog and radiofrequency section
 Allows integration of an antenna with a minimum number of
external passive components
 SPI communication with the microcontroller LPC2148

Hardware architecture of the RFID electronic lock

SPI interface
(Microcontroller LPC2148)

 SPI controller with internal configuration registers


 MASTER mode of operation
 16-bit bidirectional shift data register

LPC2148
SCK0

SCK

MOSI0

MOSI

MISO0

MISO

GPIO0.20

SSEL

Hardware architecture of the RFID electronic lock

SPI interface
(RFID module CLRC632 RFID IC)

 Automatic interface detection (SPI or parallel)


 A maximum data rate of 5 Mbps
 SLAVE mode of operation
 Has its own predefined protocols for writing and reading the
internal registers of the CLRC632
CLRC632
SCK

A2

MOSI

A0

MISO

D0

SSEL

ALE

Hardware architecture of the RFID electronic lock

CLRC632s SPI protocols


(RFID module CLRC632 RFID IC)

 The microcontroller initializes the SPI comunnication by


sending two bytes 0x00 to the CLRC632.
 Writing into the CLRC632 registers

 Reading the CLRC632 registers

Hardware architecture of the RFID electronic lock

RFID cards








Mifare 1k Classic (NXP Mifare )


Compliant to the ISO14443A standard
A passive RFID transponder, fC = 13.56 MHz
Maximum operating distance is specified at 10cm
Internal 1kB EEPROM memory
Unique 32-bit idenfitication number (Unique IDentifier)
Supports NXPs Crypto algorithm for safe transactions

Hardware architecture of the RFID electronic lock

Internal structure of the card

Hardware architecture of the RFID electronic lock

Physical layer
 Coding and modulation (RFID module)
- Modified Miller coding
- 100% ASK modulation

Hardware architecture of the RFID electronic lock

Physical layer
 Coding and modulation (RFID card)
- Manchester coding
- Load modulation (using a sub-carrier at 847.5 kHz)

Hardware architecture of the RFID electronic lock

Physical layer
 Inductive coupling (K ~ 0.3)

 Wireless power transmission

Hardware architecture of the RFID electronic lock

A block diagram of the cards


logical states
REQ
- A request for opening a
communication link with an
existing RFID card in the
readers field

POWER OFF
After 5 ms in the RFID readers field a card is
powered and ready to communicate

IDLE
Command: REQ (0x26)
Transition: IDLE - READY

SEL + NVB
- A command sent to the
detected RFID card in order
to read the full UID number

READY
Command: SEL (0x93) + NVB (0x20)
Transition: READY - ACTIVE

ACTIVE
The RFID reader shuts down the RF field after
reading the UID number

POWER OFF

Hardware architecture of the RFID electronic lock

Data layer of the RF link


RFID module

RF wireless link

RFID card

REQ
REQ (0x26h)
(0x26h)
REQ
REQ (0x26h)
(0x26h)
REQ
REQ (0x26h)
(0x26h)

A card was detected!


ATQ
ATQ (0x04h)
(0x04h)

SEL
SEL (0x93h)
(0x93h)
NVB
NVB (0x20h)
(0x20h)
UID
UID Byte
Byte 0
0
UID
UID Byte
Byte 1
1
UID
UID Byte
Byte 2
2
UID
UID Byte
Byte 3
3

Software architecture
of the RFID electronic lock
 The program code is written in embedded C, the IAR
Embedded Workbench 5.0 IDE was used
 Main features:
- Periodical interrogation of cards in order to save energy
- Simple and easy to program new or delete existing cards
from the microcontroller flash database by presenting a
predefined PROG or DEL card to the reader accordingly
- Timestamp and logging of the complete activity of the
RFID lock in a .txt file placed in an SD card (1GB) in order to
retrieve vital access control information later on
- Flexible database management, can be stored in internal
flash of the microcontroller or based on a removable SD card

Software architecture
of the RFID electronic lock
 An overview of the procedures in the code:
- void ScanCard()
- int CardType()
- void ProgrammingCard()
- void DeletingCard()
- void VerifyCard()
- void TimeStamp()
- void Signalize(int SignalType)

Software architecture of the RFID electronic lock

Basic flowchart

Software architecture of the RFID electronic lock

 Procedure for programming new cards into the database


(PROG card)

Software architecture of the RFID electronic lock

Procedure for deleting existing cards from the database when


the DEL card is detected in the readers field

Software architecture of the RFID electronic lock

 Procedure which determines the card type (USER, PROG or


DEL)

Software architecture of the RFID electronic lock

 Procedure for checking the privileges of the shown RFID card


and decision of access
void VerifyCard()


Does the card exist in the


database?

no

yes

Signalize(CARD_ACCEPTED)

Unlock the door with a 3 second


duration

Signalize(CARD_DENIED)
Lock the door
EXIT
EXIT

Software architecture of the RFID electronic lock

 Procedure for reading the UID number from the RFID card

Possible upgrades
 Introducing an ethernet link to a local or remote server which
would manage a whole system of interconnected RFID locks
 Voice or visual notification of the access status (card
accepted/denied/programmed/deleted etc)
 Storing lock-specific data into the users RFID card internal
EEPROM memory for greater flexibility and options
 Increase the operating distance (?)
 Visual C based software for managing the locks databases
and logs on a personal computer

Potrebbero piacerti anche