Soil Sensor readings are not working properly

Hoi,

today I tried to calibrate my soil sensor:

Glass of water: 896
Not immersed in soil: 241

Any now I grabbed some very very dry soil and repeated the readings including going up on the z axis and
into the same spot again. What I read was quite frustrating, these were values from 644 to 772, so a great measurement error range. This tool is not usable like this.

Did anyone make any other tests / calibrations?
Is anyone using it anyways?

Thanks, Best Regards!

@rory or @Gabriel: Did you ever use that tool to water based on the readings?

I am not sure if you have something like the Sparkfun sensor, but if you do, read this:
https://learn.sparkfun.com/tutorials/soil-moisture-sensor-hookup-guide?_ga=2.62236591.268289261.1528060848-877123021.1528060848

Down a bit in the doc is a section on callibration…
Luck!
~Tony

Hey @Intelbotfarmer thanks for the link, but I know how to calibrate.

I have written above that the thingi is outputting to much varying values when I try to calibrate it and I would like to know if someone is using it. As no one is answering even not FB personnel, I guess that is the truth… would be horribly sad though…

Sorry for being too basic, but after reading that portion of the link, it became apparent that calibrating these can be tricky and i thought it was good info for all folks.
Having said that…
How many volts are you feeding the sensor? It looks like there can be a lot of variance at different voltages (3 vs. 5)
Also, the device is pretty cheep (~$5), maybe buy another just to rule out a bad parts. And if you have had it running with power constantly, that sounds like it can shorten the lifespan.
A quote from the Sparkfun page on the devices says “One commonly known issue with soil moisture senors is their short lifespan when exposed to a moist environment…” So, just keep it away from moisture… :slight_smile:

By the way, I think the FB folks might be swamped, as I think they are on the eve of the XL shipments.
~Tony

But this variance you would only notice if you change the supply voltage. I keep it constant and only trigger multiple readings which are different each time…

@Gabriel @roryaronson do you productively use the soil sensor? Could you explain my variances?

1 Like

As with all sensors, there will be variance between readings. Variances could come from a variety of places such as:

  • Variances in the soil (water content, temperature, soil composition)
  • Variances in the environment (humidity)
  • Variances in the test method (depth inserted into the soil, time the sensor is left in the soil, contact between the soil and the sensor [which will change every time the sensor is moved any distance in any direction], etc)
  • Variances in the sensor itself/hardware (sensor degradation/corrosion over time, manufacturing differences, build-up of soil on the sensor, supply voltage, resistance in the output signal line, connection between the UTM and the tool etc)

Your soil sensor sounds like it is working properly (high values when submerged in water, low values when in the air, and readings in-between when in soil).

Because the Arduino will output an analog reading between 0 and 1023, perhaps you are expecting the range of values between measurements to be within a few whole numbers. For example: 542, 546, 543. This is an unrealistic expectation due to all the possible variances.

Instead, dividing the output by 100 and rounding to the nearest whole number provides a more realistic interpretation of the data. This would have given you outputs of 9 in water, 2 in air, and 6 to 7 in your soil.

Hopefully that sheds some light on what you can expect from the sensor. Oh, it is also important to keep in mind that the sensor included in the kits is an inexpensive hobby sensor. There are of course much more expensive sensors and testing equipment that could provide more consistency and accuracy.

Yes I do agree rory, but I am talking of totally different values than you!

Considering those two posts @roryaronson, I have a variation of (772-644)= 128 from one measurement to the other without changing anything but retracting, inserting it to the same depth and measuring again. If we consider something from 644 (0%) dry to 896 (100%) total wet this measurement error is (896-644)=252 ; 252/128 = 51%?!?!?

Yes is it inexpensive but totally unusable in this implementation, so what is it good for?!

I would say it is good for:

  1. allowing FB dev team to add a very inexpensive moisture sensor to the FB, even if it is sub-par
    a) This allowed the development of the mechanisms to get soil moisture data
    b) It gives the open-source maker community the option to develop better tools (at a bit higher cost) without having to design in all the supporting infrastructure. Just swap out the cheap one and put your own in.
    c) I think, looking at all the data, that even the cheap one can be calibrated to 3 levels, “dry”, “moist” and “wet” or even just two, “dry” and "wet"
    Just my 2 cents.

Also, you can greater range if you feed it 5v instead of 3.
Maybe try that and see if it helps

The question is really wether these totally different values (as I wrote 50% off!) are due to different resistances on the UTM or rather because of the shitty sensor. The problem of the UTM is, that the resistance of the electrical connection is depending on so much (moisture, contact at exactly that “fit”) that it is questionable if it really can be used for analog data. For digital for sure…

This will only increase the range of the output but also the offset due to the same problems…

This can make a big difference in measurements because the soil sensor will likely leave a hole in the soil after being inserted the first time. Thus, subsequent insertions will result in completely different contact with the soil and therefore different readings. You can imagine if you inserted/retracted in the same location over and over, eventually the sensor would push away all the soil and no longer contact it at all.

If you’re looking to take multiple measurements in the same location within a short time period, have your FarmBot keep the soil sensor in place with a Wait command and then take the next reading. Or, vary the exact location the sensor is inserted by about a centimeter so that you have more consistency in the amount of soil contact created during subsequent insertions.

1 Like

Hey rory, thanks for the reply! I am currently looking into a capacitive soil sensor with a nodemcu and openhab, but maybe I´ll try on the weekend again. It was just so frustrating that I did not want to spent more time on this soil sensor… do you productively use it on your own?!

Hi,
I have the same problem, but my value range is even bigger…
I measure at the same location with several measurements within 5 min values between 400 and 750.
With these ranges I can never find out if the soil needs to be watered or not :frowning:
Is there any update on this topic, e.g. a better sensor that could be used?

Thx
Markus