designing control circuits for watering system

Uber_Goober

Joined Jan 19, 2013
45
Hi I recently built something similar. I'm not controlling a pump, but I am turning on a solenoid valve when the water gets to the low level (my reservoir is nearing empty) and turns the solenoid valve off when it reaches the high level. I do use a water sensor- but only as an overflow detector. I found the water sensor circuits tricky and all the examples I could find online didn't quite work for me. After playing around I finally made one that seems to have just the right level of sensitivity. For the water level sensors I started with hall sensors and planned to have a floating magnet that would trip the high/low sensors. But this started to get too elaborate (fabricating the track for the magnet to float in etc) so I instead used an off the shelf float switch designed for aquariums. These come in all sorts of configurations and sizes. It cost a bit more than my hall sensor approach, but saved me a lot in frustration. I have these wired into an 8-pin PIC microcontroller. This thing is just awesome. It costs about a buck and lets me do much more than I could do with discrete parts. For example, I have a timer going during the filling and if it fills for too long it will assume something is wrong and stop filling. To power the solenoid valve, I'm using a logic level MOSFET instead of a relay. It works perfectly. When I layed this out on a PCB with SMD parts, I ended up with a board thats only 1" by 0.75", and it works perfectly. It draws almost no current when its idle, and when its running the only thing drawing appreciable current is the solenoid and a little indicator LED. The rest of the circuit hardly uses anything. They also do have latching solenoids that could eliminate the current draw when its on, but that wasn't a design concern in my case.
 
Top