Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

ESP32-Based Environmental Monitoring and Watering System

Image of ESP32-Based Environmental Monitoring and Watering System

Circuit Documentation

Summary

This circuit is designed to interface various sensors and actuators with an ESP32 Devkit V1 microcontroller. The sensors include a DHT11 humidity and temperature sensor, an HC-SR04 ultrasonic sensor, a pH degree sensor module, and a TDS (Total Dissolved Solids) sensor module. The circuit also includes a 5V 2-Relay module to control two 5V mini water pumps and three I2C LCD 16x2 screens for display purposes. The power supply is a 220V source that is connected to the relay module and the water pumps. The ESP32 Devkit V1 serves as the central processing unit, reading sensor data and controlling the actuators based on the programmed logic.

Component List

  • ESP32 Devkit V1: A microcontroller board with WiFi and Bluetooth capabilities, featuring a variety of digital and analog pins for interfacing with other components.
  • DHT11 Humidity and Temperature Sensor: A sensor that measures ambient humidity and temperature.
  • HC-SR04 Ultrasonic Sensor: A sensor that measures distance by emitting ultrasonic waves and measuring the time taken for the echo to return.
  • pH Degree Sensor Module: A sensor module used to measure the pH level of a solution.
  • TDS Sensor Module: A sensor module used to measure the total dissolved solids in water, indicating its purity.
  • 5v 2-Relay JD-VCC: A relay module with two relays that can switch external circuits on and off.
  • 5v Mini Water Pump: An actuator that pumps water when powered by a 5V supply.
  • Power 220V: The main power supply for the water pumps, controlled by the relay module.
  • I2C LCD 16x2 Screen: A display screen that uses the I2C protocol for showing information.

Wiring Details

ESP32 Devkit V1

  • 3V3 connected to:
    • DHT11 Sensor VDD
    • 5V 2-Relay JD-VCC VCC
    • pH Degree Sensor Module pH Positive
    • TDS Sensor Module TDS Positive
    • HC-SR04 Ultrasonic Sensor VCC
  • GND connected to:
    • DHT11 Sensor GND
    • 5V 2-Relay JD-VCC GND
    • pH Degree Sensor Module pH Negative
    • TDS Sensor Module TDS Negative
    • HC-SR04 Ultrasonic Sensor GND
    • All I2C LCD 16x2 Screens GND
  • D5 connected to HC-SR04 Ultrasonic Sensor TRIG
  • D18 connected to HC-SR04 Ultrasonic Sensor ECHO
  • D21 (SDA) connected to all I2C LCD 16x2 Screens SDA
  • D22 (SCL) connected to all I2C LCD 16x2 Screens SCL
  • D23 connected to DHT11 Sensor DATA
  • D34 connected to pH Degree Sensor Module pH A
  • D25 connected to 5V 2-Relay JD-VCC IN2
  • D26 connected to 5V 2-Relay JD-VCC IN1
  • D27 connected to TDS Sensor Module TDS A
  • VIN connected to all I2C LCD 16x2 Screens VCC (5V)

DHT11 Humidity and Temperature Sensor

  • VDD connected to ESP32 Devkit V1 3V3
  • DATA connected to ESP32 Devkit V1 D23
  • GND connected to ESP32 Devkit V1 GND

HC-SR04 Ultrasonic Sensor

  • VCC connected to ESP32 Devkit V1 3V3
  • TRIG connected to ESP32 Devkit V1 D5
  • ECHO connected to ESP32 Devkit V1 D18
  • GND connected to ESP32 Devkit V1 GND

pH Degree Sensor Module

  • pH Positive connected to ESP32 Devkit V1 3V3
  • pH Negative connected to ESP32 Devkit V1 GND
  • pH A connected to ESP32 Devkit V1 D34

TDS Sensor Module

  • TDS Positive connected to ESP32 Devkit V1 3V3
  • TDS Negative connected to ESP32 Devkit V1 GND
  • TDS A connected to ESP32 Devkit V1 D27

5v 2-Relay JD-VCC

  • VCC connected to ESP32 Devkit V1 3V3
  • GND connected to ESP32 Devkit V1 GND
  • IN1 connected to ESP32 Devkit V1 D26
  • IN2 connected to ESP32 Devkit V1 D25
  • NO connected to Power 220V hot wire
  • COM connected to both 5V mini water pumps positive pin

5v Mini Water Pump

  • Positive pin connected to 5V 2-Relay JD-VCC COM
  • Negative pin connected to Power 220V neutral wire

Power 220V

  • Hot wire connected to 5V 2-Relay JD-VCC NO
  • Neutral wire connected to both 5V mini water pumps negative pin

I2C LCD 16x2 Screen

  • SDA connected to ESP32 Devkit V1 D21
  • SCL connected to ESP32 Devkit V1 D22
  • VCC (5V) connected to ESP32 Devkit V1 VIN
  • GND connected to ESP32 Devkit V1 GND

Documented Code

No code was provided for the microcontrollers in the circuit. The documentation of the code would typically include a description of the functionality implemented in the code, along with comments within the code explaining the purpose of different sections and functions. Since no code is available, this section cannot be completed.