Soil Moisture Sensor based on Heat Capacity

cebersp

Well-known member
Hi,
this is about monitoring soil moisture for plants, perhaps with the aim of controlling an irrigation pump for my next tomatoes.

Last year I invested a lot of time with capacitive moisture sensors, which you can buy cheaply. - It turned out, that this method is not reliable. The reason is, that this capacitive type of sensor is extremely sensitive to water in the very nearest distance <0.1mm. If there is a drop, then the whole measurement is dominated by this single drop.
Due to corrosion effects a resistive sensor is not usable too.
(Best method would be tensiometers but they are not easy to build.)

Now I am trying a sensor, which actually measures heat flow. A transistor in the soil is used as a heater and used as a temperature sensor as well.
First a reference temperature is noted. Then the heater is switched on and after some time the heater is switched off and the temperature is measured again. The temperature difference is (hopefully) dependant from the moisture content of the soil (and of course from the type of soil too).
My experiments are based on:
https://www.researchgate.net/public...a_novel_heat_dissipation_soil_moisture_sensor
http://s.campbellsci.com/documents/cr/manuals/229.pdf
and:
https://www.best-microcontroller-projects.com/transistor-anemometer.html

The schematic shows two states of the circuit. Heater off and heater on. The adc input is at the emitter of Q1. I do not intend to measure with heater on. A heating time of 60sec seems to be in the right range. The transistor has TO-92 package and is inside a shrink tube. (No porous material up to now.)
Perhaps I will add some amplifier to the circuit.
1000 adc-values are added and divided by 100.
SoilMoistA.jpg


After 60sec heating I get.
36.5/4096 counts in water
92.3/4096 counts in air
71.0/4096 counts in some soil (garden mould) with unknown water contend.

The repeatability of consecutive cycles without moving the sensor seems to be quite good. ~1/4096.

I am using a Teensy 4.1 running ATLAST Forth for this experiments.

Comments, suggestions,... welcome!
Regards Christof
 
I have looked at sensing soil moisture to control irrigation off and on for 20+ years. I think it is a quixotic quest. Even if you could create a perfect sensor (inexpensive, long lasting, reliable, easy to calibrate) you are up against a number of issues that come down to the extremely heterogeneous nature of a garden/farm tract.
- water mostly moves vertically within soil. there is very little horizontal transport.
- the degree of horizontal and vertical transport is dependent on soil composition.
- water application devices (sprinklers, drippers) do not distribute water uniformly.
- soil composition within an irrigated area is not uniform.
- growing plants affect water distribution and transpiration in a highly non-uniform way.
- plant roots can grow into the sensing media and disrupt the sensor.

You can get reasonably good results for a single potted plant as long as the sensor lasts but when you try to do this for a garden or farm area, it has diminishing results. And a watering unit (sensor+valve) per plant gets expensive. Honestly, some simple rules of thumb (gallons/plant/day with a temperature based multiplier) are pretty simple and effective.

The goal, I believe, is full automation of the irrigation process. But gardening/farming is relatively labor intensive and the irrigation decision process occupies a tiny sliver of that time. In addition, different phases of plant growth require different amounts/types of irrigation - when do you stop frequent seed misting, for example.
 
Thank you, Phil for your comments. I can understand and follow your comments very well. Last year I even gave up with microcontrollers and used a system called Blumat, which worked more or less but needed adjustment every 2 days. I have got a few Tomatoes in pots as a hobby.
Reliability is extremely important, because you have only benefit, if you can rely upon the system. I think, you need a redundant system with two types of sensors. The system shall inform you, if something is not plausible or wrong.

Do you know the equation of Turk for evaporation? You have (only) to measure sun radiation and temperature (+ amount of rain ) and together with a factor for the plant and its age you can calculate the amount of water per day. Just like your rules of thumb but possible for an automatic system. I wonder if I could include this somehow. I will need a sensor for the volume of water per day then.
Regards Christof
 
The USDA and the World Meteorological Association has published several papers and decisions on soil moisture instrumentation. Texas A&M, UC Davis, and UC Riverside agricultural engineering people have all have done a lot of work in the measurement of soil properties. Search for 'apparent electrical conductivity'.

I have done several sensor networks (typically use theTeensy-LC) using conductivity to infer both volumetric and mass based moisture content. Soil conductivity and soil moisture are the most difficult measurements to do (up to and including radiated emissions) accurately, and I have tried about a dozen different methods over the previous 20 years. Your design choices are determined by requirements for a qualitative or quantitative result, if you want to generate re-producible data, or if you want to normalize an arbitrary level as part of a control loop.
 
Dry Out Experiment with NPN Transistor Sensor for Thermal Conductivity

Dry out experiment using the sensor as described in first post.
A volume (104 grams) of garden soil (dark humus) straight from the garden, as is was, was put into a paper basket (for fruits) and the sensor buried into it. Over 6 days in a heated living room with a fan the garden soil was dried out. (After this I wanted to dry the soil completely in a microwave oven, but this went very wrong :( as there was a little fire, so the dry weight is not completely accurate. :-( ).
Weight with a scale for coins (resolution 0.01 grams) and sensor reading was taken several times during the dry out time.
Sensor reading is the voltage over the silicon pn-diode in the base-emitter of the sensor. Before and after heating for 60 seconds the voltage is taken and the difference of the 2 values is plotted.
SoilMoistDryOut.JPG
There seems to be something like a linear relationship between water contend and temperature rise.
Last year I did some measurements with similar type of soil. 10% of water contend by weight was a tensiometer tension of about 150 mbar, which is in the range of tension recommended for vegetables.
Christof
 
The USDA and the World Meteorological Association has published several papers and decisions on soil moisture instrumentation. Texas A&M, UC Davis, and UC Riverside agricultural engineering people have all have done a lot of work in the measurement of soil properties. Search for 'apparent electrical conductivity'.

I have done several sensor networks (typically use theTeensy-LC) using conductivity to infer both volumetric and mass based moisture content. Soil conductivity and soil moisture are the most difficult measurements to do (up to and including radiated emissions) accurately, and I have tried about a dozen different methods over the previous 20 years. Your design choices are determined by requirements for a qualitative or quantitative result, if you want to generate re-producible data, or if you want to normalize an arbitrary level as part of a control loop.

Thanks, BJB, for pointing me at 'apparent electrical conductivity', sometimes the knowledge of the right words is extremely helpful.
I have bought some graphite mines for pencils diameter 2mm. I have the impression, that these might be helpful to do measurements of electric resistance without having electro-chemical effects. At least they give very much more repeatability than steel nails.

Well in my case the requirement is at the moment:

* Suitable for tomatoes in pots. Sunny place but completely shielded from rain. At our place in southern Germany shielding from rain is necessary for tomatoes. (Krautfäule).
* Plant shall neither die from dry out nor from excessive moisture.
* Overflow into saucer is allowed
* Overflow of the saucer shall be seldom. (Waist of water.)
* Tuning of the system can be done with daily attendance.
* Reliability after tuning must be so good, that I can "forget" the plants for 2 weeks.
So a relative measurement ist sufficient, but some correlation to absolute values are very helpful to compare with other information.

It would be interesting to hear more of your experiences.
Christof
 
Back
Top