Understanding NFC part 2: The most common NFC Reader Modules

5/28/20256 min read

NFC Reader Modules, a quick overview

If you're not familiar with the range of available NFC development modules for sale, this section is for you. Otherwise, you can probably skip right over it! If you are still reading, however, it might help to understand the landscape of development boards already available before diving into NFC circuit design from scratch. These boards are, in many cases, invaluable for prototyping, learning, and testing NFC functionality without immediately committing to custom hardware. Here's a short overview of some of the most popular options among hobbyists, along with some of their strengths and limitations.

RC522-based Modules. Probably the most widely used module in NFC tutorials and examples found on YouTube and various blogs. It's often used for simple introductory projects because it supports ISO/IEC 14443A tags, and the community-offered library makes it very easy to read tags and write to tag memory. These modules are extremely inexpensive and often bundled with key fobs and cards. The RC522 modules are also a bit large at 60mm x 40mm (there's a smaller variant, the RC522 MINI, that I later found looks better). The downside is the very limited range and tag compatibility, although there are tutorials showing methods for range improvement, such as replacing the EMC filter inductors with ones that have higher current ratings. Unfortunately, these modules suffer from very inconsistent quality and performance. There's also poor documentation for advanced features, and NXP has marked the MFRC522 chip that it is based on as Not Recommended for New Designs. This means it’s best used as a hobbyist module. If you want advanced functions, this is best treated as an entry point before moving on to newer and more capable chips. Read on to the end of this article for a dive into the known issues and gotchas with this module.

Other boards worth mentioning:

  • X-NUCLEO-NFCnnA1 Breakout Boards: STMicroelectronics offers development modules in the form of shields made to fit Arduino Uno and NUCLEO boards with their own ST25R series NFC chips. Replace the nn with numbers from 01 to 09 to find all the different variants.

  • NXP NFC Evaluation Boards: NXP does not want you to keep using the MFRC522 chip, and instead encourage you to try their new and improved NFC chips by offering evaluation boards for their updated NFC chip lineup. Examples are the OM5578 and PN7150. These are more expensive and there's fewer beginner-friendly resources, but they offer much-improved performance and advanced functionality

PN532-based Modules. One of the most widely used NFC chips in hobbyist circles, with many advantages. It supports multiple protocols (NFC-A/B, FeliCa, ISO/IEC 14443, etc.) and can communicate via I2C, SPI, or UART. It's used in many commercial and open-source NFC projects and is therefore somewhat well-documented and supported (Arduino, Raspberry Pi, ESP32). On the downside, it has slower communication speeds compared to newer chips, and antenna range and performance can vary widely by module. There's also an issue with some clone modules having quality inconsistencies. These modules are often quite expensive compared to MFRC522 and larger in size, without offering longer reading range or significantly better Arduino library support. It does offer the option to use I2C, which could justify the extra cost by simplifying multi-board setups—but the I2C address is fixed to 0x48, so that doesn’t help much. An upside for many users is that some variants, such as the Adafruit module, are available as Arduino Uno shields, simplifying setup.

PN5180-based Modules. The “big brother” of the PN532. It implements the standard ISO14443 proximity card protocol but also supports the ISO15693 vicinity card protocol. That allows for longer read distances, but only when using tags compatible with ISO15693. It is larger than the MFRC522 modules but smaller than the PN532 ones. It uses the SPI interface, like the MFRC522, but the libraries available when I tested it were a bit difficult to use, and the community/tutorial ecosystem is still a bit lacking. There are more suppliers now, but it remains one of the less commonly offered modules.

The trouble with RC522...

As promised, here’s a deeper dive into the issues I found when experimenting with RC522 modules. It started when I found some very cheap RC522 NFC boards bundled with MIFARE Classic tags. I bought 10 of them and tried them with an Arduino Uno as shown in various guides and YouTube videos.

The first board worked fine with the RC522 library by Miguel Balboa (https://github.com/miguelbalboa/rfid/tree/master). The second board did not work—and also died. A quick glance at the datasheet for the MFRC522 frontend chip revealed that it works with 3.3V, not 5V! Replacing the Arduino Uno with an ESP32 dev board solved the problem, as the remaining boards worked. (Note to self: should have read the silkscreen on the module—it clearly says 3.3V!). The best option would be to use a 3.3V-to-5V level shifter, although care must then be taken with the SPI bus speed. Some level shifters are slow, so to avoid issues it's a good idea to lower the SPI speed. One tutorial I found uses #define MFRC522_SPICLOCK (400000u) to set SPI to 400kHz, which should be sufficient.

Next step was to use the SPI interface to control multiple of these modules from the ESP32. Not surprisingly, it worked with two modules—but surprisingly failed with three and four. Even more strangely, it then didn’t work again with just two modules (different ones this time). I added a separate power supply to rule out the ESP32’s 3.3V regulator as the problem. After trial and error, I found that three out of the nine remaining boards could be used together, but adding any of the other six caused everything to stop working. After reading a large number of forums and forum posts, it seemed like some variants of the MFRC522 chip has a poorly implemented SPI interface. Namely, the MISO line does not change to high impedance when the SS line is inactive! Meaning the MISO line is actively driven at all times by the modules that aren't supposed to drive it.

(The MFRC522 datasheet does not mention anything about the state of the SPI output pins when the chip is not selected, and does not contain any timing diagrams for multiple SPI bus usage. So it might be that the libraries used for some projects set up behavior that does not work with this chip - e.g. not waiting long enough before/after a change on the SS signal before starting communication, as it is not specified how long after SS goes low that the MISO goes tri-state. )

A few workarounds could solve this (using a separate tristate buffer for all MISO lines with the respective SS signals used for enable for the individual MISO lines; or holding the SS line active at all time for all modules, and having all the MISO lines as multiplexed individual inputs to the microcontroller instead), but the mystery was why some MFRC522 chips SPI interface worked and some didn't.

I hooked all the reader modules up quite close to each other, but if you want to try to spread them out more, be careful about capacitance loading on the SPI lines. SPI is not designed for long wiring distances, and can have issues with signal integrity and rise times if the wiring is long enough to introduce too much capacitance.

Another note is that the interrupt pin IRQ isn't used in most of the examples, and indeed the common Miguel Balboa library I linked in above has the following comment "Doesn't work: Use of IRQ pin. But there is a proof-of-concept example". Which means there might be interrupt functionality coming in future releases.

Given the low price point the modules is available at from some of the sellers, and the fact that specialized IC's such as these NFC frontends usually has relatively high costs, I started suspecting cheaper counterfeit or at least non-NXP chips being used. A quick look on Digikey.com at the components used in the module shows that the most expensive component is indeed the MFRC522 chip (sells for 5 Euro). A check at LCSC.com shows that they sell in bulk for "1500+ @ US$2.0857 exc. VAT" from NXP, but also that they sell a JSMSEMI variant of the chip for "1500+ @ US$0.7319 exc. VAT". I believe the JSMSEMI chips (or other variants that aren't the true NXP chips) are used to drive down the price, but these chips has a SPI interface that isn't correctly implemented. There's probably a mix of RC522 modules out there where some has the NXP chip, and some has the cheaper chip with faulty SPI interface. If a module sells for lower cost than the supposed price of just one of the chips on it, it's time to be suspicious.