Inspiration

We kept landing on the same thing; farms waste an enormous amount of water.

Most irrigation is all-or-nothing, so the whole field gets watered even when only parts of it are actually dry.

One of us runs a bee farm in the tri-state area , so we've seen this problem first-hand year after year.

The fix already exists.

Greenhouses and precision drip use far less water, but they cost millions, so almost no normal farm can afford them.

We figured you don't need a million-dollar setup to get most of that benefit.

You just need to know which parts of the field are dry and only water those.

It's just that simple!

What it does

Smart Farm is a cheap mesh of sensors you spread across a field.

They read soil moisture, temperature, humidity, light, and they form a mesh network for intercommunication and data aggregation (220 meter radius of observation and communication per node) so there's no router or wiring to set up.

Everything feeds an AI/ML powered dashboard we call FarmIQ.

It builds a picture of the whole field, tracks how each part is trending, and works out what to do.

You can handle it yourself or let the system take that job over automatically, dispatching commands such as intelligent irrigation based on plant-type / soil conditions, imaging for crop/cattle disease, or analysis for predictive produce staging / harvesting periods.

How much water this saves

Agriculture uses about 70% of the world's freshwater [1], and most of that goes to watering whole fields evenly.

A review of U.S. soil-moisture-sensor scheduling found water savings of up to ~38% versus traditional methods, with equal or better yield [2], and a variable-rate field trial cut maize water use ~20% on a 15-hectare pivot with no yield loss [3].

We do the same thing with Smart Farm.

Even irrigation waters the whole field every cycle;

we only water the patches below their moisture floor, using the FAO-56 allowable-depletion thresholds that those same trials use.

If \( f_t \) is the fraction of the field that's actually dry on cycle \( t \), the water saved over a season of \( N \) cycles on area \( A \) at depth \( d \) is:

$$ W_{\text{saved}} = A\,d \sum_{t=1}^{N}\big(1 - f_t\big) = S \cdot A\,d\,N, \qquad S = 1 - \bar{f} $$

Using the conservative end of that range, \( S \approx 0.30 \), on a one-hectare fieldwatered \( d = 25\,\text{mm} \) a week for \( N = 20 \) weeks:

$$ W_{\text{saved}} = 0.30 \times 10{,}000\,\text{m}^2 \times 0.025\,\text{m} \times 20 \approx 1{,}500\ \text{m}^3 \approx 4.0 \times 10^{5}\ \text{gallons / hectare / season.} $$

On a 100-acre (≈40 ha) farm that's about 16 million gallons a season, and that's the low end of what these studies measured.

How we built it

The hardware is ESP32 nodes with the sensors on them (DHT22 for temp and humidity, an analog soil moisture probe, an ambient light sensor, and an ultrasonic sensor for tank level).

They mesh over ESP-NOW, a local peer-to-peer protocol, and our gateway node collects everything to send to our server over WiFi.

Irrigation commands go back out over MQTT to a 6-channel relay that runs the pumps, with safety built into the firmware so every pump auto-shuts-off and all of them cut if the connection drops.

The peer-to-peer part isn't just to save on wiring.

Each node makes its own local call first: if a patch crosses its line, that node can act on it without waiting on the server, so the system keeps working even if the uplink or the cloud goes down.

The mesh shares readings between neighbors, and the gateway rolls the whole field up for the heavier analysis.

So the simple, time-sensitive decisions happen at the edge, and the big-picture stuff happens centrally.

That central layer is where most of the analytics live.

The sensor points are sparse, so we interpolate between them to reconstruct a continuous moisture map of the field instead of just a handful of dots.

We track each patch's trend over time and fit its dry-down curve, which lets us forecast roughly when it'll cross its threshold and water it just before it stresses instead of after.

We run a water balance on top of that using real weather (rainfall, evapotranspiration, FAO-56 depletion) and the crop's growth stage from accumulated growing-degree-days, so a recommendation accounts for what the plant actually needs right now and what the sky is about to do.

The same pipeline watches for sensors that drift or flatline and flags them instead of trusting bad data.

For a high level view, FarmIQ shows it on a live map with real satellite imagery and real field boundaries, so the farmer sees where, why, and what to do.

Challenges we ran into

Running ESP-NOW and WiFi on the same gateway was a headache, and so was keeping the mesh stable over a phone hotspot for demo purposes.

Reconstructing a whole field from a handful of sensor points via interpolation, as well as forecasting dry-down without dangerous assumptions took real care on the mathematical modeling and machine learning side.

We put serious work into pump safety, making sure a dropped or stuck message couldn't leave a pump running and flood something.

Accomplishments that we're proud of

The closed loop actually works on real hardware.

Soil dries out, the pump kicks on, and no one touches anything.

The analytics turn a few cheap sensors into a full picture of the field, not just isolated readings.

The dashboard allows for a full unified view of every component of the farm, serving important information to some of the most important people in our society.

The water-savings numbers alongside our low production costs show that this project could help make a real impact on farms who cannot afford the more expensive solutions.

What we learned

The hardest part wasn't the electronics or the code. It was the translation, turning a stream of sensor numbers into one sentence a busy farmer can act on.

Pushing the simple decisions out to the nodes and keeping the heavy analysis central made the whole system more reliable than trying to do everything in one place.

Having someone on the team who actually farms changed a lot of what we built.

And the real takeaway is that water is the lever and cost is the barrier.

Bring the cost down and this reaches the farms that need it most.

What's next for Smart Farm

Run it on the bee farm for a full season and let the model learn each patch's real behavior, so the dry-down forecasts and watering get sharper the longer it runs.

Add automations that adapt to each field instead of fixed thresholds.

Handle more crops, add fertilizer dosing, and use the camera to spot pests and plant stress.

And keep pushing the per-node cost down so covering a whole field is an easy decision for any small farm.


Sources: [1] FAO, AQUASTAT — agriculture ≈70% of global freshwater withdrawals (https://www.fao.org/aquastat/en/overview/methodology/water-use/). [2] Soil water sensors for irrigation scheduling in the United States, Agricultural Water Management (2023) (https://www.sciencedirect.com/science/article/pii/S0378377423000136). [3] Water and energy savings using variable-rate sprinkler irrigation, Agricultural Water Management (https://www.sciencedirect.com/science/article/pii/S037837742600065X).

Built With

Share this project:

Updates