Arduino Forum

Topics => Science and Measurement => Topic started by: Doug101 on Jan 08, 2019, 12:17 pm

Title: Water/flood sensor?
Post by: Doug101 on Jan 08, 2019, 12:17 pm
I have a basement with a sump pump mounted two feet below the floor in a tube.  I'm looking for a way to detect if the water level has risen above a certain level.  (Sump pump isn't working).

Seems to me water sensor get corroded over time and become unreliable.  So I think that leaves an ultrasonic sensor to measure the water level or simple float switches?

Is one better/more reliable than the other?   
Title: Re: Water/flood sensor?
Post by: MarkT on Jan 08, 2019, 01:55 pm
In a damp environment any sensor you use must be hermetically sealed anyway, whatever type it is, unless
you can bring the electrical part of it out to a ventilated area.

I suspect its quite important the sensor you pick will fail, if it fails, by falsely indicating flood, so electrodes
in a protective open tube might be good - any kind of damp and you'll tend to get leakage current, but you'd never see a completely open circuit with two wet electrodes.  No moving parts to sieze up, and using it is simple, just
apply 5V through a 100k series resistor and measure the voltage across the resistor (in effect
the current through the resistor by proxy), and threshold.  Remove the voltage when not actively
measuring to prevent electrolytic action.  A capacitor across the resistor can remove any ac or RF pickup
signal.

You can test the thing easily in situ (using a cup of water).
Title: Re: Water/flood sensor?
Post by: wildbill on Jan 08, 2019, 02:03 pm
I'd be inclined to get something designed for the job - bilge pump float switch.
Title: Re: Water/flood sensor?
Post by: wvmarle on Jan 08, 2019, 02:10 pm
+1 for a float switch.

Hermetically closed; usually based on a fixed reed tube with magnet attached to a float. Water level rises, float is pushed up, magnet closes the switch (or opens it, depending on the design).
Title: Re: Water/flood sensor?
Post by: MarkT on Jan 08, 2019, 02:21 pm
I'd be inclined to get something designed for the job - bilge pump float switch.
Slightly different job I think - the one thing you want from a flood detector is reliability after
years/decades of time without any maintenance or even any regular testing - you can put up
with occasional false positives, but a false negative is extremely bad.   Anything mechanical
is subject to build up of dirt, corrosion, rodents, you name it.

I cannot imagine a situation where two metal electrodes will fail to conduct submerged in water,
however badly corroded, gummed up with crud, infested with insects/rodents.  Seems pretty
failsafe, the wires connecting them are then the reliability issue, not the sensor.

In fact a conductivity sensor is quite likely to give false positives when dirt or corrosion or whatever
affects it, so it will self-diagnose deterioration.
Title: Re: Water/flood sensor?
Post by: Doug101 on Jan 08, 2019, 06:39 pm
Interesting discussion....  The problem I see with exposed electrodes in the build up of minerals and electrolysis of the electrodes.  This is rain/ground water and on the plastic bub there are mineral deposits.   I had a bilge pump switch.  This is a mechanical switch, and for some crazy reason it turned into a resistive load.  Maybe water got into the switch mechanism.  Anyway it failed.  I'm inclined to go with the float with a magnet and reed switch type,

Looking for longevity.  Maybe what I will do is use two or three so if one fails I have some redundancy.
Title: Re: Water/flood sensor?
Post by: wvmarle on Jan 09, 2019, 02:56 am
MarkT (#4) has a point when it comes to reliability as this is a float switch that in an ideal world would never be triggered. That is a potential issue for reliability, as it being triggered regularly means you're basically testing it regularly, and a float switch is a mechanical thing that can get stuck when not used for a very long time.

For probes, safest to go for copper. Pretty resistant to corrosion, and at least it's the same metal as your wires so no galvanic corrosion issues combinations of metals are prone to. Place them close together in free air, and make your sensing quite sensitive: this way you would start to sense conduction from wet spiderwebs in between (a false positive once or twice a year is not that bad, it prompts you to clean the thing). Maybe a 100k pull-up resistor and using an analog input (so even if you have a 1M resistance between the probes you can easily sense it - you don't need instant reaction anyway).
Title: Re: Water/flood sensor?
Post by: Nick_Pyner on Jan 09, 2019, 03:42 am
Slightly different job I think - the one thing you want from a flood detector is reliability
Sounds like the description for a bilge-pump switch to me. The only "difference in the job" is that, if the switch fails, the ship sinks.
Title: Re: Water/flood sensor?
Post by: Doug101 on Jan 09, 2019, 05:01 am
In my case the basement flood.  We had rain yesterday and the pump (which I just purchased 3 years) failed.  Had almost 2 feet of water in my basement swimming pool.

The pump before that failed not because of the pump, but the float switch.  I opened it up to find one of the caps had exploded.








Title: Re: Water/flood sensor?
Post by: wvmarle on Jan 09, 2019, 05:19 am
Makes me wonder what kind of high-tech float switch you had that it includes capacitors.
Title: Re: Water/flood sensor?
Post by: Nick_Pyner on Jan 09, 2019, 05:25 am
I'm afraid I don't understand that. I understand our bilge-pump switch is nothing more than a magnet and a reed, no caps, and it just needs occasional checking that the arm moves. Don't ask how old it is, but ti works just like it is supposed to. You can get these little float switches for about a dollar on eBay. A float donut slides up a shaft, again magnet and reed - all well-sealed. They come in a variety of styles and lengths. Buy two and install in parallel.
Title: Re: Water/flood sensor?
Post by: Doug101 on Jan 09, 2019, 06:08 am
The bilge pump switch I had used a snap action micro switch.

I'll post some pictures of the sump pump switch so you can see the cap.  There's a relay in there too.  And all of this can be under water.
Title: Re: Water/flood sensor?
Post by: sibin_lal on Jan 09, 2019, 09:21 am
float switches would be more reliable i guess compared to the HC-SRO4 . if you really want an ultrasonic sensor then water proof the PCB area or else go for a sealed unit .

i use both float (upper and lower cut off) and ultrasonic (water level ).
Title: Re: Water/flood sensor?
Post by: wvmarle on Jan 09, 2019, 10:56 am
Advantage of the ultrasound sensor is that it's actively used all the time so you can detect when it's broken (it's not likely to last very long in such an environment, unless you get a waterproof version).
Title: Re: Water/flood sensor?
Post by: Doug101 on Jan 09, 2019, 01:28 pm
A cup of water is a false test.  As mentioned previously this is rain water which has passed through dirt so I;m sure it's full of anions such as Calcium, Iron, Mangneese and other ions.  Only way  could test would be to have the electrodes sitting in the muddy water for a year or two to see how corroded they will beome.  If electrodes were to be used isn't there a current always passing between the two electrodes?  Seems to me a little electroplating would be going on.

For less than $5.00 I can get a stainless steel float.  And for less than $7.00 I can get a double stainless steel float.

https://m.banggood.com/50W-220V-Stainless-Steel-Vertical-Liquid-Water-Level-Sensor-Tank-Pool-Internal-Floating-Switch-p-1031163.html?rmmds=detail-bottom-alsolike

https://m.banggood.com/200mm-Liquid-Float-Switch-Water-Level-Sensor-Stainless-Steel-Double-Ball-p-1009563.html?rmmds=search

I just think this would be far more reliable than a electrodes or a bilge pump switch.

And since no one has mentioned a ultrasonce sensor I guess I won't persue that.
Title: Re: Water/flood sensor?
Post by: Paul_KD7HB on Jan 09, 2019, 10:26 pm
I have a basement with a sump pump mounted two feet below the floor in a tube.  I'm looking for a way to detect if the water level has risen above a certain level.  (Sump pump isn't working).

Seems to me water sensor get corroded over time and become unreliable.  So I think that leaves an ultrasonic sensor to measure the water level or simple float switches?

Is one better/more reliable than the other?   

Easy to make stainless steel electrodes. Go to your local bicycle repair shop and ask for two or three old wheel spokes. Find nuts to fit the metric threads. Two per spoke. Fasten your copper wire to the spokes and put in your sump tube. Clamp to the side wherever you like. Hook wire s to Arduino.

Paul
Title: Re: Water/flood sensor?
Post by: Doug101 on Jan 10, 2019, 02:04 am
Defective float switch pictures.
Title: Re: Water/flood sensor?
Post by: Doug101 on Jan 10, 2019, 02:13 am
Defective float switch.
Title: Re: Water/flood sensor?
Post by: Paul_KD7HB on Jan 10, 2019, 02:14 am
Defective float switch.

Can't quite see what died. Is it the aluminum cap?

Paul
Title: Re: Water/flood sensor?
Post by: Doug101 on Jan 10, 2019, 02:18 am
I believe so.  See the bulging at the end of red arrow?  Not exactly sure how it works.  I wonder what's in the float to trigger the when to turn on and off.

Title: Re: Water/flood sensor?
Post by: Paul_KD7HB on Jan 10, 2019, 02:29 am
I believe so.  See the bulging at the end of red arrow?  Not exactly sure how it works.  I wonder what's in the float to trigger the when to turn on and off.


Those are why Dell computers and a lot of other companies were almost forced out of business. The capacitors were defective when installed on the boards and over time heated and popped their corks. That is why I NEVER buy Dell. Had the same problem with a video board in the computer driving our selective soldering machine. No replacement boards were available. But we had a bunch of new, very similar caps and swapped them in. 5+ years and no failures. Bet you could do the same with the switch.

Looks like that device has a reed switch or two and a magnet in the floater.

Paul
Title: Re: Water/flood sensor?
Post by: wildbill on Jan 10, 2019, 01:59 pm
Although I recommended a bilge pump detector, what I actually use in my own basement for a similar purpose is a raspberry Pi and a raindrop sensor.

It seems to me though, that what you really need is some failover in the shape of another sump pump  :)
Title: Re: Water/flood sensor?
Post by: Doug101 on Jan 10, 2019, 03:36 pm
I could replace the cap, only problem I would have is I can not make the switch watertight again.

I am curious if replacing the cap would fix the problem.  Symptom is once pump is off until the water level rises and pump turns on.  Once water level drop, pump will not trun off. 

I'm really curious, I"m thinking they must be using something like relay logic with a two inputs with on bit of storage.

Never really thought about it but a bilge pump uses is a single SPST switch.  The lever action of the float allows the pump to turn on at height greater than wher it would turn off.  Similar to how toilet tank shut off vale's work if they are on a lever arm.

Anyone know what the logic is of a pump float?  I"m thinking it"s a latching really circuit.

Two reed magnetic switches and a relay, DPDT.  As water rises S1 closes followed by SW2.  SW1 is NC and sw2 is no.  When water is high SW2 close pulling in the relay contacts turning on the pump with contact 1.  Contact 2 is used to latch the relay with SW1 which is NC in the normal condition as the float with magnet is out of range.  As water level drops past SW2 relay is latched until float with magnet reaches SW1 which them opens interrupting current flow to relay coil.

When relay is not engaged state of SW1 doesn't matter because it is in series with the relay contact.  Only way for relay to be engaged is if SW1 is in normal state, NC and relay coil is engaged.  This only happens when float is at SW2 to and closes switch contacts and energized.

I hope I got that right.