Go Down

Topic: Water irrigation system - control three valves from one pin, how? (Read 415 times) previous topic - next topic

Digitidope

Hello forum! I'm building a small automatic watering system on my balcony.

It will consist of two 12v water pumps and three valves, controlled by an arduino, a RTC and a WiFi controller. The valves and pumps will be powdered by solar panel and a 12v battery and the controller, WiFi and RTC by a 6v battery (also charged by solar).

There will be three valves attached to a small water tank somewhat above my plants in height. I want to open a valve when it's time to water the corresponding plant box and have the water drop down into the box by gravity.

I've found a solenoid direct valve that will open when given power and close (by spring or magnet or something) when power is turned off.

This could possibly be done with a relay on each valve, each relay connected to the 12v battery and to a separate pin on the arduino board.

Is there some way that one could control the three valves from one pin on the arduino?

Does there exist some kind of relay/transistor that can take let's say three different signals from the controller (for instance low, medium and high), and then relay the full 12v signal to the valve that correspond with that particular input signal?

This will be my first introduction in electronics/arduino project of any kind and that is why I am asking, to lean a bit more. I have spent many days now reading up on the basics of electronics and looking at arduino water systems online but I haven't figured out what device I could use here.

There is no wire diagram yet (haven't gotten to that part yet) but I hope the images of the planned circuit can be of help.

In advance thanks for any answer.

Delta_G

|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.


jremington

If the relay contacts can handle the current required by all three valves, just switch them in parallel. Check the relay specifications, or post links to the specs for the relay and the valves.

Delta_G

Quote
Is there some way that one could control the three valves from one pin on the arduino?
sure, if you want all three valves to do the same thing.  


Quote
Does there exist some kind of relay/transistor that can take let's say three different signals from the controller (for instance low, medium and high), and then relay the full 12v signal to the valve that correspond with that particular input signal?
I can't even imagine how that would work.  But no, there's no such relay.  You could build one with three relays and a microcontroller, but then why not just do it with the microcontroller you have.  
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

Digitidope

https://www.ebay.com/itm/1-2-Gravity-Feed-Electric-Solenoid-Valve-12-volt-DDT-CD-12VDC-Plastic-Body-N-C/290763981675?_trkparms=aid%3D222007%26algo%3DSIM.MBE%26ao%3D1%26asc%3D20160323102634%26meid%3D4c1cef4b600540e7b1f85c985e7159d0%26pid%3D100623%26rk%3D4%26rkt%3D6%26mehot%3Dpp%26sd%3D300653378588%26itm%3D290763981675&_trksid=p2047675.c100623.m-1

The valve in question.

Haven't chosen relays yet.

Not quite sure what you mean, Jremington!

*i should have specified that I want the different valves to open and close at different times.


Delta_G

Quote
Not quite sure what you mean, Jremington!
He is talking about if you want all three valves to come on together, then you just power them in parallel off the same relay.  But that doesn't sound like what you want.  It sounds like you want the valves to be individually controllable, in which case you're going to need three pins.


What is the point of this exercise?  Are you out of pins or something?  That is a much easier problem to solve. 
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

TomGeorge

Hi,
Welcome to the Forum.

Why do you want to use one pin to control 3 valves independently.

You need to do a list of your input and output devices and set out what pins they will use to check your I/O numbers.
Do not forget that the analog input pins can be configured as digital I/O.

Thanks... Tom.... :)
Everything runs on smoke, let the smoke out, it stops running....

larryd

Forget about valves.

Use 3 bilge pumps like these.   6.7 x 5.0 x 1.3 in. more like 6.7 x 1.5x 1.3 in.

https://www.princessauto.com/en/detail/12v-200-gph-bilge-pump/A-p4270013e   


No technical PMs.
The last thing you did is where you should start looking.

MorganS

You could definitely do that. Try Google to see if someone else has done it and if there is a module you can buy. That kind of multi-level control is very common in the steering-wheel controls on any car that has buttons in the wheel.

But it is highly likely that you won't find a module and the easiest way to build it is to use another Arduino. I suggest the Micro is easier to work with.
"The problem is in the code you didn't post."

Digitidope

Thanks Tom!

So something like this does not exist? https://imgur.com/a/BKlaibP

Haha, for no other reason than to see if it was possible. I'm really a beginner and I though that  the less pins I use the more pins I could use for later add'ons to this system. And it's fun to learn!

So the reason I could not find something like this is because it doesn't exist. Hmm I will have to live with using three pins and three relays then^^

Digitidope

I see Morgan! Will have to google some steering wheels.

Larry's, using this one: https://m.banggood.com/DC-12V-Solar-Powered-Water-Pump-700LH-Brushless-Magnetic-Submersible-Water-Pumps-p-1275049.html?utm_design=41&utm_source=emarsys&utm_medium=Shipoutinform171129&utm_campaign=trigger-emarsys&utm_content=Winna&sc_src=email_2671705&sc_eh=3767757c547288891&sc_llid=9773714&sc_lid=104858042&sc_uid=LqFr0QT0QQ

The reason for the tank #2 and the valves to gravity fed tube was is because I thought that this pump would pump water too strongly and damage the plants in doing so. But perhaps it can just be used at a lower voltage and hence simplifying the whole thing.

Hmm but would still need valves to direct the water to different places as I want control over the exact amount going into each plant box (overenthusiastic gardener).

Thanks for the replies.

TomGeorge

Hi,

If you had 4 or more outputs to control then there are multiplexer ICs to expand your I/O.
The condition is that they use 2 or 3 pins themselves.

Tom... :)
PS keep learning mate. 
Everything runs on smoke, let the smoke out, it stops running....

MorganS

"The problem is in the code you didn't post."

bperrybap

Quote
Is there some way that one could control the three valves from one pin on the arduino?
sure, if you want all three valves to do the same thing.  
Actually, there are several ways to control multiple things with a single wire but it takes more circuitry and potentially some clever s/w.

There is the standardized Modbus interface, but those devices are expensive.

It could be something custom like using analog voltages created from PWM signals, frequencies that are filtered using notch filters, or a simple serial (not async) interface that can be decoded using an RC network and a shift register.
I have used the latter to control a hd44780 LCD from an ATTiny part.

But all those are much more complex than just using multiple Arduino pins.

--- bill

Go Up