RFID Roundup! (Patreon)
Content
It's been over a year since I made my RFID Object Placement puzzle, which continues to be one of the most popular technologies used to provide the "magic" in escape room puzzles, and also has plenty of uses in other playful technology projects.
So, I thought I'd take this opportunity to test out some of the common RFID hardware currently available - note the advantages and disadvantages of each - and some of the "gotchas" to be aware of if you're considering using RFID in your own projects.
RDM6300
The simplest, cheapest option for reading a single RFID tag
The RDM6300 is a widely-available low-frequency (125kHz) RFID reader based on the EM4100 chip. Whenever an EM4100-compatible tag is brought within range, the reader automatically outputs the tag ID in a 14-byte datastream to a device connected to the TX pin. An Arduino can read this data very simply using a Serial.read() command to retrieve the tag, and compare this to a known "correct" value. It works well for detecting single cards at close distance, but that's about the limit of its use.
+ Incredibly cheap (around $1.40 each at AliExpress) and easily-available
+ Very simple to wire - requires only 5V, GND, and a single data wire to Arduino
+ Very simple software; no additional 3rd party libraries required, just read out whatever data is received on the serial connection pin. Example on my GitHub repository.
- Very limited read range (~3cm)
- Very hard to have more than one reader connected to single Arduino; can't reliably create more than one software-emulated serial port, and switching between readers on a single port using a multiplexer might get garbage data etc.
- No way to detect if a card is *currently* present on the reader - only to get the tag of the last card read
MFRC522
Very widely-used, with reliable, well-supported software library and plenty of examples
The MFRC522 is a high-frequency (13.56MHz) chip that uses the ISO14443 protocol, compatible with common "Mifare" cards and tags. This is the board I see most-commonly used in other projects, and is the one I used in my own previous RFID tutorial. It's very easy to get hold of, and very cheap. One thing to note is that it comes in a number of different varieties, and even when two boards are apparently based on exactly the same design, they can still vary significantly in the quality of components used. If you buy the absolute cheapest model available, don't expect it to be the most robust!
It uses the SPI standard peripheral interface, and one particular difference I've become aware of is that some boards are tolerant of receiving 5V on the SPI lines from the master device (SCK, MOSI, SS), whereas some are not. That means that, rather than connecting directly to a 5V Arduino Uno/Nano, you should place a 3.3V<>5V logic-level convertor like this on those lines (it will protect devices that are not 5V tolerant, and won't do any harm for those that are). If you are using a microprocessor that already uses 3.3V logic, like an Arduino Micro or ESP32, the convertor is not required.
+ Very cheap (around $1.60 on AliExpress)
+ Robust, well-support software library maintained on GitHub
+ Uses standard SPI connection - each reader requires (shared) MOSI, MISO, SCK, and (dedicated) SS line.
- Read range limited to about 4cm (can be extended slightly by replacing L1 and L2 inductors with same inductance but higher current rating, e.g. like these), as shown below
PN532
Not the cheapest, nor the smallest, nor the easiest to use, nor the best performing... best to scroll on past...
The PN532 is a newer chip than the MFRC522 and theoretically offers a number of benefits over it. However, from empirical testing, I couldn't find any advantages of using this board over the older MFRC522. It's more bulky, significantly more expensive, has less software support, and has no discernible improvement in read range. The board supports an I²C interface, which should have simplified the wiring for an array of readers but since every PN532 board has the same, fixed I²C address of 0x48 it's impossible to address more than one of them!
- Most expensive unit on test (around $20 on AliExpress)
- Supports I2C but, with fixed address of 0x48, only one reader can be used!
- Large physical size makes it harder to embed in props
PN5180
Offers greatest read range by far of any reader tested, using familiar SPI interface. If you want the best performance and don't mind experimenting with bleeding-edge software libraries, this is the reader for you
Like the MFRC522 and PN532, this is a 13.56MHz high-frequency RFID reader. However, rather than using the ISO14443 "proximity card" standard as with those readers, it also implements the ISO15693 "vicinity card" standard. This allows for much greater read ranges - I could comfortably read the ID of a card held about 15-20cm from the reader. Note that you need to get compatible tags/cards to make use of the ISO15693 standard - although they look identical to the ISO14443 tags you'd use with an MFRC522, you can't simply use the same tags and expect to get an improved range - you need dedicated ISO15693 tags such as these.
+ Significantly greater read range than any other reader tested here (~15-20cm)
+ Uses same SPI interface as the common MFRC522
- Uses ISO15693 protocol, for which tags are less common and more expensive than ISO14443
- Very new chip means few libraries, documentation, or other examples currently available. Please see my GitHub repository for code used here.
- Limited range of hardware suppliers, and cost is more expensive than some other readers, although still cheaper than PN532! (PN5180 is currently around $8 on AliExpress)