ESP32-Based Soil Monitoring System with RS-485 Communication and OLED Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit in question is designed to interface an ESP32 Wroom Dev Kit with an NPK Soil Sensor, an OLED 128x64 I2C Monochrome Display, and an RS-485 module. The ESP32 serves as the central microcontroller, managing data communication between the sensor, display, and RS-485 communication module. The NPK Soil Sensor is used to measure the nutrient content in the soil, the OLED display provides a user interface to display sensor readings, and the RS-485 module enables long-distance communication in industrial environments.
Component List
ESP 32 Wroom Dev Kit
- Description: A development board based on the ESP32 microcontroller, featuring Wi-Fi and Bluetooth connectivity, a wide range of GPIOs, and support for various communication protocols.
- Purpose: Acts as the main controller for interfacing with the other components in the circuit.
NPK Soil Sensor
- Description: A sensor used to measure the nitrogen, phosphorus, and potassium content in the soil.
- Purpose: Provides essential soil nutrient data to the ESP32 for analysis and display.
OLED 128x64 I2C Monochrome Display
- Description: A small display with 128x64 pixel resolution that communicates over the I2C protocol.
- Purpose: Displays information and sensor readings to the user.
RS-485 Module
- Description: A module that facilitates RS-485 communication, which is known for its robustness in industrial environments.
- Purpose: Enables the ESP32 to communicate over long distances using the RS-485 standard.
Wiring Details
ESP 32 Wroom Dev Kit
3V3connected to OLED DisplayVDDGNDconnected to OLED DisplayGND, RS-485 ModuleGND, and NPK Soil SensorGNDSD2connected to RS-485 ModuleROSD3connected to RS-485 ModuleREV5connected to RS-485 ModuleVCCand NPK Soil SensorVCCGPIO 16connected to OLED DisplaySDAGPIO 4connected to OLED DisplaySCKSD1connected to RS-485 ModuleDISD0connected to RS-485 ModuleDE
NPK Soil Sensor
VCCconnected to ESP32V5GNDconnected to ESP32GNDAconnected to RS-485 ModuleABconnected to RS-485 ModuleB
OLED 128x64 I2C Monochrome Display
VDDconnected to ESP323V3GNDconnected to ESP32GNDSDAconnected to ESP32GPIO 16SCKconnected to ESP32GPIO 4
RS-485 Module
VCCconnected to ESP32V5GNDconnected to ESP32GNDROconnected to ESP32SD2REconnected to ESP32SD3DEconnected to ESP32SD0DIconnected to ESP32SD1Aconnected to NPK Soil SensorABconnected to NPK Soil SensorB
Documented Code
No code has been provided for the microcontrollers in the circuit. The documentation for the code section will be updated once the code is available. The code would typically include initialization routines for the ESP32, code to read data from the NPK Soil Sensor, routines to communicate via the RS-485 module, and code to display information on the OLED display using the I2C protocol.