Are you interested in an Arduino RFID project? In this video we take a look at the RFID RC522 reader and writer, and we learn how to use it with Arduino. We also use an OLED display to read the UID of the RFID tags. Let’s start!
Today we are going to build a very interesting project. For the first time we are going to use RFID tags with Arduino. I have built a simple project which reads the Unique ID (UID) of each RFID tag we place close to the reader and displays it on this OLED display. If the UID of the tag is equal to a predefined value that is stored in Arduino’s memory, then in the display we are going to see the “Unlocked” message. If the Unique ID of the card is not equal to the predefined value, the Unlock message won’t appear. Cool isn’t it?
Each RFID tag, has a small chip inside. If I place a flashlight under this RFID card you can see the small chip and the coil that surrounds it. This chip does not have a battery in order to get power. It receives power from the reader, this device, wirelessly using this big coil. The reader can read an RFID card like this one from a distance up to 20mm! The same chip exists in this type of RFID tags as well. Each RFID tag has a unique number that identifies it. That’s the UID that we display on the OLED display. Except from this UID, each tag can store data. In this type of cards we can store up to 1K of data! Impressive isn’t it? We won’t use this functionality today but will do so in a future video. Today, all we are interested in is to identify a specific card by its UID. The cost of the RFID reader and these two RFID cards is around $4.
WHERE TO BUY
Arduino Uno: http://bit.ly/Cheap_Uno
RFID module: http://bit.ly/2dvWew1
OLED display: http://bit.ly/OLED_DISPLAY
Power Bank: http://bit.ly/PowerBank_XiaoMi
Full disclosure: All of the links above are affiliate links. I get a small percentage of each sale they generate. Thank you for your support!
The connection with the Arduino Uno board is very simple. At first let’s connect the power of both the reader and the display. Be careful, the RFID reader must be connected to the 3.3V output of the Arduino Uno or it will be destroyed. Since the display can also work at 3.3V we connect the Vcc from both modules to the breadboards positive rail. This rail is then connected to 3.3V output of the Arduino Uno. Next we connect both GNDs to the breadboard GND rail. Then we connect the GND rail of the breadboard to Arduino GND.
The RFID reader module uses the SPI interface in order to communicate with Arduino. So we are going to use the hardware SPI pins of the Arduino UNO. RST pin goes to digital pin 9. IRQ pin stays unconnected. MISO pin goes to digital pin 12. MOSI pin goes to digital pin 11. SCK pin goes to digital pin 13 and lastly SDA pin goes to digital pin 10. That’s it. The RFID reader is connected. We now have to connect the OLED display with Arduino using the I2C interface. So, the SCL pin of the display goes to Analog Pin 5 and SDA pin of the display to Analog Pin 4. If we now power up the project and place an RFID card close to the reader we can see that the project is working fine! Now it’s time to take a look at the code of the project.
CODE OF THE PROJECT
Physics Experiments Puzzle Game
You can download my latest Android Game which is called Incredible Physics Experiments here:
Arduino Datalogger: https://www.youtube.com/watch?v=oei3Y6tOhVI
Arduino Weather Station Project: https://www.youtube.com/watch?v=9jN-3DtS1RI
Arduino Nokia 5110 LCD Display: https://www.youtube.com/watch?v=aDwrMeu4k9Y
Arduino OLED display tutorial: https://www.youtube.com/watch?v=A9EwJ7M7OsI
DIY Arduino: https://www.youtube.com/watch?v=npc3uzEVvc0
Educ8s.tv is a Youtube channel and website which is dedicated in developing high quality videos about DIY hardware and software projects. In this channel we develop projects with Arduino, Raspberry Pi, we build robots and simple electronic circuits. Check out our website as well for more information: http://www.educ8s.tv
SUBSCRIBE ON YOUTUBE
Never miss a video: https://www.youtube.com/subscription_center?add_user=educ8s