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

ESP32-Based Smart Agriculture Monitoring System with RS485 Communication

Image of ESP32-Based Smart Agriculture Monitoring System with RS485 Communication

Circuit Documentation

Summary

The circuit in question is designed to interface various sensors and modules with an ESP32 microcontroller for the purpose of monitoring environmental parameters. The sensors include a DHT22 for temperature and humidity, a pH sensor for measuring the acidity or alkalinity of a solution, an NPK soil sensor for detecting the levels of nitrogen, phosphorus, and potassium in soil, and a capacitive soil moisture sensor. Additionally, an RS485 transceiver is used for long-distance communication, and a 0.96" OLED display is included for data visualization. The circuit is powered by a power supply unit, and voltage regulation is provided by two 7808 voltage regulators.

Component List

DHT22

  • Temperature and humidity sensor
  • Pins: +, Out, -

pH Sensor

  • Sensor for measuring the acidity or alkalinity of a solution
  • Pins: +9volt, output pin, GND

NPK Soil Sensor

  • Sensor for detecting the levels of nitrogen, phosphorus, and potassium in soil
  • Pins: 12V DC, A, B, GND

ESP32 (30 pin)

  • Microcontroller with WiFi 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

Capacitive Soil Moisture Sensor V1.2

  • Sensor for measuring the moisture content in soil
  • Pins: GND, VCC, AOUT

RS485 Transceiver

  • Module for long-distance communication
  • Pins: VCC, RO, RE, GND, B, A, DE, DI

0.96" OLED Display

  • Small display for data visualization
  • Pins: GND, VDD, SCK, SDA

7808 Voltage Regulator

  • Provides regulated +8V output
  • Pins: INPUT, GND, OUTPUT

Power Supply

  • Provides power to the circuit
  • Pins: +, -

Wiring Details

DHT22

  • + to ESP32 3V3
  • Out to ESP32 D13
  • - to GND

pH Sensor

  • +9volt to ESP32 D34
  • output pin (not connected)
  • GND to GND

NPK Soil Sensor

  • 12V DC to 7808 OUTPUT
  • A to RS485 A
  • B to RS485 B
  • GND to GND

ESP32 (30 pin)

  • D34 to pH Sensor +9volt
  • D35 to Capacitive Soil Moisture Sensor AOUT
  • D13 to DHT22 Out
  • D23 to RS485 DI
  • D22 to RS485 RE
  • D19 to OLED SDA
  • D18 to OLED SCK
  • D4 to RS485 RO
  • D2 to RS485 DE
  • 3V3 to DHT22 +, Capacitive Soil Moisture Sensor VCC, RS485 VCC, OLED VDD
  • GND to GND

Capacitive Soil Moisture Sensor V1.2

  • AOUT to ESP32 D35
  • VCC to ESP32 3V3
  • GND to GND

RS485 Transceiver

  • DI to ESP32 D23
  • RE to ESP32 D22
  • RO to ESP32 D4
  • DE to ESP32 D2
  • A to NPK Soil Sensor A
  • B to NPK Soil Sensor B
  • VCC to ESP32 3V3
  • GND to GND

0.96" OLED Display

  • GND to GND
  • VDD to ESP32 3V3
  • SCK to ESP32 D18
  • SDA to ESP32 D19

7808 Voltage Regulator

  • INPUT to Power Supply +
  • GND to GND
  • OUTPUT to NPK Soil Sensor 12V DC

Power Supply

  • + to 7808 INPUT
  • - to GND

Ground Connections

All GND pins are interconnected and connected to the Power Supply -.

Code Documentation

No code has been provided for the microcontrollers in the circuit. When code is available, it should be documented here with explanations for each function and routine, including setup and loop functions for the ESP32 microcontroller, as well as any interrupt service routines or peripheral configurations.


Please note that the above documentation is based on the provided information and assumes that the circuit is correctly designed for the intended functionality. It is recommended to review the actual circuit and test it to ensure that it operates as expected.