ESP32-Based Smart Energy Monitoring and Control System with PZEM004t and LCD Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes various sensors, a relay module, an LCD screen, and an ESP32 microcontroller. The circuit is designed to monitor environmental parameters and control a relay module based on the sensor inputs. The ESP32 microcontroller serves as the central processing unit, interfacing with all the sensors and the relay module.
Component List
PZEM004t
- Description: Energy monitoring module
- Pins: VCC, RX, TX, GND, IN, OUT
Rain Gauge
- Description: Measures rainfall
- Pins: SIGNAL, VIN, GND
Battery
- Description: Power source
- Pins: +, -
LCD screen 16x2 I2C
- Description: Display module
- Pins: SCL, SDA, VCC, GND
Adafruit VEML7700
- Description: Ambient light sensor
- Pins: VIN, 3.3V, GND, SCL, SDA
ESP32
- Description: Microcontroller
- 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, BOOT
Relay module 5v-30v
- Description: Relay module for switching
- Pins: common contact, normally open, normally closed, trigger, V-, V+
Bulb
- Description: Load controlled by the relay
- Pins: GND, power
Wiring Details
PZEM004t
- VCC: Connected to 3.3V (ESP32)
- GND: Connected to GND (ESP32)
- TX: Connected to D15 (ESP32)
- RX: Connected to D2 (ESP32)
PZEM004t
- VCC: Connected to 3.3V (ESP32)
- GND: Connected to GND (ESP32)
- TX: Connected to D4 (ESP32)
- RX: Connected to D5 (ESP32)
PZEM004t
- VCC: Connected to 3.3V (ESP32)
- GND: Connected to GND (ESP32)
- TX: Connected to D19 (ESP32)
- RX: Connected to D18 (ESP32)
Rain Gauge
- SIGNAL: Connected to D34 (ESP32)
- VIN: Connected to 3.3V (ESP32)
- GND: Connected to GND (ESP32)
Battery
- +: Connected to common contact (Relay module)
- -: Connected to GND (Bulb)
LCD screen 16x2 I2C
- SCL: Connected to D26 (ESP32)
- SDA: Connected to D27 (ESP32)
- VCC: Connected to 3.3V (ESP32)
- GND: Connected to GND (ESP32)
Adafruit VEML7700
- VIN: Connected to 3.3V (ESP32)
- GND: Connected to GND (ESP32)
- SCL: Connected to D21 (ESP32)
- SDA: Connected to D22 (ESP32)
ESP32
- D34: Connected to SIGNAL (Rain Gauge)
- D35: Connected to trigger (Relay module)
- D26: Connected to SCL (LCD screen 16x2 I2C)
- D27: Connected to SDA (LCD screen 16x2 I2C)
- 3V3: Connected to VCC (PZEM004t, Rain Gauge, Relay module, LCD screen 16x2 I2C, Adafruit VEML7700)
- GND: Connected to GND (PZEM004t, Rain Gauge, Relay module, LCD screen 16x2 I2C, Adafruit VEML7700)
- D15: Connected to TX (PZEM004t)
- D2: Connected to RX (PZEM004t)
- D4: Connected to TX (PZEM004t)
- D5: Connected to RX (PZEM004t)
- D18: Connected to RX (PZEM004t)
- D19: Connected to TX (PZEM004t)
- D21: Connected to SCL (Adafruit VEML7700)
- D22: Connected to SDA (Adafruit VEML7700)
Relay module 5v-30v
- trigger: Connected to D35 (ESP32)
- V+: Connected to 3.3V (ESP32)
- V-: Connected to GND (ESP32)
- common contact: Connected to + (Battery)
- normally open: Connected to power (Bulb)
Bulb
- power: Connected to normally open (Relay module)
- GND: Connected to - (Battery)
Code
No code provided.