I am in the process of building an automated irrigation system using capacitive soil moisture sensors and Arduinos.
My challenge comes in with the soil moisture sensors bought from Banggood.com. I attempted to waterproof the sensor by sealing the the top-part of the sensor with bathroom silicone, and in another attempt, using a combination of heat-shrink and silicone. The sensors work nicely and still give accurate readings while being waterproof.
The challenge comes in when the sensors are buried or placed in the field. I want to measure moisture at 20mm underground. When I buried the sensors, strange readings started occurring. The readings are erratic and in most cases completely outside of acceptable ranges (acceptable ranges are 300 - 750 analog readings using an Arduino Nano). This happens when I insert the sensors into soil or when moisture touches the silicone cover of the sensors. This situation also occurs when I activate my sprinklers (leading to the above case where water touches the silicone).
My setup includes 4 Arduino Nano's, 2 x 12V solenoids connected to relays controlled by 2 Arduinos. The entire setup is powered by a single 12V 60W power supply. A 5V regulator is used to power the Arduino's from the main 12V line.
I've tried covering the sensors with a bucket to prevent moisture contact, but the invalid readings still occur. Could it be that minerals inside my soil are affecting my readings? What could be causing these strange readings?
Edit 1: I should mention that the erratic readings are always at the drier end of the spectrum. Thanks @Reroute for the advice