using capsense to measure soil moisture?

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

joelucid

QuoteBeing able to run the RTC at 0.75uA rather than the WDT might solve some issues (i.e. might it avoid the WDT's 8 second limit between wakeups?).

I had somehow missed that you could drive the timer using a 32khz crystal independent of io clock. Even at 3.3V in power-save mode the power consumption is spec'd at < 1 uA (independent of io clock obviously). Just to compare that mode with the current low power setup (rfm69hw using noise wakeup timer):

Noise wakeup:

0.15 uA - 328p in power-down mode
1.2   uA - RFM69HW in idle mode
----
1.35 uA

32khz crystal:

0.95 uA - 328p in power-save mode with 32khz crystal
0.1  uA - RFM69HW in sleep mode
----
1.05 uA

That's a 22% saving with an accurate timer thrown in for the cost of one crystal. Something to consider. Thanks for the pointer.

Joe

TomWS

Quote from: joelucid on December 09, 2015, 03:18:57 AM
QuoteBeing able to run the RTC at 0.75uA rather than the WDT might solve some issues (i.e. might it avoid the WDT's 8 second limit between wakeups?).

I had somehow missed that you could drive the timer using a 32khz crystal independent of io clock. Even at 3.3V in power-save mode the power consumption is spec'd at < 1 uA (independent of io clock obviously). Just to compare that mode with the current low power setup (rfm69hw using noise wakeup timer):

Noise wakeup:

0.15 uA - 328p in power-down mode
1.2   uA - RFM69HW in idle mode
----
1.35 uA

32khz crystal:

0.95 uA - 328p in power-save mode with 32khz crystal
0.1  uA - RFM69HW in sleep mode
----
1.05 uA

That's a 22% saving with an accurate timer thrown in for the cost of one crystal. Something to consider. Thanks for the pointer.

Joe
Alternatively:
Abracon AB18X5 running with a 32KHz Crystal  55nA typ, 330nA max and very accurate.

0.15 uA - 328p in power-down mode
0.1  uA - RFM69HW in sleep mode
0.055 uA - AB18X5 with alarm or timer set
------
0.305uA

Note that AB1815 has autocal mode that provides high accuracy but even lower power consumption by using Xtal for brief periods to calibrate its lower power RC oscillator.  Power in this mode is: 22nA typ.

But then again... a decent ARM chip would bring the total to sub 200nA...

However, you lose the one advantage that ListenMode has: Wake Up on demand.  I think this is unbeatable!!!  (This coming from a guy who, a few months ago, thought ListenMode was the dumbest thing on the planet - next to the guy pushing it, that is...  ;)

Finally, once you get into single digit uA regime, you're reaching diminishing returns on the other things that will kill the mote, corrosion being the worst.  The best thing might be to use corrosion to your advantage and simply have an 'earth' battery.  I have a clock on my office bookcase that my daughter gave me for Christmas last year - I filled it with water then and it's been running ever since...

Tom

WhiteHare

#62
For indoor potted plants, I'm starting to entertain the idea of measuring the darkness/lightness of a color changing soil probe like this:  http://greenscapesinc.net/product/water-check/.
Walmart also carries them for nearly the same price.  I don't a priori know how well it will work (and I couldn't find any reviews), but it's inexpensive and at least there would be no corrosion/electrolysis issue like there undoubtedly would be for a cheap etched PCB conductive probe.  Also, capsense would seem to require some kind of custom PCB (e.g. such as that used by Chirp) to serve as a capacitive probe, which might not be exactly cheap either.  Also, there has been writing about how water can intrude between the PCB layers and effectively ruin it by staying trapped there.  That might be an issue faced by other types of PCB probes too, perhaps including the TDR type, unless it had a waterproof shell of some kind (plastidip, epoxy, etc.).

Anyhow, since this thread seems to have stalled, I'm starting to look into automating this other approach, as it should be comparatively straight forward to implement using a photocell in combination with a repeatable illumination source to light the color changing moisture strip in front of the photocell, and then taking an analog measurement of the intensity that gets reflected into the photocell.  Well, that's the idea anyway.  I'm hoping there are inexpensive reflective sensors (similar in form to an IR proximity sensor) already packaged to do this kind of thing, though it may take some hunting to find one.  Or, as a fallback, I'm sure a homemade equivalent would also work. 

[Edit: I just noticed that lowpowerlab appears to sell such a reflective optical sensor:  https://lowpowerlab.com/shop/EE-SY310 .  However, I notice from its datasheet it appears to be mostly infrared (as, at least so far, seemingly all of them are), which might be an ineffective wavelength for this application.  A visible wavelength would seem more on-point, but I haven't yet found a sensor with that.  ]




john4444

Hi WhiteHare,
QuoteA visible wavelength would seem more on-point, but I haven't yet found a sensor with that.
Would Adafruit #1334 work for you? https://www.adafruit.com/products/1334

John
John AE5HQ

WhiteHare

#64
Yes, I think it would work, although it's probably overkill.  Interesting that it incorporates an IR filter.

I suspect a simple greyscale will suffice, but I can't say for sure until I try it.  It's good to know about the Adafruit device though.  Thank you.  It looks to be of higher quality than some of the other color detectors I've seen. 

WhiteHare

#65
I was going to try just a regular single color LED, but I just received a shipment of WS2812's from China.   I think I'll try one of those instead.  It should make it easier to find the best stimulus color without having to swap among different LED's.

Anyone have any thoughts on what would be a good photodetector to use in this situation?  Something with a flat face (rather than curved) would be easier to mount onto the stick.

john4444

Hi WhiteHare,
When exposed to light, I've found green LEDs to generate the higher voltage than other colors such as red, yellow, blue or white. In addition, green LEDs are almost color blind.
Even though resistive "photo cells" provide a large resistance change with changes in light level, green LEDs seem much more repeatable. I would envision using two LEDs side by side, one to illuminate the target and the other to detect the change.
The focusing dome may be an advantage over a flat surface.

On the subject of the dual electrode soil moisture probes:
Are these being driven with alternating current?
I would think that less corrosion-prone metals would work reasonable well.
Are you open to trying some titanium or stainless-steel wire or strips?
I can send you some samples if you are interested.

John AE5HQ
John AE5HQ

WhiteHare

#67
Quote from: john4444 on June 10, 2016, 04:40:00 PM
Hi WhiteHare,
When exposed to light, I've found green LEDs to generate the higher voltage than other colors such as red, yellow, blue or white. In addition, green LEDs are almost color blind.
Even though resistive "photo cells" provide a large resistance change with changes in light level, green LEDs seem much more repeatable. I would envision using two LEDs side by side, one to illuminate the target and the other to detect the change.
The focusing dome may be an advantage over a flat surface.

On the subject of the dual electrode soil moisture probes:
Are these being driven with alternating current?
I would think that less corrosion-prone metals would work reasonable well.
Are you open to trying some titanium or stainless-steel wire or strips?
I can send you some samples if you are interested.

John AE5HQ

Thanks for the suggestion.  I hadn't known that green LED's would be more repeatable, and repeatability is very definitely quite important.  I'll give a couple green LED's a try: one as emitter and the other as receiver. 

As for stainless steel, I've read about some people using stainless steel nails or screws as inexpensive probes.  The wireless EC moisture sensors  that I've been using over the last couple of years have special stainless steel probes built-in to them, and they don't seem to have rusted or corroded at all.  In fact, they seem to work quite well for that purpose.  The only problem with the sensors I have is that EC just isn't a good method for more than short term monitoring because they're always drifting out of calibration: first due to fertilizers entering the soil changing conductivity, and then again  as plant roots uptake those nutrients.  For that reason, I think EC is a dead-end unless you're willing to accept doing regular calibrations.  That said, there is at least one faster way to calibrate than the way the manufacture recommended doing it, and that might yet make EC viable (still a hassle, but a lesser hassle).

Also, a probe needn't be limited to EC, and Titanium certainly sounds like an interesting material.  It's the first time I've heard it mentioned in this context.  What kind of wire/strips do you have that are made out of it? 

john4444

@WhiteHare,
The company I work for goes through hundreds of pounds of titanium per year.
It is mostly 25-mm OD tubing but also 1.5-mm and 3-mm titanium-clad copper-core solid wire.
As you might imagine sometimes things get damaged or fabricated incorrectly.
Because these items are not sellable for their intended purpose they are usually scrapped since it has little salvage value.

Titanium is an interesting metal; light weight, high strength, hard, not very ductile, corrosion resistant,
cannot be lead-soldered or brazed. We use hydraulic tools to connect copper-wire using compression connectors.
However, an electrical connection can be made using a ring-terminal under a nut/bolt.

PM me if you would like a few feet.

John AE5HQ
John AE5HQ

john4444

Getting back to the post topic...
I was thinking that a capacitive soil moisture sensor could be made by:
placing two electrodes into a cloth bag full of gypsum or plaster.
One electrode (titanium) would be in direct contact with the gyp.
The other electrode (any conductive material) would have an insulating coating.
The capacitor would be from the gyp to the insulated electrode.
I have not done this experiment but I would expect the gyp would create a reasonably
stable environment in which the moisture content would follow the surrounding soil.
It also seems this arrangement would be fairly immune to the salts / minerals in the soil.

I would not mind giving it a try, but I'm not sure how to "calibrate" it.

John AE5HQ
John AE5HQ

raggedyanne

Maybe too old.. Maybe not  ;)

Somewhere some time ago , i was under the impression that a piezo disc can be used to measure weight, feed power in one side & measure voltage on the other.

Dry weight , Wet weight, Over watered weight. Please do correct me if i am wrong  ::)

john4444

Hi Raggedy Anne,

Welcome to the forum.

I'm not sure that a piezo would be very suitable for measuring weight.
You would get a pulse of voltage when the disc is flexed due the the change in weight.
But, that pulse only lasts while the disc is flexed.
Or, apply a (fairly high) voltage and the disc flexes
but only stays flexed as long as the voltage remains.

A 'load-cell', on the other hand, may be what you were thinking of.
John AE5HQ

raggedyanne

#72
Yes its true, that it produces voltage. Surely there is an increase of resistance or decrease of capacitance when the disc is under pressure before applying voltage because you are changing the structure or electrical characteristics of the crystal.

Try this instructable
http://www.instructables.com/id/How-to-Make-a-Ridiculously-Cheap-Analog-Pressure-S/

raggedyanne

After further contemplation of that instructable here are my thoughts;

Follow the instructable , cover in liquid latex instead.
Glue between two acrylic/wood/steel sheets that are spring loaded (for the dry weight) in each corner.

Voila!

WhiteHare

How do you envision a pressure sensor will help you infer soil moisture content?  Is this for a potted plant (where over the near term, the pressure (weight) of the potted plant would increase do the weight of the water)?  Over the longer term it may be  somewhat problematic and may require recalibrations, as the plant grows (increases in weight) and/or as leaves die and need to be pruned.