Pages: [1] 2   Go Down
Author Topic: Detecting Water  (Read 1642 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 46
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26956
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you just directly ground the pulled up input pin, do you see a low then? Maybe the problem is not the water.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 46
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26956
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 46
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26956
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes - wet your fingers & try it. Will make you more conductive & give better results.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 619
Posts: 33975
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Swannanoa, New Zealand
Offline Offline
Full Member
***
Karma: 1
Posts: 202
New To Arduino (and C)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Will the capacitive sensing work.??
http://arduino.cc/playground/Main/CapSense


Mark
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26956
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

For detecting water?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Swannanoa, New Zealand
Offline Offline
Full Member
***
Karma: 1
Posts: 202
New To Arduino (and C)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 619
Posts: 33975
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Swannanoa, New Zealand
Offline Offline
Full Member
***
Karma: 1
Posts: 202
New To Arduino (and C)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 619
Posts: 33975
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Physics...isn't that the subject of wobbly theory.
No it's the sub branch of mathematics that happens to deal with reality.  smiley-razz
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 301
Posts: 26226
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could you measure angular deflection of some dowsing rods?
Logged

"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.

Humboldt, CA
Offline Offline
Full Member
***
Karma: 2
Posts: 223
Arduino BBB
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Pages: [1] 2   Go Up
Jump to: