An IoT based biometric attendance tracking system that bridges embedded hardware with the cloud. Utilizing an ESP32, an optical fingerprint sensor, and an I2C LCD, this system authenticates users locally and logs their precise "Entry" and "Exit" timestamps directly to a Google Sheet over Wi-Fi.
- Direct Cloud Logging: Transmits attendance data directly to a Google Apps Script Webhook, automatically appending rows to a Google Sheet with local Indian Standard Time (IST) timestamps.
- Smart Entry/Exit Tracking: The cloud script intelligently reads the user's last logged status and automatically toggles between "Entry" and "Exit" for seamless tracking.
- Non-Volatile Local Storage: Uses the ESP32
Preferences.hlibrary to store user details (Name, Roll, Branch) directly on the microcontroller's flash memory. - Serial Admin Console: Manage the system without flashing new code. Send simple commands via the Serial Monitor to
[R]egister,[D]elete, or[L]ist enrolled students. - Audio-Visual Feedback: Features an I2C LCD for real-time status updates and a buzzer for distinct success/error auditory cues.
- Microcontroller: ESP32 Development Board
- Biometric Sensor: AS608 (or compatible) Optical Fingerprint Sensor
- Display: 16x2 LCD with I2C module (Address
0x27) - Audio: Active Buzzer
| Component Pin | ESP32 Pin | Connection Note |
|---|---|---|
| Fingerprint TX | GPIO 16 |
Hardware Serial2 (RX2) |
| Fingerprint RX | GPIO 17 |
Hardware Serial2 (TX2) |
| I2C LCD SDA | GPIO 21 |
Default I2C Data |
| I2C LCD SCL | GPIO 22 |
Default I2C Clock |
| Buzzer (+) | GPIO 15 |
Digital Output |
Below is the schematic mapping the physical connections between the ESP32, the optical biometric scanner, the I2C LCD screen, and the audio buzzer module:
Ensure you have the following libraries installed via the Arduino Library Manager:
Adafruit Fingerprint Sensor LibraryLiquidCrystal_I2C- (Built-in ESP32 Core Libraries:
WiFi.h,HTTPClient.h,Preferences.h)
- Create a blank Google Sheet.
- Navigate to Extensions > Apps Script.
- Clear any default code and paste the script from
scripts/WebHook.js. - Click Deploy > New Deployment.
- Select Web App as the deployment type, set executing access to "Me", and set permissions to "Anyone".
- Click Deploy and copy the generated Web App URL.
-
Open
firmware/Fingerprint_Code/Fingerprint_Code.inousing the Arduino IDE. -
Locate the network configurations and update them with your environment settings:
cpp/.ino file:
const char* ssid = "YOUR_WIFI_SSID"; const char* password = "YOUR_WIFI_PASSWORD";
-
Paste your copied deployment URL into the GOOGLE_SCRIPT_URL variable:
cpp/.ino file:
const char* GOOGLE_SCRIPT_URL = "YOUR_GOOGLE_APPS_SCRIPT_WEB_APP_URL";
-
Connect your ESP32 board, select the correct COM port, and upload the sketch.
- Marking Attendance Simply press a registered finger against the optical scanner. The ESP32 verifies the biometric signature locally, queries its flash memory for the matching metadata, and pushes a secure request to the cloud Webhook. The connected LCD display will instantly update to indicate a successful entry (IN) or departure (OUT).
Admin Console Commands
Fire up the Serial Monitor in your Arduino IDE and make sure the baud rate is set to 115200. From there, you can control user records by typing single-character commands into the input bar:
--> R — Register a Student: This walks you through picking an available ID slot (anywhere from 1 to 127), scanning the finger twice so the system can build a proper template, and then entering the student's details — name, branch, and roll number.
--> D — Delete a Student: Enter the ID number of the student you want removed, and it'll wipe their fingerprint template from the hardware and clean up the matching record from local flash storage.
--> L — List Records: This scans through all the active entries in flash memory and prints a neatly formatted table showing every enrolled student's name and slot allocation right there in the console.
