Arduino RFID Reader / MFRC522 Turorial
by sooncheng in Circuits > Arduino
194172 Views, 509 Favorites, 0 Comments
Arduino RFID Reader / MFRC522 Turorial
![s5q-mfrc-522-rc522-rfid-reader-ic-card-proximity.jpg](/proxy/?url=https://content.instructables.com/F5M/GYUR/IGGYFLK2/F5MGYURIGGYFLK2.jpg&filename=s5q-mfrc-522-rc522-rfid-reader-ic-card-proximity.jpg)
This is an simple tutorial for beginner on how to use a MFRC522 module using Arduino
Remarks* I apologize for my english's grammar because i am a chinese :)
Collecting Parts and Programs
![Arduino_Uno_-_R3.jpg](/proxy/?url=https://content.instructables.com/FNC/WUQ5/IGGYFNC0/FNCWUQ5IGGYFNC0.jpg&filename=Arduino_Uno_-_R3.jpg)
![51YGH1yrlzL._SY300_.jpg](/proxy/?url=https://content.instructables.com/F0P/6M1J/IGGYFNA2/F0P6M1JIGGYFNA2.jpg&filename=51YGH1yrlzL._SY300_.jpg)
![s5q-mfrc-522-rc522-rfid-reader-ic-card-proximity.jpg](/proxy/?url=https://content.instructables.com/F5M/GYUR/IGGYFLK2/F5MGYURIGGYFLK2.jpg&filename=s5q-mfrc-522-rc522-rfid-reader-ic-card-proximity.jpg)
![maxresdefault.jpg](/proxy/?url=https://content.instructables.com/F48/JOC2/IGHOHG4R/F48JOC2IGHOHG4R.jpg&filename=maxresdefault.jpg)
![all.cables.600.jpg](/proxy/?url=https://content.instructables.com/F3W/0E4Q/IGHOHGF5/F3W0E4QIGHOHGF5.jpg&filename=all.cables.600.jpg)
![Blue-LEd4.jpg](/proxy/?url=https://content.instructables.com/FKZ/VM58/IGI9G6QP/FKZVM58IGI9G6QP.jpg&filename=Blue-LEd4.jpg)
In this project, you needed these parts :
1.Aruduino Uno R3 (you can also use the other version of Arduino)
2.MFRC522 module
3.Arduino IDE ( you can download it from here https://www.arduino.cc/en/Main/Software )
4.5V relay (not necessary)
5.TIP31 transistor (not needed if you didn't use the 5V relay)
6.Jumper cables
7.LEDs
Programs :
You will need the RFID library and the programs which you can download from the file that i attached . If you don't know how to add a library , here's the link https://www.arduino.cc/en/Guide/Libraries
Connecting the Component
![Untitled Sketch_bb.jpg](/proxy/?url=https://content.instructables.com/F66/R2DE/IGHOHNAP/F66R2DEIGHOHNAP.jpg&filename=Untitled Sketch_bb.jpg)
![tip31.jpg](/proxy/?url=https://content.instructables.com/FZG/PU4F/IGHOHYYG/FZGPU4FIGHOHYYG.jpg&filename=tip31.jpg)
Connect the pins with following :
- MOSI ---> PIN 11
- MISO ---> PIN 12
- SCK ---> PIN 13
- SS/SDA ---> PIN 10
- RST ---> PIN 9
- LED ---> PIN 7 & GND
- Relay / Output power ---> VCC connect to 5V pins and the collector pin of the TIP31
- GND connect to GND pins,
- IN connect to emitter pin of TIP31
- Pin 8 is connected to the base pin of the TIP31
*Ways to connect the led and relay is shown on the image above ( i didn't connect the arduino with the mfrc522 module because i didn't know how to make it , so just follow the text above to connect them)
*Double check before you connect your arduino with your computer , the wrong connection could damage your arduino
Setting Up for Your Card
![RFID-Clamshell-Card-RFID-Smart-Card-for-access-control-RFID-Tag-Read-Write-Card-T5577-Chip.jpg](/proxy/?url=https://content.instructables.com/FW6/6IFV/IGHOHY3Y/FW66IFVIGHOHY3Y.jpg&filename=RFID-Clamshell-Card-RFID-Smart-Card-for-access-control-RFID-Tag-Read-Write-Card-T5577-Chip.jpg)
![Capture.JPG](/proxy/?url=https://content.instructables.com/F6A/ES1E/IGHOIDH9/F6AES1EIGHOIDH9.jpg&filename=Capture.JPG)
![Capture1.JPG](/proxy/?url=https://content.instructables.com/FJ0/M637/IGHOIE9T/FJ0M637IGHOIE9T.jpg&filename=Capture1.JPG)
![Capture3.JPG](/proxy/?url=https://content.instructables.com/F22/64D6/IGHOIDSH/F2264D6IGHOIDSH.jpg&filename=Capture3.JPG)
![Capture2.JPG](/proxy/?url=https://content.instructables.com/FSE/DH73/IGIBJ0I6/FSEDH73IGIBJ0I6.jpg&filename=Capture2.JPG)
![Capture4.JPG](/proxy/?url=https://content.instructables.com/FY3/FFUN/IGHOIEAK/FY3FFUNIGHOIEAK.jpg&filename=Capture4.JPG)
![Capture5.JPG](/proxy/?url=https://content.instructables.com/F07/9XCH/IGIBJ0LS/F079XCHIGIBJ0LS.jpg&filename=Capture5.JPG)
First:
Plug your arduino into your computer and select the correct board and com, then verify and upload your sketch
Second:
Open up serial monitor and set your baud to 9600 baud
Third:
Scan your card , your should saw a bunch of numbers pop out
Last:
Copy only the number and paste it to the column after "int cards[][5] = { (replace the space with ',' as shown in the image above, in my case, my card is 5 117 21 219 190 )
You're Done !
Pls comment if you spot any mistake of my instructables or any question to ask me