ESP32-Based Smart Energy Monitoring System with Motion Detection and AC Load Control
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to interface various components with an ESP32 microcontroller for sensing, display, and control applications. It includes a PIR sensor for motion detection, a pushbutton for user input, an LCD display for information output, a relay module for controlling AC devices, a ZMPT101B module for voltage sensing, a current sensor for current monitoring, and a power supply to provide the necessary voltage levels to the components. The circuit also includes resistors and an electrolytic capacitor for signal conditioning and stabilization.
Component List
LCD Display 20x4 I2C
- Description: A 20x4 character LCD display with an I2C interface for displaying text and numbers.
- Pins: SCL, SDA, VCC, GND
PIR Sensor
- Description: A passive infrared sensor used to detect motion in the environment.
- Pins: VDD, SIG, GND
Pushbutton
- Description: A standard pushbutton used for user input.
- Pins: Pin 3 (out), Pin 4 (out), Pin 1 (in), Pin 2 (in)
LED Bulb AC
- Description: An AC-powered LED bulb used for indicating status or as a light source.
- Pins: +, -
Resistor
- Description: A passive component used to limit current or divide voltage.
- Properties: Resistance value of 10,000 Ohms or 100 Ohms
Electrolytic Capacitor
- Description: A capacitor used for filtering and power smoothing applications.
- Properties: Capacitance value of 1e-7 Farads
Power Supply
- Description: Provides the necessary power to the circuit components.
- Pins: +, -
ZMPT101B
- Description: A module for AC voltage sensing in power monitoring applications.
- Pins: OUT, GND, VCC, NEUTRO, FASE
Current Sensor
- Description: A sensor used for measuring electrical current.
- Pins: Out, Burden, In_current, Out_current
Relay Module 5v-30v
- Description: An electromechanical switch used for controlling high power devices.
- Pins: Common contact, Normally open, Normally closed, Trigger, V-, V+
ESP 32 DEVKIT V1 (30 pins)
- Description: A microcontroller with WiFi and Bluetooth capabilities for controlling and interfacing with various components.
- Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, VIN, 3V3, D15, D2, D4, RX2, TX2, D5, D18, D19, D21, RX0, TX0, D22, D23
Wiring Details
LCD Display 20x4 I2C
- SCL connected to ESP 32 DEVKIT V1 (D22)
- SDA connected to ESP 32 DEVKIT V1 (D21)
- VCC connected to ESP 32 DEVKIT V1 (VIN)
- GND connected to ESP 32 DEVKIT V1 (GND)
PIR Sensor
- VDD connected to ESP 32 DEVKIT V1 (3V3)
- SIG connected to ESP 32 DEVKIT V1 (D32)
- GND connected to ESP 32 DEVKIT V1 (GND)
Pushbutton
- Pin 1 (in) connected to ESP 32 DEVKIT V1 (D26)
- Pin 3 (out) connected to ESP 32 DEVKIT V1 (GND)
LED Bulb AC
-
- connected to Power Supply (+) through Relay Module (common contact and normally open)
-
- connected to Current Sensor (In_current)
Resistor
- 10,000 Ohms resistor connected between ZMPT101B (VCC) and ESP 32 DEVKIT V1 (VIN)
- 10,000 Ohms resistor connected between Current Sensor (Burden) and ESP 32 DEVKIT V1 (GND)
- 100 Ohms resistor connected between Current Sensor (Out) and ESP 32 DEVKIT V1 (D35)
Electrolytic Capacitor
-
- connected to Current Sensor (Burden)
-
- connected to ESP 32 DEVKIT V1 (GND)
Power Supply
-
- connected to Relay Module (common contact and normally open)
-
- connected to ZMPT101B (FASE)
ZMPT101B
- OUT connected to ESP 32 DEVKIT V1 (D34)
- GND connected to ESP 32 DEVKIT V1 (GND)
- VCC connected to ESP 32 DEVKIT V1 (VIN)
- NEUTRO connected to Relay Module (common contact and normally open)
- FASE connected to Power Supply (-)
Current Sensor
- Out connected to ESP 32 DEVKIT V1 (D35)
- Burden connected to Resistor (10,000 Ohms) and Electrolytic Capacitor (+)
- In_current connected to Power Supply (-)
- Out_current connected to LED Bulb AC (-)
Relay Module 5v-30v
- Trigger connected to ESP 32 DEVKIT V1 (D25)
- V+ connected to ESP 32 DEVKIT V1 (VIN)
- V- connected to ESP 32 DEVKIT V1 (GND)
- Common contact connected to Power Supply (+)
- Normally open connected to LED Bulb AC (+) and ZMPT101B (NEUTRO)
Documented Code
No code was provided for the microcontroller. The documentation for the code would typically include a description of the functionality, setup and loop functions, and any functions or libraries used to interface with the components. Since no code is available, this section cannot be completed.