Overview
I needed a mechanism for controlling an electrical device (pump) on a water level, it was necessary that the pump is switched on when the level was reached, and works for a short time (20 seconds) and then it stops and the cycle, start again.I found nothing in shops that will make it at a reasonable price, so I had to make it myself. If this occurs to you, here's how I solved it.
The principle is simple, it detects the liquid level, the detection commands a timer that turns on the pump for a given time.
Water level detection
I opted for a very well known principle, high impedance of CMOS chips. From it's very simple to make a liquid detector with a simple NAND gate (¼ of 4011). If the water level rises, it brings 1 to the input of the NAND gate which is normally pull-down to 0 by a resistor of 100 KΩ. So we have a 0 at the output of NAND which act as an inverter.Timer
Tis signal is send to timer, but also to 2 others NAND gates mounted in an RS flip-flop to memorize in a LED the fact thatlevel has been reached, it's interesting to verify the system action without staying in front of. The RS flip-flop gota reset button to switch off the LED.No special tips, I have used a ultra-classical 555 timer, in reality a half 556 because it was the only one remaining in my boxes. Configured with a 1MΩ resistor and a 10µF capacitor, the delay is about 20 seconds.Power command
Output of 556 is not enough powered to switch a relay, so I use a classical transistor (BC 109) to command the relay, BC 109 is protected from coil relay by a diode 1N4148.It's so the relay who will switch on and off the pump during the 20 seconds, each time the high level will be reached.
Power supply
I recycle a mobile phone power suply that you, probably like me, have several in a box in your attic. About mobile phone, are you like me bother by the stupidity of mobile phone factory engineers who seems to be proud to make fully incompatible power supply, even in different models of the same constructor...
Imagine that's only for delivering a small DC power and it's impossible to have a universal socket and tension.I suppose it's an economic process too smart for me... I hope so.
Final schema
Conclusion
You have probably noticed that I have recycled the most parts of the system, that make a cheap whole, about $5, but it work fine since September 2009.