How to make a cheap soil moisture sensor – Heavy Duty Version
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.
img title=”IMG_4590″ src=”http://lh3.ggpht.com/_Xcv0VbxbRcc/Svd1RbUmfqI/AAAAAAAABWo/GpYqC3woNuw/IMG_4590_thumb.jpg?imgmax=800″ border=”0″ alt=”IMG_4590″ width=”400″ height=”267″ />
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:
- How to make a cheap soil moisture sensor
- Create your own PC moisture sensor via PS2/Gamepad Controller
- How to use Vegetronix soil moisture sensor (VG400) on Arduino
- Soil Logic Moisture X-Tend testing and review
- Solar Powered automated Rain Barrel watering system
Tags: arduino, cheap, growbox, led, outdoor plants, tomato plants, vegetables










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.
March 15th, 2010 at 7:01 AM
[...] plugs are cheap, easy to make, and work well for measuring the moisture content of soil. The Cheap Vegetable Gardener came up with this method in order to add automatic watering to an [...]
March 15th, 2010 at 7:47 AM
Copying myself from hack-a-day:
Problem: Galvanized or not, DC current will eventually corrode the electrodes as electrolysis will happen. Measuring conductivity requires a more sophisticated circuit that provides for an AC (ie: 1KHz) current. As a side note, measuring with precision also requires a thermometer integrated into the probe, as the resistance changes dramatically with temperature.
It will work, but you will eventually have to replace your probes. Also applying the current for a short time using an IO pin for the voltage source could make the probes to last longer.
March 15th, 2010 at 10:02 AM
The sensor is a great idea, and a nice design, but perhaps it be simplified:
Why not strip an inch or so of zip cord (18 gauge line cord or speaker wire), leaving a bit of paired insulation on the tip. Stick the bared end into the plaster mold.
The spacing should then be very consistent, and the bit of insulation on the tip would keep the pair of wires straight and from touching.
No problem soldering to nails or having a poor contact from wrapping leads around nail heads…
March 15th, 2010 at 10:15 AM
[...] galvanized nails set in a plug of plaster-of-Paris. That's it. The Cheap Vegetable Gardener, who created the sensor for an automated grow box project, [...]
March 15th, 2010 at 12:34 PM
Ivan has it right, an AC supply will ensure long life. His other suggestion to power the sensor for a short period will also increase the life expectancy. @[those claiming to have made a capacitor] I suspect you have just made a battery
March 16th, 2010 at 1:43 AM
Cool! I’ll definitely use that for my GrowBoxBox v2
I needed to measure relative humidity with a resistive sensor which doesn’t like DC at all. I believe my algorithm can be used for reading your moisture sensor accurately while minimizing the amount of current that flows through it and bringing the DC component to 0. This will definitely keep the sensor’s characteristics constant for much longer. See if you like the idea:
http://1024.cjb.net/2009/10/rh-measurement-resistive-avr/
http://growboxbox.org/lib/exe/fetch.php/growboxbox.ps
http://github.com/kikcho/gbb/blob/master/src/sensor.c
March 16th, 2010 at 5:32 AM
You’re missing a current-limiting resistor on the ADC input of the Arduino. If these things really do go down to 0 ohms, you’ll be pumping 5V supply current directly into the ADC, which will hurt it.
I would be inclined to up your 10K to 20K and add a 10K on the other arm of the potential divider to limit max current into the ADC, although this will affect the response curve.
March 17th, 2010 at 3:03 PM
[...] galvanized nails set in a plug of plaster-of-Paris. That’s it. The Cheap Vegetable Gardener, who created the sensor for an automated grow box project, explains: Technically a gypsum block [...]
March 27th, 2010 at 3:10 PM
Why do you need to use the plaster of paris, why not just use the galvanized nails connected to the circuit by themselves and stick them in the soil???
March 28th, 2010 at 4:26 AM
[...] the brilliant post about creating some DIY soil moisture sensors using nails and plaster of paris. cheapvegetablegardener from hackaday. Plaster of paris humidity sensor Plaster of paris humidity sensor with wires [...]
April 2nd, 2010 at 4:08 AM
Have had the occasion to test your probe when the soil is *really* wet (like when it’s been raining for two days).
Does the plaster dry quick enough to avoid delivering a false information (if it’s still wet when the soil is dry) ?
April 3rd, 2010 at 12:03 AM
Hi, i am working on precision farming project, I am going to make Soil moisture Sensor will you please help me? How to make Gypsum electrode ? and how to connect external wire to that electrode??
Thanks in Advance..
April 4th, 2010 at 7:00 PM
W, you could get away with a couple of nails in the soil method, would work great for pots, though in regular garden good chance of getting moved around. The gypsum also should give better accuracy between degrees of wetness.
Marc, it seems to get a spike when first “watered” but seems to even out as the soil dries. Haven’t really had any issues with it regulating.
Mahesh, I think much of the information you are looking for is above, please let me know in a little more detail where you are confused.
April 8th, 2010 at 12:18 PM
This is sweet and I will be adding these to my current arduino setup which is monitoring air temp and RH and controlling fans atm.
@Mahesh – Really? did you just reply to a how-to asking how to do what it describes? I’m confused… maybe you just want to be spoon fed?
April 15th, 2010 at 10:26 PM
This is almost exactly the same sensor design, casting and voltage divider circuit that I came up with.
I made mine using brass rods held parallel with some small pieces of polystyrene sheet. I only use DC voltages (Arduino, 5V) on it but I minimize the variance problem by only applying voltage long enough to measure the resistance 8 times, I then average the results. I do this every 5 minutes. This has been showing extremely repeatable results.
What kind of resistance ranges are you getting? I get about 320 Ohms in fully saturated soil and 480 seems to be about the upper limit in a small indoors pot plant after exactly 3 days without any extra water.
April 24th, 2010 at 8:34 AM
I remember making these at university 30 years ago. The main problem we had when monitoring field soil moisture was cows eating the insulation off the wires.
April 24th, 2010 at 2:54 PM
So ,are you leaving them(the probes) permanently in the bed at a certain depth,or just lowering them in the bed as needed? If they are in the bed all the time,how long before the plaster of parts dissolves?
April 24th, 2010 at 5:33 PM
I only have used them indoors, the small ones usually will last a season and I normally start with new ones each year. Outdoors with hard rains could reduce their life though.
April 27th, 2010 at 1:13 AM
hi, I made a soil moisture sensor by myself, but I use regular powder gypsum plaster of paris instead. Then what ratio gypsum powder and water to make a block of gypsum? I use a regular digital multimeters resistance acquired but why can not a constant? Are there other alternatives? I have very limited knowledge of electronics, thanks for the solution given.
May 1st, 2010 at 8:21 AM
Thanks for sharing, this is perfect for my arduino-controlled drip irrigation system!
What about the warning on the Plaster of Paris box about the product causing cancer (apparently only in California)?
I’m assuming this is from the silica. I’ve done a few searches but can’t quite find the information i’m looking for. When it sets, do I have to worry about my delicious tomatoes becoming carcinogenic? I was under the impression that the warning pertained to inhaled plaster of paris, but can’t find anything reliable to confirm this.
Any thoughts?
May 5th, 2010 at 7:19 AM
I have seen that label as well and I have not been able to find too much more information about it either. Though there are also similiar warning for perlite though in that case I know it is based on the inhalation of the dust I would presume Plaster of Paris probably is the same. But given I live outside of California apparently I am immune
May 9th, 2010 at 2:00 AM
Awesome. Brilliant. I haven’t made any yet, but I’d like to suggest the following design modifications which I plan on implementing. Not sure if they’re worthwhile, but anyway …
1) Prepare the nails and wiring before putting it in the plaster. Lie the nails in position on some paper and string a bit of hot glue between then at each end to keep them evenly spaced. Attach the wires to the nails before hand. Submerge the entire nail assembly in the plaster so that only the insulated wires are sticking out. This may help to avoid spikes when the sensor is completely wet,
Also, you could insert the nail assembly in the tube before pouring the plaster, then plug up the end where the wires are hanging out with hot glue, then pour the plaster in the ‘bottom’ of the tube and leave it to set. No mess. May make getting the tube off harder, unless you go with suggestion [2] as well.
2) Make a permeable, semi rigid sheath (for longevity). I haven’t figured out what to use yet – perhaps punch a bunch of wholes in plastic tubing> Seems like a lot of work though? Flyscreen material, maybe?. Of course, then you have to figure out how to plug (and then unplug) those holes – wrapping electrical tape around the whole thing would probably work though.
May 9th, 2010 at 8:29 PM
phlipped, I agree any extra insulation protecting the connections should provide longer life though given the metal is still frequently saturated with water so it will fail eventually though if you can get an extra season out of the technique I say got for it. Let us know how it works our for you?
May 13th, 2010 at 12:10 PM
I would use stainless steel nails or such instead of the standard jacketed nails. Stainless will hold up better, but it will be a pain connecting the wires securely. I think that shrink wrap would also be of benefit to hold the plaster in place, and holes can be added for permeability. Shrink wrap may be a good way to connect the leads to the nails, with a little hot glue holding it on for good before submersion in the plaster. Thank you for the good ideas!
June 11th, 2010 at 3:59 PM
[...] is brilliant way to start with testing soil on your own. You can get very creative with the data coming out of [...]
June 18th, 2010 at 9:42 AM
[...] UPDATE: Though this still a great sensor, check this post for the latest version of a more heavy duty soil moisture sensor. [...]
June 24th, 2010 at 8:27 AM
[...] http://www.cheapvegetablegardener.com/2009/11/how-to-make-cheap-soil-moisture-sensor-2.html [...]
July 3rd, 2010 at 5:59 AM
There is the Watermark gypsum soil sensor, that uses some sort of metal with holes around it that makes it more durable.
It would be nice to see the sensor teared down to see how its constructed.
http://www.specmeters.com/Soil_Moisture/Watermark_Soil_Moisture_Sensors_and_Meter.html
July 18th, 2010 at 9:01 PM
I tested my first successful sensors this evening and they seem to work! I’m going to have to do some testing over the next week or so to get a feel for how the voltages correlate to soil moisture content (or tension). One thing I recommend is using a pair of really good scissors instead of a utility knife. It makes cutting the tubing so much easier. I actually used a pair of gardening scissors to do all the cutting and they worked much better and faster than when I tried using my utility knife.
Thanks for a great article! Your site is like a gateway drug for geeks like me to really get into gardening. In fact, this article is the very reason I have begun to take it so seriously (serious fun!).
July 19th, 2010 at 9:21 AM
Garrett B. Thank you for the many compliments there and will have to try using scissors though I have been throughly impressed with the Vegetronix soil sensor I have been using lately.
July 19th, 2010 at 9:59 PM
[...]These can run a little pricey on some models, if you are strapped for cash and or just want to make something while waiting for your plants to grow you can make your own at http://www.cheapvegetablegardener.com/2009/11/how-to-make-cheap-soil-moisture-sensor-2.html. [...]
July 30th, 2010 at 10:59 PM
the design is really amazing.. im gonna use this in our project.. but there are still questions that i want to ask:
- how would you calibrate the sensor so that it would give accurate soil moisture percentage?
- my sensor reads only 1kohms when it’s already super dry, is it correct?
- can i use this sensor in the circuit shown in this site: http://www.faludi.com/2006/11/02/moisture-sensor-circuit/
CVG you are really gifted! im from the Philippines and i am thanking you so much for the information you have shared! hope to see more cheap but very useful projects from you!
^^
August 7th, 2010 at 10:20 PM
Hi. Thanks for the instructions. I am a hydroponics farmer and am using your probe design in my plant bags.
The problem some of your posters are having with inconsistent readings when measuring with a multimeter is caused by a certain amount of electrolysis caused by the DC probe voltage from the meter.
I drive mine with a high frequency AC signal. The electronics amplifies and rectifies the signal, giving me a 0-5V dry-wet signal which is then routed to my automatic watering/time system.
August 17th, 2010 at 8:32 AM
KiLLua, sensors of this nature are better suited to reading soil water tension than they are soil moisture percentages. The sensor has to move water in and out of the material, a process that is affected by soil water tension. Soil specific conversions exist for taking a given soil water tension (expressed in Centibars or kPa) and translating it to percentage of moisture, but for accuracy it requires a site specific calibration. It would also first require that the resistance measured from this sensor could be equated to a soil water tension. A published calibration for manufactured gypsum blocks would probably be somewhere in the ballpark, but there are a lot of factors in the construction of the sensor and how it is read that will determine the real relationship.
These sensors will give you a great relative reading of soil moisture for a low cost, but to be able to equate the readings to published values for accurate measurement or comparison, you might be better off with a manufactured sensor that has an established calibration.