Go Down

Topic: Soil Moisture Sensing (Read 485 times) previous topic - next topic


I have looked at a lot of the posts on here to make the cheapest/most reliable soil moisture sensor and I am leaning toward simply using parallel, insulated conductors (a la epoxy-coated SS screws) and place them in the soil and use them as the capacitive element of an RC circuit and measure the pulse rise/decay time as the metric to use. 

Any recommendations on the frequency I should use or any potential problems?

Thanks all!


To get reasonable capacitance you will need some like plates to get the area and the dilectric properties or the expoxy May dominate changes in soil properties . You need to do some sums , the best frequency will then drop out !


Making sure I understand, you recommend just trying different square-wave frequencies to see which one is most effective?


No. Far from that.
hammy basically said your suggested solution won't work, and gave a suggestion on how you may actually make a small capacitor.
Then you measure the actual capacitance and calculate what frequency would work for you.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.


I'm not sure exactly what you're looking for, but I've used this Analog Capacitive Soil Moisture Sensor with good results.


So if I coat some stainless-steel screws in epoxy and fashion the screws so that they are parallel and close together, (say  3 - 4 millimeter) then you think the epoxy will dominate any RC time changes caused by any soil moisture change?


Mar 08, 2018, 07:45 pm Last Edit: Mar 08, 2018, 07:46 pm by larryd
For soil moisture sensing:

You can place a DHT22 in a box sitting on the soil.
The box has ventilation holes in the walls and the bottom open to the dirt.

Calibrate as needed.

No technical PMs.
The last thing you did is where you should start looking.


You only get the moisture in the soil between the surfaces. Is your soil humidity uniform?

If you actually learn about capacitance you will know that cap sensor surface area makes a big difference. Those screws are not great choices, you could do better with a couple of cheap butter knives from Goodwill or like.

Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts


Okay so I want to use multiple soil moisture sensors, not just one sensor stuck into the soil on the surface.  Some of these sensors will be buried deep into the soil at various depths to determine the soil moisture at different soil depths.  The boards that are being recommended do not lend themselves to being buried without complications so I am looking for for those methods that are totally DIY and use Resistive-Capacitive effects to sense changes in soil moisture.  I think I can do this by simply using Arduino digital pin outputs to measure the changes in the RC rise/decay time as an indication of soil moisture.

The epoxy coating is intended to prevent any oxidation/reduction reactions from occurring with the SS screws embedded into the soil.


You can get cheap stainless steel utensils for 5 or 10 cents each. Compare the surface area of a butter knife to a screw.

Do you understand electric field and capacitance at all?
Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts


Mar 08, 2018, 11:39 pm Last Edit: Mar 09, 2018, 02:32 pm by Koepel
@GoForSmoke, you didn't have to write such things in return, we can all see what is going on.

@tentoes1962, a photo or a picture of your capacitive element would help us to understand it. The way you describe it, then I see only a few picofarad. That is not enough to measure something in a reliable way.


Professional soil moisture sensors use around 100MHz.



What you have presented us is an X/Y PROBLEM.    (google it)

you have come to the table and said,  here is my design,  help me make it work.

the correct response from us should have been, try it out, collect your findings and offer those for evaluation.
of course, you would have found the major design flaws yourself.

just to point some things out.
epoxy encapsulated anything will not be in contact with the soil.
what exceptional electrical properties does the selected materials have over other possible candidates ?

second, what is the preferred shape of electrodes when building a capacitor ?
what is the preferred arrangement of said electrodes ?

when building a capacitor for this particular application, what are the goals ?
is there a sweet spot where accuracy is high and sensitivity is high and repeatability is high ?

For a few dollars, you can buy a working device that does what you want, but since it is for a home garden and sits above the ground, it is not water proof.   you would need to epoxy encapsulate that.

to end, if you noticed, this is an Arduino, microcontroller forum.  it is not a sensor design forum.
although there are some guru's there and here that roam and reply,  +90% are software, with some scattered hardware knowledge.  it seems that about half are trained, the other half are self taught. some have deep knowledge of the technologies others have a superficial understanding that it exists and does something...

if your project is a one-off school project, it would be far easier to just spend the $5-10 per pre-fab sensor, encapsulate and then get the results.  


As I mentioned earlier in this thread, I have used an inexpensive capacitive soil moisture sensor for some time with good results. The sensing element is coated, it has a voltage regulator so it can handle a range of input voltages and the output is a varying DC voltage proportional to the soil moisture level. There is an area of exposed electrical components which would need to be coated for outdoor use.

As you point out Dave, this is a microcontroller forum. However, microcontrollers don't operate in isolation. There is a range of participants in this forum as you indicate, from gurus to beginners. This is in line with the Arduino Foundation mission statement which refers to "students and hobbyists" to "programmers and professionals". If the gurus are frustrated dealing with the beginners, perhaps this Forum is not the place for them. That said, beginners should also do their homework on some of the basics of electronics. As we all know, the internet is an incredible place for learning these basics.


Mar 09, 2018, 07:15 pm Last Edit: Mar 09, 2018, 07:16 pm by GoForSmoke
There is a Sensors section in the forum. There is a lot about sensing in the Arduino Playground.

And then there's the Project Guidance section where you get people who if this was food can't pick up a spoon (book) or cut their own meat (learn) but can demand to be fed bite by bite and don't you dare try and find out what size chunks go on the freaking spoon.

We get so many who are willing to learn it's still worth trying.
Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

Go Up