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.
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]
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.
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.
[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.
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.
Previous article:Extending battery life with dual processors
Next article:Small tracker based on GPS and GPRS'
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [HPM6750 Review Part 2] CoreMark Verification (Comparison between external flash xip and internal sram)
- This week's review information is here~
- "Head First Design Pattern (Chinese Edition)", a must-read for programmers!
- Huawei RF Basic Knowledge Training Full Solution PDF
- TI's AXC level translator
- I would like to ask the experts to help explain the filtering principle of this picture, as well as the calculation of inductance and capacitance parameters.
- Disassembly preview, does anyone know what this is?
- 【TGF4042 Signal Generator】+ Unboxing Review
- 【Smart Sports Watch】Work Submission
- TMS320F2812 complete program to implement SVPWM