Blagojche "Bill" Kolichoski's Soil Moisture Sensor Delivers Wireless Data for Smarter Irrigation

Driven by an Espressif ESP8266 module running ESPHome, this battery-powered weatherproof sensor tracks soil moisture to save water.

Software developer Blagojche "Bill" Kolichoski has added smart moisture sensing to his Home Assistant-controlled garden irrigation setup — using battery-powered wireless Espressif ESP8266-based moisture sensor running ESPHome.

"Last year I made and installed a DIY garden irrigation controller for my drip irrigation system and it worked wonders during the last growing season," Kolichoski writes. "I had it set up through Home Assistant to turn on at night and water the garden so it stays fresh for the next day and so that the water has time to penetrate deeper before it is evaporated by the sun.

"That worked, [but] there were times when the day was a touch cooler and there wasn't a need to be watered. This brought the idea that I make a sensor to measure the soil moisture content and that I can then act on that with the watering, only turning it on if it is needed."

This ESP8266-powered soil moisture sensor aims to make a Home Assistant irrigation system even smarter. (📹: Taste The Code)

Kolichoski was looking for something that would be easy to deploy in the depths of the garden, without the need to run cabling — meaning a wireless network connection and a device with low enough power demands it could run from compact batteries. The chosen solution: an Espressif ESP8266-based ESP-07 module running the ESPHome firmware, giving it easy integration into the existing Home Assistant setup and the ability to feed in readings from an off-the-shelf capacitive soil sensor module that could be used to trigger the existing irrigation system.

To get the most runtime from the two 18650 cells in the device's waterproof housing — salvaged, in a smart approach to green electronics, from an old laptop's battery — Kolichoski removed the power LED and configured the device for deep sleep to boost its runtime from a little over two days to nearly 50. "This […] puts the ESP8266 module to sleep at certain intervals so that it can save power," he explains. "In our case, the measured humidity does not change so quickly so we can safely use intervals of a few hours in sleep and only measure once every 2 or 3 hours."

The project is documented in full, including the ESPHome configuration file, on Kolichoski's website and on Instructables.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire:
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles