My first version of my cheap soil 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 for cheap soil moisture sensor:

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 your cheap soil moisture sensor

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.

Conclusion

The above should give you everything you need to know to create your own cheap soil moisture sensor and how to use it. This can be used as a moisture soil sensor for watering your indoor plants like I am using it. This same moisture 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.

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.

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.

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.

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.

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.

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!

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

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.

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.

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.

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…

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

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..

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.

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.

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?

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.

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.

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

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.

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?

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!

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!).

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.

Hello. I made a sensor is the same as you, I am embarrassed by a high resistance, about one 1MOhm in wet ground and about 500KOhm in the damp earth. What is your distance between the electrodes?
I have used electrodes made of stainless and discovered an interesting thing, the sensor operates as a galvanic cell for about an hour i am fix by multimeter voltage about 40 mV
And one more question, how do you recieve the signal from the sensor? On the line connecting the input to the ADC resistive divider? Such an approach does not provide the full range of ADC, what do you think the account of the operational amplifier together with the sensor?

I normally make a batch of 6-7 of them at a time and then calibrate wet/dry with the first one I use. Provides me with sensors for at least a couple years.

I love your suggestion of using the ceramic cap to generate the 50Hz square wave. I will have to try that out, been having great luck with my vegetronics moisture sensor but would like to see if I can make these even more accurate.

brilliant idea.. i made a soil moisture sensor for my final yr undergrad project. i replaced plaster of paris by a block of wood. 2 by 2 by 1 inch. pierced the nails through. insulated the nails. they worked just fine. wood is much easier for making the sensor, compared to plaster of paris. just a suggestion.

Matt, this is a great idea. It should be pretty easy to set this up using one of my moisture sensors and IC (or Arduino) to determine when the analog value reaches your watering threshold. Once this point is acheived you just send a digital HIGH out to override to the circuit that opens the valve. Couldn’t tell you how to specifically do this without having one of those timers in front of me to test but seems definately viable setup to me.

And I thought I was the only one crazy enough to hack together a DIY grow box! Was trying to figure out how to construct a reliable soil moisture sensor for an automated watering system when I came across your site. Nice work. Will probably give this a try once I’ve procured the materials.

To make consistently spaced electrodes (and also to prevent them from shorting when you push them into the plaster), you can use a tiny bit of hot glue to secure the two nails to each other, one near the top and one near the bottom. It does not have to be a big gob (in fact, it’s better if it’s just a tiny drop), and if you make more probes, the resistance skew will be (for all intents and purposes) the same, so you only need to calibrate one (given that the other factors are also highly similar).

Instead of hot glue you can use basically any (even water soluble, as by the time the humidity dissolves the glue, the plaster will have firmly affixed the nails anyway, though having glue in the mix may have unwanted effects) glue, like a drop of epoxy (this might be easier to apply than hot glue that solidifies relatively quickly).

Do not coat the nails with the glue, just a tiny drop between them to secure them together.

[…] Cheap Vegetable Garderner is something of the granddaddy it seems of the type using a separate medium, in this case Plaster of Paris. Conceptually, the plaster absorbs water and dries out in concert with the soil it is buried in. Two conductive probes are embedded in the plaster and the resistivity between them is measured. While in principle, this controls for the soil composition, it adds its own problems. As explained over at GardenBot, Initially when the plaster is dry, it has very high resistance (as you would expect). The problem is that plaster has an affinity for moisture, so as soon as the plaster comes in contact with any moisture at all, the sensor reading will drop to a very low resistance. And even if you completely saturate the sensor, you will not get the resistance to drop much lower than that. […]

Do you really need nails? Wouldn’t it work if you just bared the tips of two wires, then cast them in plaster? That would solve the problem of connecting the wires to the nails, and also the problem of insulating the exposed wires.

Francois, reason you normally go with nails is that they are galvanized and will hold up to water. You could simply stick copper wires into the ground but unprotected they will rust pretty quickly. I have heard of people using galvanized wire with good results, but normally you can’t purchase a few feet of galvanized wire.

Thanks for designing this and providing the instructions here. I have an analog moisture sensor that I got from the gardening store, which says it doesn’t use electricity – I wonder what principle it uses. I want to monitor moisture levels, but I worry that sticking something in right near the root ball that is conducting electricity or dissolving plaster might have an effect on the plant. It’s amazing that you have a watering system working with this. Are you familiar with self-watering pots that use vacuum seal based valve sensors to regulate moisture automatically? I’m planning on using one of these but want some data on moisture levels to help me tune the moisture levels by getting the placement of the sensor right. Also, I think it makes sense to monitor it as a backup, so I could be notified if the valve breaks or malfunctions. If you have any experience or thoughts on this method I’d love to hear about it. Thanks!

Sir, Awesome! I am a new and a humble beginner for these types of exposures. However, I am impressed and want to incorporate this in my 5 acre lands for growing Onions and Maize. What do you advice me? As I am sitting about 200 Kms away from my lands and want to operate through Arduino. Kindly respond to my this request.
Gnaneshwar GS
Bangalore, India

hi, we are working on this project using 8051 in place of arduino wit adc0808. we have some basic doubts.how do we measure voltage readings from the sensor? how do we transfer it to the 8051 using adc0808. kindly help us out ..

[…] any interested handy-men or -women out there, it’s relatively easy to create your own basic soil moisture sensors. Using that information to know when to water would probably be a big improvement over watering […]

Hi, I built a sensor with two zinc coated nails. I put them in the gipsum casing, as you show it. I was surprised to observe a power of about 100 mV between the two nails without any external source. Is this
an effect of different metals to be in contact among them? Of course this small power affects the resitance values between nails.

Just wondering a few things if anyone would like to answer it would be greatly appreciated… 1. what if you wrapped the probe in something like pantyhose or stuck it in a sponge, would that help the life of the probe? 2. Is it possible to daisy chain them? Thank you in advance for any help you can give. I am going to get some plaster of paris tomorrow and I am going to try few different things… thank you to the poster this is an excellent idea

[…] water my neglected seedlings in the grow box in my garage. To solve this problem I made these great little soil sensors using galvanized nails and Plaster of Paris. Check out this post which help the #4 spot for […]

Hi, thanks a lot for the detailed explanation about your project and congrats for the idea!
My only curiosity is about the gypsum used in the sensor… Is it good for the soil? Since, as far as I know, gypsum has chemicals and those chemicals are probably unhealthy to the soil. Am I wrong?
In second if we just use the galvanized nails with some support that grants us always the same space between them, which would be the difference between both sensors?

Gypsum is calcium sulfate dihydrate a naturally existing mineral, basic processing to “gypsum plaster” is to dehydrate it by heating it to 300F to remove 2 of the water molocules. Now if the manufacture adds more chemicals after this process that is something to keep an eye out for but in the pure manufactured form we are just talking about basic minerals here.

As for difference between galvanized nails and gypsum blocks both can provide you with pretty accurate water measurement numbers. If you just want to know the soil is dry I should water now either option will give you this. Using the gypsum block will give you additional accuracy especially if you happen to water with fertilizer (coventional or organic) as well as an overall more accurate and conistent reading. So if you really need a smaller specific range of accuracy I would go with gypsum.

For me personally, when growing seedlings where I just want to make sure soil is always moist I go with nails, when I am growing more mature tomatoes/peppers I want to have a much more consistent watering pattern and accuracy where I switch to gypsum.

I completed the sensor today (I used gypsum instead of the paris plaster) and I was now checking the voltage ratings exactly like you have in your sketch above!
The voltage drop I got with the dry gypsum was around 0.50V (I did the conversion Vdrop=measure*5/1024). After I placed the sensor inside a glass of water and Vdrop value was 0.63 after waiting around 15 mins.
The questions I have, is:
– Is it normal this small voltage drop? Isn’t possible to increase resolution by inserting a smaller resistance so we could get a higher current?
– Second, is any way (not the empirical one) to tune correctly our sensor?

Does the plaster keep the non-stainless steel nails from corroding, or does it only minimize the effects of soil salinity?

If the nails aren’t stainless steel, aren’t they going to rust, and wouldn’t that affect the readings? Has anyone torn down one of these sensors after it’s been used for years to check the condition of the nails? If so, what did you find?

Would using copper nails be better, so as to avoid a galvanic reaction with the copper attachment wires? If not, has anyone found a good way to waterproof the connection between wire and nail so that the point of connection doesn’t corrode?

What are the trade-offs around how much plaster to embed the nails in? It would seem that the less plaster, the faster the response to change, but at the price of a lower lifespan. Has anyone experimented with different plaster thicknesses, and if so, is there any apparent sweet spot for this trade-off?

Lastly, does it make any difference what length the nails are? What are the trade-offs around that, and what’s optimal?

One more thought: thin nails would be more feasible to solder the wire to. Do thin nails last as long as thick ones in this application? Does it make any difference? Any reason *not* to use thin nails?

Perhaps using small dixie cups would offer cheap and standardized form for casting the plaster. After the plaster sets, you could simply peel off the cup. Not sure if there’s any downside to this approach, but it seems like it might be a little easier than using plastic tubing (as above).