|
1 | | -🔐 RFID Attendance System using ESP32 |
2 | | -An IoT-based smart RFID attendance system using ESP32, RC522 RFID module, and LCD Display, with real-time data logging directly into Google Sheets. Designed for schools, colleges, or any organization that needs a simple and automated attendance solution. |
| 1 | +# 🔐 RFID Attendance System using ESP32 |
3 | 2 |
|
4 | | -🚀 Built with two powerful modes: |
5 | | -➕ User Registration Mode |
6 | | -📅 Attendance Mode |
| 3 | + |
7 | 4 |
|
8 | | -🕒 All attendance logs are recorded in NST (Nepal Standard Time). |
9 | 5 |
|
10 | | -⚙️ Features |
11 | | -📲 ESP32 WiFi-enabled microcontroller |
| 6 | +An IoT-based smart RFID attendance system using **ESP32**, **RC522 RFID module**, and **16x2 LCD Display**, with real-time data logging directly into **Google Sheets**. Designed for schools, colleges, or any organization that needs a simple and automated attendance solution. |
12 | 7 |
|
13 | | -🪪 RC522 RFID module for tag scanning |
14 | 8 |
|
15 | | -📟 16x2 LCD Display for user feedback |
| 9 | +🚀 Built with two powerful modes: |
| 10 | +➕ **User Registration Mode** |
| 11 | +📅 **Attendance Mode** |
16 | 12 |
|
17 | | -📄 Google Sheets integration using Google Apps Script |
| 13 | +🕒 All attendance logs are recorded in **NST (Nepal Standard Time)**. |
18 | 14 |
|
19 | | -🧠 Dual-mode system: |
| 15 | +--- |
20 | 16 |
|
21 | | -Registration Mode – Add new users with RFID UID and name |
22 | 17 |
|
23 | | -Attendance Mode – Log attendance with date and time |
24 | 18 |
|
25 | | -🌐 Real-time syncing over the internet |
| 19 | +## ⚙️ Features |
26 | 20 |
|
27 | | -🕐 Timestamped records in NST |
| 21 | +- 📲 ESP32 WiFi-enabled microcontroller |
| 22 | +- 🪪 RC522 RFID module for tag scanning |
| 23 | +- 📟 16x2 LCD Display for user feedback |
| 24 | +- 📄 Google Sheets integration using Google Apps Script |
| 25 | +- 🧠 Dual-mode system: |
| 26 | + - **Registration Mode** – Add new users with RFID UID and name |
| 27 | + - **Attendance Mode** – Log attendance with date and time |
| 28 | +- 🌐 Real-time syncing over the internet |
| 29 | +- 🕐 Timestamped records in NST |
28 | 30 |
|
29 | | -🧰 Hardware Required |
| 31 | +--- |
30 | 32 |
|
31 | | -Component Quantity |
32 | | -ESP32 Dev Board 1 |
33 | | -RC522 RFID Module 1 |
34 | | -16x2 LCD Display 1 |
35 | | -Jumper Wires Several |
36 | | -Breadboard (Optional) 1 |
37 | | -RFID Tags/Cards As needed |
38 | | -📦 Folder Structure |
39 | | -bash |
40 | | -Copy |
41 | | -Edit |
42 | | -📁 RFID-Attendance-ESP32/ |
43 | | -├── 📄 attendance.ino # Main Arduino code |
44 | | -├── 📄 credentials.h # WiFi and Google Script credentials |
45 | | -├── 📄 GoogleAppsScript.gs # Script to connect to Google Sheets |
46 | | -├── 📄 README.md # This file |
47 | | -🔌 Wiring Overview |
| 33 | +## 🧰 Hardware Required |
48 | 34 |
|
49 | | -RC522 Pin ESP32 Pin |
50 | | -SDA D21 |
51 | | -SCK D18 |
52 | | -MOSI D23 |
53 | | -MISO D19 |
54 | | -IRQ Not connected |
55 | | -GND GND |
56 | | -RST D22 |
57 | | -3.3V 3.3V |
58 | | -💡 Make sure to power the RC522 with 3.3V only (not 5V)! |
| 35 | +| Component | Quantity | |
| 36 | +|---------------------|----------| |
| 37 | +| ESP32 Dev Board | 1 | |
| 38 | +| RC522 RFID Module | 1 | |
| 39 | +| 16x2 LCD Display | 1 | |
| 40 | +| Jumper Wires | Several | |
| 41 | +| Breadboard (Optional) | 1 | |
| 42 | +| RFID Tags/Cards | As needed| |
59 | 43 |
|
60 | | -☁️ Google Sheets Integration |
61 | | -Create a Google Sheet. |
| 44 | +--- |
62 | 45 |
|
63 | | -Go to Extensions > Apps Script, paste the code from GoogleAppsScript.gs. |
| 46 | +## 📦 Folder Structure |
64 | 47 |
|
65 | | -Deploy it as a Web App (with permissions: Anyone with the link). |
| 48 | +📁 RFID-Attendance-ESP32/ ├── 📄 attendance.ino # Main Arduino code ├── 📄 credentials.h # WiFi and Google Script credentials ├── 📄 GoogleAppsScript.gs # Script to connect to Google Sheets ├── 📄 README.md # This file |
66 | 49 |
|
67 | | -Copy the Web App URL and paste it in your credentials.h. |
68 | 50 |
|
69 | | -🔐 credentials.h Example |
70 | | -cpp |
71 | | -Copy |
72 | | -Edit |
| 51 | +--- |
| 52 | + |
| 53 | +## 🔌 Wiring Overview |
| 54 | + |
| 55 | +| RC522 Pin | ESP32 Pin | |
| 56 | +|-----------|-----------| |
| 57 | +| SDA | D21 | |
| 58 | +| SCK | D18 | |
| 59 | +| MOSI | D23 | |
| 60 | +| MISO | D19 | |
| 61 | +| IRQ | Not connected | |
| 62 | +| GND | GND | |
| 63 | +| RST | D22 | |
| 64 | +| 3.3V | 3.3V | |
| 65 | + |
| 66 | +> 💡 Make sure to power the RC522 with **3.3V only** (not 5V)! |
| 67 | +
|
| 68 | +--- |
| 69 | + |
| 70 | +## ☁️ Google Sheets Integration |
| 71 | + |
| 72 | +1. Create a new **Google Sheet**. |
| 73 | +2. Go to `Extensions > Apps Script`. |
| 74 | +3. Paste the code from `GoogleAppsScript.gs`. |
| 75 | +4. Deploy it as a **Web App**: |
| 76 | + - **Execute as**: Me |
| 77 | + - **Who has access**: Anyone |
| 78 | +5. Copy the Web App URL. |
| 79 | +6. Paste it inside your `credentials.h` file as shown below. |
| 80 | + |
| 81 | +--- |
| 82 | + |
| 83 | +## 🔐 `credentials.h` Example |
| 84 | + |
| 85 | +```cpp |
73 | 86 | const char* ssid = "YOUR_WIFI_NAME"; |
74 | 87 | const char* password = "YOUR_WIFI_PASSWORD"; |
75 | 88 | const char* scriptURL = "YOUR_GOOGLE_SCRIPT_URL"; |
76 | | -▶️ Modes Explained |
77 | | -🟢 Registration Mode |
78 | | -Use the RFID tag to register new users. Their UID and name will be saved in the Google Sheet. |
| 89 | +``` |
79 | 90 |
|
80 | | -🔵 Attendance Mode |
81 | | -Tap the tag to log the date and time of attendance. Duplicate entries for the same day are avoided. |
| 91 | +## ▶️ Modes Explained |
| 92 | +# 🟢 Registration Mode |
| 93 | +- Scan a new RFID tag. |
| 94 | +- The system prompts for user details. |
| 95 | +- UID and name are stored in Google Sheets. |
82 | 96 |
|
83 | | -🌍 Timezone Configuration |
84 | | -This system uses Nepal Standard Time (NST). Adjust Google Apps Script for other timezones if needed: |
| 97 | +# 🔵 Attendance Mode |
| 98 | +- Tap the tag to mark attendance. |
| 99 | +- Date and time are logged automatically. |
| 100 | +- Duplicate entries for the same day are prevented. |
85 | 101 |
|
86 | | -javascript |
87 | | -Copy |
88 | | -Edit |
89 | | -var timeZone = "Asia/Kathmandu"; // NST |
90 | | -📸 Demo |
91 | | -(Insert GIF or image of system in action – optional but cool!) |
| 102 | +## 🌍 Timezone Configuration |
| 103 | +This system uses Nepal Standard Time (NST). You can adjust the timezone in the Apps Script: |
92 | 104 |
|
93 | | -✅ Future Enhancements |
94 | | -Admin dashboard for data filtering |
| 105 | +``` var timeZone = "Asia/Kathmandu"; // NST |
| 106 | +``` |
95 | 107 |
|
96 | | -Email notifications on entry |
| 108 | +## ✅ Future Enhancements |
| 109 | +- 🖥️ Admin dashboard for data filtering and reporting |
| 110 | +- 📧 Email notifications on entry |
| 111 | +- 📲 NFC card and mobile tag support |
97 | 112 |
|
98 | | -NFC card support |
99 | | - |
100 | | -🧠 Credits |
101 | | -Made with 💡 and ❤️ by Sameer Sah. |
| 113 | +## 🧠 Credits |
| 114 | +Made with 💡 and ❤️ by **Sameer Sah** |
102 | 115 | Inspired by the power of automation and microcontrollers. |
103 | 116 |
|
104 | | -📜 License |
105 | | -This project is licensed under the MIT License – feel free to use and modify! |
106 | 117 |
|
107 | | -Let me know if you want this turned into a README.md file or want to add a badge or demo video link! |
| 118 | + |
| 119 | +--- |
| 120 | + |
| 121 | +Let me know if you want me to generate the Google Apps Script code or the actual `.ino` code too — I’ve got your back! |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
0 commit comments