Build an RFID reader with Arduino and the RC522 RFID module

The RC522 RFID module is a cheap module which comes with a card and a dongle.
You can buy it at our local electronics shop the STORES for € 4,85 (search for ‘rfid’ in the pricelist). Only thing you have to do before you can use it is solder the header.

If you are unfamiliar with using and programming an Arduino, consider taking this Getting Started tutorial first.

Next, add it to a breadboard and build the circuit:

IMG_20160524_125755

For details on the wiring refer to the pinout of the Arduino type you use (I used a Nano here) and the pinout of the RFID module.  A table with pin numbers is also in the Arduino Sketch (read on).

Now we can program the Arduino and start viewing RFID data in the console. Follow the steps in this tutorial for this. I summarize the steps:

  • Install the Arduino MFRC522 Library by downloading the zip-file and extracting it to the library folder of the Arduino program (eg. C:\Program Files (x86)\Arduino\libraries).
  • Create a new sketch with the example code (in the tutorial right below “Dumping Mifare’s TAGs Example”).
  • Upload the sketch (check the proper setup under Tools in the menu of the Arduino IDE, see the image below for my settings).
  • Start the Serial Monitor via Tools > Serial Monitor and test the application.

Arduino_sketch_for_rc522

If you want to read the data from the RFID reader in a Java application, continue reading this article: “Add RFID identification to a Java application”.