Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP32 Smart Biometric Attendance System

ESP32 C++ Google Sheets Arduino IDE

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.


✨ Features

  • 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.h library 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.

🛠️ Hardware Setup & Pin Mapping

  • Microcontroller: ESP32 Development Board
  • Biometric Sensor: AS608 (or compatible) Optical Fingerprint Sensor
  • Display: 16x2 LCD with I2C module (Address 0x27)
  • Audio: Active Buzzer

Wiring Guide

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

🔌 Circuit Diagram

Below is the schematic mapping the physical connections between the ESP32, the optical biometric scanner, the I2C LCD screen, and the audio buzzer module:

ESP32 Biometric System Circuit Diagram


🚀 Software & Library Requirements

Ensure you have the following libraries installed via the Arduino Library Manager:

  • Adafruit Fingerprint Sensor Library
  • LiquidCrystal_I2C
  • (Built-in ESP32 Core Libraries: WiFi.h, HTTPClient.h, Preferences.h)

⚙️ Configuration & Deployment

1. Google Sheets Webhook Setup

  1. Create a blank Google Sheet.
  2. Navigate to Extensions > Apps Script.
  3. Clear any default code and paste the script from scripts/WebHook.js.
  4. Click Deploy > New Deployment.
  5. Select Web App as the deployment type, set executing access to "Me", and set permissions to "Anyone".
  6. Click Deploy and copy the generated Web App URL.

2. Firmware Compilation & Upload

  1. Open firmware/Fingerprint_Code/Fingerprint_Code.ino using the Arduino IDE.

  2. 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";

  3. 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";

  4. Connect your ESP32 board, select the correct COM port, and upload the sketch.

🎮 How to Operate the System

  • 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.

About

An IoT based biometric attendance system utilizing an ESP32 and an optical fingerprint sensor to log realtime attendance directly to Google Sheets.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages