detecting water - Page 1
Forum section: electronics / projects

author: Simon
author_rank: Unknown
timestamp: March 10, 2010, 07:00:26 pm
content: ok this post is part academic but if a simple solution is found I may impelment it (just to show the idiots at work what an ass we made of ourselves in choosing the supplier)Now we (my company) design and build air conditioning for vehicles, we have units that had a problem with condensation turning the air con into a shower ! so two small pumps were installed to pump out condensation from the bottom of the unit, the pumps came with sensors that go in the base so that when water is between the electrodes in the sensors the pump that has sensing electronics starts pumping the water out.Just one snag these stupid things just pump at any random time until they run dry ! and burn out due to overheating.Now I heard the guy that supplies these saying something about the circuit in the pump turning the DC to AC so assume a section of the circuit is generating pulses for another section to pick up, this now means that when one pump goes off the other one in the same unit (there is a left and right pump) also goes off, it would seem in his opinion that one pump is picking up the signal iradiated by the sensor wire of the other (like arials).Surely this is simple ? to detect water isn't it sufficient to have a DC detection method that will use the small current passed by water to say run the base of a darlington transistor so that it can then set off other circuitry ? like a mosfet ? or is there something really that tricky about picking up water.I'm going to have a play around myself - any comments welcome

author: Simon
author_rank: Unknown
timestamp: March 10, 2010, 07:20:11 pm
content: well I have carried out an initial test: according to my meter the resistance of water with probes about 10mm apart varies from 2 Mohms with just tips imersed down to 700 Kohms with all of the bare probes submerged, so there looks like room for being selective about the depth of water before "ignition" the other thing is though I'm using tap water, now that's not the same as ondensed water is it ?Tap water = H2Ocondensed = HOany ideas ?

author: Simon
author_rank: Unknown
timestamp: March 10, 2010, 08:29:18 pm
content: well using tap water a single 2N2222 Transistor is sufficient to get a led to light, so there we have it !only thing is that my wire (breadboard jumper) in the water on the negative side has tiny bubbles rising from it, i suppose some sort of reaction , am I desolving my "probe" or just putting electrons into the water ?I expect to get this to work properly I would have to introduce a comparator so that I have a determined on/off at a set level of water

author: rossmoffett
author_rank: Regular Contributor
timestamp: March 10, 2010, 11:41:49 pm
content: Pure water is non-conductive, it must have some salt or sediment in it to conduct. You may find that method unreliable with increasingly pure water.Typically a water detector will use two plates and check capacitance between the plates. I have a friend who designed soil moisture sensors this way.

author: Simon
author_rank: Unknown
timestamp: March 11, 2010, 07:48:33 am
content: well it should be pure water as it is condensed water but from what I have seen of the units in operation there is dust/sand in the water collecting tray

author: DJPhil
author_rank: Frequent Contributor
timestamp: March 11, 2010, 09:13:40 am
content: I recently did a bit of research into rust removal and the like, so I might be able to help a bit.All manner of water you will experience in nature is essentially H2O with impurities. Water is very stable chemically as H2O where as HO is highly unstable and very eager to bond with something, so you won't encounter it under normal circumstances. Condensation can be more or less pure than tap water, it really depends on what else is in the air with it. I would guess that unless you are heavily filtering the air before it's allowed to condense you are likely to have enough impurities to sense it's presence with electricity.As for sensing water there's a decent writeuphereabout the LM1830 from National Semiconductor (datasheet) which is designed as an all purpose fluid level sensor IC. The application hints on the datasheet are excellent, and include electrode calculation and sensing other fluids as well as a heap of example circuits. It's possible that this is the actual IC used, you might be able to reverse engineer their sensor box if they haven't moisture proofed it with black goop. It might be properly designed, but it's probes are shorting somewhere or it's calibrated incorrectly and always thinks it's in a puddle. If you can find a problem with it you might have some good evidence to bring to your supplier, after all, you're doing their engineering for them!The bit about the AC signal involves extending the life of the probes used to detect the fluid, helping reducegalvanic corrosion. Galvanic corrosion andelectrolysisare closely related electrochemical concepts dealing with how electricity, metals, and conductive fluids interact. The bubbles you saw from your breadboard negative side (cathode) were hydrogen gas, the other conducting lead (anode) will produce half as much oxygen (remember, H2 O1). This is basicelectrolysis of water, and the presence of that oxygen in particular helps corrode the anode. Sometimes that's desireable, as withelectrolytic rust removal.Hope that helps some. Please let me know what you learn solving this, I'm actually planning to build an overflow sensor in a future project.

author: Zero999
author_rank: Super Contributor
timestamp: March 11, 2010, 09:36:01 am
content: Well I think you now know why DC shouldn't be used: it causes electrolysis, AC doesn't.The problem is that if a high frequency is used and the cables are long, capacitive coupling might cause false triggering.The only solution is to keep the cable as short as possible.Not that it matters because the circuit used to detect moisture is so simple that it can be made from SMT components, potted and put on a tiny PCB at the end of a long piece of cable.If a hex Schmitt trigger IC is too large, a tiny dual Schmitt trigger is available.http://focus.ti.com/lit/ds/symlink/sn74lvc2g14.pdfYou should be able to get a dual diode which will save space.

author: Simon
author_rank: Unknown
timestamp: March 11, 2010, 01:00:26 pm
content: Quote from: DJPhil on March 11, 2010, 09:13:40 amthanks for all you helpful info. unfortunately these sensors are comapny property and I'd need to take one home to properly analyze it (maybe swipe one this weekend) It's a case of getting the labels off to unscrew the box, the circuit is not protectd so easily accessible

author: PetrosA
author_rank: Frequent Contributor
timestamp: April 05, 2010, 03:06:36 am
content: This sounds like some serious over-engineering to my layman ears. Wouldn't it be easier to just let gravity rid you of the water? If there's enough of a bottom in the unit to collect water for a pump, shouldn't there be enough to drain it?

author: Simon
author_rank: Unknown
timestamp: April 05, 2010, 07:49:52 am
content: alas you are right and yes this is dick head over engineered. I think part of the problem is that it is a military vehicle so you can't just drill a hole in the side to put a drain tube through that would be the eaiest by far. they want the water to go up and out the roof where there is already a hole for other stuff.I did actually get that fed up that I took one of the pumps apart and I'm highly baffled by the diagram I worked out. To be blunt it is utter giberish, the only part that mkes sense is the mosfet/pump driver circuit, the "AC" is not rectified and it looks like the pic's own clock is being used as the signal but it seems tied to VCC via a resistor, basically a real mess, frankly I can't explain how it can possibly work at all let alone work. I'm positive this guy possibly did not design them but if he did he is an asshole !I'd love to go over the thing with a scope but I can't as it's not my job to trouble shoot this thing just send them back wen found faulty.my main gripe is that I cannot identifiy a distinct "ouput" and a distinct "input" and assuming he is using the clock of the pic as the signal it is not being retified

author: saturation
author_rank: Super Contributor
timestamp: April 16, 2010, 07:48:26 pm
content: Capacitance seems to be a reliable method to detect water.A comparator circuit can be used to detect the difference.Detecting resistance between 2 terminals has pitfalls, one being the electrolysis of ionized substances will cause deposits on the electrodes and foul the sensor. But, many consumer products are made using conductance, and work well.[edited, errors corrected, conductance not capacitance is more common in consumer water detectors ]

author: Simon
author_rank: Unknown
timestamp: April 16, 2010, 11:15:29 pm
content: well things have rather developed on these, as they have proven to be the cockup I have thought they were I was officially allowed to open one and take a look and report findings after showing the engineer (who really knows nothing of electronics) how I would design such a device.So how does capacitive water detection work ? we do have the extra challenge of the water being contained in an earthed unit (vehicle chassy - negative), would the capacitive method be suitable for a moving vehile on rough terrain ?

author: ElektroQuark
author_rank: Unknown
timestamp: April 17, 2010, 05:47:24 am
content: Quote from: Simon on March 10, 2010, 07:20:11 pmWater is always the same H2O. The difference between distilled water and the rest is that distilled/pure water hans't any salts disolved in it. Disolved salts makes water conductive, tap water has them.

author: Simon
author_rank: Unknown
timestamp: April 17, 2010, 06:47:57 am
content: when your in the desert I think you will have water with lots of crap in it so no need to worry

author: saturation
author_rank: Super Contributor
timestamp: April 17, 2010, 02:27:43 pm
content: Quote from: Simon on April 16, 2010, 11:15:29 pmHi Simon,I think yes as its a common method to detect bilge water in boats. See links.http://www.ece.msstate.edu/classes/design/ece4512/.../water_detector/LastFinal.pptBasically you use some known way to measure water purity and use these phenomena to detect water's presence.The easiest sensor to make is to detect conductivity.Pure ideal water has very low conductivity but its not zero. Typically worst case is 20 megaohms/cm between the contact terminals; after that contaminants will raise conductivity. In real world use, gases in the air, mainly C02, will dissolve in pure water easily and raise conductivity, so 'real world' water always has conductivity you can use to build an electronic detector.However, for a permanent installation, you need a sensor that won't foul; eventually the contacts of a conductance probe will need periodically cleaning or changing. To minimize fouling, design AC on the sensor probe to keep ionization minimal. This sounds like your device, my guess is your sensor is dirty causing it to still be on without water or its too sensitive and sensing humidity in the container. You could also have condensation inside the sensor or circuits, triggering it too.Capacitance requires more work and circuitry. The sensor is made of 2 parallel plates, and it compares water as a dielectric versus air. The no-go state is when the capacitance plates have only air, and the go state is when any water, pure or contaminated, appears between the plates. You want the sensor again to use AC, not DC, to prevent fouling of the plates.Here's a sample circuit but I think it can be simplified still:http://www.discovercircuits.com/PDF-FILES/capgage.pdf

author: saturation
author_rank: Super Contributor
timestamp: April 17, 2010, 02:45:57 pm
content: I typically don't build from scratch, but take modules and interface them together.If I were to build your circuit, I would buy something premade then improve on it for reliability, such as this it runs between $5-10, I own 2 already. Its main IC is CD 4069, both as the oscillator and the triggering circuit.http://www.basementwatchdog.com/water_alarm.htmYou can easily tap this circuit, and improve on its probes. The probes sense using DC. This model is rarely advertised but its superior to the Zircon because its cheaper, its probe is removable, extensible can be inserted into small crevices.DC is used in these consumer devices as 99.99% of the time, the device is dry, and in the standby mode, i.e., it has a fair low duty cycle. Thus, the likelihood of the sensors fouling is fairly small, and it can easily be cleaned to be workable again.But, in your need, it likely gets wet very often, and simply needs to shut off once all the water is pumped out.

author: Simon
author_rank: Unknown
timestamp: April 17, 2010, 03:33:09 pm
content: thanks for that link, so basically that highly solves my problem because we have an issue with the water being contained in a "ground" anyhow as the metal case the unit is made in is the vehicle chasis. I'm attaching the diagram I worked out of ous suppliers sensing circuit be not amazed it is the biggest pile of **** I have ever seen in my life, the sensor consists of a metal "U" stape peice of metal that has a small PCB in it holding 3 terminals and then the board is potted so you normally (when the idiot remembers to pot the thing) only see 3 terminals coming out of the potting compound. the things are tempremental at best. two of the probes are connected together, the use of 3 and not 2 still remains a mystery

author: Simon
author_rank: Unknown
timestamp: April 17, 2010, 04:41:56 pm
content: well having looked at the capacitive version you linked to I can see that this needs to be a little more complicated than what I or the supplier developed, We both used pic's and the reason being that the pump needs to run in cycles of 10 minutes on and 5 off to stop overheating, so the easy solution was a pic to run the timming (and yes he cocked that up too !). the capacitive method clearly need high impedence input circuitry that only op amps can provide as the beleive the pic ADC input is 250 ohms but in any case no higher than 10 Kohms. So while i would still need the pic I must introduce opamps, the convenient thing about the pic is that it will provide a 1 MHz output so saves some circuitry

author: PetrosA
author_rank: Frequent Contributor
timestamp: April 17, 2010, 09:28:44 pm
content: I had a thought - if you can use electronics to run this thing, why not have a probe measure ambient humidity which would control a programmed duty cycle for the pump? You could have maybe 3 or 4 duty cycles based on different ambient humidity levels and the pump would simply run by program instead of trying to figure out a dependable way to monitor the water levels inside the sump. It would also make maintenance easier since a humidity probe could be mounted somewhere relatively easy to reach. Just a thought...

author: Simon
author_rank: Unknown
timestamp: April 17, 2010, 09:36:50 pm
content: well firstly this needs to be inside the air conditioner unit anyhow so that the customer does not have extra work and we are certain that a malfunction is not due to poor installation. The other things is that if your sensing humidity you are not guaranteeing whether or not the sump has water in it and if the pump runs with no water it can overheat and burn out and makes a horrible noise when it runs dry as it is not a rotary pump

author: XynxNet
author_rank: Regular Contributor
timestamp: April 17, 2010, 09:49:23 pm
content: Maybe you could try to measure ir-absorption (900nm+), if the water collecting facility stays reasonably dirt free..

author: Simon
author_rank: Unknown
timestamp: April 17, 2010, 09:54:18 pm
content: I would not guarantee it dirt free, I saw a bit of grit in the units after just a bit of testing let alone field use and I mean literally field use, desert field use at that

author: PetrosA
author_rank: Frequent Contributor
timestamp: April 17, 2010, 10:38:55 pm
content: Quote from: Simon on April 17, 2010, 09:36:50 pmI don't know how fast it fills up or empties and it's capacity would be a deciding factor, but my idea is this:All programs would assume a full crew in vehicle (humidity to be removed from bodies)Program 1 would work between 0-35% humidity and would work the leastProgram 2 would work from 35-65% humidityProgram 3 would work from 65-100% humidityDuty cycles would only start when the AC is on and could be a short as you want to maintain whatever spread of levels in the sump can be tolerated. It would take some testing to determine the optimum duty cycles, but I think it should work and be more dependable than a level sensor system.

author: saturation
author_rank: Super Contributor
timestamp: April 18, 2010, 02:24:30 am
content: Quote from: Simon on April 17, 2010, 03:33:09 pmI'm short on time tonight just some quick thoughts on the schematic:This design uses conductance to trigger the PIC by putting 5V onto pin 2.This triggers Pin 7 to bias the MOSFET into conduction and the pump's negative terminal is now grounded. Otherwise, its floating? Floating grounds often cause problems; if water and high humidity enter the chamber were the pump stays it could ground itself and bypass your switch, causing the device to not shut off. Its better to switch the positive side of the pump power supply.Is this really an IRF540N MOSFET? The symbol used is unusual.

author: Simon
author_rank: Unknown
timestamp: April 18, 2010, 06:46:44 am
content: I'm not well up on mosfet symbols and the drawing software is the free express pcb one, it is indeed an IRF540N.What is amusing is that he told our engineer that the circuit "converts DC to AC puts it throught the water and then reconverts it to DC and detects the water", I see no diodes ! except for power protectors, I think basically he is relying on the water to "pull down" the input pin but he has forgotten that pic inputs are not high impedence like opamp and comparator inputs, I've also seen what I hope is a prototype of this unit that our engineer gave to me to look at. he put the filter capacitor for the LM78L05 quite a distance from the reg with an extremely thin trace to it and has only used an input cap and no output cap, the input cap is 25 V for a 24 V vehicle system, very helpful ! basically I get the impression he is designing with the mind of a teenager that is learning electronics. I know I'm no expert and that sets me ahead, I don't try stupid things without researching them first, if he came on the web and had a little look around or even read a damn 78L05 datasheet he would have not made so many basic errors, we have paid £ 60 a peice for over 200 of these pumps and circuitry and have just had to declare them unfit for purpose with many of them already on vehicles that we will need security clearance to access because they are now armed and full of high tech electronics that the goverment does not like showing every tom dick and harry.while this guy has spent 3 months trying to get the things to work amid lies about how he has the final fix I designed a perfectly competent solution in 2 evenings complete with cycling software !another thought I had for a capacitance detector, what if i formed a potential divider on the sensor and a know capacitor and rectified the output and sent it to the ADC of the pic ? or maybe this project needs an opamp stage aded to it for high impedence inputs ? an opamp could be configured as a signal rectifier at the same time couldn't it ?

author: Zero999
author_rank: Super Contributor
timestamp: April 18, 2010, 09:14:26 am
content: I have another idea involving capacitive detection.Build a similar circuit to the one I posted previously but rather than using discrete capacitors, use two large metal plates coated in an insulating material, such as two planes on a PCB with solder resist on top.This has the advantage of not having any exposed metal electrodes to get corroded by chemicals. You could use a double sided PCB, one side for the water sensor, the other for all the components which will be potted.

author: Simon
author_rank: Unknown
timestamp: April 18, 2010, 09:27:47 am
content: so if the electrode are coated they will still act as a capacitor ? that would be very good as it would eliminate the waters resistance from the equation. discussions about how to solve the particular problem my company has are academic as they are not officially looking to me for a solution and are thinking of having the water drain out of the sump into something like a car screenwash bottle with a pump in that, of course they still have to get that pump to detect water, the engineer told me to keep my ideas handy as they may need some input later. at the end of the day I could design the thing and the idiot supplier could make it for us. So the game is still a-foot even if for my personal satisfaction of getting it to work

author: Zero999
author_rank: Super Contributor
timestamp: April 18, 2010, 09:37:52 pm
content: It still relies on the conductivity of water, it's just that the solder resist and PCB ground plane is acting as a capacitor.However, I think water has a higher dielectric constant than air anyway so the capacitance should increase slightly even if the water isn't conductive.I think you need to perform some experiments to find out for sure but I'm sure it's possible.

author: MoJo
author_rank: Newbie
timestamp: April 19, 2010, 01:47:05 am
content: A little more info would be nice, as to what type of pump and what is its sensor? I think building another sensing mechanism when this should already contain one is not the right approach. It would be better to spend energy troubleshooting the current setup. Is the pumps sensor false triggering, or is it missing a comparator component that tells it the off state compared to the on state (what the PIC should be doing in this case, a voltage comparator would be better).I think the motors built in sensor is a pressure sensor, or it needs a pressure sensor to complete it (again more info would be great).Read up on Liquid Level Detecting, might be of interest to youhttp://www.freescale.com/files/sensors/doc/app_note/AN1516.pdfI'm a student going into the Biomedical field, (Medical equipment meets Electronics Engineering), we primarily always discuss the significance of sensors and sensor design. Another alternate approach which probably is simple but I would rank second after the above mentioned setup is to create a displacement based sensor, in this case a capacitive sensor. Having a top floating conductive material and an anchored bottom material you create a capacitor with changing distance of plates. This can be used to set a lower bound threshold that is checked every 10 minutes ... if it isn't met, than the pumps are turned on ... they only turn off when that threshold is met again.Hope it helps,EDIT: Oish, I should of read Hero999's post more clearly. He mentions exactly what I just repeated like an echo... but nonetheless a good idea still.

author: Simon
author_rank: Unknown
timestamp: April 19, 2010, 06:38:03 am
content: the pumps are reciprocal and are housed in a small plastic case along with the custom build circuitry and the sensor is in the sump. so far many ideas have already been tried to improve the current setup but it is now clear to us that the whole design is garbage and does not match what the supplier is telling us. Many have said in the workplace that a float sensor should have been used in the first place but as always with management and design the wrong people make the decisions. I think our engineer not having any real knowledge of electronics (although not wanting to admit it to the point he carries an oscilloscope he does not know how to use) and has trusted the supplier who seemed quite reputable and acustomed to these sorts of military projects. It is now chear that it is all garbage.My intent was to see if there are better methods of doing this, I came up with a similar circuit myself to the suplier but one that worked ! however as has been pointed out a capacitive sensor is best. How will a pressure sensor cope in a moving hehicle over rough terrain ? the ide is that this thing will be tipped all over the place.your pressure sensor looks interesting but having looked at your link a bit it says that the output is a very low voltage that needs amplifing, we already have an issue with interfearance i think the sensor output may be drowned in the surrounding EMI