Document
AgroNext · Module 02 · Root zone
Sheet
03 / 07
Scope
field prototype · product development

Module 02 · Root zone

TerraNex

TerraNex reads the root zone and runs irrigation. Soil moisture and pH arrive on analog inputs, NPK values over an RS485 / Modbus RTU line. The irrigation pump and the nutrient dosing pump are driven by two separate relays.

NPK, pH and moisture probes in the soil with the TerraNex breadboard
TerraNex probes in the soil, pepper greenhouse.
Technical summary
ControllerESP32
Soil moisturecapacitive probe · ADC1 · GPIO34 · two-point dry/wet calibration
pHanalog interface + BNC electrode · GPIO35 · 10k/20k divider · two-buffer calibration
NPKRS485 probe · Modbus RTU · MAX3485 interface
Irrigation pumpGPIO25 · max 60 s
Fertiliser dosingGPIO26 · max 30 s
03.1

Two pumps, one rule

Only one pump runs at a time. Each run is capped at the channel's maximum duration and the board's own timer switches the pump off when time is up; even if the link or an upload stalls, the pump does not stay on. The board is also supervised by a watchdog.

03.2

Analog inputs and Wi-Fi

On the ESP32, ADC2 is unavailable while Wi-Fi is on, so soil moisture and pH use ADC1 pins. The pH board's output can reach 5 V, so a divider brings it within the 3.3 V limit.

03.3

NPK line

The NPK probe talks over a differential RS485 line; its A/B wires never connect directly to the ESP32 but go through a MAX3485 transceiver. The values serve as context for dosing decisions.

TerraNex breadboard wiring: pH interface, capacitive moisture, NPK RS485, fertiliser and irrigation relays
Electronic layout · TerraNex · click for full size