Capacitive moisture sensor interference

Dear all,

I'm working on a prototype for a automated irrigation system, which includes a capacitive moisture sensor v 2.0 (as many already tried).

I know that many sensor had production issues, i ensured that mine works ok.

Issues that i have resolved:

1- since i used a tm-1637 display to show percent values, i had to filter the power line with a 100uf. The display is too noisy. This capacitor filtered the line, which improved.

2- when the moisture is under a X percent selected by user (potentiometer), a water pump is activated via relay. But the relay use too much current and because of that, modifies the readings from the sensor in a bad way, so i fixed it using a Mosfet instead of a relay. Worked.

3- i added a average of 60 for the sensor readings when it's "listen", and 30 (more "faster") when is filling water to make the water pump to stop more quickly. Worked ok.

And other fine calibrations, like using a "compensation" constant that i add to the sensor readings, when leds are on....

The only thing, that i can't understand is this: if the testing pot with the soil and sensor is on the workbench or elevated from the ground in a table, the readings are stable. But if i put the pot on the ground, start receiving readings with fluctuations in a periodic-lineal way.... Very noticiable: on top, no oscilations. On the floor, mooving up and down.

I beleive this is a electrical /electro-magnetic situation.... I would like to fix it too.
There is anything that i can do?
Any ideas?

Best wishes to all.

I

1 Like

Can you supply a link to this sensor please.

Also fitting a 0.1uF ceramic capacitor in paralled with the 100uF will improve the high frequency noise.

See this for a full explanation of why
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

this one:

The 555 chip and the voltage regulator are ok. I also inserted a 1 Mega resistor between ground and AUOT to improve performance. I used serial plotter to check the transitions from 100 % wet to air, and the response was very good. I mention this FYI.

thank you for this aditional information of de-coupling, i will study right now.

Thanks for that.

Sadly this is only to be expected. It is the fundamental property of capactive sensing. What happens is that the capacitance to ground is swamping the capactive effect caused by the moisture in the soil.

It looks like this sensor uses a free running oscillator and the moisture in the soil is being measured by measuring the frequency this oscillator runs at. With such a high capacitance to ground then it is actually stopping the oscillator from working. This is only to be expected on a free running oscillator.

The solution would appear to be not to push the probe down so far in the pots, or use higher pots so the end of the probe is not so close to the ground. Or indeed, as you have found, to raise the pots off the ground.

Thank you so much for this Grumpy_Mike!

Hi, @gabrielgabrielgabriel
Welcome to the forum.

What re the lead lengths between the sensors and the controller?
What model Arduino controller are you using?
This appears to be the schematic of the V1.2 sensor.

Tom... :smiley: :+1: :coffee: :australia:

Hi Tom! Thanks you.

Im using arduino pro mini 5v 16 Mhz.
The lenght of the cable from the sensor to the pro mini is about 1.5 meters long (stereo cable)

Regarding to the 1M resistor (factory missing) i fixed,

I did new testings at home, and this sensor is quite sensitive to electric fields / ground. For instance, a pot filled with water, when its 50 cm up from the floor it reads a solid 95 %, but when i put it down, the readings are crazy, which is a problem because i need solid readings to react to concrete events on soil (watering).

Aa grumpy_mike said, perhaps it seems the nature of the sensor to work on this way.

Hi,
The sensor uses C2 as the sense capacitance, that is a very small capacitance, just inter track capacitance or close metal objects can influence it, even your hand.
Any signals/currents in the earth would also upset any readings almost making the sensor act like an aerial to EM noise.

Tom.. :smiley: :+1: :coffee: :australia:

Ok.

So, the only solution i have to improve this is working with averages, multimap() and cleaning the power line with de-coupling caps.

Any other improvements?

So far, the worst scenery i'm having is oscilating over +-3 %. Which i can fix to the lowest one...

Thanks for the help, i really appreciate.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.