Skip to content
Free Delivery on Orders Above Rs 999/- Pan-India
Cash on Delivery Available for Orders above Rs.500/- and Upto Rs 3000/-
SAVE more when you BUY more. Upto 30% Off on BULK PURCHASE
GST Invoices for Your Business
Dedicated Technical Support Team
Safely Delivering Genuine Products PAN INDIA

Smart Attendance System Using Arduino and RFID

Smart Attendance System Using Arduino and RFID
-
Written By - Robocraze -
๐Ÿ“… Updated on 24 Aug 2026
โœจ Summarize with AI
โœ… Prompt copied

Summary

Managing attendance manually is time-consuming and prone to errors. Registers can be misplaced, proxy attendance is difficult to detect, and updating digital records often requires additional administrative work.

An RFID-based smart attendance system solves these problems by automatically identifying users through RFID cards and recording attendance with accurate timestamps. By combining an ESP32 development board with an RFID reader, institutions can build an attendance system that is reliable, scalable, and capable of syncing records to the cloud.

In this tutorial, you'll learn how to build a smart attendance system using ESP32 and the MFRC522 RFID module, understand the circuit connections, upload the code, and explore ways to expand the project for schools, colleges, and offices.

Building a Smart Attendance System - Cover Image

Components Required

Component Purpose
ESP32 Development Board Main controller with built-in Wi-Fi
MFRC522 RFID Module Reads RFID cards and tags
RFID Cards / Key Fobs User identification
OLED Display (0.96") Displays attendance status
Breadboard Prototype the circuit
Jumper Wires Connect components
Buzzer (Optional) Audio confirmation after scanning
LED (Optional) Visual scan indicator
USB Cable Programming the ESP32
Li-ion Battery + TP4056 (Optional) Backup power supply

ย 

IOT Based Student Attendance System

Components and Supplies

STM32F103C6T6A Board โ€“ STMicroelectronics ARM Cortex-M3-based microcontroller board. -Development Board -RobocrazeSTM32F103C6T6A Board โ€“ STMicroelectronics ARM Cortex-M3-based microcontroller board. -Development Board -Robocraze

STM32F103C6T6A Board STMicroelectronics ARM Microcontrollers

STM32F103C6T6A Board STMicroelectronics ARM Microcontrollers The STM32F103C6T6A Board is a microcontroller development board based on the Arduino Nano size.ย The microcontroller has a 32-bit ARM Cortex-M3 core.ย It is a powerful and economical solution for those who want to improve themselves in the field of embedded...
Rs 189/-
Rs 189/-
Rs 249/-
Save Rs 60/-
Arduino Uno R3 Board compatibleArduino Uno R3 Board compatible

    Arduino Uno R3 Board compatible

    Arduinoย Uno R3 Compatible Boardย  The Arduino Uno R3 ATMEGA328P Development Board is more than just a microcontroller board; it's a gateway to endless possibilities in the world of electronics and programming. For hobbyists, students, and makers, it stands out as the best Arduino Uno...
    Rs 420/-
    Rs 420/-
    Rs 699/-
    Save Rs 279/-
    ๐Ÿ† Best seller
    ESP32 NodeMCU Dev Board (CP2102, 30-Pin) โ€“ WiFi & BLE support. -Nodemcu ESP Board -RobocrazeESP32 NodeMCU Dev Board (CP2102, 30-Pin) โ€“ WiFi & BLE support. -Nodemcu ESP Board -Robocraze

      ESP32 NodeMCU 30-Pin WiFi Bluetooth Development Board CP2102

      ESP32 NodeMCU 30-Pin WiFi Bluetooth Development Board CP2102ย  The ESP32 NodeMCU 30-Pin WiFi Bluetooth Development Board is a versatile microcontroller board designed for IoT, home automation, robotics, wireless monitoring, and embedded system development. Powered by a dual-core ESP32 processor and equipped with built-in WiFi...
      Rs 445/-
      Rs 445/-
      Rs 597/-
      Save Rs 152/-
      0.96" 6-Pin OLED Display โ€“ OLED screen for Arduino, ESP32 & Raspberry Pi.-OLED Display -Robocraze

      0.96in 6 pin OLED Display

      0.96in 6 pin OLED Display This is the 0.96 inches (2.44 cm) OLED Display Moduleย is a precise small, This OLED module can be interfaced with any microcontroller using SPI protocol. It is having a resolution of 128x64. OLED (Organic Light-Emitting Diode) is a self-lighting...
      Rs 231/-
      Rs 231/-
      Rs 405/-
      Save Rs 174/-
      TP4056 Li-ion Battery Charging Module โ€“ TP4056 micro USB charger for lithium cells. -Battery Charger -RobocrazeTP4056 Li-ion Battery Charging Module โ€“ TP4056 micro USB charger for lithium cells. -Battery Charger -Robocraze

        TP4056 Li-ion Battery Charging Module

        TP4056 Li-ion Battery Charging Module The TP4056 1A Li-Ion Lithium Battery Charging Module โ€“ Mini B USB, a compact solution for efficient charging. This module, with its Mini USB interface, offers hassle-free connection to a computer's USB port for battery charging. For non-USB sources,...
        Rs 18/-
        Rs 18/-
        Rs 34/-
        Save Rs 16/-
        Jumper Wire Set - M2M, M2F, F2F (40 pcs each) โ€“ Ideal for Arduino & prototyping. Electronic Components - RobocrazeJumper Wire Set - M2M, M2F, F2F (40 pcs each) โ€“ Ideal for Arduino & prototyping. Electronic Components - Robocraze

          Jumper Wire Set - M2M, M2F, F2F (40 pcs each)

          Jumper Wire Set - M2M, M2F, F2F (40 pcs each) These DuPont jumper wires for electronics is a premium quality wire manufactured by using quality assured material and advanced techniques, which make them up to the standard in this highly challenging field. This 120pcs...
          Rs 145/-
          Rs 145/-
          Rs 169/-
          Save Rs 24/-
          1660 Tie-Point Solderless Breadboard โ€“ Large breadboard for circuit prototyping. Electronic Components - Robocraze1660 Tie-Point Solderless Breadboard โ€“ Large breadboard for circuit prototyping. Electronic Components - Robocraze

          1660 tie-point Solderless Breadboard

          1660 tie-point Solderless Breadboard Theย 1660 Points Solderless Breadboardย is an excellent size with more than enough room for more advanced prototyping.ย There are two terminal strips with 1260 tie-points and 4 distribution strips with 400 tie-points.ย ย The breadboards accept a variety of wire sizes from 20 to...
          Rs 676/-
          Rs 676/-
          Rs 699/-
          Save Rs 23/-

          How the Smart Attendance System Works

          A smart attendance system arduino rfid project works by reading the unique UID stored on each RFID card, verifying it against an authorized database, and automatically recording attendance with an accurate timestamp.

          The attendance system follows a simple workflow:

          1. A student taps an RFID card on the RFID reader.
          2. The MFRC522 reads the unique card ID.
          3. The ESP32 checks whether the UID exists in the database.
          4. If the card is valid, attendance is recorded with a timestamp.
          5. The OLED display confirms successful registration.
          6. The attendance data is stored locally or uploaded to a cloud database using Wi-Fi.

          This architecture makes the system suitable for classrooms, laboratories, offices, and access-control applications.


          Circuit Connections

          MFRC522 RFID Module โ†’ ESP32

          RFID Module Pin ESP32 Pin
          SDA (SS) GPIO 5
          SCK GPIO 18
          MOSI GPIO 23
          MISO GPIO 19
          RST GPIO 22
          GND GND
          3.3V 3.3V

          OLED Display (IยฒC)

          OLED Pin ESP32 Pin
          VCC 3.3V
          GND GND
          SDA GPIO 21
          SCL GPIO 22

          Note: Some ESP32 boards may use different default IยฒC pins. Verify your board documentation before uploading the code.

          RFID Wiring Diagram

          ย 

          Arduino Code

          #include <SPI.h>
          #include <MFRC522.h>

          #define SS_PIN 5
          #define RST_PIN 22

          MFRC522 rfid(SS_PIN, RST_PIN);

          void setup() {
          ย  Serial.begin(115200);
          ย  SPI.begin();
          ย  rfid.PCD_Init();
          ย  Serial.println("Scan your RFID card...");
          }

          void loop() {

          ย  if (!rfid.PICC_IsNewCardPresent())
          ย  ย  return;

          ย  if (!rfid.PICC_ReadCardSerial())
          ย  ย  return;

          ย  Serial.print("Card UID: ");

          ย  for (byte i = 0; i < rfid.uid.size; i++) {
          ย  ย  Serial.print(rfid.uid.uidByte[i], HEX);
          ย  ย  Serial.print(" ");
          ย  }

          ย  Serial.println();

          ย  rfid.PICC_HaltA();
          }

          This example reads the RFID card UID. You can extend it by storing registered IDs and sending attendance records to Google Sheets, Firebase, or another database.

          Step-by-Step Build Instructions

          Step 1

          Assemble the ESP32, RFID module, OLED display, and optional buzzer on the breadboard.

          Step 2

          Connect the MFRC522 module to the ESP32 using the SPI interface.

          Step 3

          Wire the OLED display using the IยฒC pins.

          Step 4

          Install the required Arduino libraries:

          • MFRC522
          • SPI
          • Adafruit SSD1306 (if using OLED)
          • Adafruit GFX

          Step 5

          Upload the Arduino sketch to the ESP32.

          Step 6

          Scan an RFID card and verify that the UID appears in the Serial Monitor.

          Step 7

          Store authorized UIDs and add cloud integration if required.


          Expanding the Project

          Once the basic attendance system is working, you can add additional features such as:

          • Google Sheets logging
          • Firebase database integration
          • Automatic email or SMS notifications
          • Face recognition
          • Fingerprint authentication
          • Attendance reports
          • Classroom dashboard
          • Student database
          • QR code backup authentication

          Troubleshooting

          Problem Possible Solution
          RFID card not detected Verify SPI wiring and power connections
          "Communication failure" Confirm the SS and RST pins match the code
          OLED remains blank Check IยฒC address and SDA/SCL wiring
          ESP32 repeatedly resets Use a stable power supply
          Wi-Fi connection fails Verify SSID and password
          Invalid card readings Ensure cards operate at 13.56 MHz

          Applications

          A smart attendance system arduino rfid solution can be deployed in schools, colleges, offices, libraries, laboratories, and training centres where quick, contactless attendance tracking is required.

          An RFID attendance system can be used for:

          • School attendance
          • College attendance
          • Office employee tracking
          • Laboratory access
          • Library management
          • Hostel entry monitoring
          • Event registration
          • Smart campus automation

          Improving Reliability

          To deploy a smart attendance system arduino rfid in a real-world environment, use a stable power supply, secure enclosure, local data storage during network outages, and encrypted cloud communication for improved reliability.

          For production deployments, consider:

          • Local data storage during network outages
          • Battery backup using Li-ion cells
          • Custom PCB instead of breadboards
          • Protective enclosure
          • Encrypted communication
          • Automatic cloud synchronization

          These improvements make the system suitable for long-term institutional use.

          The performance of the entire project depends on using a reliable RFID reader. The MFRC522 RFID Moduleย is widely used for Arduino and ESP32-based attendance systems because it is affordable, easy to interface, and supports standard 13.56 MHz RFID cards.

          Final Thoughts

          Building an RFID-based attendance system is an excellent project for learning embedded systems, wireless communication, and automation. Beyond recording attendance, it introduces concepts such as cloud connectivity, data management, and IoT architecture that are widely used in real-world applications.

          Excerpt

          Build an automated attendance system using Arduino and an RFID module. Complete circuit, code and setup guide for a college or office project.
          Prev Post
          Next Post

          Leave a comment

          Please note, comments need to be approved before they are published.

          Thanks for subscribing!

          This email has been registered!

          Shop the look

          Choose Options

          Edit Option
          Back In Stock Notification
          Compare
          Product SKU Description Collection Availability Product Type Other Details

          Choose Options

          this is just a warning
          Login
          Shopping Cart
          0 items
          FREE SHIPPING!
          โ‚น100 OFF
          โ‚น200 OFF
          โ‚น999
          โ‚น2500
          โ‚น4900
          WhatsApp Chat Chat