You could use the ADC input, or use the input as a digital pin. Essentially, the resistor between the pin and ground, and the water body would form a potential divider. With no water, your ADC reading would be almost, or equal to zero. When water bridges the probe, it should get close to the full Vdd (200+, for the resistor value I have used).
Alternately, if you're using the pin as a digital input, it would be low till water bridges the probe, and then swing high.
The 2nd version of the schematic would be even better, where you control current going thru' the water, as you could reduce the corrosion by a very significant amount.
BTW, please excuse the shabby drawing, thought it would be faster than drafting it.
Regards,
Anand
Bookmarks