using capsense to measure soil moisture?

Started by WhiteHare, September 25, 2015, 10:58:25 AM

kobuki

Quote from: WhiteHare on September 27, 2015, 08:13:05 PM
If you were to buy something that works "by magic", as vegetronix claims to, how would you test its sensitivity to salinity?

Their "magic" is based on transmission line techniques, which is an important part of radio technology. They claim:

Quote
Because our probe measures the dielectric constant of the soil using transmission line techniques, it is insensitive to water salinity, and will not corrode over time as does conductivity based probes. Our probes are small, rugged, and low power.

So either you believe their claims or make a series of repeatable tests. I think I'd buy a few, plant them, hook them up in my monitoring system any way I can at the moment, and then watch what's the situation in various moisture levels. I'd try to find the correlation point with the watering needs, or in other words, I'd try to tune the threshold for turning on the irrigation system. Is your land prone to salinity problems? If not, or minimally, you might want to skip this test.

WhiteHare

#31
@Joe and @Tom: Sounds promising!  How far apart do you reckon the two antennas should be?

Also, not sure if this applies or not to an RFM69x radio, but would the  Tx radio have to be carefully regulated to a constant repeatable voltage for it to work?  I know that with cheap 433Mhz radios, Tx power is purely a function of supplied voltage.

OTOH, if there were an accurate formula for how Tx power varied depending on the supplied battery voltage, maybe that could be adjusted for.

joelucid

Quote from: TomWS on September 28, 2015, 07:46:08 AM
Not bad, but since you don't really need to decode the received signal - you just need amplitude, why not simply have an rf amplitude demodulator (AKA capacitor and diode, similar to Chirp's) feeding a DC signal proportional to signal strength into an Analog sense pin

Yup - even simpler.

joelucid

QuoteSounds promising!  How far apart do you reckon the two antennas should be?

It wouldn't be two antennas. Just feed the antenna signal into the probe and rectify and measure the resulting signal.

QuoteTx radio have to be carefully regulated to a constant repeatable voltage for it to work?

You'd want to measure the resulting signal relative to the unmodified signal. If the signal generated by the radio isn't constant across voltages you could short out the sensor with a mosfet and measure the unmodified signal that way.

joelucid

Quoteshort out the sensor with a mosfet

Or given the RF nature here I don't know how one would do that - if a mosfet would work. Probably the same problem as the antenna switch. Tom, HELP ;)

TomWS

Quote from: joelucid on September 28, 2015, 01:07:56 PM
Quoteshort out the sensor with a mosfet

Or given the RF nature here I don't know how one would do that - if a mosfet would work. Probably the same problem as the antenna switch. Tom, HELP ;)
I wouldn't expect a radio TX circuit output level to vary an amount that was significant enough to matter (of course this assumes that the load is fairly constant, as radio circuits tend to expect  ;)

In this case, I wouldn't expect to need to make a 'reference' measurement, but I can experiment with that once I'm back on the air - I'm tied up for the next week. 

I did find some nifty little antenna switches (http://www.rfmd.com/store/rf1200.html) The value of these is few components => small size and they aren't too expensive ~$0.85 IIRC.  However, we can probably get away with a diode, transistor, and a couple of discrete components and accomplish what needs to be done.

Quote from: WhiteHare on September 28, 2015, 02:08:28 PM
This is probably an ignorant question, but in that case, since it's an RF signal feeding the capacitance probe (antenna wired directly to the probe through an antenna switch, yet to be defined), is it of any consequence that the source signal is no longer a square wave?
Nope.

Tom

joelucid

QuoteIn this case, I wouldn't expect to need to make a 'reference' measurement

I hope you're right. The challenging scenario will be coin cells where voltage might differ between nodes by as much as 30%. Of course we can measure vcc. So if we do find a voltage impact we can just measure it once and then infer the right adjustment factor from our vcc measurement.

Have a safe trip and see you back in the air soon!

TomWS

Quote from: joelucid on September 29, 2015, 08:43:44 AM
QuoteIn this case, I wouldn't expect to need to make a 'reference' measurement

I hope you're right. The challenging scenario will be coin cells where voltage might differ between nodes by as much as 30%. Of course we can measure vcc. So if we do find a voltage impact we can just measure it once and then infer the right adjustment factor from our vcc measurement.

Have a safe trip and see you back in the air soon!
It would actually be best if the measured voltage is proportional to VCC since the ADC is ratiometric, everything will track.  However, if the result is constant (due to constant TX output level), then using the adjustment is relatively straightforward process since, presumably, you've already measured VCC to make sure you CAN measure and report...

Tom
(Traveling next two days, it's just everything is packed now  :(

Felix

He's been travelling back to another residence and just got settled, he's been less active but should be back soon :)
Tom you are missed! :P

ssmall



jarrods

I woudl recommend that you look at this sensor:

https://www.tindie.com/products/miceuz/i2c-soil-moisture-sensor/?pt=ac_prod_search

It is i2c and works very well. Be sure to get a well shielded cable that is low capacitance. The guy that built it is open to feedback. in fact he modified the design for me on multiple occasions such as to add the 2 holes near the top to allow securing the cable by the shielding. and you can order it from Tindie or download the kicd files and build it yourself.

There is also a new Library for it if you don't want to do the i2c commands directly: https://github.com/Apollon77/I2CSoilMoistureSensor

FYI - he is the same guy that build "Chirp" on adafruit.

TomWS

Quote from: jarrods on November 23, 2015, 02:21:14 AM
I woudl recommend that you look at this sensor:

https://www.tindie.com/products/miceuz/i2c-soil-moisture-sensor/?pt=ac_prod_search

It is i2c and works very well. Be sure to get a well shielded cable that is low capacitance. The guy that built it is open to feedback. in fact he modified the design for me on multiple occasions such as to add the 2 holes near the top to allow securing the cable by the shielding. and you can order it from Tindie or download the kicd files and build it yourself.

There is also a new Library for it if you don't want to do the i2c commands directly: https://github.com/Apollon77/I2CSoilMoistureSensor

FYI - he is the same guy that build "Chirp" on adafruit.
Thanks for the recommendation!  I was wondering when he was going to make a sensor only version.  Good price and it seems well made.  Too bad it's I2C interface, however, I struggle with sending those signals 20 feet underground.  How long and what type of cable have you used with it?

I've deployed a Vegetronix sensor, placing it side by side with one of my Watermarks to correlate them.  Unfortunately, I've discovered that if you want to keep your landscaping well watered, all you have to do is set up a new sensor for testing.  I deployed it about 4 weeks ago and it's been wet ever since!  I think I'll get some of these to try.

Tom

joelucid

Would be interesting to see how well these perform given the low frequency (I think he uses 1mhz?). At such low frequencies you should get large salinity effects on measurements again. One day I'll have to try the 433mhz idea. Next summer ...

Joe

jarrods

I would have to look at his code again but he is running at 8mhz.

As for the i2c and wire. It has been hit and miss but I am going to be testing http://products.conwire.com/item/product-catalog/ow-cap-foil-braid-shield-ul-cm-ul-style-2919-cable/5922-cl it looks very promising. I got good results from cat6e but the airspace in the shielding allowed water in even after best efforts to seal it :(

This consolidated wire cable is only 12.5pf per foot and is uv resistant. The only bummer is that you have to order 1000 feet to get the 4 and 6 conductor.

BTW there is a version of his sensor in github that uses rs485 instead of i2cand he has a spreadsheet with the bom as well as the Gerber files. I didn't use it cause rs485 has a constant power draw and requires chips that are almost expensive as the processors.

My goal is to build my own (I have the PCB done and flowed still working on software) that will use a modified version of SDI-12 that will work at 3v. That way you could have of to 63 devices on a bus and up to 200 feet of cable. Once that is working i am going to figure out how to include LVDS (low voltage differential signaling) with my modified sdi12 then I should be able to get up to 1km of cable just like rs485.

This way from a single Node I could support 60 + sensors per bus spread across rows of trees and vines.