Radio Frequency Identification (RFID) technology is a system capable of identifying objects through a unique identifier (UID).
The RFID system consists of two main components: an RFID tag and an RFID reader.
The RFID tag has different formats. It can be a sticker like the one placed on supermarket products to prevent theft, on a plastic card, on a keychain, and it can even go under the skin like in animals.
There are read-only RFID tags. These labels are engraved with the identifier in the manufacturing process. Once a read-only RFID tag is generated, the UID can no longer be modified.
However, there are other types of RFID tags that are read and written. Such a tag can change your information thanks to RFID readers such as RC522 that allow you to read and write RFID tags of this type. In reality this component not only reads information, it is also capable of emitting a radio frequency signal.
How RFID Works
The power of the RFID reader and RFID tag is different. A module like RC522 must be connected to the electrical network to function. But what about RFID tags? How do you feed these types of cards?
The typical RFID stickers that go on many products do not have any batteries or power supplies. Neither do RFID-based access control cards.
The basic operating principle on which they are based is induction. These types of RFID tags are known as passive.
To read the information encoded on a passive RFID tag you need to withdraw the electromagnetic field that causes the electrons to move through the tag’s antenna and then power the chip.
When this happens, the powered chip is able to send the information stored in the RFID tag through the radio frequency. This is called backscattering.
The backscatter is detected and interpreted by the RFID reader, which then sends the data to a computer or a microcontroller such as the one with Arduino.
Just as a radio must be tuned to different frequencies to listen to different channels, RFID tags and readers must be tuned to the same frequency in order to communicate.
An RFID system can use multiple frequencies within the radio frequency spectrum. The radio frequency spectrum is between the Extremely Low Frequency (ELF) band and the infrared.
There are three types of system depending on the frequency they use.
- Low frequency or LF (125-134 KHz)
- High frequency or HF (13.56 MHz)
- Ultra-high frequency or UHF (433, 860 and 960 MHz)
Radio waves do not behave the same at all frequencies in the radio spectrum. This forces us to choose a frequency depending on the application we want to build.
Low frequency RFID or LF systems
RFID applications that use low frequency or LF have a long wavelength and can better penetrate thin and metallic objects. Furthermore, RFID systems using LF are ideal for reading objects with high water content such as fruits and drinks.
However, the range of the low frequency range is limited to a few centimeters. Memory on RFID tags is very limited due to the low data transmission rate and high production cost.
Typical RFID applications using low frequency include access control and tagging of animals.
High frequency RFID or HF systems
These use high frequency work very well on metal objects and products with a medium and high-water rate.
Generally, these RFID systems operate in a range of centimeters although the maximum reading is around the meter.
They use global standards and protocols such as NFC with larger memory options, although the reading range is still short and the data transmission rate is low.
Ultra-high frequency RFID or UHF systems
RFID systems based on ultra-high frequency generally offer a greater range than LF and HF types. We speak from a few centimeters to more than 20 meters. Another difference is that they can read data faster –several labels per second.
This technology is used to monitor warehouse items, to count people, to control races when runners cross the finish line, and for tolls and for access control to parking lots.
RFID reader with Arduino RC522
The RFID reader module RC522 is based on the MFRC522 integrated circuit.
It is usually accompanied by an RFID tag in a credit card format and an RFID tag in a keychain format.
The cards can have 1K or 4K memory divided into sectors and blocks. The RFID reader module RC522 is also used to write RFID tags.
The RFID reader RC522 uses the high frequency HF creating an electromagnetic field of 13.56 MHz. In theory it has a maximum range of 35 centimeters.
Something very interesting is that this module comes with a very useful interrupt pin. It is used so that instead of asking the RFID reader RC522 over and over again if there is an RFID tag nearby, the module will warn us through the pin when an RFID tag approaches and thus be able to activate the microcontroller.
The operating voltage is 2.5V to 3.3V. This implies that it is compatible with most microcontrollers on the market such as those used by Arduino.
The good news is that despite being powered by 3.3V, the logic levels are compatible with 5V making it compatible with any Arduino or microcontroller that works at 5V.
These would be the complete specifications taken from the technical data sheet:
|Frequency range||13,56 MHz|
|Supply Voltage||2,5V to 3,3V|
|Max. current||13-26 mA|
|Min. current||10 uA|
|Logic levels||5V y 3V3|
Components of the RFID RC522
- VCC: RFID reader power pin RC522. It supports a supply voltage between 2.5V and 3.3V.
- RST: it is a pin to turn the module on and off. As long as the pin is in the LOW state it will stay off with little consumption. When the state changes to HIGH the RC522 restarts.
- IRQ: interrupt pin that alerts the microcontroller when an RFID tag approaches the RFID reader RC522.
- MISO / SCL / TX: This pin has three functions. When the SPI interface is enabled, it functions as slave output and master input.
- MOSI: entry in the SPI interface.
- SCK: clock signal of the SPI interface.
- SS / SDA / RX: The pin acts as a signal input when the SPI interface is enabled.
RFID reader connection RC522 with Arduino UNO
The communication between Arduino and the RFID reader RC522 is quite complex at the programming level. Fortunately, we have ready-to-use Arduino tools such as the Grove Beginner Kit for Arduino, an All-in-one Arduino compatible board with 10 sensors and 12 projects that will surely help us saving valuable time.
First, we will run DumpInfo. This program does not write any data to the RFID tag. Just read the RFID tag if you can and display the information on the serial monitor.
Let’s have a look at the code. This will vary depending on the purpose for the RFID
Provide your comments below
If you loved this story, do join our Telegram Community.
Also, you can write for us and be one of the 500+ experts who have contributed stories at AIM. Share your nominations here.
Dean at Woxsen School of Business. He is a registered expert in Artificial intelligence, Intelligent Systems, Multi-agent Systems at the European Commission, and has been nominated for the Forbes 30 Under 30 Europe 2020 list.