In-soil/Underground application of SHT1x & DS18B20

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Ton_vN
Normal user
Posts: 212
Joined: 21 Oct 2016, 15:20
Location: Hengelo (Ov)/ NL
Contact:

In-soil/Underground application of SHT1x & DS18B20

#1 Post by Ton_vN » 04 Oct 2021, 19:49

For meteo/agrotechnic it is also interesting to measure the temperature and humidity in-soil/underground.
Davis has very nice humidity sensor and temperature-sensor, but cost is reason to look for alternatives.

In my setups I apply SHT1x to measure Temperature &Humidity in/on the top-soil, and DS18B20s for measuring Temperature from top-soil to deeper levels.
SHT1x in 'protective' capsule, and DS18B20 is version in stainless steel holder.

Earlier experience with SHT11 already showed that humidity sensor of that device fails after prolonged exposure to water, even if housed in a 'protective' capsule.
Measurement by SHT11 of temperature continues undisturbed.
For segmented measurement in the garden have an array of 1*SHT15 + 4*DS18B20: measurement was no problem until last winter.
Problems then starting as description ending here.
Experience with SHT15 in the garden not different than with SHT11: end-of-life-signal is that humidity drops & stays at -2%.
Slower demise of the array of DS18B20s: first 3 from same supplier, then slightly slower 1 from other supplier.
Not expecting that the DS18B20s have suffered from testing experiments (because according to spec they can deal with PS in range 2.4VDC~5.5VDC), fearing that WEMOS_GPIO got 'fried' during testing, or for other reasons.
However, when connecting the array to VCC+GND+pinD5 of 'fresh' WEMOC_PCB, during setup for DS18B20s get response DeviceAdress - None -
:( Headscratching; last resort of digging the sensor-array is undesirable ..........
Subsequently doubting power supply and wiring, but after comparative testing another fresh WEMOS_PCB with unused DS18B20 (which run without problem), the conclusion might be that the application in continously very moist environment has affected and ultimately 'killed' the DS18B20s, while WEMOS remained unaffected.
Replacement of SHT1x + DS18B20 is not difficult, because just purchase & labour, but would prefer to prevent future breakdown, or at least to extend the life-cycle.

Questions now:
a) how to better protect the next SHT1x-in-capsule against intrusion of moist, while keeping the functionality for humidity?
b) how to better protect the next DS18B20-in-steel-holder against intrusion of moist?
Any best practises?

TD-er
Core team member
Posts: 5514
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: In-soil/Underground application of SHT1x & DS18B20

#2 Post by TD-er » 05 Oct 2021, 09:16

I think the only way to keep the sensors from oxidation is to make sure there is no direct contact.
For temperature sensors this is relatively easy to achieve, but for humidity you might want to switch to "capacitive" sensors.
These are essentially a capacitor which experiences a change in capacity due to the presence of water. (distance and amount of water is key here)

Also I don't think the 'traditional' temp/hum sensor is usable for high humidity environments.
Those report a relative humidity, which is depending on the temperature.
But this relative humidity is related to air, not soil.
In the ground, you're essentially measuring the depth of water level, so a capacitive sensor makes more sense here. (pun intended :) )

Ton_vN
Normal user
Posts: 212
Joined: 21 Oct 2016, 15:20
Location: Hengelo (Ov)/ NL
Contact:

Re: In-soil/Underground application of SHT1x & DS18B20

#3 Post by Ton_vN » 05 Oct 2021, 21:15

TDer,

Indeed life of the thermo-sensor will become much longer if their cover is really thick and very water-resisting:
have been thinking for next batch of DS18B20s-in-steel-holder to put each DS18B20 in an extra capsule and fill that capsule with silicon paste or similar emulsion.
The filling of the capsule may be thermal resistant, but processes underground are slow by nature: therefore some 'retarding' through the filling probably is not a big problem.

For underground measuring of moisture a capacitive method might be the better solution compared to resistive measurement, but realisation is a question mark.
Puzzles, because Davis as established company is not known to be ignorant, but their humidity sensors are measuring resistance.
:? DC as carrier will be 'eating' the outer side of the sensor (like happening with the well-known 'fork'-sensor), but applying an AC-signal as carrier for measurement, interesting aspect how to deal with multiple neighbouring sensors at 1 station ........
Last edited by Ton_vN on 05 Oct 2021, 22:45, edited 1 time in total.

TD-er
Core team member
Posts: 5514
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: In-soil/Underground application of SHT1x & DS18B20

#4 Post by TD-er » 05 Oct 2021, 21:35

Measuring resistance can be tricky indeed, due to redox reactions (is that correct English? I only know it from chemistry class in high school)
Switching polarity may indeed help here, but not against "normal corrosion" of the material.

Switching is rather easy by the way, as you can use a simple "H-bridge", normally used for DC motors.
The resistance in the MOSFETs of such a H-bridge is negligable when compared to the resistance of the soil, so you can put a simple linear voltage regulator in front of it and measure the voltage over a series resistor in front of the regulator.

Not sure if you would also measure the values from a neighboring sensor. But I guess if you only send a current during the measurement you can prevent false readings by taking the lowest (or highest?) measured resistance of a few measurements in a row.
By using a random interval between measurements you can make sure you always have one measurement which cannot be influenced by another one.

Ton_vN
Normal user
Posts: 212
Joined: 21 Oct 2016, 15:20
Location: Hengelo (Ov)/ NL
Contact:

Re: In-soil/Underground application of SHT1x & DS18B20

#5 Post by Ton_vN » 05 Oct 2021, 22:26

Found some more manufacturer's information describing the sensor including example How to read the sensor.
The example also discusses the aspect of 'mutual effects' between sensors.
Cannot (yet) find how the 'managing' Soil Moisture/Temperature Station functionally deals with multiple sensors, but obviously some time-planned measurement cycle would be a rather simple functional solution to prevent 'mutual interference' between the sensors.
This type of humidity measurement does not have % as result, but cb, as described in Davis' spec sheet for this sensor: just another type of calculation .....
The Soil Moisture/Temperature Station converts the electrical resistance reading
from the sensor into a calibrated reading of centibars of soil water suction with a range from 0 (wettest) to 200 (driest)
centibars.
October 06, 2021
Better hint to 'mutual effects: added line 2, edited line 3
Last edited by Ton_vN on 06 Oct 2021, 09:07, edited 3 times in total.

TD-er
Core team member
Posts: 5514
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: In-soil/Underground application of SHT1x & DS18B20

#6 Post by TD-er » 05 Oct 2021, 22:34

Is this a linear scale?
And if so, linear to what? current or resistance?

If so, then calibration is rather simple.

Ton_vN
Normal user
Posts: 212
Joined: 21 Oct 2016, 15:20
Location: Hengelo (Ov)/ NL
Contact:

Re: In-soil/Underground application of SHT1x & DS18B20

#7 Post by Ton_vN » 05 Oct 2021, 22:42

;-) The 'example' is very supportive for making a setup incl. software.
Like Arduino ESPEasy offers PWM as candidate to generate pseudo-AC.
Also describing setups for multiple sensors and how to calibrate.

Ton_vN
Normal user
Posts: 212
Joined: 21 Oct 2016, 15:20
Location: Hengelo (Ov)/ NL
Contact:

Re: In-soil/Underground application of SHT1x & DS18B20

#8 Post by Ton_vN » 11 Oct 2021, 19:56

Learning by experience.
Testing is the start, to be followed by repair.
'Remote restauration' is not possible, and therefore dug the array with the 4 failing DS18B20, and possibly found the reason for their 'strike':
the 32mm PVC-pipe used for bringing the sensors&cable down to their levels was full of water from -50cm downwards.
The surrounding soil was not very wet till -100cm.

Possible explanation:
over time the fluctuating groundwater has filled the array-pipe (helped by some severe floods during thunderstorms), and apparently the sensors at -50cm and -100cm have been drowned, dragging along the other 2 sensors,
:-( In hindsight had forgotten to make drain-holes in the covers with the sensors and in the bottom segment of the pipe, disabling discharge of leaked water ......

Yet making drainholes possibly a quick&dirty solution, but not sure of future effects, and therefore have to re-engineer the holders for the array, perhaps according to this idea:
1) separately check the sensors whether still fit for recycling
2) keep the array for sensors at - 10cm, -20cm and -30cm, because they usually will be above groundwater, outside the dager area
3) not 1 common 32mm-pipe down to -100cm, but separate pipes for the sensors at -50cm and -100cm, with gaze at the bottom end to keep out soil, but allow free flow of water
4) for -50cm and -100cm the sensor&cable each fitted into a narrower pipe, which pipe to be sealed at the bottom end with the steel sensorholder protruding, with waterresistant closure [to ensure that sensor and cable remain dry].
This setup to be dropped into the wider pipe to make thermal contact at the bottom
5) for the sensors at -50cm and -100cm interface to junction box by connector, enabling quick & reliable (de)connection for check & replacement.

TD-er
Core team member
Posts: 5514
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: In-soil/Underground application of SHT1x & DS18B20

#9 Post by TD-er » 11 Oct 2021, 20:57

There are also Dallas sensors sold which are packaged in "waterproof" enclosures. (also at AliExpress etc.)
One problem still may be that those are often RVS and I'm not sure how well that may last in slightly acidic soil.

Ton_vN
Normal user
Posts: 212
Joined: 21 Oct 2016, 15:20
Location: Hengelo (Ov)/ NL
Contact:

Re: In-soil/Underground application of SHT1x & DS18B20

#10 Post by Ton_vN » 11 Oct 2021, 22:54

TD-er,

All outdoor DS18B20s in my configuration have been delivered with steel holder.
Never seen that the holder has been affected by moisture, but fear that for the 'victim'-DS18B20s the moisture has been entering by way of the 'backdoor' along the cable.

Because liquid often follows gravity, one possible way of protection is fitting with the holder upright (as 'roof').
But that approach not very handy for the intended 'undersoil' setup.

For measuring temp at my solar panels, I curled a small sheet of aluminium around the holder and glued the alu-sheet to the backside of the solar panels.
Also for measurement in the bottom of my crawlspace curled an alu-sheet around the holder of a DS18B20 to act as a thermal probe stuck into the sandy bottom.
In both cases the alu-sheet acting as a thermal conductor towards the holder of the 'offset'-DS18B20: already > 5 years in operation without any problem.
;-) Headscratching how to translate this experience for these 'deep-soil' DS18B20s.

Temp_under_solar
Temp_under_solar
Paneel_temp2.jpg (15.12 KiB) Viewed 400 times

Ton_vN
Normal user
Posts: 212
Joined: 21 Oct 2016, 15:20
Location: Hengelo (Ov)/ NL
Contact:

Re: In-soil/Underground application of SHT1x & DS18B20

#11 Post by Ton_vN » 19 Oct 2021, 09:52

The DS18B20-sensors usually have a cable of max. 1m
=> in my array the deepest sensor at -100cm therefore needed an extension to reach the nearest junction box.
The 'drowned' array now above-soil for inspection & repair:
the connection between DS18B20 and Extension shows clear signs of muddy submersion and resulting rust.
Not good for the connection, operation and life-cycle ......
Related handicap that the cores of the sensor-cable are very thin:
:( certainly not improving survival in moist environment.
After drying, the sensor itself still shows signs of life:
perhaps can be reused .....

Short term solution: refit with watertight connector or watertight cover for the extension.
Longer term approach (while the 'repaired' setup bridges the gap till arrival of the replacing sensor):
buy DS18B20 with 3m-cable
Last edited by Ton_vN on 19 Oct 2021, 10:34, edited 2 times in total.

TD-er
Core team member
Posts: 5514
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: In-soil/Underground application of SHT1x & DS18B20

#12 Post by TD-er » 19 Oct 2021, 10:01

What is the situation on how the sensors are mounted?
Is it a straight line down?
Would it be possible to use PVC tubes with the sensors glued to the wall of the tube and then the tube glued at the end?
Even if you need to extend it a bit, you could use pieces of PVC tube, so you can glue in the sensors at the end of each piece and use those extender parts.
I was thinking of some plastic cap to hold the sensor and glue in that cap so you have the best adhesion between plastics. Easy to 3D print, or make from parts of PVC tube.

Ton_vN
Normal user
Posts: 212
Joined: 21 Oct 2016, 15:20
Location: Hengelo (Ov)/ NL
Contact:

Re: In-soil/Underground application of SHT1x & DS18B20

#13 Post by Ton_vN » 19 Oct 2021, 10:28

TD-er,

Original setup was with sensor at -100cm fitted in a cap solidly closing the end of the array-pipe, sensor-cable&extension free-hanging and (optimistically, because inside the common PVC-pipe) connector between sensor-cable and extension open to environment.
As indicated, my 'conceptual-error' seems the need for a drainage hole in that closing cap to get rid of intruding water and the need for waterresistance of the connection.

;) New setup is a combination of your idea and the original setup.
Basis is a straight 32mm PVC-pipe extending till -100cm, just for this 'bottom'-sensor.
The 32mm PVC-pipe is open-ended at the bottom, end covered by gause and/or by punctured cap, keeping out soil (but with good contact to soil) while enabling free flow of water.
90cm PVC-pipe of 5/8" with sensor glued at bottom end (with the glue also closing that bottom end), also closing the top end of the 5/8"-pipe (to keep out water from above) should protect the sensor and it's 'standard' cable at least for the lower 90cm.
Dropping that setup in the 32mm-pipe enables quick & easy install, test & repair.
If not fixing the package of extension cable and 5/8"-pipe+sensor, side-effect when groundwater or rain would enter, is that the whole package is a floater, and the extension-connector stays out of the water.
In practise the setup as floater hardly seems a functional handicap, because probably very little difference between the temperature at the bottom of the dry 32mm-pipe and the temperature of rising groundwater.

Time to gather experience till the sensor-with-long-cable arrives, to see whether correct thinking (and 5/8"-pipe application to be repeated for long cable setup), or not required with long cable.
Must pay attention that sufficient extension cable to allow vertical movement of the package:
;-) ;-) if fitting a thin, lightweight, marked vertical bar to the 5/8"-pipe, at the same time would have a very coarse visual indicator for groundwater level rising from -100mm upwards .......

Ton_vN
Normal user
Posts: 212
Joined: 21 Oct 2016, 15:20
Location: Hengelo (Ov)/ NL
Contact:

Re: In-soil/Underground application of SHT1x & DS18B20

#14 Post by Ton_vN » 19 Oct 2021, 22:11

Just an observation for info as example results:
nothing else intended ....

Results for the 4 'drowned' DS18B20s, from functional testing with ESPEasy, singly and in combination:
sensor-010 => device detected, but Port-ID has changed (to different DA-string of 8*2characters) and no report of temperature => useless
sensor-020 => device detected, but Port-ID has changed (to different DA-string of 8*2characters) and no report of temperature => useless
sensor-050 => device 'dead' and (when connected to array) 'killing' the interface for the other sensors => DA = None => useless
sensor-100 => device seems OK [reports with original Port-ID/DA, reports temperature] => recycling possible
Bottom sensor is from another supplier than the top 3 devices: difference in quality of manufacturing?

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests