Capacitive water tank level determination

This forum is for posts that might be considered off-topic but that may be useful or interesting to members. Examples include posts about electronics or programming in general, other microcontrollers or interesting devices, useful websites, etc.
twesthoff
Posts: 247
Joined: 17 March 2006, 6:45 AM
Location: Fredericksburg, VA

Capacitive water tank level determination

Post by twesthoff »

I would think just the center would be good enough, especially if you just want to know when it is almost full.  Maybe there is "center of the boat" where it might be more accurate than the center of the tank.  Also, averaging a number of readings may give you a better reading.  You could possibly put an simple "attitude" sensor (pendulum attached to a pot) to adjust the reading.

On 9/12/2011 12:17 PM, General wrote:
I am about to tape the actual tanks I want to measure. The freshwater, irregularly-shaped tank, while I expect difficult to get at, shouldn't change depth while in motion much on the surface I intend to use.

The waste water tank, however, is long and shallow, and is oriented lengthwise along the keel line. Under different attitudes (the boat bowrise will be somewhere between zero and 10 degrees, typically three to five degrees on plane while cruising) the water at any single point on the side of the tank will change significantly.

To reduce false level readings, I could measure the depth at both ends and average them - or, I'm thinking, tape the tank's entire length in a V, expecting that, as the stern end gets deeper the bow end gets shallower, so the effective area should be more constant than just one end measurement. Pythagoras will play a part as the tank is tipped (forming a triangle of side area) but the indication doesn't need to be precise, just adequate to avoid overloading.

Maybe that's over-thought, though. Maybe just measuring the mid-length depth will suffice.
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

Post by GTBecker »

I'm still working on the tank measurement scheme. One tank is taped and ready, but the other - the oddly-shaped one in the bow - has proven to be difficult to gain access to the aft vertical surface where I intended to place aluminum tape. That got me started thinking about a dip tube, a dry thin-walled PVC pipe with sensor tapes on its inner wall, penetrating the tank from the top - and that led to an interesting experiment.

I have long wanted to measure the speed and wakes of passing boats on our canal. I tried an acoustic ranger for the wave heights, which worked - for a month; the environment is harsh. A sealed capacitive dip tube should be ideal - except that anything submerged near the surface will normally be coated with marine growth in short order. A coating of algae and barnacles would surely interfere with the device.

I thought about boat bottom paint, which is commonly composed of a copper-based pigment that is deliberately conductive; that wouldn't allow capacitive sensing to work. I researched a few depth-sounder transducer spray paints, and found that several are composed of arsenics or cyanides that I'd prefer to avoid - but one is simply zinc. A coating of Pettit's Transducer Paint ($28 for 16 ounces!) is 93% zinc after curing.

That sounded familiar and, sure enough, a can of Rustoleum Cold Galvanizing Compound ($5 for 20 ounces!) that I had in the garage appears to be the same product after comparing the MSDS data. The resulting coating, despite being essentially pure metal, is not conductive. I sprayed half of a length of PVC pipe and hung it off the dock to see if the Rustoleum would prevent growth. So far (a week), it seems that it does; the white PVC is now green and the gray zinc is unchanged.

I tested to see if the zinc coating would interfere with capacitive sensing. I coated the interior of the first test bucket with several layers and let it dry. It is absolutely opaque, a thick coating, but it remains non-conductive and strangely, to my mind, has no effect on the capacitive function. The measurement scheme continues to work fine.

So, soon I expect to have another application for this method of water level determination - wave and wake measurement.

FYI.
Last edited by GTBecker on 10 November 2016, 10:45 AM, edited 1 time in total.
Tom
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

Post by GTBecker »

Well, the zinc coating appears to work to prevent marine growth, and it is not conductive - but it doesn't shed water; it stays wet - surprisingly well, in fact. That means capacitive sensing will always see a wet surface, an apparently full tank or high wave.

Alas.
Tom
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

Zinc is used in medical ointments and wound dressings for its hydrophilic properties.
DougWong
Posts: 2
Joined: 15 October 2011, 22:14 PM

Capacitance Water Level

Post by DougWong »

You are on to a good sensor application here...
As mentioned previously, the capacitance is proportional to electrode surface area. If you want to maximize the capacitance, make the electrodes larger. The largest you can get is to cover the two opposite sides of the tank with semi-cylindrical electrodes. You should leave a half inch gap between electrodes in a strip up each side. The gap should be much larger than the thickness of the tank wall to minimize the empty tank capacitance.
To make a linear output voltage, look up capacitance-to-voltage circuits on the net.
To prevent the electrodes from being susceptible to external influences, look up driven shields. You would need to cover the sensing electrode with an insulation layer and then a driven shield layer - on the outside only, not the side facing the tank. This driven shield should also not cover the electrode connected to your oscillator.
If you want to minimize radiation, the whole tank and sensor assembly could be covered with insulation tape and then with grounded conductive tape.
Good Luck.
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

Post by GTBecker »

Active shielding might be necessary, you're right, to minimize the otherwise large stray capacitance that would result from simple shielding. But you say
This driven shield should also not cover the electrode connected to your oscillator.
In my simple 555 monostable, one plate is grounded and the other is "connected to the oscillator"; shielding the ground would seem to be unnecessary. How, then, can a shield be effective if it can't cover the active element?
Tom
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

Inductive sensing?

Post by GTBecker »

I had another ill-conceived notion. I wonder what would result from wrapping the tank in a coil (or immersing an air coil in a dip tube or, perhaps, a ferrite rod with a coil at one end) in the liquid and using that as the variable resonant component? As with capacitance, if the effective inductance of the coil is changed by the liquid, level could be inferred from it.

Wrapping a coil around a plastic tank might well be difficult or impossible in the conventional sense, but slipping a turn or two of 40-conductor ribbon around it might well be feasible, with loop connections made at headers on a circuit board.
Tom
DougWong
Posts: 2
Joined: 15 October 2011, 22:14 PM

Post by DougWong »

If you are willing to stick something in the tank, you could simply wrap the entire tank with conductive tape connected to ground and connect your oscillator to a vertical stainless steel rod in the tank. The rod should be spaced off from the tank wall a little bit but there is no need to isolate it from the water, as long as the water can't contact your ground.
If the water is grounded, the electrode leads could be reversed, but generated EMI would be worse.
If the active element is driven from a low impedance source, it won't be affected much by stray influences, which are generally high impedance.
If the tank is metal, it could be grounded and the oscillating electrode could be isolated from the water. For the oscillating electrode, you could coat a rod with RTV or simply run an insulated wire to the bottom of the tank an back up so there is no possibility of the wire getting wet. To get higher capacitance use a longer wire - run it up and down a few times. I have tried this and it works well.
I don't think water affects inductive coupling dramatically, but it might be worth testing the coil idea.
I have tried the ribbon cable coil with staggered header concept, but only for a metal detector antenna, where it works fine.
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

Post by GTBecker »

GTBecker wrote:... I sprayed half of a length of PVC pipe and hung it off the dock to see if the Rustoleum would prevent growth...
Three months later, here are the results of using Rustoleum Cold Galvanizing Compound to impede marine growth:
Attachments
DSCN0437a.JPG
(115.19 KiB) Downloaded 576 times
Tom
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

Post by GTBecker »

I ultimately resorted to a commercial solution for the two boat tanks; the senders use a closed-end pressure tube to infer depth and send PWM to a PIC-based display. http://www.fireboy-xintex.com/liquid-level-monitors.htm

Well, a lightning strike just killed the display processor - for the second time. I converted the first fried display into a remote for the cabin (essentially paralleling the switches and LEDs of the main display unit) and purchased a new main unit for the head. The easiest fix this time is to try to buy just the PIC from them. Lacking that I'll be digging into this project again.

Meanwhile, our city managers regularly (over a number of years) declare water emergencies after periods of little rain. They claim the city wells are threatened by droughts - which seems reasonable. However, we receive a water-quality report each year that shows the analytical state of our water. It also discusses the source of the aquifer that the city wells draw from, some 750' below the surface; they say the aquifer is recharged from rainwater in northern Florida, about 250 miles from here, and that the water is believed to take about 10,000 years to get from there to here, based on measured flow rates of a few inches per day.

Any hydrologists here?

How, then, does current rainfall here (or 250 miles from here) affect our drinking water in the short term? I'm not convinced that it does (and more convinced that rain affects politics more than deep aquifers) but it might affect shallower aquifers - like the one on my property that my lawn irrigation system draws from. So, I have another application for depth measurement.

I am thinking of dropping a length of 300-ohm twinlead down the well to chart the water table level over a long period to see if my ~360'-deep well does what they warn it does. The static water table is normally only about 20' below the surface, but I have no idea how much that varies. The pump itself is set about 180' deep in a 4" casing, hanging on a 1.25" PVC pipe, with 3x#12 wires strapped to it for power.

So, I think I can measure the effective capacitance of a length of immersed twinlead with the scheme I tried last year with the small tank.

Has anyone some experience or thoughts?
Tom
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Post by spamiam »

GTBecker wrote:I
Meanwhile, our city managers regularly (over a number of years) declare water emergencies after periods of little rain. They claim the city wells are threatened by droughts - which seems reasonable. However, we receive a water-quality report each year that shows the analytical state of our water. It also discusses the source of the aquifer that the city wells draw from, some 750' below the surface; they say the aquifer is recharged from rainwater in northern Florida, about 250 miles from here, and that the water is believed to take about 10,000 years to get from there to here, based on measured flow rates of a few inches per day.

Any hydrologists here?
I am not an expert in any way. Just offering one other possible explanation. Maybe during a drought water demand from the aquifer gets higher. This might cause one of 2 outcomes.

1) if it takes a long time for water to percolate south from the source, then maybe you can run the local aquifer dry. Eventually it will be recharged, but in the meantime you have run out of water.

2) By draining the aquifer it allows surface water to get into the aquifer, bringing with it contaminants that have not had time to get filtered for 10K years.

When I was a little kid our town had a fairly bad drought and people's wells did run dry. It was solved by drilling deeper. To the next aquifer, I suppose.

-Tony
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

Post by GTBecker »

> ... during a drought water demand from the aquifer gets higher...

Could be. I need to have a conversation with someone knowledgeable at our water treatment plant, I guess.

Meanwhile, 300-ohm twinlead is not common any longer and doesn't seem to be locally available at all, so I tried plain old zip cord, two-conductor #18 power/speaker cable. It exhibits about 30pF/foot dry and about 100pF/foot wet. That's an easily measured difference. Code can see even an inch of depth change on the bench.

To avoid having an end to seal I'll try dropping a U down the well, keeping both ends dry, with the processor in an enclosure at the well head. Results soon.
Tom
stevech
Posts: 715
Joined: 22 February 2006, 20:56 PM

Post by stevech »

Long ago I knew of a guy who perfected a motorcycle gas tank level gauge that eliminated the need for a float (and eliminated the shaky gauge).

It used ultrasonics.
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

Post by GTBecker »

stevech wrote:... It used ultrasonics.
Ha! I can relate. Did he ping the surface depth or do something more sophisticated?

You've reminded me of an old acoustic attempt from which I still have a fuel tank simulator on my bench - a project that became stale after initial success, followed by my inability to duplicate the results. It was a learning device that excited the tank with a piezo and correlated the levels of a fundamental (I chose 1214Hz for some reason I don't recall) and seven harmonics, detected via a second piezo.

Here is the audio of the resulting change as the tank volume increased from empty, and the VB5 main form of the learning software (I don't see that I have a screenshot of it in action, unfortunately). The "Divine Indication" was the result of the process, a 64-level bar graph that showed the best fit of the current detected audio to 64 FFTs of previously-learned levels. One can hear the harmonic content change as the tank volume changes, pretty easily.

http://rightime.com/Transmo/clean_empty ... ht1214.mp3
http://rightime.com/Transmo/transmoform.gif

Did he do something like that?
Last edited by GTBecker on 26 July 2012, 18:32 PM, edited 1 time in total.
Tom
GTBecker
Posts: 616
Joined: 17 January 2006, 19:59 PM
Location: Cape Coral

Post by GTBecker »

> ... Results soon...

I have some encouraging measurements.

I bought 100' of #16/2 low-voltage outdoor, underground, lighting cable at an Ace Hardware (https://www.ccixpress.com/webapp/wcs/st ... &customer=), folded it into a 50'-long U and lowered it through a hole in the wellhead seal.

I had a capacitance meter connected to one end and saw the ~1600pF value start to rise sharply about 18' feet down - which I interpret to mean the loop hit water at that level, close to the 20' I had measured earlier. I continued to lower the U, finding the capacitance increased about 50pF per immersed foot. When the entire 50'-long loop was in the well (18 feet of it dry) its apparent capacitance was about 3200pF.

I started the irrigation system and consequently the pump, and watched the capacitance decrease to about 1680pF, which suggests the level had dropped to -49', where it stayed until I turned the pump off; the value began climbing almost immediately. I suspect this means the loop is just long enough or, more likely, too short for this test. Nevertheless, there is a clearly usable change in the cable capacitance for this application.

I ran out of daylight to continue so tomorrow I'll seal the end and lower it, I expect doubling the range of the scheme (but also halving the change rate), and use another method to measure the static and running-pump well levels to get a pair of calibration points.

Looking good!
Tom
Post Reply