Managing attendance manually is slow, error-prone, and often requires maintaining physical registers or expensive biometric systems. As part of my interest in IoT and embedded systems, I wanted to build a low-cost, WiFi-enabled RFID Smart Attendance System that anyone can integrate into classrooms, offices, or maker labs without complex backend servers.
Every time an RFID card is scanned, the system automatically:
β Reads card dataβ Sends it securely to the Google Script Web APIβ Logs it into a Google Spreadsheet with Name, Date, and Timeβ Gives instant feedback through LEDs and buzzer
This makes attendance fast, automated, and 100% online.
π― Project Goals- Build a reliable RFID-based attendance/security system
- Store data automatically in Google Sheets
- Provide visual (LED) and audio (buzzer) feedback
- Ensure stable WiFi connection and robust HTTPS communication
- Make the system inexpensive and easy to deploy anywhere
π‘ How the System Works
When powered on, the ESP8266 automatically connects to WiFi.
The MFRC522 RFID scanner waits for a card.
When a card is tapped:
- Data from block 2 is authenticated & read.
- LEDs indicate success/failure.
- Buzzer beeps to confirm a successful scan.
The card data is appended to the Google Script URL, which sends it to the Google Sheet.
The spreadsheet automatically logs:
- Card ID / User Name
- Date
- Time
This makes attendance contactless, fast, and cloud-synchronized.
βοΈ Using Google Sheets as a DatabaseInstead of building a backend server, I used Google Apps Script, which acts like a free cloud API.
The ESP8266 sends data using a simple HTTPS GET request:
https://script.google.com/macros/s/.../exec?name=RFID_DATAThe Google Script appends data directly into a row in Google Sheets, making it extremely convenient to view, export, or analyze logs.
π Code Explanation (Simplified)
Hereβs a readable breakdown of the main modules used in the code:
1οΈβ£ Libraries & DefinitionsESP8266WiFi.h and HTTPClient.h handle WiFi and HTTPS requests
ESP8266WiFi.handHTTPClient.hhandle WiFi and HTTPS requests
MFRC522.h handles RFID card communication
MFRC522.hhandles RFID card communication
Pins for LEDs, buzzer, and RFID are defined
- Pins for LEDs, buzzer, and RFID are defined
The ESP8266 automatically reconnects if WiFi is lost:
if (WiFi.status() != WL_CONNECTED) {
// blink red LED until reconnects
}Once connected, the green LED stays ON.
3οΈβ£ RFID Read FunctionThe function ReadDataFromBlock() authenticates and reads block 2 of the RFID card.
Authentication success β Green LED
Failure β Red LED
4οΈβ£ Extracting Text from RFID CardThe readBlockData buffer is parsed and stored in a String RFID.
The ESP8266 builds the URL dynamically:
data2 = data1 + RFID;
https.begin(*client, data2);
https.GET();HTTP status codes are printed to Serial Monitor for debugging.
6οΈβ£ User FeedbackDouble buzzer beep β Successfully read RFID
Green blink β Successfully uploaded to Sheet
Red LED β Error during upload
π Final OutputEvery scan logs a new row in Google Sheets like:
This makes it extremely useful for attendance tracking and access monitoring.
π ConclusionThis project demonstrates how powerful IoT can be when combined with simple technologies like RFID and free cloud platforms like Google Sheets. The system is:
- Low cost
- Easy to build
- Highly accurate
- Cloud connected
- Scalable to multiple devices
It can be deployed in schools, offices, labs, hostels, or even home automation setups.
If you want to explore the full code, diagrams, and future updates, check the GitHub repository:












Comments