AN Low Frequency RFID Card Reader. Application Note Abstract. Introduction. Working Principle of LF RFID Reader

Similar documents
THIS SPEC IS OBSOLETE

AN Industrial Stepper Motor Driver. Application Note Abstract. Introduction. Stepper Motor Control Method

The Frequency Divider component produces an output that is the clock input divided by the specified value.

THIS SPEC IS OBSOLETE

ADC Guide, Part 1 The Ideal ADC

Produces a selectable output voltage that is higher than the input voltage

16-Bit Hardware Pulse Width Modulator Data Sheet

W H I T E P A P E R. Analog Signal Chain Calibration

3.3V Zero Delay Buffer

Terminating RoboClock II Output

1 Mbit (128K x 8) Static RAM

Produces a selectable output voltage that is higher than the input voltage

CAPACITIVE SENSING MADE EASY, Part 1: An Introduction to Different Capacitive Sensing Technologies

AN2170. AN2170 PSoC 1 - Sensored BLDC Motor Control using Hall Effect Sensors. Application Note Abstract. Introduction

WirelessUSB LS Radio Module FCC Testing & Verification - AN4006

Produces a selectable output voltage that is higher than the input voltage

CE PSoC 6 MCU Breathing LED using Smart IO

Operational Amplifier (Opamp) Features. General Description. Input/Output Connections. Noninverting Analog Follower or Opamp configuration

This Application Note demonstrates how to use a PSoC to control a 3-phase Brushless Direct Current (BLDC) motor utilizing Hall-effect sensors.

16-Bit PWM Dead Band Generator Data Sheet

THIS SPEC IS OBSOLETE

W H I T E P A P E R. EMC Countermeasure Techniques in Hardware. Introduction

256K (32K x 8) Static RAM

INTEGRATED CIRCUITS. MF RC500 Active Antenna Concept. March Revision 1.0 PUBLIC. Philips Semiconductors

2.5V or 3.3V, 200 MHz, 9-Output Zero Delay Buffer

Two Op-Amps Three Op-Amps

MPR kHz Reader

Crystal to LVPECL Clock Generator

OM29110 NFC's SBC Interface Boards User Manual. Rev May

PN7120 NFC Controller SBC Kit User Manual

Spread Spectrum Clock Generator

AN Using PSoC in a Gaming Environment. Application Note Abstract. Introduction. Memory Copy Design. Smash PSoC Design.

MiniProg Users Guide and Example Projects

AN3332 Application note

ZKit-51-RD2, 8051 Development Kit

AN1954 APPLICATION NOTE

AN Energy Harvesting with the NTAG I²C and NTAG I²C plus. Application note COMPANY PUBLIC. Rev February Document information

AN PR533 USB stick - Evaluation board. Application note COMPANY PUBLIC. Rev May Document information

I/O 1 I/O 2 I/O 3 I/O 4 I/O 5 I/O 6 A 16 I/O 7

H4102 EM MICROELECTRONIC-MARIN SA. Read Only Contactless Identification Device H4102. Typical Operating Configuration

U2270B replacement by EM4095 reader chip

Spread Aware, Ten/Eleven Output Zero Delay Buffer

PN7120 NFC Controller SBC Kit User Manual

Using Z8 Encore! XP MCU for RMS Calculation

AN Cypress Powerline Communication Debugging Tools. Application Note Abstract. Introduction. System Diagram

I/O 1 I/O 2 I/O 3 I/O 4 I/O 5 I/O 6 I/O 7

128K x 8 Static RAM CY7C1019B CY7C10191B. Features. Functional Description. Logic Block Diagram. Pin Configurations

NCD1015ZP 50mm Half Duplex Read-Only RFID Transponder Features Description Applications Ordering Information Part # Description Block Diagram

MCRF200. Contactless Programmable Passive RFID Device

Low Skew Clock Buffer

AN4014 Application Note Adjustable LED blinking frequency using a potentiometer and STM8SVLDISCOVERY Application overview

AN NFC, PN533, demo board. Application note COMPANY PUBLIC. Rev July Document information

512 x 8 Registered PROM

RFID ACCESS CONTROL. SRðAN LALE FACULTY OF ELECTRICAL ENGINEERING EASTERN SARAJEVO

AN UCODE I2C PCB antenna reference designs. Application note COMPANY PUBLIC. Rev October Document information

AN2446 Application note

NCD RO HDX Robust 50mm Transponder

AN12165 QN908x RF Evaluation Test Guide

TDA18250HN. 1. General description. 2. Features and benefits. Cable Silicon Tuner

I/O 1 I/O 2 I/O 3 I/O 4 I/O 5 I/O 6 A 16 I/O 7 A 15 7

64K x 1 Static RAM CY7C187. Features. Functional Description. Logic Block Diagram. Pin Configurations. Selection Guide DIP. SOJ Top View.

AN4507 Application note

UM Description of the TDA8029 I2C Demo Board. Document information

2K x 8 Reprogrammable PROM

One-PLL General Purpose Clock Generator

Spread Spectrum Clock Generator

I/O 1 I/O 2 I/O 3 A 10 6

AN3252 Application note

AN2226. PSoC 1 - Using Correlated Double Sampling to Reduce Offset, Drift, and Low Frequency Noise. Introduction. Simple Approach. Too Simple Approach

AN2047. Sensing - Ultrasound Motion Sensor. Application Note Abstract. Introduction

swarm radio Platform & Interface Description

UM OM29263ADK Quick start guide antenna kit COMPANY PUBLIC. Document information

UM0791 User manual. Demonstration firmware for the DMX-512 communication protocol receiver based on the STM32F103Zx. Introduction

3.3V Zero Delay Buffer

One-PLL General Purpose Flash Programmable Clock Generator

SiT6722EB Evaluation Board User Manual

AN Starter guide PCB tagging. Rev Jan Application note PUBLIC. Document information

UHF RFID Micro Reader Reference Design Hardware Description

Read-only Transponder TK5530

AN MIFARE Plus Card Coil Design. Application note COMPANY PUBLIC. Rev April Document information

AN NTAG21xF, Field detection and sleep mode feature. Rev July Application note COMPANY PUBLIC. Document information

R_ Driving LPC1500 with EPSON Crystals. Rev October Document information. Keywords Abstract

If you have a question, or need help with this application note, visit

EVDP610 IXDP610 Digital PWM Controller IC Evaluation Board

Inverting Programmable Gain Amplifier (PGA_Inv)

UM User manual for di2c demo board. Document information

UM10950 Start-up Guide for FRDM-KW41Z Evaluation Board Bluetooth Paring example with NTAG I²C plus Rev February

Universal Programmable Clock Generator (UPCG)

AN1756 Application note

AN2979 Application note

SJA1105P/Q/R/S. 1 Features and benefits. 1.1 General features. 1.2 Ethernet switching and AVB features. 1.3 Interface features

ZLED7020KIT-D1 Demo Kit Description

HITAG µ RO64 transponder IC

4-Mbit (512K words 8 bit) Static RAM with Error-Correcting Code (ECC)

NCD1015-IC 17 February 2011 Data sheet status: Product Data. NCD1015-IC HDX RFID IC. Product data February 2011 Production 1/14

I/O 1 I/O 2 I/O 3 A 10 6

AN2679 Application note

AN797 WDS USER S GUIDE FOR EZRADIO DEVICES. 1. Introduction. 2. EZRadio Device Applications Radio Configuration Application

HT2x. 1. General description. 2. Features and benefits. HITAG 2 transponder IC. Product short data sheet COMPANY PUBLIC

DATA SHEET. HTRM440 family HITAG proximity reader module hardware INTEGRATED CIRCUITS

Transcription:

Low Frequency RFID Card Reader Application Note Abstract AN52164 Authors: Richard Xu Jemmey Huang Associated Project: None Associated Part Family: CY8C24x23 Software Version: PSoC Designer 5.0 Associated Application Notes: None This application note details the implementation of low frequency RFID Card Reader based on CY8C24x23. The working principle of LF RFID card and CY8C24x23 are explained. The LF RFID card memory construction, the hardware schematic, and the firmware about data decoding algorithm are also described in detail. Introduction RFID (Radio Frequency Identification) is a means of identifying a person or object using a radio frequency transmission. This technology is used to identify, track, sort, or detect a wide variety of objects. Communication takes place between a reader (interrogator) and a transponder (silicon chip connected to an antenna). According to international standards, low frequency operates at around 125 KHz, high frequency at 13.56 MHz, and ultra high frequency at 860 to 960 MhZ. LF RFID is typically used in access control, animal tagging, and vehicle immobilizers. Popular design is based on MCU with a LF RFID interface chip such as EM4095 from EM Microelectronic and U2270 from Atmel. This application note takes the LF RFID reader as an example to illustrate the integration design of both reader interface IC and system control MCU into CY8C24x23/CY8C24x33. Energy is transferred from the reader to the transponder through the magnetic field generated by the reader antenna. The reader antenna is part of a resonant circuit tuned to the RF operating frequency. The magnetic field generated by the reader induces a voltage in the transponder s resonant circuit which supplies power to the transponder. The current in the transponder coil generates a magnetic field, which influences the magnetic field generated by the reader. If the transponder s supply voltage is high enough, it works and transmits data by damping the resonant circuit according to the data stream. The data is modulated into the magnetic field and then transferred from transponder to reader. This results in slight voltage modulation at the reader antenna. In this example design, CY8C24x23 handles 125 KHz PWM square wave generation, signal amplification and filtration, and data display. Working Principle of LF RFID Reader In the LF RFID reader, two devices exist in the system: the RFID reader and the transponder (or the tag). Figure 1 shows the system diagram. Two devices communicate through a 125 KHz RF field. Figure 1 RFID Reader System OSC Carrier Output Transponder IC PSoC MCU LF RF Signal 125KHz ASK Demodulation NF Channel Data Stream March 20, 2009 Document No. 001-52164 Rev. ** - 1 -

CY8C24x23 Overview CY8C24x23 is one of the products of the PSoC family and is compatible with other PSoC devices architecture as illustrated in Figure 2. It is a programmable system-on-chip with On-Chip Controller device. Each CY8C24x23 PSoC device includes four digital blocks and six analog blocks. Depending on the PSoC package, CY8C22x45 provides up to 24 general-purpose IOs (GPIO) and 4K flash memory and a 256 byte SRAM data memory. Like other PSoC products, CY8C24x23 has some other fixed function on-chip resources such as I2C, UART, and MAC. CY8C24x23 also includes some optimized modules like On-Chip Precision Voltage Reference and User-Configurable Low Voltage Detection. Figure 2 CY8C24x23 Block Diagram 10K potentiometer for adjusting LCD contrast Four red color LEDs indicating data rate One power LED One UART interface to communicate with PC Future designs include more advanced features such as: Different types of card identification I2C communication with PC System Hardware The LF RFID reader board has a Low Frequency RF antenna, the ASK demodulation circuit, and the PSoC CY8C24423 chip. Figure 3 shows the block diagram of the main board. Figure 3 Schematic of LF RFID Reader Adaptor Board The mother board is the CY3210 kit board, which is responsible for LED lighting and data transmission to PC through UART interface. Figure 4 Signal Demodulation Block Diagram System Features The LF RDIF demonstration is based on a simple adaptor board which is plugged onto CY3210 kits. DC 5V Power Jack 2x14 Connector (Female, 0.100 inch pitch) Figure 4 shows the method of RF signal energization and demodulation. PSoC internal resources are configured as PGA, low pass filter, and hysteresis comparator for the signal conditioning and data demodulating. 2x8 Connector (Female, 0.100 inch pitch) 1x14 Connector for Character LCD 5-pin male header (0.100 inch) for I2C 5-pin male header for ISSP March 20, 2009 Document No. 001-52164 Rev. ** - 2 -

ASK Demodulation A 125 KHz square wave is generated by a PSoC digital block, and then output through P1.3 to energize the antenna resonant circuit which is tuned at 125 KHz also. The resonant circuit is energized by series resonance. The useful signal appears as a very small amplitude modulation of the reader antenna voltage. D1 is the demodulation diode which is parallel to the high voltage resonant circuit. Figure 5 shows the waveform after D1. Figure 5 Waveform After D1 Demodulation Signal Amplification and Noise Removal A PSoC internal PGA operates the RF signal before it goes into a PSoC internal low-pass filter. You can extend the card detection distance by modifying PGA s gain value. The fully integrated low-pass filter (2-pole Butterworth) removes the remaining carrier signal and high frequency disturbances after demodulation. The upper cut-off frequency of the LPF depends on the customer selected frequency. The corner frequency is 10 KHz, comparing with 2K data rate and 125 KHz carrier waveform frequency. Signal Reshaping and System Interrupt PSoC outputs the signal after the LPF to P0.3 through the analog buffer; then it routes back to PSoC P0.4 through a register. The PSoC internal comparator works with two external resisters, R6 and R7, to be a hysteresis comparator. The hysteresis comparator reduces the noise sensitivity of the comparator and helps the comparator avoid oscillation. Thus the data stream is read out easily by the microcontroller. The comparator bus is used to interrupt M8C core. In order to show the ultimate interrupt signal, we output the signal through a temporary digital buffer to an outside pin. Figure 7 shows the signal on the CompBus and the original modulated signal. Figure 7 Interrupt and the Original Signal After D1, there is a passive high pass filter by R3, C3, then a low-pass filter by R4 and C5. Figure 6 shows the waveform on C5. Figure 6 Waveform on C5 (After Passive Filters) Data Stream and Interrupt Signal 125 KHz RF with Data Modulation The signal then goes to PSoC through C4 to remove the DC signal and do a voltage shifting to Vdd/2 by P2.4 Port. March 20, 2009 Document No. 001-52164 Rev. ** - 3 -

Figure 8 PSoC Chip Used Resources Figure 10 EM4100 Memory Structure The firmware has four parts: the CompBus Interrupt s time interval measurement mechanism, signal start detection algorithm, the Manchester decoding algorithm, and Parity-bit check procedure. Figure 11 shows the high level firmware flowchart. Figure 11 Firmware Flowchart Board Connector Definition and Description The board connector pins definition are the same as the CY8C24423 pins definition. System Firmware EM4100 RFID Data Encoding When the EM4100 RFID card sends data, the output signal is Manchester encoded. It uses a rising edge to send bit 1, and uses a falling edge to send bit 0. Before starting to send the specific data, EM4100 RFID sends 9 bit 1 first. It means that the data stream has 9 consecutive rising edges at first. Figure 9 Manchester Data Encoding EM4100 Memory Structure As shown in Figure 9, the EM4100 contains 64 bits divided into five groups of information. The header is composed of nine first bits which are all 1 s. The header is followed by 10 groups of four data bits with one even row parity bit. The last group consists of four even column parity bits without row parity bit. The last bit S0 is a stop bit which is 0. PSoC Digital Block and Analog Resources Consuming The following table lists the digital blocks, analog blocks, and other resources consumed in the RFID reader system. Table 1 RFID Reader System Resources Name DBB00 DBB01 DCB02 DCB03 ACB00 ACB01 ASC10 ASC20 Description Counter8 for CompBus1 s Interrupt interval measurement PWM8 for 125 KHz UART TX and RX PGA for Signal Amplification Hysteresis Comparator and Interrupt Source 2-pole Butterworth low pass filter March 20, 2009 Document No. 001-52164 Rev. ** - 4 -

Figure 12 System Interconnection Data Start Bit Detection For the output data sequence, there are four different types of waveform between two adjacent rising interrupts. Type A: The time interval is about 530 us, so the counter value is around 0x42. Note that the input clock s period is 8 us. Type B: The time interval is about 800 us, so the counter value is around 0x64. Type C: The time interval is also about 800 us, so the counter value is around 0x64. CompBus 1 s Interrupt Time Interval Measurement In the AnalogColumn1 s interrupt procedure, we record the down counter s temporary value when the interrupt happens. For the worst case, when the data are all zeros, there are 55 signal falling edges in the data stream. To ensure that a start signal bit can be found in the recorded data sequence, at least 119 (55*2+9) data records are needed. The time interval between two rising edge interrupts is measured by subtracting two adjacent counter values. The following is the main source code to measure time intervals: Global Variables: unsigned char Value_Valid=0; unsigned char Temp_Count=0; Type D: The time interval is about 1060 us, so the counter value is around 0x84. Because the start signal is characterized by one 0 and nine consecutive 1 s in the data sequence, we must find one Type C or D waveform followed by eight consecutive Type A waveforms to identify the start signal. This way, the possible data bit start position is detected. Note that when there is one 1 followed by ten or more 0 s in the data sequence, the waveform is the same as the start signal waveform. To check out this error, use the parity bit. If there is a parity error when decoding the data bit stream from the specified position, use the next possible data bit start position. Figure 13 Flowchart of Start Bit Detection In the interrupt procedure: void PSoC_COMP_ROUTINE(void) { Temp_Count=Counter8_bReadCounter(); Value_Valid=1; } In the main procedure: while(i<121){ while(value_valid==0); Value_Valid=0; Count_Value[i++]=Temp_Count; } for(i=0;i<120;++i){ Count_Value[i]-=Count_Value[i+1]; } March 20, 2009 Document No. 001-52164 Rev. ** - 5 -

Manchester Data Decoding Algorithm From the start position, the default data bit value is 1. Note that there must be one Type B waveform in between two consecutive Type C waveforms, and vice versa. In order to distinguish Type B and Type C, set a type flag to identify, and the default value for this flag is 0. For waveform type A, only one data bit has been sent. The value is the default data value. For waveform type B, only one data bit has been sent, but the value has been changed. If the previous default value is 1, this sent value is 0, and vice versa. Then we change the type flag to 1 and change the default value to its opposite value. Summary This application note describes the low frequency RFID card reader system based on PSoC chip CY8C24x23. CY8C24x23 can replace the low frequency RFID card reader interface IC and show the PSoC integration value. The experiment circuit can read the EM4100 RFID card at a range about 5 to 6cm, which is almost the same as EM4905 performance. The reachable distance can be extended by optimizing the antenna driving circuit. For waveform type C, two data bits have been sent. The first data bit value is the default data value, and the second is the opposite of the default value. Then we change the type flag to be 0 and change the default value to be its opposite value. For waveform type D also, two data bits have been sent. The first data bit value is the opposite of the default data value, and the second is the default value. After we decode 55 data bits, we can use the parity bit to identify whether we found the correct start signal. Figure 14 Flowchart of Manchester Data Decoding March 20, 2009 Document No. 001-52164 Rev. ** - 6 -

Appendix1: Hardware Schematics Figure 15 Schematic Drawing of LF RFID Reader Main Board March 20, 2009 Document No. 001-52164 Rev. ** - 7 -

Figure 16 Schematic Drawing of CY3210 Kit Board (UART Interface and LED CY3210 Kit Board) March 20, 2009 Document No. 001-52164 Rev. ** - 8 -

Appendix2: Board Photograph Figure 17 LF RFID Reader Demo Board Photograph Figure 18 LF RFID Reader Test Experiment Photograph March 20, 2009 Document No. 001-52164 Rev. ** - 9 -

About the Authors Name: Richard Xu Jemmey Huang Title: Co-op Bachelor Product Apps Manager Sr. Contact: jrxu@cypress.com jhu@cypress.com Document History Document Title: Low Frequency RFID Card Reader Document Number: 001-52164 Revision ECN Orig. of Change Submission Date ** 2677563 JHU 03/23/2009 New application note. Description of Change PSoC is a registered trademark of Cypress Semiconductor Corp. "Programmable System-on-Chip," PSoC Designer is trademark of Cypress Semiconductor Corp. All other trademarks or registered trademarks referenced herein are the property of their respective owners. Cypress Semiconductor 198 Champion Court San Jose, CA 95134-1709 Phone: 408-943-2600 Fax: 408-943-4730 http://www.cypress.com/ Cypress Semiconductor Corporation, 2009. The information contained herein is subject to change without notice. Cypress Semiconductor Corporation assumes no responsibility for the use of any circuitry other than circuitry embodied in a Cypress product. Nor does it convey or imply any license under patent or other rights. Cypress products are not warranted nor intended to be used for medical, life support, life saving, critical control or safety applications, unless pursuant to an express written agreement with Cypress. Furthermore, Cypress does not authorize its products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress products in life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges. This Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by and subject to worldwide patent protection (United States and foreign), United States copyright laws and international treaty provisions. Cypress hereby grants to licensee a personal, non-exclusive, non-transferable license to copy, use, modify, create derivative works of, and compile the Cypress Source Code and derivative works for the sole purpose of creating custom software and or firmware in support of licensee product to be used only in conjunction with a Cypress integrated circuit as specified in the applicable agreement. Any reproduction, modification, translation, compilation, or representation of this Source Code except as specified above is prohibited without the express written permission of Cypress. Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes without further notice to the materials described herein. Cypress does not assume any liability arising out of the application or use of any product or circuit described herein. Cypress does not authorize its products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress product in a life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges. Use may be limited by and subject to the applicable Cypress software license agreement. March 20, 2009 Document No. 001-52164 Rev. ** - 10 -