- 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.

| Controller | ESP32 |
|---|---|
| Soil moisture | capacitive probe · ADC1 · GPIO34 · two-point dry/wet calibration |
| pH | analog interface + BNC electrode · GPIO35 · 10k/20k divider · two-buffer calibration |
| NPK | RS485 probe · Modbus RTU · MAX3485 interface |
| Irrigation pump | GPIO25 · max 60 s |
| Fertiliser dosing | GPIO26 · max 30 s |
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.
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.
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.
