ESP32 CAM PIR Sensor Security Camera with Battery Management
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an ESP32 CAM microcontroller, a PIR sensor, a momentary switch, a lipo battery charger module, an electrolytic capacitor, an NPN transistor, an MT3608 step-up converter, a yellow LED, and a resistor. The circuit is designed to be powered by a 7.4V battery. The ESP32 CAM is the central processing unit of the circuit, interfacing with the PIR sensor and controlling an LED through a transistor switch. The MT3608 step-up converter is used to regulate the voltage for the circuit, and the lipo battery charger module is included for battery management.
Component List
ESP32 CAM
- Description: A microcontroller module with Wi-Fi and camera capabilities.
- Pins: 5V, GND, GPIO12, GPIO13, GPIO15, GPIO14, GPIO2, GPIO4, 3.3V, GPIO16, GPIO0, 3.3V / 5V / P_OUT, GPIO3 / RX, GPIO1 / TX
7.4V Battery
- Description: A power source for the circuit.
- Pins: +, -
Black Momentary Switch 32 mm
- Description: A switch to control the power flow in the circuit.
- Pins: In, Out
Lipo Battery Charger Module
- Description: A module for charging the lipo battery.
- Pins: B-, B+, OUT-, OUT+
Electrolytic Capacitor
- Description: A capacitor for filtering and stabilizing the voltage.
- Pins: -, +
- Properties: Capacitance - 0.0001 Farads
NPN Transistor (CBE)
- Description: A transistor used as a switch or amplifier.
- Pins: Collector, Base, Emitter
PIR Sensor
- Description: A motion sensor that detects changes in infrared radiation.
- Pins: VDD, SIG, GND
MT3608
- Description: A step-up converter to boost the voltage.
- Pins: VOUT+, VIN+, VOUT-, VIN-
LED: Two Pin (Yellow)
- Description: A yellow light-emitting diode.
- Pins: Cathode, Anode
Resistor
- Description: A component that provides resistance in the circuit.
- Pins: Pin1, Pin2
- Properties: Resistance - 1000 Ohms
Wiring Details
ESP32 CAM
- 5V connected to the positive voltage rail.
- GND connected to the ground rail.
- GPIO13 connected to the collector of the NPN transistor.
7.4V Battery
-
- connected to the B+ of the lipo battery charger module.
-
- connected to the B- of the lipo battery charger module.
Black Momentary Switch 32 mm
- In connected to the positive voltage rail.
- Out connected to the VOUT+ of the MT3608 and OUT+ of the lipo battery charger module.
Lipo Battery Charger Module
- B- connected to the negative terminal of the 7.4V battery.
- B+ connected to the positive terminal of the 7.4V battery.
- OUT- connected to the VOUT- of the MT3608.
- OUT+ connected to the Out of the momentary switch.
Electrolytic Capacitor
-
- connected to the ground rail.
-
- connected to the positive voltage rail.
NPN Transistor (CBE)
- Collector connected to GPIO13 of the ESP32 CAM.
- Base connected to the SIG of the PIR sensor.
- Emitter connected to the ground rail.
PIR Sensor
- VDD connected to the positive voltage rail.
- SIG connected to the base of the NPN transistor.
- GND connected to the ground rail.
MT3608
- VOUT+ connected to the Out of the momentary switch and OUT+ of the lipo battery charger module.
- VIN+ connected to the positive voltage rail.
- VOUT- connected to the OUT- of the lipo battery charger module.
- VIN- connected to the ground rail.
LED: Two Pin (Yellow)
- Cathode connected to the ground rail.
- Anode connected to Pin1 of the resistor.
Resistor
- Pin1 connected to the anode of the LED.
- Pin2 connected to the positive voltage rail.
Documented Code
ESP32 CAM Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Additional Notes
- The ESP32 CAM microcontroller is currently programmed with a basic template that includes empty setup and loop functions. The actual functionality needs to be implemented according to the requirements of the application.
- The code for the ESP32 CAM is stored in a file named "sketch.ino".
- There is an additional text file named "documentation.txt" associated with the ESP32 CAM, but it contains no code or text.