Create your own PC moisture sensor via PS2/Gamepad Controller



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 ($500) alternatives out there but I can live with this for my application.

13 Responses to “Create your own PC moisture sensor via PS2/Gamepad Controller”

  1. jimmycrackedcorn Says:

    I’m really loving all the electronics projects! They are very interesting to me! Thank you!


  2. The Cheap Vegetable Gardener Says:

    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.


  3. Dan Faulkner Says:

    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.


  4. szilard Says:

    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


  5. fred070 Says:

    hello it's me again.. what's the value of your thermistor? 4.7k?


  6. The Cheap Vegetable Gardener Says:

    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


  7. fred070 Says:

    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? 🙂


  8. Delfin Says:

    helodoes this device needs a microcontroller to operate?


  9. The Cheap Vegetable Gardener Says:

    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.


  10. How to make a cheap soil moisture sensor Says:

    […] […]


  11. Leon Says:

    Hi

    I would like some clarity on what you say about the hand held soil moisture sensor unit.
    There is no battery inside this unit, so where does the current come from to drive the meter?
    Does this unit not in fact become some sort of a battery?

    Also, I made the plaster of paris sensor that you have shown, i only used galvanised wire to prevent rust forming.., but it becomes a battery & the resistance meter is unreadable..?


  12. The Cheap Vegetable Gardener Says:

    Leon, the sensor is basically a variable resistor, when it is dry no voltage should get through it, when it is wet almost all of the voltage should get through it. Given this works much similiar to a pot (what is used in PS2 controller that is what we are measuring.

    As for the voltage I am guessing this is a very low value, you shouldn’t be getting a current with like metals…but given imperfections in productions I am sure it is entirely possible. These numbers should be insignficant after you calibrate your sensor.


  13. Computer controlled grow box - Part 1 - The Cheap Vegetable Gardener Says:

    […] it would be cool if we have some sort of automatic watering system.  I agreed, so I added a moisture sensor and created an algorithm to periodically check the moisture level and activate a water pump to add […]


Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

IKE