ESP32 Soil Monitors Tap Into Ultra-Low Power Mode

ESP32 Soil Monitors Tap Into Ultra-Low Power Mode

Soil moisture sensors are cheap and easy to interface with, to the point that combining one with an Arduino and blinking an LED when your potted plant is feeling a bit parched is a common beginners project. But what about on the long term? Outside of a simple proof of concept, what would it take to actually read the data from these sensors over the course of weeks or months?


That’s precisely the question [derflob] recently had to answer. The goal was to build a device that could poll multiple soil sensors and push the data wirelessly into Home Assistant. But since it would be outside on the balcony, it needed to run exclusively on battery power. Luckily his chosen platform, the ESP32, has some phenomenal power saving features. You just need to know how to use them.



The custom board can read from six soil sensors.

In his extremely detailed blog post, [derflob] goes over some of the tricks he used to eek out as much runtime as possible. The big one, and arguably the key to the whole project, is his use of the ESP32’s Ultra-Low Power coprocessor (ULP). This powerful feature allows the microcontroller to do some useful work, albeit with a reduced instruction set, without waking up the power-hungry primary processor.


Since the ULP can read from the ADC, he was able to craft some assembly code that only wakes the CPU if the readings from one of the six connected sensors has changed more than a set threshold value since the last update. This keeps the chip asleep the majority of the ..

Support the originator by clicking the read the rest link below.