Back
Home security demo setup
Smart Home Security

Home Security — ESP32-CAM + Fingerprint

A compact security system where ESP32-CAM captures an image after a successful fingerprint match and uploads user details to Google Apps Script.

Scan Fingerprint access
Capture ESP32-CAM photo
Upload Cloud logging

Project Overview

This system combines an ESP32-CAM with a serial fingerprint module such as R307 or GT-511C3. When a valid fingerprint is detected, the device captures a photo, converts it to Base64, and sends the user name, UID, and image data to a Google Apps Script endpoint.

It acts as a smart door security prototype with photo logging, access tracking, and optional LED or buzzer feedback.

View GitHub Repo

Core Hardware Modules

NodeMCU ESP8266 Wi-Fi processor managing sensor inputs and cloud synchronization.
MFRC522 RFID Contactless proximity validation for authorized access tokens.
HC-SR04 Ultrasonic Precision sonar distance checks for vehicle detection.
SG90 Servo Motor Mechanical barrier control for physical gate actuation.

Project Resources

ESP8266 Firmware Motion detection firmware featuring ultrasonic sensing, visitor counting, LED indication, NTP time synchronization, and Twilio WhatsApp alert integration.
Hardware Connections Complete wiring guide for NodeMCU ESP8266, HC-SR04 Ultrasonic Sensor, LED indicator, power connections and GPIO mapping.

Pin Configuration

Component NodeMCU Pin
HC-SR04 TRIG D1 (GPIO5)
HC-SR04 ECHO D2 (GPIO4)
LED Indicator D5 (GPIO14)
VCC VIN
GND GND

System Workflow

Google Assistant

ESP RainMaker

ESP32

Relay Module

Home Appliances

Project Source Codes

1. ESP32-CAM Firmware

Handles fingerprint authentication, image capture, Base64 conversion, cloud upload, and access logging.

View ESP32-CAM Source Code


#include <esp_camera.h>
#include <WiFi.h>
#include <HTTPClient.h>
#include <Adafruit_Fingerprint.h>

/* Complete source available in download */

        

2. Google Apps Script Backend

Receives image data, stores access records, processes uploads, and manages cloud integration.

View Apps Script


function doPost(e) {

  // Receive image
  // Save to Drive
  // Log user details
  // Return image URL

}

/* Complete source available in download */

        

Technologies Used

ESP32 ESP RainMaker Google Assistant Arduino IDE Bluetooth Provisioning OTA Updates EEPROM AceButton Wi-Fi Embedded C++