Create your own PC moisture sensor via PS2/Gamepad Controller
Dec 19, 2008 electronics, water

Yet another component for “Project Everbearing” where I need the ability to monitor the moisture level of my soil. There are a couple options on how to do this; the classic method is to take two galvanized nails at a fixed distance apart in the soil. If you run electricity through one of the nails, some of the electricity will pass through the other nail depending on the amount of moisture, in much the same way as a variable resistor works. If the soil is completely dry it will have no conductivity (infinite resistance) since low voltage electricity does not pass through dry soil, as water is added the resistance is decreased and with completely drenched soil almost having complete conductivity.
Unfortunately, I did not have any galvanized nails and with our current snow storm I wasn’t going to venture out to the local Home Depot. I did fortunately have something even better, a handheld soil moisture sensor, which I bought when I started gardening before I learned I can see if I need to water by putting my finger in the soil.

With a little manhandling I got the cover off the back and realized that this tool works with the same principle as the galvanized nails with just two wires with provide variable resistance depending on the water content.

[And I thought my soldering was bad]
Now all that is needed was to solder these wires to a couple open points on my PS2 Controller which I am already using as a cheap temperature sensor The great thing about this implementation is the “resistor” has a broad range from no conductivity to nearly zero. Which is great since it gives a very accurate representation of the soil’s water saturation. For the calibration I was a little lazier this time and only took two points “Dry” and “Really Wet” With these measurements I then calculated the water saturation percentage. So now I can see my plants are at a 43% water saturation level, which I have no idea what exactly that means, but I do know I don’t need to water for a few more days.
One warning though since electrical conductivity can be affected by application of fertilizer (especially synthetic fertilizer which may contain sodium) and temperature so accuracy may be around 70-85% but for higher accuracy there are other expensive ($1500) alternatives out there but I can live with this for my application.
Related posts:


December 20th, 2008 at 11:47 AM
I’m really loving all the electronics projects! They are very interesting to me! Thank you!
December 22nd, 2008 at 9:37 AM
Glad you are enjoying them, guess I am not the only gardening/electronics geek out there. Just need something to make it through these cold winter months.
January 9th, 2009 at 4:46 PM
Cool!Thank you for the Post and the Ideas!Have you thought of using 1 wire sensors?I found this site and it gave me some ideas http://www2.ertyu.org/temp/conditions.php Later and Good eating.
September 23rd, 2009 at 8:06 PM
Does your meter require a battery to operate? If not, then it's based on the galvanic action between two dissimilar metals – one might be zinc, the other just the stainless stem, or tin, or lead, etc. I just bought a similar sensor and wrote up some observations about it: http://kolomp.blogspot.com/2009/09/soil-moisture-meter.html
October 3rd, 2009 at 10:02 PM
hello it's me again.. what's the value of your thermistor? 4.7k?
October 3rd, 2009 at 10:21 PM
Dan, check out this points where I use a 1-Wire temperature sensor with Arduino.szillard, no battery needed (well sort of) You can simply measure the resistance if you want. Though in my case I am pushing voltage through them and then measuring the output though analog input.fred, my thermistor is 10K
October 4th, 2009 at 6:58 PM
hello again.. you said you used 10k thermistor.. i browsed our local electronic shop and the thermistor which has a value of 10k is very small.. look at here:>Thermistorwill this work?
November 29th, 2009 at 10:25 PM
helodoes this device needs a microcontroller to operate?
December 1st, 2009 at 5:54 PM
Deflin, you could simply use a multimeter to get the value if you wanted. Also could be some simple electronic projects you could like have a LED fade as your plants need water.