Soil Moisture Value Bouncing

Hi Guys,

My soil moisture value bounces all over the range (from 200 - 1000) even when the readings are taken 5 seconds apart and the probe has not moved.

My understanding is that the UTM contacts the screws on top of the soil moisture tool head and the signal is delivered that way. I would think that would be problematic but I could be wrong.

Does anybody know of a way to prevent the values from bouncing around? Has anybody made a change that has given them reliable values?

I am looking at replacing the spark fun soil moisture sensor with a capacitive sensor from DF Robot. That will require some modification of the tool as they don’t mount the same. The electronics at the top of the sensor will also need to be waterproofed so I will have to develop a design that accounts for that.

Please let me know if you have experienced the same issue and whether you solved the problem.

Thanks,
Mark

For now, due to lack of free time, i have given up ambition to get anything useful from stock moisture sensor. I experience the same - unreliable and inconsistent readings. I haven t had time to troubleshoot this too much, but among first things i would look into the quality of electrical contact between the utm and the soil moisture tool.

In my sequences i use “tool on check” that reads whether tool was mounted properly. I get a lot of false alarms - i.e. based on pin reading, tool is not mounted, while in reality it is on and working well…

Hi eide,

I’m thinking that the design of the utm will never allow good electrical connection. In my experience, having that many electrical gaps in an analog signal is a recipe for disaster.

I have had an idea though. I am wondering if it is possible to wire a soil moisture sensor directly to the farmduino board. I am not near the bot but from looking at it on the net, there are analog pins that it could be wired to.

I would like to use it to determine if it has been raining so if I put the sensor in a location that doesn’t get watered and just leave it in the soil, it should tell me when the soil is wet from rain. That way I can prevent watering sequences after rain.

Does anybody have reasons why this approach wouldn’t work? It seems logical to me but I’m not really the sharpest tool in the shed!

Thanks,
Mark

Obviously the path and length of the wires to the electronics box would be an issue if I left it in a stationary position.

Given that the utm cable itself runs through the y axis cable carrier, I could mount a soil moisture probe to the z axis. The wires would be pretty much the same length as the utm cable. I would think wires that long could limit the signal being produced but it’s worth a test. The farmbot guys obviously think it could work or they wouldn’t have designed the soil moisture probe to attach to the utm.

Hey gents, I had the same issues in the past and found the soil moisture sensor to be pretty useless. If you search the forums you’ll find a thread where I even included my measurements I guess. That the FB team still follows this path I cannot understand at all.
I switched to a second system with a smapp ESP826 that measures the soil moisture continuously. I wanted to include Xiaomi MiFlora sensors but did not have time to do so. I can highly recommend to get rid of this very unreliable electrical contact in the UTM, that is useless for analog measurements and even “digital” as I have experienced as well with the tool verification pin.

Cheers
Klim

Hi Klim,

Thanks for the info. Agreed that the UTM is never going to work properly for reading sensors.

I’m wondering if there’s a way that a Bluetooth module can be attached to the farmduino? That way you could use a Bluetooth soil moisture sensor and transfer the data? Could power it using a small solar panel and rechargable battery. That way the probe can stay in place and wires aren’t going everywhere. Even if you had another mini arduino board that was outputting a signal from an analog pin that was then attached to the analog pin of the farmduino then that would work?

I’m not very good at any of that sort of stuff but surely the farmbot guys could work that out pretty easily.

Could one of the farmbot guys please let me know if something like that could work? I don’t want to go and do research and waste time playing with it if for them it’s as simple as buying a couple of modules and sticking them together.

Thanks,
Mark

Are there any plans for @roryaronson / @RickCarlino to look at this in the future? I would love to not run a sequence if it has been raining already :grinning:

2 Likes

@markgregory8, Bluetooth is a good suggestion because the Raspberry Pi (running the FarmbotOS) moves with the X-axis gantry and so remains close to the Z-axis UTM.
How about putting that Bluetooth-based sensor on a tool-head which is just powered by the UTM ?
As I see it ( caveat : I don’t work for FarmBot ) the integration into FarmbotOS is a bit of work but pretty straight-forward . . Raspbian has good Bluetooth support.

1 Like

Hi John,

So is the soil moisture reading running through the raspberry pi and not the analog pins on the farmduino? If that’s the case, the solution I had envisaged won’t work.

I’ve got no idea when it comes to raspberry pi stuff and a limited knowledge of Arduino.

Powering it using the UTM may be viable. I’d be interested to see what the multimedia reads at the power inputs of the standard soil moisture when connected to the UTM. It may be stable enough to operate a bluetooth sensor successfully. Who knows??

Kind regards,
Mark

Mark, the sketch of a solution that I gave was . . a bit too sketchy :slight_smile:
To clarify my thoughts . . the UTM would power the (moveable) soil moisture sensor and the sensor would be controlled (full-time) by a Bluetooth connection from the Raspberry Pi.
That sensor control ( e.g. measure soil moisture now ) would be programmable from a Farmware “script”.

and how about a solution where sensor + ESP8266 microcontroller would be placed anywhere needed (on Z, Y axis or even attached to plant bed somewhere) and ESP would send measurements via WIFI (it would connect to the same wifi network as farmbot) somehow to the farmbot servers.

This way no extra bluetooth devices would be needed (and powered). what do you think? Would it be possible to integrate farmbot web app with the ESP that’s on same wifi, so that e.g. read sensor would trigger sensor reading from the ESP?

I did this successfully earlier this year with 2 ESP8266 modules talking to each other on home wifi network. Do you think such a “remote sensor read over wifi” would be viable for farmbot ecosystem?

1 Like

Hi,

I agree that wireless is the way to go. I’m no expert but I think either Bluetooth or wifi would be viable, as @jsimmonds and @eide have suggested. I work with a few very smart computer dudes who could get it going wirelessly but they are time poor.

I’m going to have a go at sending the output from an arduino analog pin directly to the analog pin on the farmduino via a wire. If that provides an accurate value on the web app then I see a Bluetooth of wifi setup on a separate arduino as the simplest, but by no means most elegant, solution. Would eliminate trying to get it to interface with the farmbot software and dodge having to touch the raspberry pi.

I’m sure there’s a way to tap into the power going to the farmduino. Would just need a diode and voltage regulator to bring it down to 7-12v for the arduino. Alternatively I might have a look for something that can do it but only needs a lower voltage so it can use the 5V pin on the farmduino.

I’ll have a crack at this little experiment today and report back my findings.

Regards,
Mark

Hi,

I connected an Arduino directly to pin A1 on the farmduino. I set the soil moisture pin to Pin 55 (A1) in the web app. An analog signal was sent with varying values. I tested the voltage with a multimeter and it was 4.68V to start with and down from there at 20 second increments, exactly as I had programmed it to.

At first, the value went to 1003 which is about right. It then stayed there for a while before dropping to 0 and staying there for a bit. It then repeated this cycle.

Really weird. Pretty confident its not working as designed. Any ideas?

Thanks,
Mark

Hi guys, don’t know if this conversation is still active?
Having worked with soil sensors since some years from high-end to low-cost, jumping values are most often related to soil compactness. I tested the farmbot sensor with loose soil (humus) and compact soil (put light pressure on it by hand) and the changes are significant:
loose:
image
compact:

So I think the sensor can do the job, but one has to provide the sensor with more compact areas on the field that allow for constant data.

Best. Christian

1 Like

I can only repeat my experiences with this sensor. Moreover this very cheap sensor would need to stay in a house to not corrode away with time. This is how my soil moisture sensor looked like after 1.5 years (constantly in the soil…):

Anyways, it would be great if someone from the farmbot team could add something regarding the very smart ideas in this thread and the future of the (currently for me useless) moisture sensor @RickCarlino @roryaronson @Marc