Go Down

### Topic: Detecting Water (Read 2412 times)previous topic - next topic

#### bfrye

##### May 24, 2011, 09:41 pm
I have seen a number of circuits that detect water. I am looking for one that is SUPER simple and hooked to a digital IO line of an Arduino. If I put one end of a volt meter on a batteries +5, and the other end of the DMM in the water along with the negative side of the battery - I can measure the voltage of that battery. However, with the Arduino, if I put ground in the water, and a digital I/O line (internally pulled up) in the water also the I/O line does not go down. I assume it can't overcome the internal resistor? (pardon my complete ignorance here, I'm a software guy trying to learn this). Can I instead use some other external resistor to make this work? Thanks all,
Brandon

#1
##### May 24, 2011, 10:27 pm
If you just directly ground the pulled up input pin, do you see a low then? Maybe the problem is not the water.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### bfrye

#2
##### May 24, 2011, 10:32 pm
Yes - if I directly ground the pin it works as expected. For grins and giggles I put in a 1M Ohm resistor - this seems to work as I would expect/want it to now. However, I am not confident in it because I simply don't understand all that is going on!

#3
##### May 24, 2011, 10:44 pm
Really? (as in, "wait, what?") 1M gave you a low?
With 5V source and 25K internal pullup, Vpin = 5V*(1M/(1M+25K)) = 4.8V, I wouldn't have expected to see that as a Low.
I would expect water with any impurities in it to have lower resistance.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### bfrye

#4
##### May 24, 2011, 11:20 pm
Sorry, my bad - I should have been more clear. I changed my setup a little bit. So here is my current setup...

PIN0 pulled to ground with 1M Ohm resistor.
+5V (from Arduino board) placed in bowl of tap water.

PIN0 put in water - it goes HIGH
PIN0 out of water - it goes LOW

Touch PIN0 to my finger and 5 Volts to my finger, PIN0 goes HIGH/LOW unpredictably (this is why I am concerned this 'circuit' is not reliable. ANy thoughts?
Brandon

#5
##### May 25, 2011, 05:47 am
Yes - wet your fingers & try it. Will make you more conductive & give better results.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### Grumpy_Mike

#6
##### May 26, 2011, 05:41 am
Quote
PIN0 goes HIGH/LOW unpredictably (this is why I am concerned this 'circuit' is not reliable. ANy thoughts?

Yes it will, 1M is too high to pull a floating pin low.
See:-
http://www.thebox.myzen.co.uk/Tutorial/Inputs.html

#### markB

#7
##### May 27, 2011, 01:01 am
Will the capacitive sensing work.??
http://arduino.cc/playground/Main/CapSense

Mark

#8
##### May 27, 2011, 02:23 am
For detecting water?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### markB

#9
##### May 27, 2011, 09:34 am
Thats what the ?? was.
As I understood the writeup about how it works, the capacitance makes the receiving pin slower to reach the high, and the processor detects this.

In theory if the touchpad is in water, then it should also impart some capacitance.

The spa pools I dealt with used AC and a opamp to detect that it was getting 'shorted out' by the presence of water, and would therefore allow the heating elements to work.

The other option is to use ADC and detect a lower voltage when it gets 'shorted out' by water.
In this case you wouldn't necessarily want the internal pull-ups turned on.

Mark

#### Grumpy_Mike

#10
##### May 27, 2011, 10:00 am
Quote
then it should also impart some capacitance.

A bit wobbly on the physics there.

However a connection to the water will allow it to act like one side of a capacitor.

#### markB

#11
##### May 27, 2011, 10:15 am
Physics...isn't that the subject of wobbly theory.

Yes the impart isn't quite the right term.
I think the ADC bit is probably easier to process if there is a pin free.

Mark

#### Grumpy_Mike

#12
##### May 27, 2011, 11:17 am
Quote
Physics...isn't that the subject of wobbly theory.

No it's the sub branch of mathematics that happens to deal with reality.

#### AWOL

#13
##### May 27, 2011, 12:25 pm
Could you measure angular deflection of some dowsing rods?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

#### Bobnova

#14
##### May 27, 2011, 05:27 pm
Capacitive sensing out to work, I haven't tried it for that use specifically, but when it's in contact your entire body of water will be acting as a capacitor.  That ought to have at least a bit more capacitance than just the leads!

Go Up

Please enter a valid email to subscribe