Monday, September 21, 2009

Playing with an off the shelf el-cheapo soil moisture meter

Original article 9.21.2009.
PS. 4.2.2010 nice read - http://tuxgraphics.org/electronics/200908/eth-flower-watering.shtml

I just found a Bond 9628 Moisture Meter hanging at the junk section at Marcs, for $2.49. I just had to get it, out of curiosity. I know what such meters measure is nonsense, because the principle they are based on is nonsense. It looks like an analog millivolt meter, with a needle attached to an ultra-fine-wire wound coil. The minute amount of electric current passing through the coil wire creates a magnetic field that makes the coil deflect from another magnet or just a piece of iron, or even a second coil wound same or opposite direction - I don't know what exactly, I haven't taken it apart. The current is generated at the tip of the meter, by a battery action, by two dissimilar metals being immersed into an electrolyte. In this case the two metals seem to be a zinc and stainless steel. The tip is zinc, separated by what looks like a polyethylene ring, and the whole stem is stainless. The ionic conductive electrolyte is supposed to be the wet earth with the salts and ions dissolved in the wetness.
The idea here is that if there is a continuous wet path for the current to flow through the wet earth from the zinc tip to the stainless stem, then the circuit is completed, and the battery setup at the tip generates a voltage that deflects the needle. Here is where the first problem is, because according to theory taught in Chem 101, the voltage is independent of pretty much everything including amount of wetness, or salinity, except the concentration (molarity) of the dissolved zinc or stainless(or lowest redox species, such as hydrogen) ions in solution (Nernst equation). So according to theory the meter is an on/off device - there is either a continuous path, and then the needle is fully deflected, or there is a break in the circuit, and the needle does nothing. That is theory, assuming theoretical voltages. However the practical meter has internal conductance, and cannot measure just pure absolute theoretical voltages, only combinations of current flow and voltages.
Suppose the full theoretical voltage generated is, say, 1.0 Volts (measured by a meter with a huge internal resistance of say 40 megaohms or 200 megaohms. Our coil wound meter probably has maybe a few kiloohms - I will have to measure the resistance between the tip and the stainless stem). Now if the earth is partially wet, and its bulk resistance is (roughly )2000 Ohm/millimeter (there would be a complicated conduction field even in a totally uniform and isomorphous earth decaying beyond significance but theoretically going all the way out to infinity), so let's say the earth is 2000 Ohms as far as the meter can see it, and the coils internal resistance is 2000 Ohms too, then half the voltage drop happens through the coil, half the drop happens through the earth. In this case the coil would feel 0.5 V instead of 1.0 V. So basically we're measuring the electrical resistivity of earth, with a matched resistivity of the coil somewhere in the ballpark of interest. This is all well, except salinity is a crucial thing here - distilled rainwater is almost an insulator, while saltwater, or water full of putrefied ammonium, nitrate, sodium, potassium ions is very conductive. So the resistivity depends on the type and makeup of earth we're trying to measure. Very wet but nonconductive earth such as quartz sand would be after a rain, will measure very dry, but a quite dry as far as moisture content goes, but loaded with salts/fertilizer earth will measure as very wet, simply because it's more electrically conductive. Though there is a general correlation that the more wet the earth the better the conductivity - in regular earth such numbers are so far off the chart in either direction, that a meter measuring simply earth resistivity cannot tell whether it's due to moisture or salt content.
Moreover there is a porosity problem - compact earth with good contact area will be less resisitive compared to loose and freshly tilled aerated earth that may only have a few inadequately conducting point-contacts on both the surface of the meter, and through the bulk of the earth.
Basically, to measure moisture content of earth, the medium has to be very fixed as far as salinity and bulk porosity is concerned. All the meaningful methods to measure moisture content through electrical means first use a standard medium such as a rod of gypsum(plaster of paris) or a piece of polyimide to suck up moisture from the ground in an equilibrium quantity, and then measure the electrical properties of that standard medium (resistance or capacitance, aka. collectively impedance). Gypsum is sensitive to salinity, it soaks up the salts somewhat, but polyimide should only absorb moisture. Both gypsum and
polyimide of course would not have the variable porosity issue from soil sample to soil sample, but it takes significant time to equilibrate moisture levels inside the "moisture probe" (whether gypsum or polyimide.) Smaller physical size probes equilibrate faster, but also need more precise measurements, and even so the measurements might be spurious. The meter I bought is very fast, except what it measures so fast is meaningless. Standardizing the moisture measurement medium, and bringing it into moisture equilibrium with the surrounding earth is time consuming, but the results are at least more meaningful.
When I tried out the meter, fresh out of the wrapping, I stuck it into some tap water - nothing, no reaction, in standing water. I looked at the tip and it looked a bit corroded/oxidized. I tried dipping it into acid, the standard medium for batteries. The only acid I had handy was straight vinegar (acetic acid). When I dipped it, the needled went flying to the 10 mark, the very wet on the scale. So the thing works at least if it sees a proper and strong ionic electrolyte that it can react with. I noticed the zinc tip fizzing, and getting very clean very fast. After this oxide layer removing cleaning step, immersing it into tap water started moving the needle, but barely to 1 or 2. I'm like aha, I still need to add salts. I have no table salt, or i can't find it, but i found some baking soda, and I tried adding that. It gave a reading of around 5-6 in standing tap water with a pinch of baking soda. Then I added some of the vinegar, to generate sodium acetate, which is a good conducting salt, and the needle went to 10 in standing water. So the electrolyte quality does matter, a straight standing pool or tap water is not very "wet" as far as the meter is concerned, only if it has lots of dissolved salts, does it become wet. In most good topsoil conditions, that are properly fertilized, there should be a lot of dissolved salts, but in fresh leaf compost/mulch/rainwater type beds this may not be the case, and the meter might read dry even in a standing pool or rainwater on top of such bedding material, because of lack of salinity.
The interesting thing to see in the future is if sticking this probe into a gypsum stick would give more meaningful numbers, even if very slowly (may need up to an hour to equilibrate moisture content between gypsum and soil). Then all these el-cheapo moisture meters might even be used for something useful.

PS. Oh by the way it's funny how one can forget almost everything about microcontrollers in a few years, especially if the inital stuff never really sank in very hard (not enough practice, I only built like 2 custom circuits, the rest were programmers/kits, where you program in one slot, and do something else in the other.) So I pretty much started with the basics again, but it's a lot easier to relearn now than it was to comprehend it initially. It's still a hobby, and a fun past time.

No comments:

Post a Comment