Author Topic: Detect prescence of water between 2 probes  (Read 3505 times)

0 Members and 1 Guest are viewing this topic.

Offline HDL_CinC_DragonTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Detect prescence of water between 2 probes
« on: November 07, 2007, 03:12:15 PM »
What would be the easiest way to detect the presence of water between two metal probes? Can I simply have it so that one probe is constantly supplied with regulated 5v and have a second probe About 5-10mm apart connected to an input pin that the software is constantly checking for a voltage level on the ATMega?

Heres an MSPaint example of what I mean for the most part - I think you'll get the idea =)

Red "wire" = 5v regulated wires
Black "wire" = GND
Green "wire" = Input wire from probe to MCU
Blue "wire" = Input wire from probe to MCU

Basically when the MCU detects zero voltage from the Green wire input pin (The bottom probe) it tells the MCU to open the fluid valve to allow water into the tank. When the MCU detects voltage from the Blue wire input pin (The top probe) it tells the MCU to close the fluid valve again to cut off the flow of water into the tank.

It would also be nice if the MCU could keep track of how long the fluid valve is open for so that if its open for a ridiculous amount of time (say 10 minutes if its only supposed to take say 5 minutes to fill) it can go into an error mode where it just flashes an LED and/or pulses a piezodisc so the user knows something is wrong and can either reset on false alarm or after fixing the problem.
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline nottoooily

  • Full Member
  • ***
  • Posts: 91
  • Helpful? 3
Re: Detect prescence of water between 2 probes
« Reply #1 on: November 07, 2007, 07:01:33 PM »
That should be fine for a normal CMOS input. You'll have to have a pulldown resistor of fairly high value on the input. Some quick R = resistivity * length / cross-sectional area   calculations would sort out the details of electrode size and resistor value.

Also salt water is much more conductive than tap water.

I don't think damage due to elecyrolisis will be a problem because the voltage is too low when conducting. There may be some other corrosion/contamination mechanism but I can't think of any.



Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Detect prescence of water between 2 probes
« Reply #2 on: November 07, 2007, 07:06:21 PM »
Just use the photoresistor schematic:



But instead of a photoresistor, let that circle be the tank of water. If the probes detect no water, Vout will be ground. If there is water, Vout will be some other voltage - depending on the resistance of the water.

(Vin is a probe connected to 5V and Vout is a probe connected to the ADC of your microcontroller)

Offline Kohanbash

  • Supreme Robot
  • *****
  • Posts: 430
  • Helpful? 1
Re: Detect prescence of water between 2 probes
« Reply #3 on: November 07, 2007, 09:39:07 PM »
Watch out since the resistance of spring/purified water can be very different from tap water.
This can range from very low resistances to very high (like an open circuit) resistances
Robots for Roboticists Blog - http://robotsforroboticists.com/

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Detect prescence of water between 2 probes
« Reply #4 on: November 08, 2007, 05:58:49 AM »
If the resistance is too high, just put an op-amp on Vout to amplify the signal.
« Last Edit: November 08, 2007, 05:59:52 AM by Admin »

Offline HDL_CinC_DragonTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: Detect prescence of water between 2 probes
« Reply #5 on: November 08, 2007, 07:19:53 PM »
Yeah im aware that the resistance of water is different depending on its source and such and im also familiar with the corrosion that Electrolysis can do to metals and such.
I have 12 seperate "tanks" of water that need to be monitored and regulated but luckily they all get their water from the same source, I was planning on taking my DMM and just measuring the resistance value of the water with the probes at different lengths apart to find that "sweet spot"...

Thanks for the help and input guys =) I should be able to get this working =)


-EDIT-
Oh yeah, Admin: I thought if something had a direct route to ground it was a bad thing? doesn't that cause problems for the battery or anything? Or is that why there is a resistor in series?
« Last Edit: November 08, 2007, 07:29:00 PM by HDL_CinC_Dragon »
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline ed1380

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: Detect prescence of water between 2 probes
« Reply #6 on: November 08, 2007, 07:45:09 PM »
why not do something like in car gas tanks?

there is a float at the end of a X length rod. and the rod is connected to a rotating pot

Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Detect prescence of water between 2 probes
« Reply #7 on: November 08, 2007, 08:33:13 PM »
Quote
doesn't that cause problems for the battery or anything? Or is that why there is a resistor in series?
Yeap, thats why there is a resistor in series (but also to create a voltage divider). Select the resistor exactly the same way as if you were to use a photoresistor.

Offline HDL_CinC_DragonTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: Detect prescence of water between 2 probes
« Reply #8 on: November 08, 2007, 09:39:16 PM »
@Ed:
Thats a pretty good idea... Ill experiment with that idea a bit more too =) Thanks!
United States Marine Corps
Infantry
Returns to society: 2014JAN11

 


data_list