ESP32-S3 Based Automated Watering System with Ultrasonic Sensing and Data Logging
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit in question appears to be a complex system designed to interface with various sensors and actuators, likely for some form of monitoring and control application. The central processing unit of the circuit is an ESP32-S3 microcontroller, which is responsible for handling inputs from an ultrasonic sensor (HC-SR04) and a water flow sensor, as well as controlling an OLED display, a real-time clock (DS3231 RTC), an SD card module, a water pump, a two-channel relay, and a solenoid valve. The power supply for the circuit components is provided through 3.3V and ground connections from the ESP32-S3, with additional power for the water pump and solenoid valve provided by 220V power sources through the relays.
Component List
ESP32-S3
- Microcontroller with WiFi and Bluetooth capabilities.
- It has a variety of GPIO pins for interfacing with peripherals.
HC-SR04 Ultrasonic Sensor
- Sensor for measuring distance via ultrasonic waves.
- It has VCC, TRIG, ECHO, and GND pins.
Water Flow Sensor
- Sensor for measuring the flow rate of water.
- It has Signal, Vcc, and GND pins.
OLED Display 2.42"
- A small display for visual output.
- It has GND, VCC, SCK, SDA, RES, DC, and CS pins.
DS3231 RTC
- Real-Time Clock module for timekeeping.
- It has 32K, SQW, SCL, SDA, VCC, and GND pins.
SD Card Module
- Module for reading and writing to SD cards.
- It has CS, SCK, MOSI, MISO, VCC, and GND pins.
Water Pump
- Actuator for pumping water.
- It has VCC and GND pins.
Two Channel Relay 5V
- Module for controlling high power devices.
- It has VCC, IN2, IN1, GND, NC2, C2, NO2, NC1, C1, and NO1 pins.
Valve Solenoid Water
- Electrically controlled valve for controlling water flow.
- It has IN01 and IN02 pins.
Power 220V
- Power source for high power devices.
- It has hot wire and neutral wire pins.
Wiring Details
ESP32-S3
- 3v3: Connected to VCC of OLED Display, Two Channel Relay, HC-SR04 Ultrasonic Sensor, DS3231 RTC, SD Card Module, and Water Flow Sensor.
- GPIO4: Connected to ECHO of HC-SR04 Ultrasonic Sensor.
- GPIO5: Connected to TRIG of HC-SR04 Ultrasonic Sensor.
- GPIO18: Connected to CS of OLED Display.
- GPIO8: Connected to DC of OLED Display.
- GPIO9: Connected to 32K of DS3231 RTC.
- GPIO10: Connected to SQW of DS3231 RTC.
- GPIO11: Connected to RES of OLED Display and SCL of DS3231 RTC.
- GPIO12: Connected to SDA of OLED Display and SDA of DS3231 RTC.
- GPIO13: Connected to SCK of OLED Display.
- GND: Common ground with OLED Display, HC-SR04 Ultrasonic Sensor, DS3231 RTC, Two Channel Relay, SD Card Module, and Water Flow Sensor.
- GPIO43: Connected to IN1 of Two Channel Relay.
- GPIO44: Connected to Signal of Water Flow Sensor.
- GPIO1: Connected to SCK of SD Card Module.
- GPIO2: Connected to CS of SD Card Module.
- GPIO42: Connected to MOSI of SD Card Module.
- GPIO41: Connected to MISO of SD Card Module.
HC-SR04 Ultrasonic Sensor
- VCC: Connected to 3v3 of ESP32-S3.
- TRIG: Connected to GPIO5 of ESP32-S3.
- ECHO: Connected to GPIO4 of ESP32-S3.
- GND: Common ground with ESP32-S3.
Water Flow Sensor
- Signal: Connected to GPIO44 of ESP32-S3.
- Vcc: Connected to 3v3 of ESP32-S3.
- GND: Common ground with ESP32-S3.
OLED Display 2.42"
- GND: Common ground with ESP32-S3.
- VCC: Connected to 3v3 of ESP32-S3.
- SCK: Connected to GPIO13 of ESP32-S3.
- SDA: Connected to GPIO12 of ESP32-S3.
- RES: Connected to GPIO11 of ESP32-S3.
- DC: Connected to GPIO8 of ESP32-S3.
- CS: Connected to GPIO18 of ESP32-S3.
DS3231 RTC
- 32K: Connected to GPIO9 of ESP32-S3.
- SQW: Connected to GPIO10 of ESP32-S3.
- SCL: Connected to GPIO11 of ESP32-S3.
- SDA: Connected to GPIO12 of ESP32-S3.
- VCC: Connected to 3v3 of ESP32-S3.
- GND: Common ground with ESP32-S3.
SD Card Module
- CS: Connected to GPIO2 of ESP32-S3.
- SCK: Connected to GPIO1 of ESP32-S3.
- MOSI: Connected to GPIO42 of ESP32-S3.
- MISO: Connected to GPIO41 of ESP32-S3.
- VCC: Connected to 3v3 of ESP32-S3.
- GND: Common ground with ESP32-S3.
Water Pump
- VCC: Connected to C2 of Two Channel Relay.
- GND: Connected to hot wire of Power 220V.
Two Channel Relay 5V
- VCC: Connected to 3v3 of ESP32-S3.
- IN1: Connected to GPIO43 of ESP32-S3.
- GND: Common ground with ESP32-S3.
- C2: Connected to VCC of Water Pump.
- NC2: Connected to neutral wire of Power 220V.
- C1: Connected to IN02 of Valve Solenoid Water.
- NC1: Connected to neutral wire of Power 220V.
Valve Solenoid Water
- IN01: Connected to hot wire of Power 220V.
- IN02: Connected to C1 of Two Channel Relay.
Power 220V
- Hot wire: Connected to GND of Water Pump and IN01 of Valve Solenoid Water.
- Neutral wire: Connected to NC2 of Two Channel Relay and NC1 of Two Channel Relay.
Documented Code
No code was provided for the microcontrollers in the circuit. Therefore, this section is left blank until the relevant code is supplied.