Application of RF IC-MFRC522 in smart meters

Publisher:WanderlustSoulLatest update time:2012-04-20 Source: 国外电子元器件 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

Since the external conditions such as ambient temperature, humidity, oil pollution, etc. have obvious effects on contact card meters such as prepaid water meters, prepaid gas meters, prepaid heat meters, etc., the card holder wear, corrosion, moisture, dust, etc. greatly shorten the service life of the card meter, so contactless card meters have become the current development trend. Here is a design of an intelligent meter based on the RF device MFRC522, which improves the mission life of the intelligent meter.

2 Introduction to MFRC522

2.1 Features of MFRC522

MFRC522 uses serial communication to communicate with the host. According to user needs, SPI, I2C or serial UART working mode can be selected, which is conducive to reducing wiring, reducing PCB board area and reducing costs. The main features of MFRC522 are as follows:

Highly integrated modulation and demodulation circuit, with few external components, the output driver stage can be connected to the antenna;

Support ISO/IEC 14443 FypeA interface and MIFARE communication protocol:

Supports multiple host interfaces: 10 Mbit/s SPI interface; I2C interface, the rate of fast mode is 400 Kbit/s, the rate of high-speed mode is 3400 Kbit/s; serial UART, the transmission rate can be up to 1228.8 Kbit/s, the frame depends on the RS232 interface;

The unique transmitter power-down mechanism can shut down the internal antenna driver, that is, shut down the RF field to achieve low power consumption;

Built-in temperature sensor, automatically stops RF transmission when overheated;

Independent multiple power supply groups to avoid mutual interference and optimize EMC characteristics and signal decoupling performance;

2.5 V to 3.6 V low voltage, low power consumption, using 5 mm × 5 mm × 0.85 mm ultra-small HVQFN32 package. [page]

2.2 Internal structure of MFRC522

The internal structure block diagram of MFRC522 is shown in Figure 1. MFRC522 supports various microcontroller interfaces that can be directly connected, such as SPI, I2C and serial UART. MFRC522 can automatically detect the current microcontroller interface type at power-on or hard reset when its interface is reset. The microcontroller interface can be identified by the logic level of the reset control pin. The data processing part implements data parallel-to-serial conversion. CRC and parity check can be supported. Since MFRC522 operates in a fully transparent mode, it supports all layers of ISO14443A. The status and control part is used to configure the device to adapt to environmental influences and optimize performance. When MFRC522 communicates with MIFARE, a high-speed CRYPTO1 stream cipher unit and a reliable non-volatile key memory are used. The analog circuit contains the sending part of the ultra-low impedance bridge driver output. This allows its maximum operating distance to reach 100 mm. The receiver detects weak response signals and decodes them.

Application of RF IC MFRC522 in Smart Meters

MFRC522 has 4 pages of 64 registers for sending and receiving data. Page 0 is the command and status register, which is used to set data communication and status flags; Page 1 is the command register, which is used to control and set the transmitter and receiver; Page 2 is the internal structure register, which is used to control the transmission pin and set the timer; Page 3 is the test mode register, which is mainly used for chip testing.

MFRC522 uses a variety of commands to complete the setting and operation of registers, thereby realizing operations such as reading, writing, and verifying RFID cards. Table 1 lists the operation commands of MFRC522. [page]

Application of RF IC MFRC522 in Smart Meters

2.3 Working Principle of MFRC522

The system transmits data by resonating the antenna connected to MFRC522 and the IC card coil, thus completing the communication between the module and the card. MFRC522 modulates the send buffer data according to the register settings to obtain the send signal, which is sent in the form of electromagnetic waves driven by the antenna via the TX1 and TX2 pins. The IC card responds by load modulation of the RF field. At the same time, after the antenna detects the response signal of the IC card, it is transmitted to the RX pin through antenna matching. The internal receive buffer of MFRC522 detects and demodulates its signal, and performs corresponding processing according to the register settings, and then sends its data to the microcontroller.

3 Application of MFRC522 in Intelligent Instruments

3.1 Requirements for smart meters

Since most smart meters are powered by batteries, it requires the RF module to consume as little power as possible while ensuring normal data communication. MFRC522 can provide a variety of methods to reduce power consumption, including soft power-off and hard power-off. When soft power-off, the power consumption of MFRC522 is 10μA, and when hard power-off, the power consumption of MFRC522 is 5μA. However, for products with static power consumption of only 3μA to 4μA, the power consumption of 5μA still cannot meet the requirements. Therefore, the NRSTPD pin of MFRC522 can be connected to DVCC through a 100 kΩ resistor. When there is no operation on the card, control DVCC to completely power off the MFRC522 to minimize power consumption, and use a button or reed switch to implement the trigger program to power the MFRC522.

3.2 Interface Mode

MFRC522 can provide three interface modes, as shown in Table 2. Select the corresponding interface mode according to the microcontroller used.

Application of RF IC MFRC522 in Smart Meters

Taking MSP430F413 as an example, the I2C interface mode is selected, and its connection diagram is shown in Figure 2. Since the single-chip MSP430F413 does not have a port line with an I2C interface function, I/O is used to simulate the I2C timing.

Application of RF IC MFRC522 in Smart Meters

[page]

3.3 Antenna Matching Circuit

The signal transmitted from the TX1 and TX2 pins is a modulated 13.56 MHz carrier signal supplemented by several passive components for matching and filtering to directly drive the antenna.

The internal receiving circuit uses the card's response signal to modulate the double-sideband of the subcarrier. It is recommended to use the VMID signal generated internally by MFRC522 as the bias of the RX pin input signal. In order to stabilize the VMID output, a capacitor C4 needs to be connected between VMID and GND. The receiving circuit needs to connect a voltage divider circuit between RX and VMID. Its matching circuit and signal receiving circuit are shown in Figure 3. Figure 3 includes EMC low-pass filter (L01, L02, C01, C02), receiving circuit (R66, C3, R65, C4), antenna matching circuit (C03, C04, C2A, C2B, R2A, R281) and antenna. The size of the components in the EMC low-pass filter and receiving circuit can refer to the relevant data, and generally no adjustment is required, but it should be noted that the component accuracy and material must meet the design requirements, such as: L01 and L02 should use 1.0μH±10% filter inductors, and C01 and C02 should use NP0 material ±2% capacitors.

Application of RF IC MFRC522 in Smart Meters

3.4 Antenna Design

To achieve communication with contactless cards, smart meters must have antennas that transmit and receive radio frequency signals. Relevant antennas can be designed for different applications. The antenna design steps are: setting the working environment of the smart meter; optimizing the coupling coefficient between the antenna and the contactless card; and determining the antenna coil and matching capacitor.

The contactless IC card antenna uses inductive coupling to generate magnetic flux, which is used to provide power to the IC card device and transmit data between the two. Therefore, the antenna coil current is required to be maximum to generate maximum magnetic flux; power matching to maximize the use of the available energy of the magnetic flux; sufficient bandwidth to transmit the data modulated carrier signal without distortion.

The actual antenna inductance and capacitance values ​​depend on factors such as antenna resistance (PCB type), conductor thickness, distance between lines, protective layer material, nearby metal or ferrite, etc. After the antenna design is completed, adjust the matching capacitor based on the longest distance that can accurately communicate. The matching capacitor should also be made of NP0 material.

3.5 MFRC522 card recognition software design

MFRC522 can read all contactless cards that comply with ISO/IEC 14443 TYPE A interface. The card recognition process is as follows:

(1) After MFRC522 is reset, the card can be operated.

(2) Reset response: When the card enters the operating range of the reader, the reader communicates with the reader using a specific protocol to determine whether the card is an S50 RFID card, i.e., verify the card type.

(3) Anti-collision closing mechanism. When there are multiple S50 cards in the operating range of the reader, the anti-collision closing circuit first selects one of the cards as the object for next processing, while the unselected cards are in idle mode to wait for the next selection. This process returns the serial number of the selected card.

(4) Select the card. Select the serial number of the selected card and return the capacity code of the card.

(5) Three-way mutual authentication. After selecting the card to be processed, the reader can determine the sector number to be accessed and perform a password check on the sector. After three-way mutual authentication, communication can be carried out through the encrypted stream (when selecting the next sector, the password of the new sector must be checked.).

4 Conclusion

With the popularization of RFID card applications, its technical indicators have also been improved, and it has the technical ability to be widely used. MFRC522 is in a leading position in the application of smart meters and various handheld devices with its advantages of low operating voltage and low power consumption. Therefore, MFRC522 has a large development space.

Reference address:Application of RF IC-MFRC522 in smart meters

Previous article:Extending battery life with dual processors
Next article:Small tracker based on GPS and GPRS'

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号