water sensor

I’m building an Arduino water detector and could use a little expert advice as my electronics is v weak!

Here’s the circuit which works when the probes are in direct contact with each other but lacks sensitivity with water (even with a bit of salt in).

I read D10 (it is set as input_pullup) and D11 acts as the voltage output which switches on to take the reading and then off to avoid electrolysis.

Do you think I should vary the resistance or put it on the D10 line? I would like to keep the circuit as simple as possible so prefer not to add a transistor as amplifier.
image

Hi Andrew,

Your sensor idea may corrode in the water quite quickly (more-so with electricity involved). I recommend using a float switch such as:

It will close a switch when the water activates it. Plus, it will last for a very long time.

thanks for this. It is actually an alarm so it will sit dry all the time. Only if fluid enters will it be subject to electrolysis and then it won’t matter. Its part of another device, so it needs to end in two wires that are detecting the fluid.
cheers Andrew

I think I’ve answered my own question. I had the resistor between the input pin D10 and the connection to the power pin rather than as in the diagram. After swapping to the configuration in the diagram it is now much more sensitive. I suppose that pull down to ground is easier with no resistor intervening?

I would have gone about it differently, as I’d prefer not to be banking on the conductor being in the same perfect-state from day zero (especially if liquids are involved). Just a small amount of corrosion will throw the resistance around a lot.

With that said, DIY often leads to all sorts of creative solutions, all the best with it :slight_smile: