After soldering and some programming it was time to test my soil moisture sensors. My target was

a) to set up a working infrastructure for transmitting data in my local network.

b) to find out if my sensors are water proof

c) to see their behaviour over time


My ESP32 reads both the soil moisture sensor (output: analog voltage) and water level sensor (output: frequency) and sends the values to my network using the MQTT protocol.

A mosquitto broker running on my Raspberry Pi receives the data. A Node Red daemon get notifications from mosquitto and stores the data in a influxdb database. For visualization I use a Grafana instance.

Soil moisture sensor and my baby fig tree
Water level sensor
Visualization of the water level (blue) and the soil moisture level

In the picture above the refills of the water tank are clear to see (blue line). But you can also see that the soil moisture sensor almost always shows a moisture level of 100% . It also does sens major peaks and a lot of noise. It debugged my code for days to find a mistake, searched my circuit designs for errors, but without success. I did not find the error until I gave up and unmounted my setup:

The paint cover of the copper foil got damaged when I stick the sensor into the soil. 🙁

I decided for spray paint because I wanted to keep the cover as thin as possible. Maybe I try either a seconds layer of spray paint or a different method for painting like brushing.