Arduino Projects

Arduino Firebase Database, Students Attendance system using RFID and GSM

Arduino Firebase Project Description:

Arduino firebase

Arduino Firebase, Students Attendance system using RFID and GSM– In this tutorial, you will learn how to make an advanced level student attendance system using Google Firebase Database, Arduino, GSM Sim900A Module, MFRC522 RFID Receiver Module, RFID Tags, and a 16×2 LCD. This is an IoT based project and used for monitoring the students’ attendance from anywhere around the world. With the help of this project, the students’ attendance is sent to the Google Firebase database through Nodemcu ESP8266 Wifi Module.

A few months back, I uploaded a very detailed getting started tutorial based on the Nodemcu ESP8266 Firebase. In This tutorial, I explained how to create your own Google firebase account and how to make your very first project to monitor a sensor in real-time from anywhere around the world. So, I highly recommend you should read my previous article on the Nodemcu ESP8266 Firebase, because in today’s article I will not explain the things which I have already explained in my previous tutorial. My previous tutorial on the Nodemcu ESP8266 Firebase got very popular on my YouTube channel “Electronic Clinic”.

Due to a lot of requests from my subscribers and followers, finally, I decided to make something complex. Don’t be afraid of the wiring and so many modules used in this project, I will go through all the details. So it really doesn’t matter if you have never used the GSM module, Nodemcu ESP8266, 16×2 LCD, and MFRC522 RFID Module.

Before I start explaining the circuit diagram and codes, first, let me explain how this project works, or you can watch the demonstration video given at the end of this article.

About the Arduino Firebase, Students Attendance System:

This is an RFID smart attendance system based on the Arduino Firebase. Parents get an instant SMS notification on their cell phones as soon as their child swipes the RFID card. This project is specially designed for the children safety; parents are informed whether they are in office or at home through an instant Real Time Automatic SMS. The school authorities can see the real time attendance on their computers or cell phones through a firebase database from anywhere around the world.


Arduino firebase

1001 and 1002 are the two students roll numbers. Currently, these fields are empty.

Swipe your card is written on the LCD which means that this system is ready for an RFID tag which can be an RFID key chain tag or an RFID card.

Arduino firebase

Each child will be given an RFID tag; it can be an RFID key chain or an RFID card. Now let’s practically check this system, as you can see in the picture above, in the database, the fields are empty. Let’s do it for the student number 1002. When I swiped the RFID card for student number 1002, attendance is marked was written on the LCD, the firebase database was updated and also a message was sent on the desired cell phone number. As you can see clearly in the picture below.

Arduino firebase

On the right side, you can see the student number 1002 is marked present.

Now this time let’s do it for student number 1001.

Arduino firebase


This system has an advantage even if you turn off the Arduino the Firebase database field values won’t be affected. In the video I practically demonstrated this, I turned off the Arduino and then again turned ON the Arduino, it had no effect on the Firebase data.

The Google Firebase database will be refreshed only when the Nodemcu ESP8266 module will be turned off and turned on again. So the Google Firebase database will only store the values for that day, the next day after restarting the Nodemcu ESP8266, the old attendance will be lost. As this system is only for the kids’ monitoring system on a daily basis.  While the students’ actual attendance will be marked by the teachers in classrooms.  The Arduino firebase database implementation is only for the inquiry purposes if in case the parents do not receive a message they can call the management, and then the management can double-check the attendance, they will verify through the firebase database and also from a teacher in the classroom.

The double-checking should be done by the management and the class attendance should be compared with the Google Firebase database to further ensure child safety.

There is a possibility that one student can swipe two or even more cards for his friends, while his friends are not physically present at school, so that’s why double-checking is a must and is the responsibility of the management.

Note: For the practical demonstration watch video given at the end of this article.

Without any further delay, let’s get started!!!

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

MFRC522 RFID module with tags:

12v Adaptor:

Arduino Uno

Arduino Nano

Sim900A GSM Module:

16X2 LCD

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!

About the Google Firebase Database:

Google Firebase is a Google-backed application development software used for creating, managing, and modifying data generated from any android/IOS application, web services, IoT sensors & Hardware. To learn more about the Google Firebase Console, you can read the official Google Firebase Documentation from Google Firebase.

Some of the most commonly asked questions about the Google Firebase Database.

What is Google Firebase Database?

The Firebase Realtime Database is a cloud-hosted database. When you build cross-platform apps with our iOS, Android, and JavaScript SDKs, all of your clients share one Realtime Database instance and automatically receive updates with the newest data.

What type of Database is Firebase?

Firebase is a Backend As A Service or BAAS, meaning it is a NoSQL data store that is in the cloud that your clients can access directly in realtime. Now this means Firebase has it’s own Realtime Database, Cloud Storage, Authentication, Hosting, and many other services.

Is Firebase better than SQL?

Unlike SQL there’s no schema for the database, no tables, no columns, it’s just a combination of key/value pairs. Firebase is based on a data structure used by the NoSQL database is vastly different from those used in a relational database. Some operations are faster in NoSQL than relational databases like MySQL.

Which is better Firebase or AWS?

If you’re a small team setting up, Firebase might serve you better than a heavy AWS setup. It also has a lower learning curve than AWS. On the flip side, Firebase makes it difficult to query larger datasets. Their database also doesn’t provide relational data, which could spell trouble for some newer companies.

Can I use Firebase for Free?

Yes, it’s free. You can use Analytics for advanced messaging – out of the box. Which products are paid? Firebase’s paid infrastructure products are the Realtime Database, Firebase Storage, Hosting, and Test Lab.

Is Firebase good for a large database?

The real-time functions in Firebase are not only suited for but designed for large data sets. The fact that records stream in real-time is perfect for this. Performance is, as with any large data app, only as good as your implementation.

Is Firebase a DBMS?

FireBase It’s a cloud service Also FireBase is a NoSQL database. In FireBase Data stored/processed in a cloud. FireBase is suitable for real-time applications. MySQL is a relational database management system (RDBMS)

Which language is used in Firebase?

The Firebase SDK supports programming in C++, Java, JavaScript, JavaScript/Node. js, Objective-C, and Swift. Angular, Backbone, Ember, and React are supported through bindings to the database.

Can Firebase Handle a million users?

This is possible since firebase is just a bucket of data that can be easily allocated for each user. Queries with limited sorting and filtering functionality can be performed with the firebase database. Cloud firestore assures automatic scaling and can handle 1 million concurrent connections and 10,000 writes/second.

Is Firebase secure?

1 Answer. The short answer is yes: by authenticating your users and writing security rules, you can fully restrict read / write access to your Firebase data. In a nutshell, Firebase security is enforced by server-side rules, that you author, and govern read or write access to given paths in your Firebase data tree.

Why Firebase is used in Android?

Firebase allows you to build apps that need authentication, database, file storage, analytics, and server-side functionality without having to own and manage infrastructure and software required for server-side support. Using firebase, you can access the google cloud store for storing images from your app.

How fast is Firebase realtime database?

Firebase uses document storage (JSON Documents), similar to MongoDB, so there are documents with fields and subdocuments, and nothing like rows or tables. Back to your question, yes Firebase is blazingly fast. I’ve used Firebase in building two apps of mine, and the response is amazing.

Is learning Firebase easy?

Yes, it is really easy for beginners. Firebase has very good documentation. It is easy to connect you application to Firebase. If you are an android developer using Android Studio, you can connect your app to Firebase with just a few clicks using assistant, without using a single line of code.

How to make the Google Firebase Account?

Create Google Firebase Database Account follow the same exact steps and then resume from here. After making the Google Firebase Database account, the next step is how to connect all the electronics. For the best understanding first let’s discuss each module in detail so that you can understand the circuit diagram.

About the GSM Sim900A Module:

Arduino firebase

This is the GSM Sim900A Module. The first thing that you will notice about this GSM module is that, it has no onboard voltage regulator, so be very careful while applying the voltage; Because voltages greater than 5 volts can easily damage this module. The ideal voltage for this GSM module is 4.7v but you can easily power up this GSM Sim900A module using a 5v adaptor. if you don’t have a 5v adaptor then you can make your power supply using lm317t adjustable variable voltage regulator, I have a very detailed tutorial on lm317t explaining everything.

There are a few things that I really like about the GSM sim900A module which are

  1. This is the cheapest GSM module available on the market.
  2. Another cool thing is, it can be easily interfaced with 5V supported controller boards like Arduino Uno, Arduino mega, Arduino Nano etc, and also with 3.3v controller boards like Nodemcu ESP8266 Wifi Module and ESP32, etc. The GSM Sim900A module interfacing with Nodemcu ESP8266 is already done “Nodemcu ESP8266 with GSM”.

GSM Sim900A Specifications:

As I said earlier the GSM Sim900A Module has no onboard voltage regulator. Although it has a power supply pin which can be connected with the Arduino’s 5 volts. When no sensors are connected with the Arduino then you can Run this GSM module without any problem. But the time you start connecting different sensors with the Arduino, then Arduino cannot provide enough current to the Sim900A Module due to which the Arduino starts resetting.

So, my recommendation is use an external regulated 5v power supply.

GSM Sim900A Pinout:

Arduino firebase

The white connector labeled with 4.7 – 5V, This is where we connect the external 5volt regulated power supply. It has a total of 9 male headers. The three male headers on the right side are not connected.

  • Pin number 1 is the VCC which can be connected with the Arduino’s 5volts. In my case as I will power up this module using the external power supply so I will leave this pin unconnected.
  • Pin number 2 is the ground, which will be connected with the Arduino’s ground.
  • Pin number 3 is the 5v TXD,
  • Pin number 4 is the 5v RXD,
  • Pin number 5 is the 3.3v TXD, and
  • Pin number 6 is the 3.3v RXD.

As Arduino is based on the 5v controller board so we will be using the 5v TXD and 5v RXD pins of the GSM Sim900A module.

If you want to study more about the GSM Sim900A a module, then read my article “GSM Sim900A with Arduino Complete Guide with GSM based Projects Examples“. This article explains everything about the AT commands and other things you want to learn.

About the MFRC522 RFID Module:

Arduino 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. But in this project I will interface this module with the Arduino.

Some of my previous projects based on the MFRC522 RFID Module.

·         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

While using the MFRC522 RFID module with the Arduino, you need to know the identity numbers of the RFID tags. The RFID tags identity numbers can be found using the following Arduino code.

Find the RFID Tags Identity numbers:

Download libraries

About the 16×2 LCD:

Arduino firebase

LCD stands for Liquid crystal display. 16×2 LCD is named so because; it has 16 Columns and 2 Rows. There are a lot of combinations available like 8×1, 8×2, 10×2, 16×1, etc. but the most used one is the 16×2 LCD. So, it will have 16×2 = 32 characters in total and each character will be made of 5×8 Pixel Dots.

Features of the 16×2 LCD module

  • Operating Voltage of the 16X2 LCD  is 4.7V to 5.3V
  • Current consumption is 1mA without backlight
  • This is an Alphanumeric LCD display module, which means you  can display alphabets and numbers
  • Consists of two rows and each row can print 16 characters.
  • Each character is built by a 5×8 pixel box
  • Can work on both 8-bit and 4-bit mode. “we will be using this LCD  in 4-bit mode”.
  • It can also display any custom generated characters. I will explain this in my upcoming tutorial.
  • Available in Green and Blue Backlight

Read more about the 16×2 LCD Arduino interfacing and Programming.

Arduino Firebase Students Attendance System Circuit Diagram:

Arduino firebase

On the upper left side is the 5V regulated power supply based on the famous LM7805 voltage regulator. The positive and GND pins of the DC female power jack J1 are connected with the input and middle legs of the 7805 voltage regulator. Two 470uf capacitors are connected at the input and output sides of the voltage 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 of the voltage regulator is connected with the Vin pin of the Nodemcu ESP8266 Wifi module while the ground of the power supply is connected with the ground pin of the Nodemcu module.

The Tx and Rx pins of the Nodemcu ESP8266 are connected with the Rx and Tx pins of the Arduino. Make sure the ground pin of the Arduino is connected with the ground pin of the Nodemcu module. The Arduino and Nodemcu module will communicate through serial communication.

Pin number1 and pin number 16 of the 16×2 LCD are connected with the ground.

Pin number 2 and pin number 15 of the 16×2 LCD are connected with the 5 Volts.

Pin 3 which is the contrast pin of the LCD is connected with the middle leg of the potentiometer. While the other two legs of the potentiometer or variable resistor are connected with the 5V and ground.

The RS pin of the LCD is connected with the analog pin A1 of the Arduino.

The EN pin of the LCD is connected with the analog pin A2 of the Arduino.

While the data pins D4 to D7 of the LCD are connected with the Arduino’s pins 6 to 3.

The TXD pin of the GSM Sim900A module is connected with the Arduino’s Pin number 7.

The RXD pin of the GSM Sim900A module is connected with the Arduino’s pin number 8.

The ground pin of the GSM module is connected with the ground pin of the Arduino.

The power supply pins of the GSM Sim900A module are connected with the 5V external power supply.

The MFRC522 RFID Module power supply pins are connected with the Arduino’s 3.3V and ground. The Rst pin of the MFRC522 RFID is connected with the Arduino’s Pin number 9. The ss pin of the MFRC522 RFID module is connected with the Arduino’s pin number 10. The MOSI pin is connected with the Arduino’s pin number 11. The MISO pin of the MFRC522 RFID module is connected with the Arduino’s pin number 12. The SCK pin of the MFRC522 RFID module is connected with the Arduino’s pin number 13.

So, that’s all about the circuit diagram.

Arduino Firebase Students Attendance System Programming:

The Arduino Firebase students attendance system is based on two programs. One program is written for the Arduino, while the other program is written for the Nodemcu ESP8266 Wifi Module. In this project the actual processing is done by the Arduino, while the Nodemcu Module is used to send the attendance data to the Google Firebase Database. So first let’s start with the Arduino Programming.

Before you start the programming first of all, make sure that you download all the necessary libraries.

GSM and RFID Arduino Programming:

Nodemcu ESP8266 Firebase Database programming:

If you have any question regarding this project, let me know in a comment. Don’t forget to subscribe to my website and YouTube Channel “Electronic Clinic”.

Watch Video Tutorial:

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...


Leave a Reply

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

Back to top button