Measure waterlevel in a cellar

Go To Last Post
38 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Guyzz in my new summerhouse , the "Ground water" is sometimes rising in the cellar. Maybe as much as 30 cm.

Until i get drilled a Hole in the concrete , and put in a pump (Next year) , i would like to measure the waterlevel.

How do i best do that with a M168 , 10 cm indicators ??

I was thinking about something like making 4 small pcb's , and connect GND and a portpin to each , via a 470 ohm resistor (the cable is prob going to be 3..4 meters long).
Then activate pullup on the portpin , and read the port.

If i get a zero reading , the pcb is "shorted"

Would that work ?? , or should i use some A/D stuff or ????

The cellar is made of big granite stones in concrete , amd might etch the pcb. But it should be a "cheap" solutuion.

Any suggestions are welcome

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I suggest using a pressure transducer connected to the
upper end of a tube, with the lower open end at floor
level. As water rises, the pressure will be proportional to the depth. This is the method being
used in a sump pumping arrangement a friend is using.
Actually, it is a rather sophisticated home built
system with web access and control, data logging
and graphics 8-)

Tom Pappano
Tulsa, Oklahoma

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I found this one that might be "do able"
http://www.parallax.com/dl/docs/...
I wonder witch tube to use for this one ??

And the Pressure one
http://www.freescale.com/files/s...

How is Freescale's sample program ??

The first one seems simpler for a "hardware noob" like me :oops:

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Another option might be ultrasound.... mounting a transducer to the ceiling and then taking periodic measurements to the floor should work.

The simplest/cheapest option would be to use a rotary encoder, potentiometer, and a float.

For this you can use a rigid lever, much like the float in a toilet, where the pivot point is attached to the pot or encoder, and the other side is attached to the float. The trick will be choosing a lever length long enough so that the electronics stay above water.

Alternatively, you can use a string/float configuration, where the line runs down from the encoder, or multi-turn pot, to a pulley anchored on the floor, and then back up to the float. As the float rises, it will turn the encoder. Using a light spring on the other end of the line, can help to pull it back the other way as the water recedes.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

If i get a zero reading , the pcb is "shorted"

Yeah thats ok why bother for A/D but how about humidity? like if would be doing the same in for my garden sprayer then it will always notify system "shorted".

I might be wrong.
ali

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

But it should be a "cheap" solutuion.

Any suggestions are welcome

-- Tie the chip to the end of the string.
-- Lower the assembly into the water.
-- Raise, and measure the length of wet string.

This method may work better using a PC power supply than with the AVR. Easier if removed from the PC first.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
And the Pressure one
http://www.freescale.com/files/s... ... AN1950.pdf

This is very similar to what we did. We used the
mpx5010gp.

Tom Pappano
Tulsa, Oklahoma

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
-- Tie the chip to the end of the string.
-- Lower the assembly into the water.
-- Raise, and measure the length of wet string.

This method may work better using a PC power supply than with the AVR. Easier if removed from the PC first.

A variation on this, arrange a vertical stack of PC
power supplies, their power cords all connected to
an outlet strip. Place an ammeter in the common AC
supply to the stack. Current will be low when the
supplies are dry, and increase in discrete steps as
the water deepens.

Tom Pappano
Tulsa, Oklahoma

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bingo600 wrote:
I found this one that might be "do able"
http://www.parallax.com/dl/docs/...
I wonder witch tube to use for this one ??

And the Pressure one
http://www.freescale.com/files/s...

How is Freescale's sample program ??

The first one seems simpler for a "hardware noob" like me :oops:

/Bingo

Good find, the capacitive sensor is a cool technique, didn't think of that one. The trick for you will be in building a double walled tube, so that the capacitive plates stay dry. It shouldn't be too hard.

Create the sensor tube, as they show in the article, except leave about a centemeter clearance at each end of the tube (this will be for mounting).

For the outer tube & support, you will need a larger diameter tube roughly 2cm shorter than the sensor tube, and 2 end-caps, for support. Drill holes in the center of the 2 end caps large enough to snugly accept the sensor tube.

Next you will need some epoxy to assemble, and seal this thing. Get the slow drying kind, so you have time to work. Start with the bottom cap flat on the table (opening up), and insert the sensor tube. next fill the end cap about half full of epoxy, to anchor, and seal the sensor tube in place. Next (before the epoxy hardens) insert the outer tube into the end cap, insert it in as far as possible. finally to keep the tubes in alignment, place the top cap on, to hold the sensor tube in place. Leave the assembly in the vertical position for 24hrs for the epoxy to fully cure.

Test the tube to make sure water does not leak into the inner chamber that we created. Test it by plunging it vertically down into water to a depth a few cm from the top of the tube, and holding it there for about 10 minutes (the longer the better).

If it does leak, try adding some silicone around the end cap joints at the bottom of the tube. You can also try adding more epoxy inside.

Note that if you're liucky and can find reducing couplings for the size of your sensor tube to your outer tube, use those, and the proper adhesive for the type of tubing you are using, instead of epoxy. This will give you a more reliable result than the drilled end-caps.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

glitch wrote:
The trick for you will be in building a double walled tube, so that the capacitive plates stay dry. It shouldn't be too hard.

It doesn't seem like the tube from AN27 is keeping the capasitive plates dry.

Should they be keept dry because they will corrode or ???

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In AN27, the water is passed into the sensor tube from a flexible hose (look at the diagram, the water goes from the bucket into the sensor via a flexible hose, the water never contacts the exterior of the sensor tube), the sensor tube is not not submerged in the bucket. The technique works when the sensor and water container are at the same level. In AN27, they had the convenience for measuring the water that is in a separate small container. In your case, the sensor is inside the container (the cellar) so you need to place the sensor itself in another container to keep it dry.

The plates need to be kept dry, because impurities in the water, will create a short between the plates, thus killing the capacitive effect the sensor is based on.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ahh yes :roll:

Thanx glitch :-)

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

Referring to http://www.parallax.com/dl/docs/cols/nv/vol1/col/nv27.pdf
You don't use DC but use alternating signal.
This will minimize any electroplating effect when using the capacitive electrodes.

Ken

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

pykedgew wrote:
Hi

Referring to http://www.parallax.com/dl/docs/cols/nv/vol1/col/nv27.pdf
You don't use DC but use alternating signal.
This will minimize any electroplating effect when using the capacitive electrodes.

Ken

I won't need that if i enacpsulate the electrodes in a waterproof tube ... would i ??

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Put a piezo speaker on something that can float...tie the float to the floor.

Put a mic on the ceiling...send a very short beep to the speaker and then measure the time it takes to reach the mic.

Or just put the speaker and mic on the ceiling and read the reflected beep.

You might be able to use one of those cheap sonic tape measure thingies and place it on the ceiling aimed at the floor. Then read its output with the m168.

Maybe the important thing is to tell if the water has reached a certain dangerous depth...so maybe just place
something that would short out on the wall at this level and watch for the short with the AVR?

Maybe 2 or three alarms at different levels would be enough.

1-a bit of water on the floor
2-10cm of water
3-START BAILING :)

You could hook the AVR to the phone line and use pulse dialing to dial your cellphone and send a series of audio beeps indicating the depth that has been reached.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Gwen wrote:
Put a piezo speaker on something that can float...tie the float to the floor.

You could hook the AVR to the phone line and use pulse dialing to dial your cellphone and send a series of audio beeps indicating the depth that has been reached.

I have seen some pressure solutions with a piezzo resonator (hookes up in a std. oscillator circuit .. 2 inverters), where the water pressure would change the oscillating freq. of the piezzo.
But i cant see how to let the pressure come through to the piezzo , and not the water.

Regarding the alarm ...

I have already hooked a M32 up to a GSM , and is using SMS.

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

with wet electrodes: you can measure the change in capacitance with the level of water.
To avoid destroying of your electrodes i recommend to decouple the DC par with (much larger) capacitors.

One simple way could be to use a Port as an opencollector output to discahrge one capacitance and use the internal pullup to charge the capacitance. connect the capacitance to the analog comparator input (is it possible to simply use just the analog comparator input?).
Measure the time when the capacitor is charged to the certain voltage level. The time tells you the water level.

maybe you can find some CrNi18/8 (INOX) material for the electrodes.

Quote:
Until i get drilled a Hole in the concrete
Take care!!!! How do you tell the water that it has to stay outside the cellar when the ground water level is rising? Maybe after you drill to the concrete you have 1m water level....

Klaus
********************************
Look at: www.megausb.de (German)
********************************

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

1 Open Door
2 Turn on light
3 look at water level
4 turn off light
5 close door
edit
You may wish to add a deep sigh between 3 and 4

Keep it simple it will not bite as hard

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

The impression I got from reading the nv27.pdf is you need the water to be in contact with the 2 electrode plates.
With the water between the 2 plates you do not get a short circuit unless it is salty sea water.

Quote:
I won't need that if i enacpsulate the electrodes in a waterproof tube ... would i ??

Then how can you get a capacitance change when it is dry ?
Miller effect ??

Ken

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

Quote:
Then how can you get a capacitance change when it is dry ?

you have two dielectica. the thin isolation at each electrode and the air/water between the (large) electrodes.
air has dielectrical constant of 1 while water has about 80. With the rising water there is less air and more water inbetween the electrodes. The different e(r) changes the overall capacitance.

Klaus
********************************
Look at: www.megausb.de (German)
********************************

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

pykedgew wrote:
Hi

The impression I got from reading the nv27.pdf is you need the water to be in contact with the 2 electrode plates.
With the water between the 2 plates you do not get a short circuit unless it is salty sea water.

Quote:
I won't need that if i enacpsulate the electrodes in a waterproof tube ... would i ??

Then how can you get a capacitance change when it is dry ?
Miller effect ??

Ken

Ken think about a capacitor. The plates are separated by an insulator, not a conductor. The capacitance of the plates is determined by their surface area, and the dielectric constant of the material that separates them. You get a change in capacitance because the water partially fills the void between the plates, while the rest is air. (the tubing remains constant over the entire surface, and is therefore not mentioned, but it does have an effect on the overall base capacitance) The two plates act as an infinite series of small capacitors in parallel, as the water moves up, the capacitance of the virtual capacitors separated by water changes from what it was with air, to what it is with water. while the top portion remains unchanged. The result is a change in the overall capacitance of the sensor, relative to the depth of the water.

Water does not need salt to be conductive. Any number of impurities in the water can increase it's conductivity. As it'll be ground water that is seeping in, it will be full of various metal minerals thus increasing it's conductivity, just as the sodium in salt water does. Obviously the higher the impurity content, the higher the conductivity. (actually pure water is a semi-conductor, otherwise you would never be able to break it down into hydrogen, and oxygen via electricity alone, so I'm not even convinced wet electrodes in pure water would work as desired)

If you put a conductive solution in contact between the plates, it will bleed off the charge, ruining the capacitive effect. At that point you need to measure resistance, not capacitance. So, as you can see, you need an insulator separating the plates for this to work. (note that you can still have wet plates, they just need to be conformally coated, or similar, to keep the water form contacting the conductive plate directly.

As you can see, using wet electrodes is not likely going to work as desired. For wet electrodes you'd be better off reading resistance, not capacitance, which, essentially, is what the original idea was to do. However, unless the resistance of the water at that time is known, you can only test for the presence of water, not it's depth (with only 2 electrodes)

If measuring for resistance, you have another problem the resistance measurement would die off, as the electrodes got coated with other non-conductive impurities from the water, reducing their effectiveness. Oxidization will also have a negative effect.

Again, in AN27 the electrodes are dry, they are taped onto the outside of a 1/4 inch diameter tube. The water runs on the inside of that tube.

[afterthought]
The dielectric constant of the water is going to change as well with the varying impurities. So this will have a negative effect on the accuracy of the measurement, unless you can calibrate the sensor to the dielectric constant of the water being measured. I have no idea how dramatically the dielectric constant will vary, and how dramatically it effects this type of sensor. Should make for an interesting experiment. Measure with distilled water, and then again with a high salt content.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

Last Edited: Fri. Sep 15, 2006 - 04:16 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bingo600 wrote:
I have seen some pressure solutions with a piezzo resonator (hookes up in a std. oscillator circuit .. 2 inverters), where the water pressure would change the oscillating freq. of the piezzo.
But i cant see how to let the pressure come through to the piezzo , and not the water.

Water does not compress, so only the air column above the water would compress (if in a sealed chamber). If you sealed the top of a tube with a piezo element, that increased air pressure, inside the tube, would deform the piezo element changing it's resonant frequency.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There are many level controllers using ultrasonic measurement. You can try hacking some commercial ones, or develop your own. Google can give you many schematics that can be easily attached to an AVR instead of the usual PIC.

Ultrasonic level measurement for liquid works really nice, since I have one at home (AKO-53190)that controls the water level in my swimming pool from a height of about 4m with a precision about 1 cm.

Guillem.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Using the air compressed in a column of water - use something like the MX4115 pressure sensor with a piece of ordinary tubing weighted to remain at the bottom of the water. Air fills the tube; it's compressed as the water rises.

There's a 0-5 volt output, and they'll even send you a free sample so you could do this as a freebie :)

Neil

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can do this remotely by using a bubbler made from small air pump and a length of plastic tubing. If one end of the tube is a the floor of the basement, the other end can be in the dry somewhere. Just pump air into the tube and measure the pressure of the air in the tube with a pressure sensor. The air pressure will vary linearly with the depth of the water. you can read it directly with a gauge of you like.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

@Glitch, thanks for the explanation.
You are correct in the theory of operation.
Really, they are using the dry electrodes method.
It was my interpretation of that document did not really explain clearly.
So is this acting as a proximity detector ?

Quote:
If you put a conductive solution in contact between the plates, it will bleed off the charge, ruining the capacitive effect. At that point you need to measure resistance, not capacitance. So, as you can see, you need an insulator separating the plates for this to work. (note that you can still have wet plates, they just need to be conformally coated, or similar, to keep the water form contacting the conductive plate directly.

Impedance not resistance for capacitor.

Another way is 4 electrodes evenly space (wet method) with an AC constant current say 1mA signal applied to the outer 2 electrodes, then take a measurement of the inner 2 electrodes. The result will be impedance which the reciprocal of ohms.

Ken

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You could also measure the length of an open tube with two methods.

1) Find the resonant frequency of the tube (to the water) by applying a frequency sweep.
2) Measure the length of the tube (to the water) with an ultrasonic rangefinder hooked to the tube.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bingo600 wrote:
Guyzz in my new summerhouse , the "Ground water" is sometimes rising in the cellar. Maybe as much as 30 cm.

Until i get drilled a Hole in the concrete , and put in a pump (Next year) , i would like to measure the waterlevel.

How do i best do that with a M168 , 10 cm indicators ??

I was thinking about something like making 4 small pcb's , and connect GND and a portpin to each , via a 470 ohm resistor (the cable is prob going to be 3..4 meters long).
Then activate pullup on the portpin , and read the port.

If i get a zero reading , the pcb is "shorted"

Would that work ?? , or should i use some A/D stuff or ????

The cellar is made of big granite stones in concrete , amd might etch the pcb. But it should be a "cheap" solutuion.

Any suggestions are welcome

/Bingo

I did it this way:
If you use an physicial smal PTC at the right walue, you may feed it wirh a constant current givving this result.

As the PTC are cooled in water, the resistanse are low, and the woltagedrop across it are smal. If the are not cooled in water, the current wil heat it, the resistance rais and the voltagedrop raise. The point are that the current are able to heat the PTC in free air.

I used a EPCO, B59010D1135B040 AND 24V. Not a good one, but it works.

As I asked for free samples, I met a sweedish, thinking I asked for gould.

HM

HM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

Sound more like a pipe organ.
You can use the principle of blowing across the tube end or like a top of bottle & will get a frequency resonate that will vary like pipe organ length.

Another idea, you could use a those cheap security camera fitted with infrared leds, which can monitor the floor & wall.
Then integrate the video signal at very slow frame rate.
The AVR will monitor any change & compare it to previous store data.
Or set the trip point for it.

Ken

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just back from my Summerhouse ... no water yet :-)

I think i will give that AN27 a go , and then have the pressuresensor , and maybe the ultrasonic as fallback.

Will let you know how i progress :-)

I have to do the "LED blink detection (Power meter)" first.

Would have loved to have done the LED thingie this weekend , as i was up there.
But the wife meant that sofa's & curtain's , and other non AVR things had higher priority.

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

if you do the pressure method, make sure the setup is such that the column of air to be compressed will always be the same, no matter how fast the water runs in, so the bottom of the tube needs to be vertical, NOT lying on the floor.

Also you will need to take temperature into account, as pressure is greatly affected by temperature.

Each technique has it's own advantages and pitfalls.

Good luck with it! It should be a fun project.

pykedgew wrote:

Impedance not resistance for capacitor.

Using the electrodes wet, you no longer have a capacitor. And since I was talking about measuring voltage drop with DC voltages, resistance was the correct term. Had I been talking about the drop with respect to a particular frequency, then yes, impedance would have been the correct term to use.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

Last Edited: Sun. Sep 17, 2006 - 07:05 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The version I use for measuring water level in a five foot high tank:

Pully system with a float attached in the middle. The upper pully is attached to a 20 turn pot. The pot is wired as a voltage divider. uP monitors A2D and determins water level. Very low tech. Very reliable.

Go electric!
Happy electric car owner / builder

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sgomes wrote:
Very reliable.

Now where's the fun in that? :D

Neil :P

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Another way is 4 electrodes evenly space (wet method) with an AC constant current say 1mA signal applied to the outer 2 electrodes, then take a measurement of the inner 2 electrodes. The result will be impedance which the reciprocal of ohms.

Small point . . .

Impedance is the equivalent "AC resistance" of a component and is expressed in Ohms.
Conductance is the reciprocal of resistance.

Interesting thread as it has given me several ideas for measuring the flow in a small stream, ie 1-10 L/s.

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Now where's the fun in that? Very Happy

True, Neil, very true !
Bingo, topics like these belong in the off-topic: they're too much fun :wink:

Now serious: I once did the capacitive one (with the rising water as dielectric between two plates) and found TWO effects: capacitance-change, but also: increase of dielectric losses. And yes, we did get it to work. But it's not a simple solution.

This one IS:

Quote:
Pully system with a float attached in the middle. The upper pully is attached to a 20 turn pot. The pot is wired as a voltage divider. uP monitors A2D and determins water level. Very low tech. Very reliable.

But hehe, it's reliable .. so where is the fun ...

The idea with the PTC's is great, but the snag is always: how to keep the water out of the electronics.

When I was a student, I made a level-measuring system for the Big reservoir of a central heating system, and used CMOS and four electrodes (silver) on a PVC-pipe in the reservoir. The reservoir itself was grounded. It worked, but I had to go to the attick every month to rub-off the insulating oxide or whatever the stuff was ... it felt a bit gelly.
Yes, it was fun .... but it didn't work very well.
Students huh ?

Nard

Attachment(s): 

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Plons: The insulating oxide is a classic secondary effect when using DC current for the measurement. Industrial sensors based on this use always AC, like AKO-53181 (my first commercial project, fully analog).

Guillem.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is getting very complicated. Why not just write a simple C program. Have a variable called
WaterDepth, and declare it as a float.

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

...declare it as a float...

Groan. Good one.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.