RFID technology has made great progress in recent years. The widely used frequency bands are distributed in LF, HF, UHF and microwave bands. RFID systems in each frequency band have their own advantages and corresponding application scopes. For RFID systems in the LF frequency band, the most obvious advantage is that they have good penetration performance, such as penetrating liquid substances, buildings, human bodies, etc., and various animal cells and various gas molecules have little energy absorption in the LF frequency band.
It can be seen that the LF RFID system can work well in places that require good penetration, need to work uninterruptedly for a long time, and have high dangers (such as mines containing explosive gases). Because of these important advantages, this paper proposes a LF RFID system based on STM32, and designs, manufactures and tests the system. The test results show that the system has the characteristics of simple implementation and high reliability.
According to the principle of RFID system, LF system generally consists of the following three parts:
1) Electronic tag: It should be placed on the object to be identified. In this design study, the standard 125 kHz electronic tag EM4100 in industrial production is mainly used. It has a built-in small ROM and rectifier circuit, which can realize the contactless operation of transponder and reader.
2) Reader: It can be a read or write/read device, depending on the structure and technology used, and mainly plays the role of reading tags.
3) Antenna: The antenna should be placed between the transponder and the reader. It mainly plays the role of a bridge for communication. Whether it is energy supply or information transmission, it must be achieved through coupling elements.
1 Overall design of the system
This design uses STM32 as the core of the control module. By outputting a 125 kHz square wave source, it provides a driving signal for the power amplifier circuit behind it. The power amplifier circuit provides an amplified 125 kHz square wave to the antenna load, so that the antenna load can provide enough energy for the tag and obtain the tag information at the same time. The detection circuit realizes the detection function of the tag information. After detection, it is converted by the square wave signal conversion circuit and transmitted to the STM32 for decoding. At the same time, the tag information is transmitted to the host computer through the STM32 serial port for subsequent processing. The whole system block diagram is shown in Figure 1.
The difference between this system and the existing system is:
1) It does not require a dedicated decoding chip for decoding, but directly uses the capture function of STM32 to decode the electronic tag signal after detection conversion.
2) It uses the function of STM32 to output a pair of complementary square waves with dead zones to drive a pair of switch tubes, eliminating the need for complex analog electronic circuits to generate the same drive waveform.
3) Drawing on the principle of the half-bridge inverter circuit in the switching power supply, the IC circuit forms a series resonance, thereby achieving power amplification.
2 Hardware Circuit Design
2.1 Power Amplifier Circuit Design
The power amplifier circuit is formed by two switch tubes and an LC oscillation circuit (antenna). After analysis, the power amplifier circuit design is shown in Figure 2.
Among them, S1 and S2 are two PWM waves with dead zone control output by STM32 after driving chip IR2110, with a frequency of 125 kHz. In this way, the antenna L1 and capacitor C1 form a series resonant circuit with a resonant frequency of 125 kHz. The function of the resonant circuit is to enable the antenna to obtain the maximum current, thereby generating magnetic flux and obtaining a larger card reading distance.
The antenna itself is a low-resistance device. Connecting the antenna coil to the power amplifier circuit requires estimating the antenna's equivalent circuit and quality factor to obtain the recommended capacitance value of the matching circuit.
Generally speaking, due to the magnetic field radiation of the antenna, the requirement for the Q value is about 20 to 40. Now the antenna inductance is determined according to the antenna's Q value. Some current industrial standards mainly use winding 50 Ω, Q value of 30, and fR of 125 kHz when the operating frequency is 125 kHz. From the above 3 data, the inductance of the RFID antenna can be obtained as 375 μH.
Antenna winding: First, roughly wind a few turns, and then use an impedance analyzer to measure the inductance at an operating frequency of 125 kHz. In this design, the inductance is 89.03 μH after winding 10 turns. The calculation formula of inductance is:
L=N2×L1(3) (L1 represents the inductance of a single turn, N represents the number of turns of the coil). From the above formula, we can get the single turn inductance of the antenna is 0.89 μH. That is, from the above inductance value, we can get the required number of turns of the antenna, which is about 21 turns. [page]
After the antenna design is completed, the corresponding impedance matching circuit needs to be selected. Now this design mainly chooses to use CBB capacitors to achieve the purpose of impedance matching. The size of the capacitor is determined by the operating frequency of the system. The main purpose of impedance matching is to make the antenna work in the best state, that is, the antenna and the capacitor are in a resonant state.
From the above analysis of the capacitor size calculation formula:
This formula can determine the size of the capacitor to be 4.7 μF, and the withstand voltage value of the CBB capacitor also needs to be determined based on the peak value of the oscillation waveform passing through the capacitor.
2. 2 Design of envelope detection circuit
The design of the envelope circuit largely determines the reading distance of the RFID reader. Its main working principle is that the low-pass filter and the diode arm work in series to filter out the high-frequency 125 kHz wave. The circuit design mainly uses series diode envelope detection, and its working principle is shown in Figure 3.
The circuit is composed of a diode D and an RLC low-pass filter connected in series. When Us is input, the current i passing through D generates an average voltage UAV in the RLC circuit, which in turn reacts on D (called the average voltage negative feedback effect), affecting the current passing through the diode.
If Us=Vcm(1+MacosΩt)cosωct, then vov=ηdVcm+ηdMaVcmcosΩ=VAV+Vov, where vov∝vΩ, so linear detection is achieved.
3 Software Design
The key problem to be solved by the terminal software is how to correctly receive and decode data. The electronic tag selected in this RFID system is Manchester decoding, and the output signal of the electronic tag signal after passing through the Manchester encoder is shown in Figure 4.
The capture function of STM32 is used to capture the waveform after shaping. After each delay of 384μs, STM32 detects whether it is a high level. Then the previous and next levels are compared. If it is 01, it means data 0, and if it is 10, it means data 1.
The 64-bit data in the electronic tag is sent to the comparator in NRZ serial. The so-called NRZ is baseband transmission, that is, the electrical pulse of the digital signal is directly transmitted in the line. This is the simplest transmission method. The local area network for short-distance communication uses baseband transmission. After the reverse comparator, the Manchester code waveform is output and then directly input into STM32 for Manchester decoding. Its working principle: in a data reading cycle, if the pin is high, the data read is 1; if the pin is low, the data read is 0. In general, the working process of the entire system is the Manchester decoding process.
4 Program flow chart
4.1 STM32 overall program flow chart
STM32 overall program flow chart, as shown in Figure 5.
[page]
4.2 STM32 decoding process flowchart
Through the analysis of Manchester decoding principle, the microcontroller mainly processes the square wave signal given by the envelope circuit to obtain the corresponding data. The following system flowchart can be obtained as shown in Figure 6.
5 Test results
The reading distance of the electronic tag is about 10 cm. Figure 7 is the measured diagram of the STM32 outputting a 125 kHz complementary square wave with dead zone, and Figure 8 is the waveform after detection and conversion. From the waveform in Figure 7, it can be seen that the output waveform frequency of the STM32 is 125 kHz, and the dead zone time is 0.9 μs, which meets the design requirements.
6 Conclusion
Some existing readers require a dedicated card reader chip for decoding, and the circuit is complex. This article mainly introduces an LF RFID reader that uses STM32 decoding, complementary output, and dead zone control. With STM32 as its control core, it can detect and identify electronic tag cards and process the identified information accordingly. The circuit structure is simple and has certain practical value for reading EM4100 ID cards.
Previous article:Design of LF RFID identification system based on STM32
Next article:Design of STM32 debugging platform based on LabVIEW
Recommended ReadingLatest update time:2024-11-16 20:47
- Popular Resources
- Popular amplifiers
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
- EEWORLD University ---- Live playback: The most important component of the analog world - Signal chain and power supply: Amplifier special
- Help, how to calculate the voltage gain of an amplifier circuit?
- Xilinx XPE Power Estimation Software Setup Advisory
- Electronic password lock based on single chip microcomputer
- Anlu SparkRoad FPGA development board interface definition
- Analysis and Design of TL431 Feedback Loop
- Understanding the past, present and future of the Matter Protocol in one article
- Schematic diagram of various application circuits of LM324
- [Voice and vision module based on ESP32S3]-The materials have not arrived yet, so use ESPcam to test QR code recognition first
- Hongmeng Development Board Neptune (Part 3) - Problems encountered in the development environment