Back to selected work

Selected work

Irrigation control with local measurements and resilience to outages

Local measurements and checks on actual water use improved the soil water model. The design prioritises reliability: during partial failures it preserves available functions, uses fallback data and continues to enforce local time limits.

Personal project · design and implementation

Application
Garden irrigation
Platform
ESP32 (ESP-IDF)
Valve
24 VAC valve
Focus
model accuracy, diagnostics and local control
A rain gauge and hydrostatic probe provide local data. The ESP32 checks water availability and actual use, controls the valve and enforces time limits; MQTT and cloud services are optional.
Local measurements improve the soil water model. Online data can provide fallback input when local measurement is unavailable. The valve shut-off timer and stored daily limits remain independent of network services.

Assignment and context

The objective was to control one irrigation zone supplied from an underground rainwater tank, with operational reliability as a primary design goal. The device had to operate a valve, enforce daily limits and handle failures of sensors, the network, time sources and cloud services.

The original solution estimated soil water availability from precipitation and evapotranspiration supplied by an online provider. The data repeatedly reported rain that had missed the site. The model also counted irrigation when watering was activated but the tank had no water available. Its estimate therefore drifted away from actual conditions.

I added a rain gauge and a hydrostatic probe in the tank. The system needed local rainfall data, a check to prevent irrigation without water and verification of actual water use. A command to open the valve does not confirm that irrigation took place: even with enough water, a valve fault can prevent it.

Approach and solution

I supplemented the soil water model with local measurements and checks on the physical effect of irrigation. I designed the firmware so that a partial failure limits the affected functions while allowing others to continue. Valve control and time limits stay on the device; network services provide supplementary or fallback data and monitoring.

  • Local sensorsThe rain gauge provides the model with actual local rainfall. The hydrostatic probe measures stored water and changes in tank level. Local data takes priority because it better reflects conditions at the irrigation site.
  • Checking the physical effectA low tank level blocks irrigation. Comparing stored water before and after a cycle allows actual use to be checked and discrepancies with the command to be detected, for example when a valve fails. The model therefore need not rely solely on the assumption that opening the valve means water was delivered.
  • Graceful degradationWhen part of the system fails, other available functions remain operational. For example, online rainfall data can provide a fallback input when the rain gauge fails. The model then uses less accurate data, but the sensor outage alone does not disable the entire system. Local time limits remain in force in this mode.
  • Valve shut-off timerOnly one component changes the valve state. A separate timer based on elapsed operating time handles closure without relying on wall-clock time, the network or the application’s main loop.
  • Persistent limitsBefore opening the valve, the requested duration is reserved in the daily record. The reservation survives a power outage and irrigation does not resume automatically after restart.
  • Monitoring and supervisionThe device exposes valve state, limit usage, sensor status and communication status. A cloud outage does not interrupt the local timer or erase stored limits.

Result

Local rainfall measurements and verification of actual water use substantially improved the soil water model. Its state now reflects local conditions and verified irrigation, instead of counting rain that missed the site or water that was never delivered.

The system detects discrepancies between requested and actual operation more effectively, making faults easier to diagnose. During partial outages it preserves available functions and uses fallback data where possible. Reliability is supported by checking actual conditions, containing the impact of faults and enforcing local control limits.

A similar task

Do you need local measurement or control that works without a network?

Tell me what you need to monitor or control and how the device should behave during an outage.

Tomáš Vávra · independent engineer

tomas@vavrasystems.cz