ESP32-Based Smart Energy Monitoring System with Motion Detection
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary of the Circuit
This circuit integrates a variety of sensors with an ESP32 microcontroller to monitor environmental parameters such as motion, voltage, and current. The PIR/Motion Sensor detects movement, the Voltage Sensor measures voltage levels, and the ACS712 Current Sensor monitors current flow. The ESP32 microcontroller processes the data from these sensors and can be programmed to respond to the environmental changes they detect.
Component List
Voltage Sensor
- Description: A sensor used to measure the electrical voltage between two points in an electric circuit.
- Pins: Ground, Phase, Vcc, Out, Gnd
ACS712 Current Sensor 5A 20A 30A
- Description: A sensor capable of measuring alternating or direct currents. The ACS712 outputs an analog voltage proportional to the current that passes through the Hall-effect sensor.
- Pins: 1, 2, GND, OUT, VCC
ESP32 38 PINS
- Description: A microcontroller with Wi-Fi and Bluetooth capabilities, featuring a wide variety of GPIOs for interfacing with various sensors and peripherals.
- Pins: GND, G23, G22, TXD, RXD, G21, G19, G18, G5, G17, G16, G4, G0, G2, G15, SDI, SD0, CLK, 3V3, EN, SP, SN, G34, G35, G32, 33, G25, G26, G27, G14, G12, G13, SD2, SD3, 5V
PIR/Motion Sensor
- Description: A sensor that detects infrared radiation from objects in its field of view, commonly used to detect motion.
- Pins: GND, OUTPUT, VCC
Wiring Details
Voltage Sensor
- Ground: Connected to ESP32 GND
- Vcc: Connected to ESP32 3V3
- Out: Connected to ESP32 G34
- Gnd: Connected to ESP32 GND
ACS712 Current Sensor 5A 20A 30A
- GND: Connected to ESP32 GND
- OUT: Connected to ESP32 G35
- VCC: Connected to ESP32 5V
ESP32 38 PINS
- GND: Common ground for PIR/Motion Sensor, Voltage Sensor, and ACS712 Current Sensor
- 3V3: Powers the Voltage Sensor
- G34: Receives the voltage measurement from the Voltage Sensor
- G35: Receives the current measurement from the ACS712 Current Sensor
- G13: Receives the motion detection signal from the PIR/Motion Sensor
- 5V: Powers the ACS712 Current Sensor
PIR/Motion Sensor
- GND: Connected to ESP32 GND
- OUTPUT: Connected to ESP32 G13
- VCC: Powered by an external source (not specified in the wiring details)
Documented Code
No code has been provided for the microcontroller. The ESP32 microcontroller requires programming to read the sensor outputs, process the data, and perform actions based on sensor readings. The code would typically initialize the GPIO pins, set up analog-to-digital converters if necessary, and implement a main loop to continuously read the sensor values and respond accordingly.