ESP32-Based Smart Water Pump Controller with Ultrasonic Sensor and LCD Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that integrates an ESP32 microcontroller, an LCD display, an I2C module, a 5V Type C DC socket, a mini diaphragm water pump, an HC-SR04 ultrasonic sensor, and a 5V relay. The circuit is designed to control the water pump based on sensor inputs and display relevant information on the LCD.
Component List
ESP32 (30 pin)
- Description: A powerful microcontroller with built-in Wi-Fi and Bluetooth capabilities.
- Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, Vin, D23, D22, TX0, RX0, D21, D19, D18, D5, TX2, RX2, D4, D2, D15, 3V3
LCD Display (16 pin)
- Description: A 16x2 character LCD display.
- Pins: VSS, VDD, VO, RS, R_W, E, DB0, DB1, DB2, DB3, DB4, DB5, DB6, DB7, A, K
I2C module
- Description: A module to interface with I2C devices.
- Pins: SCL, SDA, VCC, GND
5V Type C DC Socket
- Description: A power input socket for 5V Type C power supply.
- Pins: - Negative, + Positive
Mini Diaphragm Water Pump
- Description: A small water pump for liquid transfer.
- Pins: Positive (+), Negative (-)
HC-SR04 Ultrasonic Sensor
- Description: A sensor to measure distance using ultrasonic waves.
- Pins: VCC, TRIG, ECHO, GND
5V relay
- Description: A relay module to control high voltage devices.
- Pins: Normally Open, Common terminal, Normally Closed, In, GND, VCC
Wiring Details
ESP32 (30 pin)
- D34: Connected to ECHO pin of HC-SR04 Ultrasonic Sensor
- D33: Connected to TRIG pin of HC-SR04 Ultrasonic Sensor
- D26: Connected to In pin of 5V relay
- GND: Connected to GND pin of I2C module, GND pin of HC-SR04 Ultrasonic Sensor, and GND pin of 5V relay
- Vin: Connected to VCC pin of I2C module and VCC pin of HC-SR04 Ultrasonic Sensor
- D22: Connected to SCL pin of I2C module
- D21: Connected to SDA pin of I2C module
- 3V3: Connected to VCC pin of 5V relay
LCD Display (16 pin)
- No connections specified in the provided net list.
I2C module
- SCL: Connected to D22 pin of ESP32
- SDA: Connected to D21 pin of ESP32
- VCC: Connected to Vin pin of ESP32
- GND: Connected to GND pin of ESP32
5V Type C DC Socket
- - Negative: Connected to Negative (-) pin of Mini Diaphragm Water Pump
- + Positive: Connected to Normally Open pin of 5V relay
Mini Diaphragm Water Pump
- Negative (-): Connected to - Negative pin of 5V Type C DC Socket
- Positive (+): Connected to Common terminal pin of 5V relay
HC-SR04 Ultrasonic Sensor
- VCC: Connected to Vin pin of ESP32
- TRIG: Connected to D33 pin of ESP32
- ECHO: Connected to D34 pin of ESP32
- GND: Connected to GND pin of ESP32
5V relay
- Normally Open: Connected to + Positive pin of 5V Type C DC Socket
- Common terminal: Connected to Positive (+) pin of Mini Diaphragm Water Pump
- In: Connected to D26 pin of ESP32
- GND: Connected to GND pin of ESP32
- VCC: Connected to 3V3 pin of ESP32
Code
No code was provided for the microcontrollers in this circuit.