loading

Hello everyone
This is my first instructable hope you like it.

English is not my first language please help me improve if you notice grammar mistakes.

I needed a soil moisture sensor but the ones I can buy are not very resistant nor high quiality looking, at least not for what I intended so I decided to make an improvement because originally also I needed to measure temperature on the exact same spot where the moisture probe was going to be placed.

So... why not both in the same probe?

Tried to search something similar to my idea without succes, so it is time to build it!

Step 1: Materials

Well, altough I said this kind of sensors were ugly the module sensor still works pretty fine so we will use one of them:

Pricing in US DLS, most of the items bought from AliExpress

1 Moisture sensor - Less than 1$

1 DS18b20 Water resistant probe - 2$

3 m. of 4 lines cable - 2$

An unused garden solar lamp - 2$ If you already have the stainless steel pipe that serves as a base for the solar lamp, thats all you need I bought mine form Walmart, otherwise you should consider buy stainless steel pipe.

5 centimeters long of stainless steel round bar (I used 4.5 mm in diameter) - 10$ for 3 meters

Optional:

GX12 type connector of 4 pin - 2$

Step 2: Cut

First we need to cut the stainless steel pipe from the solar lamp to the desired lenght, in my case I used one pipe for two sensors so cut in half resulting in 67 mm long.

The other thing we need to cut is the stainless steel bar (the one 4.5 mm in diameter) 50 mm long

I used a moto tool with cut disc for the Pipe.

Step 3: Dissasemble the DS18b20 Probe Sensor

Lets disassemble the Temp probe, but we need to be careful because I have encountered that some of this waterproff probes aside from the plastic that's between the metal and the plastic to keep the together they add Epoxy inside the metal probe to keep the DS18b20 inside and isolated, these cant be used for our goal.

Use some cutter knife to remove the plastic and the sensor will come out smothly, just be careful not to cut yourself.

Step 4: Make Some Notch

We need some way to use the pieces of metal that we already have as electrodes for our probe so we will adapt them, simply make a cut with the moto tool in the metallic bar near the end of it, just be carefull not to cut trough.

For the Temperature probe we will use the one obtained from the DS18b20 water proff probe.

In this case we will only cut half way trough.

See the photos.

Step 5: 3D Print a Guide

I printed the guide for both electrodes to fit inside the pipe, the file is atached if it helps.

Insert both electrodes from the end we previously made the cuts into the 3D printed part.

It should fit with the help of a few hammer hits.

The result should look like the ones in the pictures.

Everything should fit nicely.

Step 6: Put Everything Togheter

Solder everything as shown

The electrodes should be connected with wire around the one solid (the one that is only metal) make a ring of wire around the round cut we did, then solder it like if it was a ring, the more thigh the better connection and less failure. The tin solder should fill all the space left in the notch where the wire is wraped.

Do the same for the electrode that fits the DS18b20, but instead of wrapping it around, get the wire trough the notch we cut.

The red wire of the DS18b20 to the VCC of the module

The black wire of the DS18b20 to the GND of the module

Make sure the DS18b20 is isolated before siliding it inside.

Isolate everything and make it fit inside the stainless steel pipe.

Step 7: Almost Done

There is still some work left

I will fill the inside of the pipe with epoxy resin.

You can test it via arduino, I attached some example you can use in Arduino.

IT WORKS!!!

<p>A suggestion: keep an eye on the electrodes for longer terms (months most probably)</p><p>Stainless steel as it may be, passing a current through them will still result in corrosion over time - you are actually measuring the resistance of an electrolytic cell at small voltages/currents with dilute electrolytes. Supplementary, any salts resulting from that corrosion and leaching into the soil are bound modify the resistance of the soil. </p><p>Maybe using some graphite bars (central electrodes of a D battery?) would alleviate the effects?<br>Granted, you'd still have minute changes resulted from the ions from the soil salts recombining in less soluble/mobile forms (e.g. trace amounts of chlorine will degas over time and probably replaced by a heavier - less mobile, higher resistance - bicarbonate ion).</p><p>Anyhow, the effects are hard to quantify - they may be small enough to fall under the variability given by the watering itself - washing away some salts, adding others, migration/concentration of some salts in the upper level due to capillarity and evaporation, etc.</p><p>Some other biotic factors may fool with the measurement: plant roots growing between your electrodes, colonies of bacteria which may be favoured by the (even occasional) electrical activity (see Geobacter - they'd love some ferric ions to reduce; granted, geobacter is mostly anaerobic, but there may be others, bio-remediation is reality), etc</p>
<p>Graphite is a great idea. Corrosion will still happen, but the corrosion is simply CO2 and won't coat the electrodes. And it won't poison the soil with metals.</p>
You can even &quot;paint&quot; yourself the electrodes on a plastic (a PVC pipe is much cheaper than stainless steel and easier to handle).<br> I've done it with a suspension of graphite powder in a&nbsp; solution of polystyrene in xylene - the result is a conductive layer. (just search &quot;conductive ink&quot; on youtube and watch the clips having Robert Murray-Smith as the author)<br> <br> The downsides: <ul> <li> - it's hard to control the resistance of the &quot;painted&quot; electrodes themselves - thus from the start each &quot;probe&quot; will need it's own calibration. Not a big issue given that this would need to be done anyway due to the soil variability <li> - I can say nothing about the stability of the electrodes/resistance over time - I'm not worried about corrosion, but I'd keep an eye on mechanical stuff (abrasion mostly, cracks due to bending) </ul>
<p>Thanks for the suggestion, indeed, graphite electrodes would decrease electrolityc corrosion, I will try them soon, and also test their resistance to impacts and rough use. Initially I used the stainless steel because it is the most used material for the probes commercially available. The biotic factor is something I must investigate further, thanks for the suggestion. </p>
<p>Galvanized steel (for as far as that is different from stainless steel) is also often used.<br>As acolomitchi suggests using the graphite probes of a battery is a possibility, but I havent come across some of those lately.<br>Nevertheless just using steel probes is a quick and easy way of measuring soil moisture (actually you are measuring soluble ions) and I have used it a long time. Just do intermittent measurements and switch off the current to the probes in between will last you a long time.<br>But for the health purists: when the metal of your probe is eventually eaten away.... guess where it is. Might not be so bad for the iron, but the chrome and nickel are also gone :-)</p>
<p>Galvanized steel is only used by hobbyists, as far as I can tell.</p><p>It is coated with zinc, which is to act like the zinc sacrificial anode on a boat. So when it gets wet, galvanic corrosion eats away the zinc before rusting the iron. But galvanized metal is not meant to be placed in constant contact with moisture or dirt, the zinc will get eaten away very quickly, then the iron rusts.</p><p>And the zinc oxide is a bit toxic.</p>
<p>thats exactly why i am not using it</p>
<p>&gt; I used the stainless steel because it is the </p><p>&gt; most used material for the probes commercially available.</p><p>Most probes commercially available using stainless steel would have a pH-meter incorporated (I suspect their measurement logic compensate for the pH to get a more accurate moisture measurement) or other methods to compensate (buffer) the pH variation.</p><p>Since your doesn't, I think the main use case you have in mind falls into the &quot;irrigation based on relative moisture variations over time in the same place&quot; (as opposed to the &quot;portable probe: stick into the ground, read the humidity, move on and take the probe with you&quot; scenario). Even more so as your choice was to hack a low cost moisture sensor.<br>My personal experience with the same toy-sensors you hacked tells me the<br> are unreliable even when used in the &quot;irrigation&quot; scenario (or I didn't manage to handle it properly) and totally unusable in the &quot;portable&quot; one.</p><p>If you, however, wanted a &quot;portable humidity probe&quot;, be aware that the soil resistivity is dependent on heaps of other factors beyond the water content (salinity, compactness, temperature). May be a good research project if you have time to do it.<br>Here's a link to one of the articles I read a while ago while trying to solve a problem of mine </p><p><a href="https://www.researchgate.net/profile/Clinton_Shock/publication/228762944_Calibration_of_W_ermark_Soil_Moisture_Sensors_for_Irrigation_Management/links/55ed971408ae3e12184819e7.pdf">https://www.researchgate.net/profile/Clinton_Shock...</a></p><p>Best of luck.</p>
<p>I have seen some probes that got three electrodes, to be used as comparative points, but adding a pH compensation it is a great idea! thanks for the idea and the article, I will develop it in the near future.</p>
<p>Just one more question. You are using the Analog output of the board. I was always under the impression that that output was in fact directly connected to the sensor making the board obsolete, but i could be wrong</p>
<p>Some had found that the resistivity varies over the day-night cycle because of the temperature. </p><p><a href="http://micah.waldste.in/blog/2010/09/grow_with_arduino_far_too_much_on_moisture_sensing/">http://micah.waldste.in/blog/2010/09/grow_with_ard...</a></p><p>As your probe has temperature reading, I'm curious if you experienced the same.</p>
Looks very similar to my recent project on instructables: search DIY soil moisture'. The probe is accurate, but the power needs to be pulsed for 50ms once every hour or so to prevent corrosion.
Interesting. I didn't realize you could prevent corrosion by pulsing the power.
To actually stop the corrosion the polarity could be reversed on each pulse. Now that WOULD be an improvement !
<p>Not quite - it will slow it further down, but no warranty that an ion that left your probe is the same ion that will return once that the polarity is reversed; more mobile species might present in the soil (say, one Ni ion leave, a sodium comes back).</p>
<p>there are various ways. pulsing the power does lessen corrosion because there isnt current 24/7. Could also use a timer yo do a quick measurement say every 10 minutes, or every hour. Big difference between a current that goes 24/7 or one that goes say 6 times a fraction of a second.<br>If you don't want corrosion, take a capacitive probe. I and others have published those on instructables</p>
<p>Indeed! they look quite similar, in fact I've just arrived home from pouring resin into my probes and checked this message and your instructable. Well you know what they say: Great minds think alike! :-)</p>
https://m.instructables.com/id/Arduino-Soil-Probe-Using-DS18B20-and-DIY-Moisture-/
<p>I love yr name, obviously you are welsh. How to pronounce yr last name?</p>
<p>It's pronounced 'Tum (as in tumult) - fat', and is welsh for 'funnel'. I myself am not welsh - more of a Euro-mongrel cross breed ie English, Irish, French etc. Must try and find your capacitance probe project now ......</p>
<p>tnx for the explanation. You will find it here </p><p><a href="https://www.instructables.com/id/Capacitive-Soil-Moisture-Measuring/">https://www.instructables.com/id/Capacitive-Soil-Mo...</a></p>
any ideas on how to make the probes pointed to go into difficult soil?
<p>Use a dremel to make a point sharper and ruggedize the top so that you are able to gently hammer the top. Just remember that hard soil can be loosened by watering over extended periods of time and no amount of ruggedization will help you if you are trying to put the sensor through rocks.</p>
<p>Well yes, for the solid electrode it only has to be cut longer and then using a metal lathe could be achieved a durable and pointy end, as for the Ds18b20 electrode I would probably solder via MIG with stainless steel wire some points at the end of the electrode to extend it, then again using a metal lathe to make it pointy. In both cases the electrodes will be soil piercing and resistant to rust. </p>
<p>Very nicely done! This is a great first instructable. Can't wait to see what you make next! :)</p>
<p>Thank you! </p>

About This Instructable

4,317views

70favorites

More by dagorald:An improved moisture sensor 
Add instructable to: