Sensing sea water in a box

John P

Joined Oct 14, 2008
2,026
You haven't said what's connected to the output of this sensor, but if it's a microcontroller and if you managed to get an analog sensor (of any kind) working, you could have the system monitor its health. For instance, when the pump starts up, you should measure a rising level in the tank. If that doesn't happen, something is wrong--the pump is jammed, the intake is out of the water, or the hose has come loose and instead of filling the tank, you're flooding the basement. Or if the tank fills properly but isn't drained in increments as the toilet flushes, there may be a leak.

The sewage holding tank might be more of a problem, given the nature of the substance to be sensed.
 

Thread Starter

ErnieM

Joined Apr 24, 2011
8,377
Well, here is the lighthouse:


It's low tide and mid winter in the shot so the floating dock has been removed, as is the gangway from the dock to the fixed pier. The structure is a 3 story concrete structure. The bottom structure was filled with concrete once this entire structure was floated into position; it was assembled a few miles away on land.

The "first floor" just above the rip rap (though from the inside you feel if it is the basement) houses the toilet area. Usually people congregate on the second floor which is an open area and has been restored to a very fine state. The second floor room was laid out for the keeper to "live" in a larger main room with a separate sleeping room with closet. The closet was opened up to make a built in table that houses some storage and a marine radio. This table serves as the "command post" during tours and special events.

One special even is a music festival where generators are bought in, bands play on the 3rd floor open deck for 700+ boats that tie up around the lighthouse for the day. That day is a huge logistical nightmare as people and equipment have to move on and off like clockwork, and most of them have to pee and some even poop dammit!

The toilet area consists of a marine toilet sitting upon the flush water tank and next to the waste tank. Pump for filling is in controlled from this room, though I am unsure where it actually is. AFAIK the fill pump is controlled thru a 20A breaker off a 12V solar powered battery bank. The waste tank has a hose fitted to the floating dock for pump outs.

We were initially considering just automating the flush water tank, but upon revisiting the place last week I can see monitoring the waste tank would also be very useful. Just to allow for a better layout I am thinking the sensor(s) would go down at the tanks, and a separate controller with display up at eye level. If the waste tank sensor is also installed, it would be best if a separate display was mounted up on the second floor so the base operator doesn't have to go downstairs to monitor the situation.

Each piece (flush tank sensor, waste tank sensor, lower displays & pump relay control, upper display) would have it's own micro for measurement, communication, and display if need be.

We're already discussing several safety timeouts in the system. When filling, it is possible at bottom of tide for the inlet to be out of the water, so if the "empty" sensor doesn't change state after a short time the pump will trip out for a time, then re-enable. Say if no water after 1 minute, stop for 10 minutes and try again. If still no action after some max tries flag failure and stop till reset. Fill time will also be limited to some typical max value: better to have a short fill then an overfill! Finally, a good old manual push button will directly turn the pump on as a last resort in case of system failure.

As this is a salt water marine environment everything will be sealed, boards conformal coated, with every attempt to keep water out but withstand it's effects even if it does. I'm still deciding if the display will just be LEDs or can I seal in a nice alphanumeric display.
 

Thread Starter

ErnieM

Joined Apr 24, 2011
8,377
I don't know if that hose could be extended, I wasn't involved in the "hardware" end. It's something I will ask but a "pump is on but no water comin' in" is still a fault mode to be covered.

It could just be a pump head issue, this thing sits 5 or so feet above high water, and tides are up 10 feet, so a 15 foot head may just be too much for the pump to handle.

Or they just ran out of hose and declared it "good enough."
 

#12

Joined Nov 30, 2010
18,224
A clothes washer fill switch operates in the range of 1 to 2 feet of head. A plastic tube is placed in the tank and the rising water level causes pressure against a diaphragm which clicks a switch. Adjustable fill switches are available.

One limitation is that the water level needs to clear the bottom of the tube regularly to make sure the tube only has air in it. If the tube is always partially submerged, the air becomes dissolved in the water and a higher and higher water level would then be in the tube, thus a higher water level would be required to trip the switch.

This violates your "no penetration" rule, but it's a really simple "pressure to electrical" transducer.
 

SgtWookie

Joined Jul 17, 2007
22,230
Water has the highest dielectric constant that I can think of; a perfect vacuum has a dielectric constant of 1, and air is just a tad above that. Water is roughly 78, and salt content doesn't affect it that much. I don't know how solid waste will affect it, but let's just make a wild guess that the holding tank will contain at least 70% water.

[eta]
A selection of dielectric constants for various materials can be found on this page:
http://www.rfcafe.com/references/electrical/dielectric-constants-strengths.htm

I'm thinking that concentric rings or strips that alternate between the + and - sides of the cap would be considerably more effective than just a single circle and surround; as capacitance is basically area x distance x dielectric constant. If you just have one circle and a ball in the center, the most capacitance will come from the area that separates the two poles.

However, if you have alternating pole strips or circles, there will be a good deal more material in proximity. I'm thinking that strip width should be perhaps 2x to 3x the thickness of the tank material. Blank PCB material is pretty cheap, so the experiment won't cost much.

MPJA has 12"x12" copper clad PCB for ~$9:
http://www.mpja.com/products.asp?dept=393

[eta]
Here's what I'm thinking; something similar to this - it's a ~3.2" square board with 1/4" wide traces on it (grid squares are 250 mils):



J1 obviously doesn't get installed; it's just there because if I delete it from the board, Eagle will also remove all of the traces I routed.
 

Attachments

Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
Some quick calculations and random guesses tell me that glued to the side of the box (1/8" polyprop with a dielectric of 2.2) you'd get ~11pF with low waste (below the cap) and ~400pF when the waste was higher than the cap.
 

Thread Starter

ErnieM

Joined Apr 24, 2011
8,377
Thank you SgtWookie. How did you do that calculation? It's been way too long since I took EL101 and 102 for me to remember any of that stuff.
 

SgtWookie

Joined Jul 17, 2007
22,230
Here's an online calculator that I used:
http://www.daycounter.com/Calculators/Plate-Capacitor-Calculator.phtml
My wild guesses could be way off. I figured the average distance between the plates would be somewhere in the vicinity of 1/4", and then added some to that. Forgot that the dielectric would be 1/8" away from the plates though, so I could still be way off.

You could find out easily enough using something like a milk carton and a spacer; even a chunk of cardboard box (the convoluted kind) would be fine to get a rough idea. Add water to the milk carton to see what kind of capacitance change you get.
 

Thread Starter

ErnieM

Joined Apr 24, 2011
8,377
OK, that's going to figure out the capacitance between the plates, neglecting fringing. But it seems it's the fringe field that's changing and the "good" part.

I had to step away from my empirical experiments but just revisited them. I was assuming the field of interest would be between two plates, set side by side instead of stacked. One plate is ground (OK, return), the other the "active" cap plate that goes to the '555 R and pin.

What I learned was it didn't matter much what I put next to the active plate, the most change occurred when I put something directly over it. So I changes the setup tossing the ground plate and just kept my bottom shield to serve as the return reference plate:



That's a sketch, side & top views of how I'm testing this now. I'm running out of "items" to use as fixed spacers, but the general idea is to try different seperations between the plates to see how far out I can get a reliable change in capacitance.

With a "D" of zero (remember the other plate is still .062 away from the copper) I can get about 11% change when .150 above the active plate.

With a "D" of .150 I get about a 20% change when .150 above the active plate.

These are still pretty encouraging numbers, but I betcha I'm going to be going out to the lighthouse with a sensor lash up driving a 555 driving a PIC driving an LCD so I can do some on site testing.
 

John P

Joined Oct 14, 2008
2,026
If you look up "capacitance" on Wikipedia it gives a formula for "Two parallel coplanar strips" but when it mentioned Elliptic Integrals I decided it was too much for me. Others might thrive on that stuff! I second Sgtwookie's idea of trying it out. What I had in mind when I suggested parallel strips was some sticky-backed copper tape that I've had lying around forever, but an ingenious person would be able to use lots of stuff to do the same basic thing.

It's intuitively obvious that interdigitating strips would give a higher capacitance than just a pair of strips. That's a good idea, but the size of a PC board might be a limitation.
 

SgtWookie

Joined Jul 17, 2007
22,230
Gee, I think I'd much rather do a good bit of testing at the abode before paddling my happy keister out to a lighthouse and getting involved with some not-so-secret sauce...

Do you have any plastic storage boxes? Like Rubbermaid brand, or similar? You might just try mixing up some Epsom salt (or what the heck, just plain old table salt) and do some fiddling around with it.

Your little brass rectangle in the middle of that large copper plane isn't going to be very effective, I'm afraid - you really need roughly equal area for both planes. It'll work OK if you're putting your thumb on it - but you said earlier that the box is ~1/8" thick polyprop.

That means at minimum a double thickness the electrons need to go through before they get to the water, which is why I was speculating 2x to 3x the thickness of the tank wall as widths for the traces.

Since I have a bunch of alternating strips on the board, I guess that could be calculated as one long parallel coplanar strip, but with the dielectric changing from ~2.2 to some mix of 2.2 and ~78 or so, however I'm a math rock :rolleyes: and elliptic integrals are a good bit beyond me at the moment.
 

Thread Starter

ErnieM

Joined Apr 24, 2011
8,377
Gee, I think I'd much rather do a good bit of testing at the abode before paddling my happy keister out to a lighthouse and getting involved with some not-so-secret sauce...

Do you have any plastic storage boxes? Like Rubbermaid brand, or similar? You might just try mixing up some Epsom salt (or what the heck, just plain old table salt) and do some fiddling around with it.

Your little brass rectangle in the middle of that large copper plane isn't going to be very effective, I'm afraid - you really need roughly equal area for both planes. It'll work OK if you're putting your thumb on it - but you said earlier that the box is ~1/8" thick polyprop.

{clip}
I'm well away from getting MY butt out there, especially as the scheduled next trip out there is to hang the Christmas wreath and baby it's COLD out there in December. I'm saving that for when I have a really good idea how the sensor will be configured and just want that final warm fuzzy reality check before I go about building any final sensors.

As far as testing mediums go, last trip out I got a 20 fluid ounce sample of actual water from the bay contained in an old coke bottle. If coke came in a square bottle it would be ideal, but I can press it down on my sensor and get something "good enough." However, it seems just the palm of my hand is a really good substitute test medium at this point.

I had no luck at the marine store getting any polypropylene, but I did get a small sheet 6" x 12" x 1/4" of "marine lumber" made of polyethylene, which has similar dialectic characteristics. Siemans specs cap sensors seeing out to 3/4" so I should be able to go out a third of that. It may be overly thick but I like to keep all the design margin in my pocket I can get.

OK, let me explain what I'm seeing. First, a bad diagram:


What is wrong is it indicated the fringe field seems to be between the sense pad and an adjacent ground area. It also does not show the recommended backside ground of the PCB. This ground is important as it defines which way the sensor is looking so it can uphold the Italian race car drive motto of "what is behind me is not important."

So to start I had a single sided PCB blank, copper side down, and added two copper tabs up top. The top is isolated with some kapton tape so I can't directly touch the sense pad. Note if I touch "ground" there is no effect. So here's the early sensor:



Two upper tabs, capacitance between A (ground) and B. From app notes and such I was expecting the fringe field to exist between my two plates, and the most change to be when my finger was poking as shown.

This was NOT the case. Instead, my finger had the most effect when placed directly over the sense pad. So I removed the top ground pad to get this configuration:




While there is capacitance directly between the top pad and the bottom plate there is also a fringe field from the "backside" of the sense plate that is both unexpected and significant. I could swipe my finger about the sense pad and generally I had to be over it or very near to it to have an effect.

My data seems to indicate that by increasing the separation between the sense pad and the PCB also increases the percentage change for distant objects.

For example, when the pad is direct on top of the PCB, with a .2" spacer above the sense pad, my hand only gives a 5% change when placed over the sensor. If I add a .15" spacer between the sense pad and the PCB the same .2" spacer above the sense pad has a 15% change.

The larger change may be due to just decreasing the direct sense pad to PCB plane capacitance, as the second case runs 25% faster due to the free capacitance (no hand/ medium in fringe field) being less.

Right now I'm out of nice well defined spacer materials to continue. This thing is very sensitive to the set-up so it is best to have things strapped down tight so they don't change when it necessarily gets bumped during testing. Also my sense pad has square corners, something an app note warned about as it can "concentrate" the electric field there.

I can see a trip to the hobby store in the near future. Updates to follow.
 

SgtWookie

Joined Jul 17, 2007
22,230
You might try some 1/8" thick balsa wood for a spacer. It's D.C. is ~1.2 - 1.3.
ABS plastic is 2.0 - 3.5
Bond (copy) paper is 3.
Plexiglass is 2.2 - 3.4
PVC is 3.

Speaking of PVC stuff, Big Blue and Big Orange hardware stores carry 4" PVC clean-out end caps that could work pretty well for ~$2/ea:
http://www.homedepot.com/h_d1/N-5yc...splay?langId=-1&storeId=10051&catalogId=10053
Plop one of those on top of your homemade cap, and pour in some water.
 

THE_RB

Joined Feb 11, 2008
5,438
A reasonably large round sense pad with "guard ring" (gnd wire) is probably the best option.

Microchips appnotes for their PIC with capacitive touch sensing have design tips for making sense pads with good sensitivity.
 
Top