How to make a cheap soil moisture sensor – Heavy Duty Version
Nov 8, 2009 cheap, electronics, moisture sensor, water
My original version of my moisture sensor has worked great for me but it did have a couple flaws. The first issue was construction, though I had great luck on my first attempt though after trying to recreate additional sensors given the small amount of gypsum between the sensor and the probes were so thin it was extremely easy to crack the sensor and I normally have about a 25% success rate on later creations (must have had beginners luck on the first one.
The second issue was durability. Given we are playing with gypsum and as it is suspended in water it will eventually breakdown and there is very little we can do about it. Though with my latest changes to my automated grow box which includes automated watering based on moisture content I want to ensure my measurements stay accurate throughout the season. To help with this I have decided to increase the sensors size and also am using galvanized nails to prevent rusting. After a few attempts I have come up what I feel is a pretty foolproof method of creating a moisture sensor.
How it works:
There were many questions in the comments in the previous post so hopefully I can clear this up a little here.
Technically a gypsum block measures soil water tension. When the gypsum block is dry it is not possible for electricity to pass between the probes, essentially making the probe an insulator with infinite resistance.
As water is added to the problem more electrons can pass between the probes effectively reducing the amount of resistance between the problem to the point when it is fully saturated where the probe has virtually zero resistance. By using this range of values you can determine the amount of water than exists in your soil.
Parts:
- Plaster of Paris
- 2 Galvanized Finish Nails
- 1/2 inch plastic tubing
- utility knife
Construction:
Take your utility knife and cut the tubing slightly longer than your galvanized finishing nails. Try to make the cut as straight as possible though it doesn’t have to be completely perfect.
Use your utility knife to cut the smaller plastic tube lengthwise, this will allow easier removal of your soil sensor after the mold cures.
Optional: Make the cut diagonally to prevent a potential vertical fracture line.
If you were very careful on you vertical cuts you can avoid this step, but to completely avoid spilling plaster onto my workbench I drilled four holes slightly larger than your tubing. I used these holes for support but also to catch any of the plaster in the gaps from you less than accurate vertical cuts.
Being careful that the tubing fits together where you split the tubing vertically, insert the tubes into the holes (or carefully on a flat surface) Mix Plaster of Paris and carefully fill with to the top. The friction between the tubing should keep a water tight seal where you made the cut, though if the plaster is a little thin and it appears to be leaking through wait a couple minute for the plaster to setup some and try again, at that time it should not have the viscosity to seep through the very small gap that may be causing the leak.
Take your two galvanized nails and push them through a small piece of wax paper. You may also allow the plaster to setup for a few minutes and then float the nails in the the plaster. I like the first method since gravity will help ensure they fall straight down and parallel to each other. As for spacing, I have done some experimentation with the gaps between the probes and my conclusion was, it doesn’t make much difference. As long as there is a gap (they are not touching) you should get reliable results.
After allowing the sensor to cure for about and hour remove it from the holes you drilled in the wood.
Gently pull back the plastic tubing and you have a nice clean soil sensor.
Lay them out to dry for 24 hours to cure completely and their construction is complete.
For attaching the wires there are a couple options. The best would be to solder them to the probes though to do this you need to heat up the nail hot enough to enable a strong solder connection. My little 15W soldering iron just can’t produce the heat for this so I am option for the wire wrap method. I take about an inch of wire and strip off about an inch of insulation and tightly wrap around the probe. Given copper will rust and could be a point of failure you will want to insulate this connection and the probes from the moisture. A few dabs of hot glue works pretty well. I am planning on trying liquid plastic, though I am currently out and when I have some on hand I will update with how it went.
How to use it
You can simply hook up a multi-meter and check the resistance though if you want to create anything automated you would need to use an integrated circuit (IC) or a electronics prototyping platform such as Arduino. By applying voltage to one side of the sensor and using a voltage splitting circuit connected to ground and an analog input you can then measure the voltage making it through the probe. The higher the voltage, the higher the moisture content of the soil.
![[SoilSensorDiagram[3].png]](http://lh3.ggpht.com/_Xcv0VbxbRcc/SqbDHOFko6I/AAAAAAAABRI/e37AOb37rPI/s1600/SoilSensorDiagram%5B3%5D.png)
Conclusion
The above should give you everything you need to know to create your own soil sensor and how to use it. This can be used as a soil sensor for watering your indoor plants like I am using it. This same sensor could be for monitoring your outside soil moisture content to trigger (or preempt your irrigation system) to save some money on your water bill and/or maintain consistent moisture levels in your plants which could drastically improve water sensitive crops such as tomatoes.
Related posts:


November 9th, 2009 at 2:07 PM
Very very impressive!
November 9th, 2009 at 9:50 PM
Wow, thank you for all these amazing amazing tips and tricks! What very useful info indeed!I will have to stop by frequently and learn a thing or two I am sure of it.Thanks again!
November 12th, 2009 at 8:43 AM
Glad you enjoyed the write up. These are really easy to make and very reliable.
November 16th, 2009 at 6:58 AM
I wonder (actually that much, I'm going to try myself) if you could make capacitive sensors with two wires inside a tube and use the clock of the µC as a source (amplify it with a transistor) and measure the change in capacitance. It is usually quite a high frequency in the MHz-range, so even a small capacitor should show a change.
November 17th, 2009 at 8:55 AM
Ragnar, sounds like a great idea, be sure to let us know how it works out.One other thought I have for these is not to continuously add current to the sensor but instead apply current for a shorter period of time using a transistor and a digital output to break/complete the circuit. This should definitely increase the life of the sensor. Could also use the digital output directly though not sure if it would have enough wattage.
November 19th, 2009 at 11:19 AM
Thank you for this writeup on the improved moisture sensors. It comes at an opportune time, as I have purchased some Plaster of Paris and an Arduino, but haven't made any sensors yet.I was wondering if you used any sort of release agent at the bottom of the hole in the wood. Does the plaster adhere to the wood?Also, I was wondering if different distances between the nails would cause the calibration to be different. Is it important to get the distance the same in each sensor to avoid having to calibrate each one?For turning the power to the sensor on and off, I saw one web site that suggested using a digital pin from the Arduino to provide +5v (sorry, I can't find the link at the moment). With the 10k resistor in series, the current should be well within the 40ma limit for the digital out.
November 21st, 2009 at 7:07 PM
Ken, I haven't had any issues with sticking though adding a little dry gypsum to the bottom could help or a release agent as you mentioned. As for calibration, I had that same concern and did a little experimentation and my findings were it didn't make much difference in the spacing between the probes, assuming they don't touch of course.
November 24th, 2009 at 6:32 PM
Good day, why use gypsum block if we can directly use the two galvanize nails to measure the soil moisture..
November 24th, 2009 at 10:20 PM
fred, the reason you want to use gypsum is one to keep your probes from touching, don't want a false positive that your moisture is just fine because the probes are touching. The specific reason for choosing gypsum is because of soil water salinity. As the block is saturated with water is dissolves some of the gypsum and fill the pore to create calcium sulphate which will provide the same measurement regardless of the salinity of the water. I assuming all inputs are consistent (water, fertilizer, salt content) then you could get away with a couple of galvanized nails in the soil though gypsum will provide better accuracy with these varied conditions.
December 13th, 2009 at 9:05 AM
I made it! After 24 hours saturated in water I made the measurement. With Ohm-meter, I got weird readings, started in 1k and went up to 10k in a few seconds, basically I got an capacitor. Seems like I`m the only one with this sort of reading. After I made the resistor voltage divider, got pretty stable n accurate measures. Had to make sure the "capacitor is discharged" before measuring… got up to 500mV by the two terminals before discharge. Its a month already since I started. I made 2 sensors and read them every couple days, got up to 300mV difference reading between the two, but they are walking side by side!
December 13th, 2009 at 2:22 PM
Luiz, still need to do a post on it but been doing some comparisons between my Vegetronix and homemade sensor and Vegetronix is definitely more consistent though can't beat the price of homemade. Overall wouldn't use this method for scientific measurements though great for knowing when to water
December 25th, 2009 at 5:31 PM
It would be great if you could post the comparsion between the homemade sensor and the Vegetronix.Merry xmas!//Luiz
December 30th, 2009 at 9:01 PM
Sir,Your idea of the soil moisture sensor is truly truly awesome. I loved the way you've mentioned the construction. Though I have one query that I would want to put forward to you. Can we give the sensor a perforated steel enclosure so that it remains solid over a long period? Just a query, pls do mention the pros and cons of the same.Thank You.
December 31st, 2009 at 7:54 PM
A very Happy New Year to all of you.
March 4th, 2010 at 3:46 PM
I would like to suggest that the 10K Resistor would do better to go between the sensor and the 5V on your board. There exists the possibility that you could short the 5V supply on your board when you bury your sensor in the GROUND if some kind of insulation fails. Not a big deal if it shorts to ground after the 10K current limiting resistor… I think this was an ingenious method for making “accurate enough” soil moisture sensors. I work in the SCADA group for a large company, and we plan to use them in automating our plot in the employee garden. THANKS! -Rob W.