Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Raspberry Pi 4B Smart Door Lock System with Fingerprint and Keypad Authentication

View and Edit Project In Cirkit DesignerImage of Raspberry Pi 4B Smart Door Lock System with Fingerprint and Keypad Authentication

Circuit Documentation

Summary

This circuit is a comprehensive security system that integrates various components such as a Raspberry Pi 4B, ESP32-CAM, fingerprint scanner, membrane keypad, servo motor, relay module, LEDs, loudspeaker, condenser microphone, and a solenoid lock. The system is designed to provide multiple methods of authentication (keypad, fingerprint) and includes features like video streaming, image capture, and doorbell functionality.

Component List

  1. Raspberry Pi 4B

    • Description: Main microcontroller for the system.
    • Pins: 3V3, 5V, GPIO2, GPIO3, GND, GPIO4, GPIO14, GPIO15, GPIO17, GPIO18, GPIO27, GPIO22, GPIO23, GPIO24, GPIO10, GPIO9, GPIO25, GPIO11, GPIO8, GPIO7, ID_SD, GPIO5, GPIO6, GPIO12, GPIO13, GPIO19, GPIO16, GPIO26, GPIO20, GPIO21, ID_SC, TR01_TAP, TR00_TAP, TR03_TAP, TR02_TAP, RUN, GLOBAL_EN
  2. 4X4 Membrane Matrix Keypad

    • Description: Used for keypad-based authentication.
    • Pins: R1, R2, R3, R4, C1, C2, C3, C4
  3. Servo

    • Description: Controls the locking mechanism.
    • Pins: gnd, vcc, pulse
  4. 1 Channel 5V Relay Module

    • Description: Controls the solenoid lock.
    • Pins: VCC+, VCC- (GND), IN, N.O., COM, N.C.
  5. 12V Power Supply

    • Description: Provides power to the circuit.
    • Pins: +, -
  6. ESP32-CAM

    • Description: Used for video streaming and image capture.
    • Pins: 5V, GND, IO12, IO13, IO15, IO14, IO2, IO4, VOT, VOR, VCC, IO0, IO16, 3V3
  7. Fingerprint Scanner

    • Description: Used for fingerprint-based authentication.
    • Pins: VCC, TX, RX, GND
  8. LED: Two Pin (red)

    • Description: Indicates the status of the system.
    • Pins: cathode, anode
  9. LED: Two Pin (green)

    • Description: Indicates the status of the system.
    • Pins: cathode, anode
  10. Loudspeaker

    • Description: Provides audio feedback.
    • Pins: pin1, pin2
  11. Condenser Microphone

    • Description: Captures audio.
    • Pins: pin1, pin2
  12. 2Pin Push Switch

    • Description: Used as a doorbell.
    • Pins: Input +, Output +
  13. 12V Solenoid Lock

    • Description: Controls the door locking mechanism.
    • Pins: VCC, GND
  14. Buck Converter

    • Description: Converts 12V to 5V.
    • Pins: IN+, IN-, OUT+, OUT-
  15. Micro USB to Cable (2 Pin)

    • Description: Provides power to the Raspberry Pi.
    • Pins: Micro USB, +, -
  16. Resistor (150 Ohms)

    • Description: Current limiting resistor for LEDs.
    • Pins: pin1, pin2

Wiring Details

Raspberry Pi 4B

4X4 Membrane Matrix Keypad

Servo

1 Channel 5V Relay Module

12V Power Supply

ESP32-CAM

Fingerprint Scanner

LED: Two Pin (red)

LED: Two Pin (green)

Loudspeaker

Condenser Microphone

2Pin Push Switch

12V Solenoid Lock

Buck Converter

Micro USB to Cable (2 Pin)

Resistor (150 Ohms)

Resistor (150 Ohms)

Code Documentation

import RPi.GPIO as GPIO
import time
from pyfingerprint.pyfingerprint import PyFingerprint
from picamera import PiCamera
import os
import serial

# GPIO setup