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

ESP32-Based Smart Soil Monitoring System with Wi-Fi Connectivity

View and Edit Project In Cirkit DesignerImage of ESP32-Based Smart Soil Monitoring System with Wi-Fi Connectivity

Circuit Documentation

Summary

This document provides a detailed overview of a circuit designed to interface various sensors and an OLED display with an ESP32 microcontroller. The circuit includes a DHT22 temperature and humidity sensor, a pH sensor, an NPK soil sensor, a capacitive soil moisture sensor, an RS485 communication module, and a 0.96" OLED display. The circuit is powered by a combination of power supplies and voltage regulators.

Component List

  1. DHT22

    • Description: Temperature and Humidity Sensor
    • Pins: +, Out, -
  2. pH Sensor

    • Description: pH Sensor Module
    • Pins: +9volt, output pin, GND
  3. NPK Soil Sensor

    • Description: Soil Nutrient Sensor
    • Pins: 12V DC, A, B, GND
  4. ESP32 (30 pin)

    • Description: Microcontroller
    • 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
  5. Capacitive Soil Moisture Sensor V1.2

    • Description: Soil Moisture Sensor
    • Pins: GND, VCC, AOUT
  6. RS485

    • Description: RS485 Communication Module
    • Pins: VCC, RO, RE, GND, B, A, DE, DI
  7. 0.96" OLED

    • Description: OLED Display
    • Pins: GND, VDD, SCK, SDA
  8. 7808

    • Description: Voltage Regulator
    • Pins: INPUT, GND, OUTPUT
  9. Power Supply

    • Description: Power Supply Module
    • Pins: +, -
  10. 9V Battery

    • Description: Battery
    • Pins: +, -

Wiring Details

DHT22

pH Sensor

NPK Soil Sensor

ESP32 (30 pin)

Capacitive Soil Moisture Sensor V1.2

RS485

0.96" OLED

7808

Power Supply

Documented Code

DHT22

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

}

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

}

pH Sensor

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

}

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

}

NPK Soil Sensor

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

}

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

}

ESP32

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

}

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

}

Capacitive Soil Moisture Sensor V1.2

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

}

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

}

RS485

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

}

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

}

0.96" OLED

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

}

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

}