Eleki Jack IoT All articles
Home Automation

My Sprinkler Timer Met an ESP32. My Water Bill Never Recovered (In a Good Way)

Eleki Jack IoT
My Sprinkler Timer Met an ESP32. My Water Bill Never Recovered (In a Good Way)

Photo: ESP32 microcontroller wired to relay module in waterproof enclosure next to garden sprinkler, via circuitdigest.com

Every morning last June, I watched the same scene repeat itself across my cul-de-sac: gray clouds overhead, rain still beading on the windows, and at least three neighbors' sprinkler systems churning away like it was the driest summer on record. Timer-based irrigation doesn't know it rained. It doesn't care. It runs on a schedule set in April and doesn't think again until October.

I decided my yard could do better — and for less than the cost of a month of overwatering.

The Problem With Dumb Timers

The irrigation controller that came with my house is a classic builder-grade unit: rotary dials, a plastic cover sun-bleached to the color of old cheddar, and exactly one level of intelligence — time of day. It waters Monday, Wednesday, Friday, fifteen minutes a zone, whether the soil is bone dry or the sky is actively dumping an inch of rain on it.

The EPA estimates that as much as half of all residential irrigation water goes to waste through evaporation, runoff, or plain bad timing. My water bill was quietly backing that up. So instead of dropping $200+ on a commercial smart controller, I built one from parts I mostly had in a drawer.

The Parts List

Here's what went into the build:

The key insight: I didn't rip out the irrigation system. The valves, the manifolds, the buried poly tubing — all of that stays. I'm only replacing the brain. My ESP32 now drives the same 24VAC solenoid valves the old timer did, just through relays instead of mechanical timer contacts.

Wiring It Up Without Flooding Anything

One word of caution before you touch anything: irrigation valves run on 24VAC, which won't hurt you, but shorting the wrong wires together can open every zone in the yard simultaneously. Label your zone wires before disconnecting the old timer. Ask me how I know.

The relay board takes GPIO signals from the ESP32 and switches the 24VAC transformer output to each zone. Straightforward. The trickier part is keeping the ESP32 itself alive outdoors.

Waterproofing: The Part That Actually Matters

The enclosure gets the sensors' cabling, the ESP32, a small buck converter fed from an outdoor-rated power supply, and a desiccant pack. Cable glands keep rain from wicking straight into the box, and every PCB that lives in there gets two coats of conformal spray.

The soil sensors are the most exposed components, so I embedded each one in epoxy up to the cable entry point, leaving only the sensing tines bare. Capacitive sensors have no exposed metal on the sensing pad itself, which is exactly why they outlast resistive ones by years. Mine have been buried since March and are reading consistently.

The rain gauge mounts on a fence post, well clear of roof overhang and tree cover, so it catches an honest sample of rainfall.

The Brains: Local Data, Local Decisions

The firmware is simple but opinionated. Every zone waters only if all three of these conditions are true:

  1. Soil moisture in that zone is below a threshold I tuned per zone (shade beds dry slower than the sunny strip by the driveway)
  2. The rain gauge hasn't recorded meaningful precipitation in the last 24 hours
  3. A call to Open-Meteo's free API — no key required — says no significant rain is forecast in the next 12 hours

That last one is the secret sauce. Watering right before a storm is the most common dumb-timer failure, and skipping it requires looking forward in time, not just measuring the present. Open-Meteo gives hourly forecasts with zero account setup, which makes it perfect for a set-and-forget build.

Everything runs locally on my Home Assistant box; the ESP32 just polls and reports. If the internet drops, the soil moisture logic keeps working — the forecast check just gets skipped, and the system errs on the side of the sensors in the ground.

The Receipts: One Summer of Data

I logged everything. From May through September:

The most satisfying data point came in late August, when a tropical remnant parked itself over our area for three days. My system ran zero cycles for four days straight. Next door, I could hear my neighbor's valves clicking on every morning at 5:15 AM, faithfully watering puddles.

If You Want to Build Your Own

Start smaller than I did. Wire one zone and one soil sensor first, log data for two weeks, and compare what the sensors say against what your dumb timer does. The gap between them will probably embarrass you into finishing the project.

And when your neighbors ask why their sprinklers are running in the rain, you can tell them: their timer doesn't know it's raining. Yours does.

All Articles

Related Articles

Five Houses, One Server, Zero Subscriptions: How Our Block Built a Camera Mesh That Answers to Nobody

Five Houses, One Server, Zero Subscriptions: How Our Block Built a Camera Mesh That Answers to Nobody

Read the Sticker Before You Plug It In: How I Vet Cheap Gadgets With the FCC Database

Read the Sticker Before You Plug It In: How I Vet Cheap Gadgets With the FCC Database

Eight Copper Wires, Zero New Drywall: My House Was Already Wired for Sensors

Eight Copper Wires, Zero New Drywall: My House Was Already Wired for Sensors