RFID Reader Using NodeMcu ESP8266 & Visuino

by RonFrtek in Circuits > Arduino

119 Views, 1 Favorites, 0 Comments

RFID Reader Using NodeMcu ESP8266 & Visuino

RFID Reader using NodeMcu ESP8266 & Visuino

In this project we are going to read RFID tags using NodeMcu ESP8266 & Visuino and display tag ID on the OLED Display.

Watch the Video!

What You Will Need

RFID module MFRC522.jpg
NODEMCU-ESP8266.jpg
RFID.png
VisuinoAdvrtisemenArduinoGiga_1 (1).jpg
F5OFEUQJJ4ZYFKY.LARGE.jpg
breadboard.png


The Circuit

2024-07-19_18-54-00.jpg
  • Connect NODEMCU ESP8266 Pin [3V3] to RFID pin [3.3V]
  • Connect NODEMCU ESP8266 Pin [3V3] to OLED pin [Vcc]


  • Connect NODEMCU ESP8266 Pin [GND] to RFID pin [GND]
  • Connect NODEMCU ESP8266 Pin [GND] to OLED pin [GND]


  • Connect NODEMCU ESP8266 Pin [D1] to RFID pin [RST]
  • Connect NODEMCU ESP8266 Pin [D2] to RFID pin [SDA]
  • Connect NODEMCU ESP8266 Pin [D3] to OLED pin [SCL]
  • Connect NODEMCU ESP8266 Pin [D4] to OLED pin [SDA]


  • Connect NODEMCU ESP8266 Pin [D5] to RFID pin [SCK]
  • Connect NODEMCU ESP8266 Pin [D6] to RFID pin [MISO]
  • Connect NODEMCU ESP8266 Pin [D7] to RFID pin [MOSI]

Start Visuino, and Select the NodeMCU ESP-12 Board Type

select-board-uno.jpg
NodeMCU ESP-12.jpg

Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "NodeMCU ESP-12" as shown on Picture 2


Set the Board and RFID Component

RFID.png
2024-07-19_19-31-15.jpg
  1. First Add "RFID TAG READ (SPI)" component to Visuino, you can download it here and on the page is also a step by step tutorial on how to add it to Visuino
  2. In Visuino Select "NodeMCU ESP-12" board and in the properties window set I2C pin [SCL] to 3 and set I2C pin [SDA] to 4

In Visuino Add & Set Components

2024-07-19_19-48-29.jpg
2024-07-19_19-49-14.jpg
2024-07-19_19-50-06.jpg
2024-07-19_20-18-56.jpg
2024-07-19_20-20-15.jpg
  • Add "RFID 522 SPI" component
  • Add "OLED I2C" component


  • Double click on the "DisplayOLED1" and in the "Elements" window drag "Draw text" to the left side and in the properties window set "Size" to 2 and "Text" to ID
  • Drag "Text Field" to the left side and in the properties window set "Size" to 2 and "Y" to 30
  • Close the "Elements" window

In Visuino Connect Components

2024-07-19_20-26-02.jpg
2024-07-19_20-26-20.jpg
nodemcu-rfid.png
  • Connect "RFID5221" pin [SPI] to "NodeMCU ESP-12" pin [SPI]
  • Connect "RFID5221" pin [Chip Select] to "NodeMCU ESP-12" digital pin [2]
  • Connect "RFID5221" pin [Reset] to "NodeMCU ESP-12" digital pin [1]
  • Connect "RFID5221" Key pin [Out] to "DisplayOLED1" > "TextField1 " pin [In]
  • Connect "DisplayOLED1" Out pin [I2C] to "NodeMCU ESP-12" I2C pin [In]

Generate, Compile, and Upload the Code

2024-07-19_20-29-41.jpg

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Play

If you power the  NodeMcu ESP8266 board and place the RFID Card on the RFID module the OLED Display will show the Tag ID.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable, you can download it and open it in Visuino: https://www.visuino.eu