Motorized valve 220V and garden pump control with Arduino

I have a little Arduino project in mind, but I’m relatively new to electronics. So i would appreciate the opinion of more experienced people.

I want to control with an Arduino UNO R3 a garden pump (https://www.amazon.nl/dp/B01NAFFQCU/ref=pe_19967891_404437601_TE_item) that is pumping water from a little stream to my duck pond.

At the bottom of my duck pond there is a hole which draws the water to the sewer that is lower than the pond. There is a 220V AC motorized ball valve with three wires (https://www.benl.ebay.be/itm/AC220v-DC12V-2-way-motorized-ball-valve-electric-actuator-for-underfloor-heat/273799467562) giving me the possibility to open when I want to remove the water from the pond.

I guess 2 logic level “Arduino” relay modules are the best way to control these two items.

But what do I need else to make everything work? Resistors? And where do I put them: Digital out arduino to relay? GND relay to GND arduino?

I also read about voltage spikes and flyback diodes, but since I am working with AC: how can I solve this? Or do I not have to care about voltage spikes

I have no experience in electrical schemes… So I did my best.

The schematic looks fine. The relay modules should have all the protection you need built in.

Since it doesn’t appear that the Arduino is doing anything except controlling the relays, noise from the pump motors shouldn’t be a problem.

But, what is the Arduino going to use to know when to turn the pump and valve on or off?

Every two days early in the morning the valve will open, so the pond can be emptied. I will take a large margin, before closing the valve. Ducks are not fish and having a pond for half an hour empty will be no problem. Afterwards the valve will close.

Then Arduino gives a signal to the pump. I have two ideas: I can measure the time that it takes to fill up the pond. Since it's 300 liters maximum, anything between 220 and 260 liters will do. If this does not work, maybe I can use two nails to measure if the desired level has been reached (voltage divider).

Would that be ok?

Kind regards and many thanks for your opinion.

I didn't buy yet my relay modules, but is this one ok? Can I rely on a module from 60 cents? It only needs 5mA to be triggered: is a resistor (not) necessary/mandatory? Thank you very much for the help :slight_smile:

dimi2710:
Then Arduino gives a signal to the pump. I have two ideas: I can measure the time that it takes to fill up the pond. Since it’s 300 liters maximum, anything between 220 and 260 liters will do. If this does not work, maybe I can use two nails to measure if the desired level has been reached (voltage divider).

The nails might work for a while until they become corroded.

The best would be some sort of float mechanism like your toilet bowl. Look up miniature float switch. It can be connected directly to our output pin.

That relay is fine, I’ve had one working for quite a while now.

Never heard of a float switch, so interesting information :slight_smile:

I just found one relay module in my closet SONGLE SRD-05VDC SL C. Would this work too? What is the difference comparing to 5V/12V 1 Een Kanaal Relaismodule Laag Niveau Voor Scm Huishoudelijke Apparaten Controle Voor Arduino Diy kit|one channel relay module|channel relaylevel relay - AliExpress

The one from the link only needs 5mA to be triggered: is a resistor (not) necessary/mandatory? In other words, does it draw exactly 5 mA from the arduino pin, or is a digital pin always giving 40mA? Maybe a relay works if there is minimum 5mA, and it really doesn't matter if it is 5 or 40 mA. Many stupid questions, but I want to understand everything...

there's no link just a relay name... no clue if it's just the relay or module.

You are dealing with water that is open to the elements and all kinds of trash. How do you keep the valve clean?

Paul

@wolframore: It is a relay module.

@Paul: every two days 250 liters of water will be changed. I guess it won't be that dirty, time will tell. But I asked myself the same question.

@Everyone: anyone who knows the answer (resistor (not) necessary/mandatory)?

dimi2710:
@Paul: every two days 250 liters of water will be changed. I guess it won't be that dirty, time will tell. But I asked myself the same question.

You mention ducks. Ducks have feathers. Feathers get loose and get water logged. They will certainly get trapped at the valve.

I have a bird bath that has pumps water from a reservoir to the top of the structure so birds have a continuous water supply. I have to clean the pump screen quite often to get the feathers and other crap the birds bring in and wash off. You will have the same problem, I predict.

If I was doing your project, I would use a much larger drain opening and use a rubber toilet tank valve. Use a stainless chain to a servo or solenoid to pop the flapper up and let the air inside keep it up as long as water is in the pond. It will close automagically when the pond is empty.

Paul

dimi2710:
@wolframore: It is a relay module.

A relay module has all the necessary components to reduce the current requirements from your digital I/O. The coil is switched using a transistor with a current limiting resistor at the base. The coil is powered by the switched power with a current gain from the transistor in a common emitter configuration. The final coil current is limited by the coil resistance, perhaps a resistor in series and the BJT beta. The current requirement to the base is approximately 4.3v/1k ~ 4.3 mA assuming 5v system and 1k base resistor it’s a commonly used value.

Thank you for all the reactions. I will first try it with the valve, since I ordered it. If it doesn't work: I have two old toilets here... :wink: