Electronics > Beginners
Water-detecting circuit activates on its own
(1/2) > >>
Kayamon:
Hi everyone,

I'm trying to build a little hobby electronics project but running into a complication (I'm a software guy normally, so a little out of my depth here).

My circuit is designed to detect the presence of water, and then run a 12V DC pump for a few seconds when it sees it. (schematic attached). I built the whole thing out on a small protoboard powered from a 12V wall adapter. When the water level bridges PORT1 and PORT2 (I used a standard 2-pin header for them) the current flows and activates the Darlington transistor, which then allows a signal to reach the microcontroller. The MCU then activates the L293D for 10 seconds which pumps the water back out.

So generally it works great. The problem is, sometimes it'll randomly activate even if there's no water there and I don't know why.

I'm wondering if it might be related to static electricity possibly -- I saw Dave's video where he caused a monitor to cut out by getting up from a chair, and I was able to get my circuit to activate using the same method.

Any ideas what things would cause it, and more importantly what do I do about it?  :)
Audioguru:
Your circuit uses DC that causes the sensing pins to become plated and corroded. You should use AC instead and an AC detection circuit.

Pure water (distilled) does not conduct. Salt water or acid rain water or tap water conducts.

Make your circuit less sensitive to interference by reducing the value of the 470k resistor (100k?) then reduce the spacing of the probes so that it is sensitive to the resistance of the water.
ledtester:
I don't know why your circuit is spuriously triggering, but I would suggest you use a capacitive sensor. Here's a video which explains why sensors based on allowing DC current to flow between electrodes is a bad idea:

https://bit.ly/2LwMTG0

And since you are using a microcontroller your sensor can just be a pair of insulated probes and a resistor. It's based on the idea that the capacitance between the electrodes will change when immersed in water. Here's an example of how to measure capacitance with an Arduino:

http://www.electronoobs.com/eng_arduino_tut10_1.php

The resistor and timing thresholds you use will depend on the construction of your probes - you'll just have to determine them experimentally.




Kayamon:
Electrolysis shouldn't be a problem -- the probes aren't in the water for any length of time. The moment the water reaches them, it drains the water right back out again.
ledtester:

--- Quote from: Kayamon on July 02, 2019, 08:49:20 pm ---Electrolysis shouldn't be a problem -- the probes aren't in the water for any length of time. The moment the water reaches them, it drains the water right back out again.

--- End quote ---

Sure - I'm a software guy too, and under ideal circumstances it wouldn't be a problem. Until the pump fails, or water enters fast than the pump can pump it out, or you leave it unattended and the pump gets triggered 20 times a day over a period of two years, or ...
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod