0
\$\begingroup\$

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

\$\endgroup\$
0
\$\begingroup\$

Your sensor is measuring the presence of water anywhere over its sensor area, not just at 20mm deep, from its general construction I should correct it to be more like a 40mm diameter cylinder about the sensing area,

So if you have a single droplet of water in contact with the sensor it looks the same as half the sensor being near moist soil,

I should also warn that bathroom silicone while preventing significant flow of water through itself, acts as quite a good humidity sponge, which again water near the sensor gives false readings,

Air is a dielectric of 1, dry soil is 4-5, wet soil is 10-35, water is 80, so you need to correct any readings for the range you want when you do get it more reliable.

\$\endgroup\$
4
  • \$\begingroup\$ I'll keep your warning in mind, thanks! I'll try to monitor the effects of silicone's moisture absorbtion. I've read about the 40mm sensing area. Currently I am reading values that indicate dry soil, even when water is pooling around the sensor. This can't be a result of the silicone usage, can it? \$\endgroup\$
    – Marnu123
    Sep 1 '19 at 13:27
  • \$\begingroup\$ Harder to say, I just made my own a few years ago to prevent having to face all these unknowns, I might suggest trying static testing in dry air, e.g. a drop of water in various locations, a bit of soil in various locations, you might find the sensitivity is not even across the entire area (takes some weird math to actually achieve that, involves modelling and deliberately shaping the electric fields lines around a circuit board, not beginner level stuff) \$\endgroup\$
    – Reroute
    Sep 1 '19 at 13:36
  • 1
    \$\begingroup\$ your suggestion regarding static testing gave me a thought regarding testing my power supply. I normally read sensor values wirelessly using NRF24 modules. When I connect the PSU, the erratic values would occur. Even debugging via USB yield the same values. I never thought of isolating the sensor to its own 5V power supply. I connected the sensor to a power bank. The sensor values were stable and within range. I suspect my single LM7805 with heatsink (quite a large one) can't cope with all the noise generated by what could be a cheap noisy 12V PSU and the connected solenoid valves. \$\endgroup\$
    – Marnu123
    Sep 1 '19 at 17:16
  • \$\begingroup\$ Thank you for pointing out static testing. It helped me to start evaluating my entire design, finally finding the fault in my 5V power supply and possible line noise. I'm glad I didn't have to go into the complex calculations you described :) I'd like to upvote your answer for pointing out design considerations, but my reputation points limits me. Thanks again! \$\endgroup\$
    – Marnu123
    Sep 1 '19 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.