Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

ESP32-Based Security System with RFID and Laser Tripwire

Image of ESP32-Based Security System with RFID and Laser Tripwire

Circuit Documentation

Summary

This circuit integrates various components including sensors, microcontrollers, a laser emitter and receiver, a keypad, an IO expander, an RFID module, a buzzer, LEDs, resistors, a relay module, a solenoid lock, power sources, a solar charge controller, a UPS battery, diodes, a capacitor, a transformer, a bridge rectifier, and buck converters. The circuit is designed to perform multiple functions, which may include user interaction through the keypad, identification via RFID, and signal processing with the ESP32 microcontrollers. Power management is handled through a combination of solar power, AC source, and a UPS battery system, with voltage regulation provided by buck converters.

Component List

Sensors

  • PIR sensor: A motion detection sensor that outputs a signal when motion is detected.
  • KY-008 Laser Emitter: A module that emits a laser beam.
  • Laser Receiver Module: A module that detects the laser beam emitted by the KY-008 Laser Emitter.

Microcontrollers

  • ESP32 - CAM: A microcontroller with camera capabilities.
  • ESP32 (30 pin): A 30-pin microcontroller with Wi-Fi and Bluetooth capabilities.

User Interface

  • 4X4 Membrane Matrix Keypad: A keypad for user input.

Expansion and Communication

  • PCF8575 IO Expander: An integrated circuit that expands the number of IO pins available for use.
  • RFID-RC522: An RFID reader module for contactless communication.

Output Devices

  • buzzer: An audible signaling device.
  • LED: Two Pin (green): A green light-emitting diode.
  • LED: Two Pin (red): A red light-emitting diode.

Passive Components

  • Resistor: A component that provides resistance to the flow of current.
  • Diode: A component that allows current to flow in one direction only.
  • Electrolytic Capacitor: A capacitor with a relatively high capacitance value.

Power Management

  • KY-019 Relay module 1 channel: A module that controls high power devices.
  • 12V solenoid lock: An electrically-controlled lock.
  • Solar Panel: A panel that converts solar energy into electrical energy.
  • AC source: An alternating current power source.
  • ATS: An automatic transfer switch for power source management.
  • Solar Charge Controller: A device that controls the charging of batteries from solar panels.
  • UPS BATTERY: An uninterruptible power supply battery.
  • TRANSFORMER: A device that transfers electrical energy between two or more circuits.
  • Bridge rectifier: A circuit that converts AC to DC.
  • Buck converter: A DC-DC converter that steps down voltage.

Wiring Details

KY-008 Laser Emitter

  • SIG: Connected to PCF8575 IO Expander P03.
  • 5v: Connected to ESP32 (30 pin) Vin, KY-019 Relay module 1 channel 5V, ESP32 - CAM 5V, PIR sensor VDD, Laser Receiver Module VCC, Buck converter OUT+.
  • GND: Connected to common ground.

PIR sensor

  • VDD: Connected to 5V net.
  • SIG: Connected to ESP32 (30 pin) D13.
  • GND: Connected to common ground.

ESP32 - CAM

  • 5V: Connected to 5V net.
  • GND: Connected to common ground.
  • IO12: Connected to PCF8575 IO Expander P00.
  • IO13: Connected to PCF8575 IO Expander P01.
  • VOT: Connected to ESP32 (30 pin) RX0.
  • VOR: Connected to ESP32 (30 pin) TX0.

Laser Receiver Module

  • VCC: Connected to 5V net.
  • OUTPUT: Connected to PCF8575 IO Expander P02.
  • GROUND: Connected to common ground.

ESP32 (30 pin)

  • Vin: Connected to 5V net.
  • GND: Connected to common ground.
  • 3V3: Connected to PCF8575 IO Expander VCC and RFID-RC522 VCC (3.3V).
  • Diverse GPIOs: Connected to various components including the keypad, RFID-RC522, and PCF8575 IO Expander.

4X4 Membrane Matrix Keypad

  • R1-R4, C1-C4: Connected to various GPIOs on ESP32 (30 pin).

PCF8575 IO Expander

  • GND: Connected to common ground.
  • VDD: Connected to ESP32 (30 pin) 3V3.
  • P00-P03, P14-P16: Connected to various components including ESP32 - CAM IOs, Laser Receiver Module OUTPUT, buzzer, and LEDs through resistors.

RFID-RC522

  • VCC (3.3V): Connected to ESP32 (30 pin) 3V3.
  • RST, SCK, MISO, MOSI, SDA: Connected to various GPIOs on ESP32 (30 pin).
  • GND: Connected to common ground.

buzzer

  • PIN: Connected to PCF8575 IO Expander P16.
  • GND: Connected to common ground.

LEDs (green and red)

  • cathode: Connected to common ground.
  • anode: Connected to PCF8575 IO Expander P14 and P15 through 220 Ohm resistors.

KY-019 Relay module 1 channel

  • 5V: Connected to 5V net.
  • GND: Connected to common ground.
  • S: Connected to ESP32 (30 pin) D19.
  • COM: Connected to ATS +.
  • NO: Connected to 12V solenoid lock VCC.

12V solenoid lock

  • VCC: Connected to KY-019 Relay module 1 channel NO.
  • GND: Connected to ATS -.

Solar Panel

  • +: Connected to Diode anode.
  • -: Connected to Solar Charge Controller Solar Cell -.

AC source

  • -: Connected to TRANSFORMER 2.
  • +: Connected to TRANSFORMER 1.

ATS

  • +: Connected to Solar Charge Controller Load + and Electrolytic Capacitor +.
  • -: Connected to Solar Charge Controller Load - and Electrolytic Capacitor -.

Solar Charge Controller

  • Solar Cell +: Connected to Diode cathode.
  • Solar Cell -: Connected to Solar Panel -.
  • Battery +: Connected to Diode anode.
  • Battery -: Connected to UPS BATTERY GND.
  • Load +: Connected to ATS +.
  • Load -: Connected to ATS -.

UPS BATTERY

  • GND: Connected to Solar Charge Controller Battery -.
  • VCC: Connected to Diode cathode.

Diode

  • anode: Connected to Solar Panel + and Solar Charge Controller Battery +.
  • cathode: Connected to Solar Charge Controller Solar Cell + and UPS BATTERY VCC.

Electrolytic Capacitor

  • +: Connected to ATS +.
  • -: Connected to ATS -.

TRANSFORMER

  • 1, 2: Connected to AC source + and -.
  • 3, 4: Connected to Bridge rectifier source_in+ and Source_in-.

Bridge rectifier

  • Source_in-: Connected to TRANSFORMER 4.
  • source_out-: Connected to Electrolytic Capacitor -.
  • source_out+: Connected to Electrolytic Capacitor +.
  • source_in+: Connected to TRANSFORMER 3.

Buck converter

  • IN+: Connected to ATS +.
  • IN-: Connected to ATS -.
  • OUT+: Connected to 5V net.
  • OUT-: Connected to common ground.

Documented Code

No code has been provided for the microcontrollers in this circuit. If code is available, it should be documented here with explanations for each function and routine, including setup and loop functions for microcontrollers, interrupt service routines, and any communication protocol implementations.