Project:
Incorporate a arduino system to activate a solenoid driven ball valve when water gets to a maximum height in a tank using a sensor activated by floating switch; and is then reversed once the water has drained out and the float switch hits another sensor at the minimum water depth.
Water will be coming in at a consistent rate to fill up the tank after the ball valve had been closed.
I have attached a sketch of the tank at different water levels.
I am a humble newbie at this with a wide imagination so I'm not to sure there are even sensors out there that would do this but any advice helps.
Ball valves are normally quite heavy to maneuver. So consider using a stepper motor, a gear motor or a servo instead. All these 3 should have enough torque to turn the valve.
Abuto the senors: Its a quite clever idea to use a single float. I dont know if such a thing exsists but i can be easily built using a pice of tube, 2FC's and a float.
PM me if you need more specific help
I actually run a produce farm that uses automatic bell siphons in some media beds and we are trying to find a more reliable way to fill up our tanks and then quickly draining them so the tanks can be aerated.
If you actually want this to work, rather than just tackling it as an academic exercise, then I would set up a simple relay based controller. Far easier to design and test and no finicky electronics to worry about every time it rains or you have a thunderstorm.
The basic design would be a self-energizing relay triggered by the 'high' switch which opened the valve. Because it was self-energized, it would remain triggered after the high switch has opened.
The self energizing circuit would go through the low float switch so that when the low switch opened the relay released, causing the valve to close. Two relays, two float switches and a few wires.
The behaviour you're providing is almost identical to automatic flush toilets and if the flow rates are suitable you could just use one of them to fill and drain the tank. That would be a purely mechanical solution, no electrical parts at all.
I like to use a microcontroller even if a simple circuit will do the job. Reason being, you can easily set safety timeouts (pump running for more than X minutes? Something's wrong, shut it off!) and do useful things like alert people to problems (by flashing an LED or sending a message through an RF interface etc) or gather statistics.
Thanks to some help, another idea emerged.
Would it be possible to enclose 2 hall sensors in a PVC tube (one at the bottom and one at the top) and attach a float able magnetic ring on the outside of this tube so that when the water level raises, the magnet floats up until it reaches the threshhold of the top hall sensor. Once it hits that threshold the sensor sends back information to the arduino which then takes that information and activates the solenoid on the valve to open. The water then drains out until the magnetic ring floats down to the lower hall sensor which trigger the valve to shut.
Questions
Is there a program I could upload to the arduino to perform these tasks?
Would i be able to run this system off of a 120v plug to operate that solenoid?
If I had 10 of these same set ups, would I be able to connect all 10 valves and 20 hall sensors off of one microcontroller?
coastalmbraud:
Would it be possible to enclose 2 hall sensors in a PVC tube (one at the bottom and one at the top) and attach a float able magnetic ring on the outside of this tube so that when the water level raises, the magnet floats up until it reaches the threshhold of the top hall sensor. Once it hits that threshold the sensor sends back information to the arduino which then takes that information and activates the solenoid on the valve to open. The water then drains out until the magnetic ring floats down to the lower hall sensor which trigger the valve to shut.
Sure.
Is there a program I could upload to the arduino to perform these tasks?
Yes, the standard IDE will work to upload the code you write.
Would i be able to run this system off of a 120v plug to operate that solenoid?
The Arduino runs and controls +5VDC only. To run it from 120VAC will require a power supply, and to control 120VAC loads will require something like a relay module or solid state relay.
If I had 10 of these same set ups, would I be able to connect all 10 valves and 20 hall sensors off of one microcontroller?
Standard Arduino Uno has 14 input/output pins. So, not that one. However an Arduino Mega has 54 I/O pins and would suffice.
So the Solenoid is really the only thing I have to worry about going over on the power. Each solenoid is 24V, is that gonna need to have an extra relay module?
What are some good arduino compatible hall sensors?
coastalmbraud:
So the Solenoid is really the only thing I have to worry about going over on the power. Each solenoid is 24V, is that gonna need to have an extra relay module?
You can use any standard 120VAC relay to switch 24V on and off, but if you don't have a 24V power supply already you'll need to get one.