Introduction: Arduino + MFRC522 RFID READER
Interfacing MFRC522 with Arduino Nano.This is one of my fav topics ever. Playing around with the RFID card reader and the PICCs. For this project
you must have the understanding of the SPI interface. We communicate the RFID reader with our Arduino
over the SPI protocol. The card reader and the tags communicate using a 13.56 Mhz electromagnetic field.
The tags that we will use are the ISO 14443A type. We will use the SPI library which is included in the
The Chip That is used in the card reader is : https://www.nxp.com/documents/data_sheet/MFRC522.pdf
We will also use the excellent RC522 library from Miguel Balboa.
Step 1: Parts Required
You can either use an Arduino Uno or Nano. I use Nano here.
1. MFRC522 Module
3. N number of tags
6. jumper cables
Step 2: Hardware Connection
This is standard SPI connection.
Arduino pin no. MFRC522 READER
Step 3: SOFTWARE
Once we have the connections up its time to write the code. There are many variations of the code available.
Some allow you to dump the UID of the card directly to the serial monitor. The AccessControl example
included in the library is a really good code but it is a bit overkill if you are new to the RC522 so i decided to
write a simpler version of the code. In my version of the code you define the UIDs of the Authorized cards in
the code. So once you burn the code into the arduino you cannot add new cards, however from a beginners
perspective you can learn a lot from this example.
here is the code
Step 4: Working
Ill be uploading a YouTube video tomorrow and will embed it here.
edit : uploaded the video