ESP8266IOT Projects

Nodemcu RFID Firebase, circuit diagram, and programming

Nodemcu RFID Firebase Project Description:

Nodemcu RFID Firebase

Nodemcu RFID Firebase, circuit diagram, and programming- In this tutorial, you will learn how to interface MFRC522 RFID Module with Nodemcu ESP8266 WiFi module and send the RFID card UID to the Google Firebase Database account. This is an IoT based project, the RFID Tags ids can be monitored from anywhere around the world using the Firebase Database account.

A few days back I posted an article “Arduino Firebase Database, Students Attendance system using RFID and GSM”. In this project, I also used the Arduino with Nodemcu. Later, I decided why not to use only the Nodemcu with RFID and send the RFID tags id numbers to the Firebase account.

I have been using Google Firebase in different projects, I have already explained the very details on how to set up your Google Firebase database account, and then how to use it in IoT related projects.

If you are a beginner and you have never used the Nodemcu ESP8266 WiFi Module, MFRC522 RFID Module, and Google Firebase Database account, then I highly recommend reading my articles given below.

Nodemcu ESP8266 Pinout, Features, and specifications

This tutorial is really important for beginners. In this tutorial, I have explained all the details covering Pinout, Features, and specifications.

Nodemcu ESP8266 Power Supply designing

This tutorial is also very important, after following this tutorial you will be able to design your own regulated power supply for the Nodemcu Module. You will need this power supply for practical implementation.

How to setup Firebase account for Nodemcu

This tutorial is the most important one, as in this tutorial I have explained step by step how to setup up your Google Firebase database account and then how to send the sensors data to the Google Firebase account.

Setup Firebase Account for ESP32

This tutorial is the latest one that I posted a few days ago. You can also follow this tutorial for creating your own Firebase Database account. The firebase account set up for the Nodemcu ESP8266 and the ESP32 are exactly the same.

You need to read the above articles if you want to learn everything like a Pro. After reading the above articles, you will be able to design your own advanced level projects using Nodemcu ESP8266 or ESP32 with the Firebase account.


The components and tools used in this project can be purchased from Amazon, the components Purchase links are given below:

Nodemcu ESP8266 WiFi Module:

LM7805 Voltage Regulator:

470uf capacitor:

DC Female Power Jack:

Female Headers:

Male Headers:

MFRC522 RFID module with tags:

Other Tools and Components:

Super Starter kit for Beginners

Digital Oscilloscopes

Variable Supply

Digital Multimeter

Soldering iron kits

PCB small portable drill machines

*Please Note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!



MFRC522 RFID Module:

Nodemcu RFID Firebase

As you can see this is the MFRC522 RFID module. The MFRC522 is a highly integrated reader/writer IC for contactless communication at 13.56 MHz. This module has a total of 8 male headers which are clearly labeled as SDA, SCK, MOSI, MISO, IRQ, GND, RST, and 3.3V. As per the datasheet, the typical voltage is 3.3V while the maximum voltage is 3.6 volts. This module can be easily powered up using the Nodemcu ESP8266 Wifi Module.

MFRC522 RFID Module Pins Description:

  • VCC supplies power for the module. This can be anywhere from 2.5 to 3.3 volts. You can connect it to 3.3V output from your Arduino. Remember connecting it to a 5V pin will likely destroy your module!
  • RST is an input for Reset and power-down. When this pin goes low, hard power-down is enabled. This turns off all internal current sinks including the oscillator and the input pins are disconnected from the outside world. On the rising edge, the module is reset.
  • GND is the Ground Pin and needs to be connected to the GND pin on the Arduino.
  • IRQ is an interrupt pin that can alert the microcontroller when the RFID tag comes into its vicinity.
  • MISO / SCL / Tx pin acts as Master-In-Slave-Out when the SPI interface is enabled, acts as a serial clock when the I2C interface is enabled and acts as serial data output when UART interface is enabled.
  • MOSI (Master Out Slave In) is SPI input to the RC522 module.
  • SCK (Serial Clock) accepts clock pulses provided by the SPI bus Master i.e. Arduino.
  • SS / SDA / Rx pin acts as Signal input when the SPI interface is enabled, acts as serial data when the I2C interface is enabled and acts as serial data input when the UART interface is enabled. This pin is usually marked by encasing the pin in a square so it can be used as a reference for identifying the other pins.


MFRC522 RFID Reader connection with Nodemcu ESP8266:

Nodemcu RFID Firebase

Above is the most basic circuit diagram explaining how the MFRC522 RFID module is interfaced with the Nodemcu module. The above connections are enough to get started with the Nodemcu and RFID module. You can simply power up all the electronics using your computer or laptop. Once you are done with the basic programming then you can follow the circuit diagram given below.

  • The 3.3V pin of the MFRC522 RFID module is connected with the 3.3V pin of the Nodemcu module.
  • The reset pin of the RFID module is connected with the D1 pin of the Nodemcu ESP8266.
  • The IRQ pin of the MFRC522 Module is not connected.
  • The MISO pin of the RFID module is connected with the D6 pin of the Nodemcu module.
  • The MOSI pin of the RFID reader is connected with the D7 pin of the Nodemcu ESP8266.
  • The SCK pin of the RFID module is connected with the D5 pin of the Nodemcu and
  • Finally, the SDA pin of the MFRC522 RFID Reader is connected with the D2 pin of the Nodemcu ESP8266 Wifi Module.


Nodemcu RFID Firebase Programming:


Nodemcu RFID Firebase, Final Circuit Diagram:

Nodemcu RFID Firebase

After, you are done with the basic programming. Finally, you can use this circuit to power up the Nodemcu ESP8266 wifi module. The regulated 5V power supply is based on the LM7805 voltage regulator. J1 is the DC female power jack and this is where we connect the external 12 to 25V power supply. Two 470uf Decoupling capacitors are connected at the input and output sides of the 7805 Regulator. A 330-ohm resistor is connected in series with a 2.5V LED. This is a current limiting resistor.

A wire from the output leg of the 7805 Linear voltage regulator is connected with the VIN pin of the Nodemcu module. Make sure the ground leg of the 7805 voltage regulator is connected with the ground pin of the Nodemcu ESP8266 WiFi Module. The connections of the MFRC522 RFID module with the Nodemcu remain the same.


RFID related projects:

·        Arduino RFID Servo Motor Control system for Car Parking “MFRC522”

·        RFID & GSM based student Attendance Alert message to parents

·        RFID based students attendance system with message Alert

·        Bike anti-theft system using MFRC522 RFID module

·        Raspberry Pi Home Automation using RC522 RFID, Smart Home

 

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

One Comment

  1. Hi, I tried compiling the code and got an error which says, ‘n’ is not declared. The error is from this line. String name = Firebase.pushInt(“logs”, n++);

    I hope you can help me solve this error. Thank you in advance!

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button