Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

ESP32-Based Smart Irrigation System with Humidity and Water Level Sensors

View and Edit Project In Cirkit DesignerImage of ESP32-Based Smart Irrigation System with Humidity and Water Level Sensors

Circuit Documentation

Summary

This circuit is designed to monitor soil humidity and water levels, control a water pump, and provide visual feedback using an RGB LED. The system is controlled by an ESP32 microcontroller, which interfaces with various sensors and actuators.

Component List

  1. Mini Water Pump

    • Pins: VCC, GND
    • Description: A small water pump used to irrigate plants.
    • Purpose in Circuit: Controlled by a relay to turn on/off based on sensor inputs.
  2. Humidity YL-69

    • Pins: A0, D0, GND, VCC
    • Description: A soil moisture sensor.
    • Purpose in Circuit: Measures soil humidity and sends data to the ESP32.
  3. KY-016 RGB LED

    • Pins: B, G, R, GND
    • Description: An RGB LED module.
    • Purpose in Circuit: Provides visual feedback based on sensor readings.
  4. 9V Battery

    • Pins: -, +
    • Description: A 9V battery power source.
    • Purpose in Circuit: Powers the water pump through the relay.
  5. KY-019 Relay Module 1 Channel

    • Pins: S, 5V, GND, NC, COM, NO
    • Description: A single-channel relay module.
    • Purpose in Circuit: Controls the water pump based on signals from the ESP32.
  6. Water Level Sensor

    • Pins: SIG, VCC, GND
    • Description: A sensor to measure water levels.
    • Purpose in Circuit: Sends water level data to the ESP32.
  7. ESP32

    • 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
    • Description: A microcontroller with Wi-Fi and Bluetooth capabilities.
    • Purpose in Circuit: Central control unit that processes sensor data and controls the relay and RGB LED.

Wiring Details

Mini Water Pump

Humidity YL-69

KY-016 RGB LED

9V Battery

KY-019 Relay Module 1 Channel

Water Level Sensor

ESP32

Documented Code

ESP32 Code

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

9V Battery Code

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

This documentation provides a comprehensive overview of the circuit, including a summary, detailed component list, wiring details, and the code used in the microcontrollers.