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 :)

Step 1: Collecting Parts and Programs

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


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

Step 2: Connecting the Component

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

Step 3: Setting Up for Your Card


Plug your arduino into your computer and select the correct board and com, then verify and upload your sketch


Open up serial monitor and set your baud to 9600 baud


Scan your card , your should saw a bunch of numbers pop out


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

<p>Hi,</p><p>Please help to provide Arduino card to use more than one RFID cards and tags or at least Master and standard tag provided with the kit.</p><p>Thanks.</p>
<p>Hi,I was wondering if I could change the pin values for all the pins as I have already used up most of the pins for other sensors? Thanks in advance</p>
For things i know , you can't. I would recommend you to change the sensor's pin. I'll do futher research. Sorry can't help here.
<p>Is works for HID type cards?</p>
not sure about it, sry
<p>how can i make this so i can use two or more cards ?</p>
<p>Go to the lines where you want to enter your card numbers, and just include more card numbers:</p><p><br>int cards[][5] = {<br>{5,117,21,219,190}, //Card 1<br>{181, 2, 398, 810, 193} //Card 2<br>...<br>};</p>
<p>I saw on the first page that you do not need the relay or the transistor. What is the difference in instructions and outcome if i choose not to use the relay and transistor?</p>
<p>Of course you can choose not to use a relay / transistor. I used it because the power output of the Arduino is too small, so i used a relay/transistor to supply a greater power to the things i want to use. Hope this helps !</p>
there is problem in connection between rfid reader and ardunio. ..plz help me i tried with 2 new readers with many other ways ...but still dint figure it out plz help me ..i have to submit my project within few days and i am out of option here
<p>I'm Sorry that i couln't help.. i am beginner of Arduino..</p>
<p>thanks for make this,,,</p><p>its very greatful...</p>
<p>You're Very Welcome !</p>
<p>I made it ^_^ <br><br>Thanks for a such a nice tutorial !<br>(Sorry for not posting the images/pictures because I made it to move further so I disassembled it :) )</p>
<p>Great ! Good Day !</p>
Excellent, thank you so much!
<p>You're Welcome</p>
Pin 9,10 voltage is more than 4v and MFRC522 max working voltage 3.3v so may be it can damage MFRC522 module?
<p>You can use logical level shifter . May be this would help you.</p>
you can make a circuit to lower down the voltage
<p>Has anyone tried this with the UNO R3 with WiFi. The application would be to read the card ID and send the transaction via Web/Cloud?</p>
<p>I am just starting to learn RFID - specifically using the MFRC522 and 13.56MHz tags. I have a question - is it possible to read a certain block only? The reason I ask is this - I am trying to make a game involving around 8 pieces, with each having an RFID tag embedded in it. I will be making several duplicates of each piece in case they are stolen or dropped and broken. If I could read a specific block, then I could write the playing piece number to that block in each of the duplicates, and have the Arduino read that specific block to confirm which playing piece has been positioned. Is this possible? This way I would only need to keep a list of 8 piece numbers, not 32 numbers (if I made 3 duplicates of each of the original pieces).</p>
hmm.. i am not sure about it , try playing with the code
<p>How do I use two cards at once?</p>
hmm.. i will try it out
<p>Thank you sir for the most simple RFID example. Works for me. </p>
welcome good day !
<p>GREAT INSTRUCTABLES!!<br>Question....</p><p>Is it possible to read NFC chips with this RFID reader? I have hooked it all up and it reads some RFID chips fine, but others not, thinking there is a difference between NFC and RFID. So is it possible</p>
i am not sure about it , you can try it out
<p>I just Registered to instructables just to thank You for the code and library, and add one line if(access){</p><p> // Serial.println(&quot;Welcome!&quot;);</p><p> digitalWrite(power, LOW);</p><p> delay(500);</p><p> digitalWrite(power, HIGH);</p><p> access = false; // This line</p><p>Becouse if access is granted some times unregistered ID card unlocked the relay so after granting access it disables it to unable unlocking by other cards </p>
ok thanks !
<p>i want to ask ,if i want to read block 4 ,where i must to add listing program<br>thank's</p>
Would you know how to use the mgrc522 module to copy the iOS from a tag and write it to another one all in one code
<p>I think what you are looking for is an RFID Emulator. Fairly sure these cards are hard-wired and can't be reprogrammed in software. What's your application that you want to reprogram cards for?</p>
<p>4 months and he is still thinking of a legit excuse.... hows i keep losing my work swipe card and would feel like james bond if i made my own copy :-D</p>
<p>thaaaaaaaaaaaaaaaaaaaaanx a lot </p>
<p>Where should i buy this RFID Reader / MFRC522?</p>
<p>ebay and its cost only 4 $</p>
<p>Thx! Simple and easy to modify :)</p>
We'll put together! I'll try this, thank you.
<p>you are welcome</p>
<p>Great tutorial</p>
<p>hello sir :) i have a problem with scanning my card. i don't know why too but i'm follow exactly what you did</p>
hi PhamA1 , try using another rfid reader or try to change the code (eg.changing the baud value) , double check to see wheter the connection is corret or not , it should works well :)
<p>so easy to understand...tq ;)</p>
<p>After abouth a year on my desk now i know how to use it. Thanks.</p>

About This Instructable




More by Sooncheng:Servo Modification for Continuous Turning (Simple) Dog's Computer ! L293D motors controller module / tutorial 
Add instructable to: