
An RFID based attendance system transforms the tedious task of manual attendance tracking into an automated, error-free process. What makes this project particularly exciting is how a few inexpensive components can replace expensive commercial systems, giving you complete control over features while learning valuable skills in embedded programming and circuit design.
In this comprehensive Arduino project, we'll guide you through building a complete RFID attendance system using Arduino that automatically detects check-ins and check-outs, displays real-time information on an LCD, and stores attendance logs with precise timestamps. Through our experience developing hundreds of electronics projects at CircuitDigest, we've designed this system to be both educational and practical - you'll master SPI and I2C communication, learn EEPROM data management, and create a professional-grade solution that can handle everything from office attendance to classroom management. By the end of this tutorial, you'll have a fully functional system that rivals commercial solutions costing hundreds of dollars.
Project Quick Overview
Build Time: 4-6 hours | Cost: $25-35 | Difficulty: Beginner-Intermediate
What You'll Learn: SPI/I2C communication, EEPROM storage, Real-time clock programming, RFID card management
Applications: Office attendance, Student tracking, Access control, Visitor management
Table of Contents
- Why Choose Arduino for RFID Attendance Systems?
- Features
- Components Required
- Circuit Diagram
- Step-by-Step Assembly Guide
- Arduino Code
- Adding Personal Data to RFID Cards
- Project Demonstration
- Frequently Asked Questions
- Troubleshooting Guide
- Applications
- Future Enhancements and Upgrades
- Other Projects using RFID Module
- Conclusion
Why Choose Arduino for RFID Attendance Systems?
This RFID based attendance system using Arduino project offers superior reliability compared to commercial solutions. The Arduino platform provides cost-effective customization, while the MFRC522 RFID module ensures accurate card detection. Our system includes automatic check-in/check-out detection, real-time clock integration, and persistent data storage that survives power outages. More than that, what more fun than building your own attendance system and having it used daily by your colleagues or student friends? This is not only a simple DIY RFID attendance tracker, but also opens room to future enhancements like IoT integration, wireless attendance monitoring, and much more.
Arduino RFID Attendance System Features
This attendance system is designed to be highly adaptable, making it useful across schools, offices, events, and even industrial settings. For more advanced security applications, you might also want to explore our RFID door lock system using Arduino, which shares similar hardware components.
This simple DIY Arduino attendance system can track student and employee attendance, manage access to libraries or meeting rooms, and monitor visitor entries. In workshops, gyms, or community centers, it ensures accurate logging and helps with usage tracking. Industrial setups can benefit from features like shift monitoring, worker safety tracking, and contractor management. This contactless attendance system ensures hygiene compliance while providing accurate employee time tracking and student attendance monitoring capabilities.

At its core, the system offers automatic check-in/check-out detection, real-time timestamping using an RTC module, and reliable data storage even during power loss. A user-friendly LCD interface provides real-time updates, while advanced features like live people count, scrolling name display, RFID-based access control, and automatic log management make the system smart and efficient. It can be operated either via physical buttons or through the serial monitor for added flexibility.
Components Required for RFID Attendance System

Arduino Uno (x1): Microcontroller board with ATmega328P, operates at 5V. Perfect for RFID-based projects and Arduino attendance tracking systems.
RFID Reader MFRC522 Module(x1): 13.56MHz RFID reader with SPI interface, supports read/write operations.
Tiny RTC DS1307 Module (x1): Real-time clock with I2C interface and CR2032 battery backup. It also has an AT24C32 EEPROM IC (32KB external memory module using I2C interface) in it.
16x2 I2C LCD Display (x1): HD44780-compatible character display with blue backlight and I2C backpack.
Push Buttons (x2): 6x6mm tactile buttons, normally open, used for user input.
RFID Cards/Tags (Required): Mifare Classic 1K, 13.56MHz, with 1KB memory for each card/tag.Breadboard (x1): Full-size breadboard for easy prototyping and circuit connections.
Jumper Wires (Required): Male-to-male and female connectors for wiring components.
Power Supply (x1): 5V–12V DC adapter for powering the Arduino, or in my case, we use 2S Lithium-ion battery connecting to Vin pin.
RFID Attendance System Circuit Diagram
Below you can see the circuit diagram used in the RFID-based attendance system project. If you are completely new to using RFID, you can check out this tutorial on interfacing RC522 RFID module with Arduino , where we explore the basics of RFID technology with Arduino and how it works with microcontrollers.

All components operate at 5V, with the Arduino providing regulated power to all modules. The I2C bus operates at 5V logic levels, while the RFID reader uses 3.3V internally but is 5V tolerant. The system employs multiple communication protocols to interface with various peripherals. The SPI (Serial Peripheral Interface) protocol is used exclusively for communicating with the MFRC522 RFID reader, ensuring high-speed data transfer.
The system utilizes multiple I2C devices, each with a specific address for communication. The 16x2 I2C LCD display is assigned the address 0x27 and serves as the main output interface. The DS1307 Real-Time Clock (RTC) module, operating at address 0x68, keeps track of time, while the AT24C32 EEPROM module, addressed at 0x50, is used for data storage purposes.
For user interaction, simple digital I/O is used to read inputs from push buttons. Now let's see the detailed wiring connection used in the RFID attendance tracker system, starting from the Arduino UNO.
The MFRC522 RFID reader is connected to the Arduino Uno with VCC (3.3V) to 3.3V, GND to GND, RST to digital pin 7, SDA (SS) to digital pin 10, MOSI to pin 11, MISO to pin 12, and SCK to pin 13.
The DS1307 RTC module has both the DS1307 and AT24C32 EEPROM in it. So, connect both via I2C, with VCC to 5V, GND to GND, SDA to analog pin A4, and SCL to analog pin A5. The same applies to the I2C LCD.
Additionally, the user interface is equipped with two push buttons: a "Menu" button connected between digital pin 8 and GND, and a "Select" button connected between digital pin 9 and GND. Both buttons make use of internal pull-up resistors configured in the code.
Step-by-Step Arduino RFID System Assembly Guide
Step 1: Setup Breadboard
Place your Arduino next to the breadboard for easy access. Use a red wire to connect the Arduino's 5V pin to the breadboard's positive power rail, and a black wire to connect the Arduino's GND pin to the breadboard's negative power rail. This creates your main power distribution for all components.
Step 2: Connect RFID Module
Plug the RFID module into the breadboard with enough space around it. Connect the VCC pin to the Arduino's 3.3V (not 5V), and GND to the ground rail. For the data connections, wire SDA to Pin 10, SCK to Pin 13, MOSI to Pin 11, MISO to Pin 12, and RST to Pin 9.
Step 3: Connect LCD Display
Wire your LCD display to the Arduino using the I2C connection. Connect VCC to the 5V power rail, GND to the ground rail, SDA to Pin A4, and SCL to Pin A5. The LCD should now share the same I2C bus that other devices will use.
Step 4: Connect the RTC Module
Connect the RTC module to the same I2C bus as the LCD. Wire VCC to the 5V power rail, GND to the ground rail, SDA to Pin A4 (same connection as LCD), and SCL to Pin A5 (same connection as LCD). Both devices can share these I2C lines.
Step 5: Add Buttons
Insert two push buttons on the breadboard in convenient locations. For each button, connect one terminal to the ground rail and the other terminal to a digital pin on the Arduino. Connect the first button to Pin 8 and the second button to Pin 7.
Step 6: Check Everything
Double-check all your connections against the circuit diagram. Make sure every component has proper power and ground connections, and that no wires are loose or touching each other. Connect the USB cable from your computer to the Arduino to provide power and programming capability.
Step 7: Test

Upload a simple test program to verify all components are working. The LCD should display text, the RFID reader should detect cards, and the buttons should respond when pressed. If everything works, your assembly is complete and ready for the main program.
Remember: This assembly is suited for both updating the card data and running the main attendance logger program.
Arduino Code for RFID-Based Attendance System
The GitHub repository contains everything needed for the project, including the main attendance system code that manages RFID scanning, logging, and user feedback; a card programming utility to write and manage personal data like name and ID on RFID cards; and complete documentation with circuit diagrams to guide users through hardware setup and system integration.
Let’s Begin with the Code,
Libraries and Dependencies
#include <SPI.h>
#include <MFRC522.h>
#include <Wire.h>
#include "RTClib.h"
#include <LiquidCrystal_I2C.h>
SPI: Handles communication with the RFID reader (Built-in Library)
MFRC522: Library for interfacing with the MFRC522 RFID module.
Wire: Supports I2C communication for RTC, EEPROM, and LCD. (Built-in Library)
RTClib: Manages the DS1307 Real-Time Clock module.
LiquidCrystal_I2C: Used to control a 16x2 LCD via I2C.
#define RST_PIN 7 // optional
#define SS_PIN 10
#define BUTTON_MENU 8
#define BUTTON_SELECT 9
Pin definitions establish the hardware connections, with RST_PIN and SS_PIN configured for RFID communication, and BUTTON_MENU and BUTTON_SELECT pins set up for user interface navigation.
#define EEPROM_ADDR 0x50
MFRC522 mfrc522(SS_PIN, RST_PIN);
RTC_DS1307 rtc;
LiquidCrystal_I2C lcd(0x27, 16, 2);
MFRC522::MIFARE_Key key;
Initializes objects for RFID, RTC, LCD, and default RFID key.
#define NAME_START_BLOCK 4
#define ID_START_BLOCK 8
#define NAME_LENGTH 32
#define ID_LENGTH 8
#define MAX_LOGS 30
#define LOG_SIZE 80
int logCount = 0;
int insideCount = 0;
Data storage constants define the RFID card memory layout with NAME_START_BLOCK and ID_START_BLOCK specifying where personal information is stored on cards.
Maximum lengths for names and IDs are set, along with log storage parameters including MAX_LOGS for total entries and LOG_SIZE for individual record size. These are totally customizable.
System state variables track the current number of stored logs, people currently inside the facility, and various timing and navigation states.
These values are customizable, but must be updated in both the main and personal data utility code for consistency.
enum MenuState {
MENU_HOME,
MENU_VIEW_LOGS,
MENU_STATUS,
MENU_CLEAR_LOGS,
MENU_SET_TIME
};
MenuState currentMenu = MENU_HOME;
int menuIndex = 0;
unsigned long lastButtonPress = 0;
unsigned long lastLCDUpdate = 0;
unsigned long homeScreenTimer = 0;
bool inSubMenu = false;
int logViewIndex = 0;
unsigned long lastScrollTime = 0;
int scrollPosition = 0;
String currentScrollText = "";
bool isScrolling = false;
#define SCROLL_DELAY 500
#define SCROLL_PAUSE 2000
bool menuButtonPressed = false;
bool selectButtonPressed = false;
The MenuState enumeration defines different screen modes including home display, log viewing, status checking, log clearing, and time setting. Navigation variables manage menu indexing, button debouncing, LCD update timing, and scrolling text animation parameters.
The setup function runs once when the Arduino powers on and gets everything ready to work.
Serial.begin(9600);
pinMode(BUTTON_MENU, INPUT_PULLUP);
pinMode(BUTTON_SELECT, INPUT_PULLUP);
It starts serial communication so you can see debug messages on your computer, then configures the button pins to use internal pull-up resistors. This means the buttons read as HIGH normally and LOW when pressed.
lcd.begin();
lcd.backlight();
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("RFID Attendance");
lcd.setCursor(0, 1);
lcd.print("Starting up...");
delay(2000);
SPI.begin();
mfrc522.PCD_Init();
Wire.begin();
The LCD display gets initialized and shows a startup message while other components are being prepared. The system starts SPI communication for the RFID reader, initializes the RFID module itself, and begins I2C communication for the clock and memory chip.
if (!rtc.begin()) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("RTC Error!");
Serial.println(F("RTC Error!"));
while(1); // Stop execution if RTC fails
}
for (byte i = 0; i < 6; i++) {
key.keyByte[i] = 0xFF;
}
One critical check happens here - if the real-time clock doesn't respond properly, the system stops completely. This makes sense because accurate timestamps are essential for an attendance system. The RFID security key gets set to the default values that work with most MIFARE cards.
logCount = readInt(0); // Read log count from address 0
insideCount = readInt(2); // Read inside count from address 2
if (logCount < 0 || logCount > MAX_LOGS) logCount = 0;
if (insideCount < 0) insideCount = 0;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("System Ready!");
lcd.setCursor(0, 1);
lcd.print("Inside: ");
lcd.print(insideCount);
delay(2000);
Serial.println(F("\n=== RFID IN/OUT System Ready ==="));
Serial.print(F("Total logs: "));
Serial.println(logCount);
Serial.print(F("People inside: "));
Serial.println(insideCount);
Serial.println(F("Commands: v(view), c(clear), s(status), t(time)"));
Serial.println(F("Scan card for IN/OUT..."));
displayHomeScreen();
The system then reads saved data from the external memory chip, including how many log entries exist and how many people are currently inside. If these numbers seem wrong (negative or too large), they get reset to safe values. Finally, the LCD shows a "System Ready" message along with the current inside count, and the home screen appears.
void loop() {
handleButtons();
handleSerialCommands();
handleLCDUpdates();
handleRFIDScan();
handleScrolling();
}
handleButtons(): Checks for button presses with debouncing.
handleSerialCommands(): Allows users to type commands like view, clear, or status through the Serial Monitor.
handleLCDUpdates(): Refreshes the display and handles timeouts.
handleRFIDScan(): Continuously scans for cards and updates logs.
handleScrolling(): Animates text for names or IDs longer than 16 characters.
With this, the coding part is complete. Let's move on to the demonstration.
Adding Personal Data to RFID Cards

To test the system, we first need to load RFID cards with individual names and IDs. This is done using the ReadandWrite_PersonalData.ino sketch.

1. Open Serial Monitor (9600 baud)

2. Select Write Mode and Place Card and Enter Data:
Type 'w' and press Enter
System prompts: "WRITE mode selected. Place card near reader..."
Position RFID card near reader
Enter name when prompted (max 32 characters)
Enter ID when prompted (max 8 characters)
System confirms successful write

3. Verify Card Data:
Type 'r' for read mode
Place the same card near reader
Verify stored name and ID are correct
Now let us upload the Main code(RFIDAttendanceSystem_Main.ino) and check the Attendance logging functionality
RFID-based Attendance System Demonstration

After successfully uploading of main code, you can see the system starts working,

When the system is powered on, it displays the "RFID Attendance" startup message, initializes all hardware components, loads stored data from the EEPROM (such as log count and inside count), and shows the home screen with the current time and inside count.

The home screen displays the current time (HH: MM) and date (DD/MM/YYYY) on the top line, and the inside count along with the "SCAN>" prompt on the bottom line, updating automatically every 30 seconds.
When a valid RFID card is scanned, the system shows a "Scanning card..." message, reads the stored name and ID from the card, validates the data (ensuring both name and ID are present), determines the new status based on the last recorded status, updates the inside count (adding 1 for IN or subtracting 1 for OUT), logs the entry with a timestamp to the EEPROM, displays the result for 3 seconds, and then returns to the home screen.
Before using the system, you must set the correct time on the RTC (Real-Time Clock). This can be done easily via the Serial Monitor, as you can see in the image below.

Project Demonstration

Scenario 1: Morning Check-in
Employee arrives at office
Presents RFID card to reader
System shows "Rithik Krisna M CHECKED IN"
Inside count increases from 0 to 1
Log entry created with timestamp

Scenario 2: Lunch Break
Same employee scans card before lunch
System shows "Rithik Krisna M CHECKED OUT"
Inside count decreases from 1 to 0
New log entry shows OUT status

Scenario 3: Invalid Card
Uninitialized card is presented
System shows "ACCESS DENIED - Invalid Card"
No log entry is created
Inside count remains unchanged
This RFID-Based Attendance System provides a robust, scalable solution for automated attendance tracking. With proper assembly and configuration, it offers reliable operation suitable for various professional and educational environments. The modular design allows for easy customization and expansion to meet specific requirements.
For updates, additional features, and community support, visit the project's GitHub repository and Arduino community forums.
Frequently Asked Questions - RFID Attendance System
How does an RFID based attendance system using Arduino work?
An RFID based attendance system using Arduino works by detecting RFID cards when they're brought near the MFRC522 reader. The Arduino reads the card's unique ID, checks if it contains valid employee/student data, determines whether it's a check-in or check-out based on the last recorded status, logs the entry with a timestamp from the RTC module, and displays the result on the LCD screen while updating the people count.
What is the cost of building an Arduino RFID attendance system?
The total cost for building this RFID attendance system using Arduino is approximately $25-35, including Arduino Uno ($15), MFRC522 RFID module ($5), RTC module ($3), I2C LCD ($5), RFID cards ($2), and supporting components ($5). This is significantly cheaper than commercial solutions that cost $200-500.
Can this Arduino RFID system work without an internet connection?
Yes, this RFID based attendance system using Arduino works completely offline. All attendance data is stored locally in the AT24C32 EEPROM module, and the DS1307 RTC maintains accurate timestamps even during power outages. No internet connection or external database is required for operation.
How many people can this Arduino attendance system handle?
The current system can store up to 30 attendance logs and unlimited RFID cards. Each log entry contains name, ID, timestamp, and status. The system can be easily modified to increase storage capacity by using larger EEPROM modules or adding SD card storage for handling hundreds of users.
What are the advantages of Arduino over commercial attendance systems?
Building an RFID attendance system using Arduino offers complete customization, lower cost (90% cheaper), no monthly fees, offline operation, easy maintenance, and the ability to add features like access control, visitor management, or integration with existing systems. You also learn valuable programming and electronics skills.
Arduino RFID Attendance System Troubleshooting Guide
1. LCD Display Problems
Issue: LCD shows garbled text or remains blank
Solutions:
Check I2C connections (A4 = SDA, A5 = SCL)
Verify LCD I2C address (default 0x27, may be 0x3F)
Check power connections (5V and GND)
Run I2C scanner code to detect LCD address
Adjust contrast potentiometer on LCD backpack
Issue: LCD backlight works but no text
Solutions:
Verify I2C address in code matches physical address
Check soldering on I2C backpack
Test with simple "Hello World" LCD sketch
2. RFID Reader Issues
Issue: Cards not detected
Solutions:
Check SPI wiring (MOSI=11, MISO=12, SCK=13, SS=10, RST=7)
Verify 3.3V/5V compatibility (MFRC522 is 3.3V but 5V tolerant)
Try different RFID cards (some cards may be incompatible)
Check antenna connection on RFID module
Reduce distance between card and reader
Issue: "Authentication failed" errors
Solutions:
Cards may have modified security keys
Use fresh/new RFID cards with default keys
Verify card type (Mifare Classic 1K recommended)
Check if cards are write-protected
3. RTC Module Problems
Issue: Time resets on power cycle
Solutions:
Check CR2032 battery in RTC module
Replace battery if voltage < 2.5V
Verify RTC module connections
Set time using serial command 't'
Issue: RTC not found error
Solutions:
Check I2C connections
Verify RTC module is DS1307 compatible
Run I2C scanner to detect RTC at address 0x68
Check for loose connections
4. EEPROM Storage Issues
Issue: Logs not saved between power cycles
Solutions:
Verify EEPROM connections (I2C)
Check EEPROM address (0x50)
Test EEPROM with simple read/write sketch
Some RTC modules include AT24C32 EEPROM
5. Button Response Problems
Issue: Buttons not responding or multiple triggers
Solutions:
Check button connections (pin to GND when pressed)
Verify INPUT_PULLUP configuration in code
Add hardware debouncing capacitors (100nF)
Increase software debounce delay
Check for loose connections
6. Power Supply Issues
Issue: System resets or behaves erratically
Solutions:
Use adequate power supply (2A recommended)
Check all ground connections
Add decoupling capacitors near power pins
Use powered USB hub instead of computer USB
Check for short circuits
7. Serial Communication Problems
Issue: No serial output or garbled characters
Solutions:
Verify baud rate (9600)
Check USB cable and connection
Try different USB port
Reset Arduino and reconnect
Check if another program is using serial port
Real-World Applications of Arduino RFID Attendance System
Educational Institutions: Schools and colleges can use this RFID attendance system using Arduino for automatic student attendance, library access control, and hostel entry management. The system eliminates proxy attendance and provides accurate data for academic records.
Corporate Offices: Offices can implement this system for employee time tracking, meeting room access, and visitor management. The offline capability ensures continuous operation even during network outages, making it ideal for small to medium businesses.
Healthcare Facilities: Hospitals and clinics can track staff attendance, monitor restricted area access, and maintain visitor logs. The system's hygienless operation (no physical contact) makes it perfect for healthcare environments.
Industrial and Manufacturing: Manufacturing units can use this Arduino RFID system for shift management, safety compliance tracking, and contractor access control. The rugged design withstands industrial environments.
Future Enhancements and Upgrades
This RFID attendance system using Arduino can be enhanced with additional features:
- WiFi Connectivity: Add ESP8266 for remote monitoring and cloud backup
- Mobile App: Develop smartphone app for real-time attendance viewing
- Biometric Integration: Combine with fingerprint sensor for dual authentication
- Photo Capture: Add camera module for visual attendance verification
- Database Integration: Connect to MySQL or MongoDB for advanced analytics
- Multi-location Support: Network multiple units for campus-wide deployment
- Access Control: Add relay control for automatic door locking/unlocking
Projects using RFID Module
Previously we have used this RFID module to build many interesting RFID projects. If you want to know more about those topics, links are given below.
How to Make an RFID Door Lock System using Arduino?
Build your own RFID door lock system using Arduino and MFRC522 module. Enhance security with RFID-based access control and real-time locking mechanism, ideal for homes, offices, and labs.
IoT-based Event Management System using RFID and ThingSpeak
Build an IoT-based event management system using NodeMCU and RFID to automate guest check-in, attendance tracking, and real-time data updates. Ideal for smart event solutions.
How to Connect RFID with STM32 Microcontroller
Learn how to interface an RFID reader with an STM32 microcontroller to read RFID card data. Ideal for authentication systems, automated tolls, hospital records, and more.
Conclusion
This comprehensive guide demonstrates how to build a professional RFID based attendance system using Arduino from scratch. With components costing under $35, you've created a system that rivals commercial solutions costing hundreds of dollars. The combination of Arduino's flexibility, RFID technology's reliability, and your programming skills results in a fully customizable attendance tracking solution perfect for schools, offices, and industrial applications.
Whether you're a student learning embedded systems, a teacher looking for classroom projects, or a professional implementing cost-effective solutions, this Arduino RFID attendance system provides the foundation for countless possibilities. From basic attendance logging to advanced features like access control and visitor management, the modular design ensures easy expansion and customization. If you have any questions related to this project, you can post them in the comment section below or use the Ask Our Community option to start a discussion with our 100K+ registered users.