sounds like you're basic thinking is correct. I would build in some form of redundancy for the tank full scenario just in case the level switch fails.
Either just a secondary full float switch THEN maybe some form of overflow mechanism (just in case both water level sensors fail) along with starting a timer that trips after x amount of time should the water level sensor(s) fail to turn off the power relay
I can't see any reason to involve electronics. Surely, all it needs is a float switch to turn the pump on/off. I have no idea what size of pump you're thinking of, but bilge pumps and so on routinely have a float switch wired in as standard.
Our setup uses a float valve to regulate filling of a 1,000 litre tank. The pump in turn is controlled by a conventional pressure switch. When the float valve closes, the back-pressure rises. When the pressure tank gets to 3 BAR, the pump kicks off. I have been considering a solar powered rig for filling the tank, which would be more complicated. Rather than a 3/4 HP jet pump, it would be a 12V diaphragm type sprayer pump. The the logic for running the pump would be more complicated -- based on the water level in the tank and the state of charge on the batteries. For the tank water level sensor, I was still thinking of a simple float switch though.
what about the output of arduino? im assuming its a 24 volt max? in which case I'd need to use a relay to close in the pump circuit?
and a single float isnt possible; the pump would just vibrate (off on off on off on) its a 50 gallon tank; i want it to start filling when empty and stop when full.
i like the idea of a backup of a timer though.
Arduino digital pin output is 5v so you will definitely require a relay to switch your pump. Remember to use a diode in the digital output to prevent damage to the arduino when your relay coil de-energises. Plenty of example on these forums.
I should have added. I am running with a project now using a Maxbotix ultrasonic sensor to measure water in my tanks.. Quite accurate and easy to interface with.
illinox:
I want to build a system to fill a water tank when it's empty and stop the pump once it's full.
i figure i can use two level sensors a and a relay to close the pump cct.
i am currently working on a similar project for my fish tank i have one tank with live fish one filter tank and one top off tank. Each tank has 2 float sensors a low and a high. Between :00 and :15 and :30 and :45 the cycle runs. Each pump has a relay when main tank high float sensor is HIGH run main tank pump...when filter tank low float is HIGH run filter tank pump....when main tank low float is LOW kill main tank pump...when top off tank low float is HIGH turn on return tank pump...when filter tank high float is HIGH kill main tank pump....when main tank high float is HIGH kill return top off tank pump
the concepts works well the only problem i had was with regard to the float switches when the pumps would run it would create small waves in my water which caused the switches to go HIGH and LOW making my relays flip on and off which was both annoying and inefficient
so i redesigned my code with a time factor similar to blink without delay example using millis
and for me a 5 second continuous sensor reading aka a float switch would have to stay HIGH for 5 seconds for o perform .....I have not tested this extensively but i may add another float to my main tank (the only one that fills clear to the top) as a safety
With the low voltage system you may want to keep the tank near full in case you wind up with a period of no sun/wind. It will mean tha the tank stays nearly full all the time, but it gives you a buffer when the sun doesn't shine. It also means your pump will run more often, but for less time which means that the pump motor won't get so hot and will last longer. The AC pump can fill the tank rater quickly, but the small diaphram pump will take longer.