Go Down

Topic: What components do I need to automate electric pump at home (Read 607 times) previous topic - next topic


do you have full access to the main tank ?
are you allowed to insert things into it ?
can you drill a hole in the side (optional)

same questions for your upper tank.

the motor drives the selection of relays.  you need to know how much power your pump needs.
if, your switch is low voltage, like a door bell, then a simple relay might work.

I would offer that some PVC pipe and a vertical float switch  float
would work.

you can screw them on a cap and insert the pipe.  if you want 2 heights, a full and half. you can use 2 pipes or a tee and a second drop.

all the wire is inside the pipe and the devices are easily cleaned.

if your switch is low power, you can use a simple to use RELAY BOARD

this has screw terminals for all wires. 
it does not use square pins as connectors, so it makes use more permanent.
if you want to solder your wires, you can get the type with square pins and not use the pins, just solder the wires

I suggest you put the relay into an electrical box of some sort.   the ones you use for a light switch are often low cost, come in plastic and you can easily get a cover.   

I prefer the NANO for permanent installations because you can use this shield


Hi Paul,

Thanks for your answer, it is really helpful. I looked around for some of the components you mentioned. I have selected this starter kit so far https://www.amazon.co.uk/gp/product/B01DGD2GAO/ref=ox_sc_act_title_2?smid=A1780XYQ9DFQM6&psc=1

and this ultrasonic sensor might help perhaps : https://www.amazon.co.uk/gp/product/B0066X9V5K/ref=ox_sc_act_title_1?smid=A2TQ95NU5WM0M3&psc=1

I couldn't find relay switch you mentioned. May I know where can I find this type of switches?
if you feel the need for ultrasonic to get an actual tank level. then you should get a WATERPROOF ONE.
I like this because the sensor can fit into a PVC pipe and is tight.  you can use PVC pipe to hold it in place.
the sensor has to be at least 10-20CM above the highest water level.  there is a dead zone for the first 10-20 cm distance.


If the upper tank is full the pump should not run.
If the lower tank is empty the pump should not run.
Otherwise it can run.

upper tank not full says run the pump
lower tank not empty says run the pump
if both upper AND lower tank switches are ON the pump runs.
if either switch is OFF the pump don't run.

5V ----------/ upper tank sw  -----------/ lower tank sw  --------motor relay----- GND

The long wires should not carry the motor power, can be thin.

You do not need a controller. Just wire your switches to open on the right conditions.
The job itself is simple, logic in wire as a single AND gate made of 2 switches in series.
Only when both are on does the pump run .. but you could add a manual on/off in parallel.

Series and parallel wiring will come up when/if you learn circuitry to connect pins to.

Float switches -- upper tank gets the short string and needs to turn OFF when weight comes off.
Lower tank needs a long string and needs to turn OFF when weight comes on.

If the float hangs from a spring conducting one side of the switch so it lowers if the weight of the float is held by the string, water is lower. Another spring conducting the other side of the switch set crosswise to the float spring can be placed above to be ON when the float floats and OFF when it hangs or placed below to work the opposite way. Springs will work for a long time but will need some cleaning now and then, make the switch a removable unit if possible and use a drop of vinegar to knock any corrosion off or a pencil eraser will do, works great on fingerboards and pins.
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.


I agree with GoForSmoke

If you use a float switch as shown in post #15
or better yet, the type that mounts horizontal, but you have NO or NC depending if the float rises or falls to open the contacts.  you just spin it 180 degrees.

Some PVC pipe some Tee fittings and some elbo fittings, and some end caps.
you can mount the switch on the end cap

mounted pointing up and it has the switch closed,   or NC
pointed down and the switch is open or NO

in the lower tank. the switch is pointed down.    the switch is open until the water is high enough to float the switch.

so there is no signal from the lower tank unless the water is high enough.

in the upper tank, you would mount the switch and point it up.
it would always close the circuit, unless there was water.

these connect to the relay and a power source.  

when the lower tank is empty, the float is down and does not pass power.  the relay is not energized.
when the upper tank is full,the float is up, and does not pass power, the relay is not energized.
when the lower tank water level floats the switch, the switch passes power to the float on the upper tank.

when the upper tank is empty, the float is down and it does pass the signal.

therefore, with the lower tank full and the upper tank empty, the signal will pass.
the relay will be activated and the pump will run.

When either switch changes state and opens the circuit, the relay will de-energize and the pump will stop.

the relay can be 12 volts or 5 volts and you will only need resistors to make the circuit part to activate the optocouplers on the relay board.

The beauty of this is that the unit does not draw any power unless the system is calling for the pump to run.
There is not need for any special power supply either.  and you can add an LED into the unit.

this will run, day or night, anytime that the lower tank is full and the upper tank is not.


The whole rig can be run by a simple house timer to be active at chosen times.

And no code anywhere in sight!

There are situations that organize themselves.
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

Go Up