Go Down

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

bperrybap

An I2C port expander will use only 2 precious pins.
And if using something like the PCF8574 i/o expander chip then each chip has 8 i/o pins and you can control up to 16 of those chips on the same bus.

You can even re-purpose the cheap ($1 USD) LCD backpacks that use the PCF8574 chip for this.

--- bill

larryd

Those may work, not sure of the dimensions.

I have used the ones I linked.
You can easily adjust the pressure either by lowering the voltage or adding a Y connector tube.
One leg of the Y tube has an adjustable clamp to regulate that legs flow.
The other leg just returns it's water to the same reservoir the submersible pump sits in.
You can also feed the pump output into a trough that acts like manifold the length of the area to be watered thus reducing water pressure.

I'd stay away from valves and just use several inexpense simple pumps.


No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

Digitidope

That actually sounded really interesting bperrybap! I'll take notice, might come in handy some day, although perhaps a bit complicated for this one. Especially since it was so easy to expand the pin count on the arduino, didn't know that.

Larryd I think you might be right. As the distance from the small tank (#2) to the small balcony box furtherest away from it will be about 4-5 meters I'm not sure if gravity alone will be able to push the water all the way. Three small pumps would probably cost the same as one valve, thanks for the input.

Delta_G

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
Actually...


I went on to say in that post that you could conceivably create this with three relays, a uc, and some way to communicate from your first Arduino to the one with the relays.  But at that point, why not just run them from the first Arduino.

And it becomes a question of why do you want to do this.  If there is a real problem then there may be a real solution.  But this is an example of the x-y problem as it is.  
|| | ||| | || | ||  ~Woodstock

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

bperrybap

Actually...


I went on to say in that post that you could conceivably create this with three relays, a uc, and some way to communicate from your first Arduino to the one with the relays.
And I did see that, but I was talking about solutions that didn't need another microcontroller on the other end.

--- bill

Delta_G

And I did see that, but I was talking about solutions that didn't need another microcontroller on the other end.

--- bill
How would you use modbus to control a valve without some controller to receive the modbus signal and physically switch the valve? 
|| | ||| | || | ||  ~Woodstock

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

bperrybap

How would you use modbus to control a valve without some controller to receive the modbus signal and physically switch the valve? 
You can't, I guess I was a bit unclear.
I actually meant having to use another Arduino type micro-controller requiring programming on the receiver end since I was assuming using an off the shelf modbus relay/pump/device which has a microcontroller built into the device - which is why they are so expensive.

--- bill

Delta_G

You can't, I guess I was a bit unclear.
I actually meant having to use another Arduino type micro-controller requiring programming on the receiver end since I was assuming using an off the shelf modbus relay/pump/device which has a microcontroller built into the device - which is why they are so expensive.

--- bill
Right.  That's what I said.  You'd have to have a controller on the other end to control the valves.  Or some seriously genius circuitry. 

Once you involve the second controller this becomes a trivial matter of choosing a communication protocol. 
|| | ||| | || | ||  ~Woodstock

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

wvmarle

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).
Regular pumps give more exact control than valves (the flow of which is highly dependent of how much water there happens to be in your reservoir).

If you want really tight control look into peristaltic pumps. They're slow but very accurate.

Instead of relays, you can also switch your pumps with a MOSFET transistor. Smaller and more efficient than a relay. The IRLZ44N is a popular one to use with Arduinos.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

dave-in-nj

She cost of an Arduino is so cheap that normally we would not consider that you can easily control 10 valves on one pin.

If you have even seen a LED bar display that shows power level, like on a graphic equalizer, you know what I mean.
one LED or a different one, or a different one.....going up and down....

In any Arduino, the analog output pin can send out different levels of voltage.  

You can create a circuit (wish I had my Forrest Mimms book handy) that uses op-amps/comparators,  transistors, resistors and LED's on an analog signal to have one LED light at a time as the voltage changes.

power level circuit
this shows how you can have each light come on at a voltage, but stay on. so two or three would be lit at at time.
you need a duplicate one that turns off as the voltage increases.  a window comparator circuit.

Most of us would user either an I2C port expander a Shift Register, or get a larger pin count Arduino board.

So, the answer is definitely YES.
Since you are asking, the ability for you to make the circuit is a bit of a steep learning curve, but not more than an advanced beginner level.

The cost will be much higher than buying a new Arduino.

The time to make one is much longer than to get a second UNO, or a MEGA and just use individual pins.

Since you can get a 16 pin port expander and run it on I2C from 2 pins,  there is a simple solution.
but if your goal is to learn about electronic circuits and you don't mind making circuit boards,  you can get to your goal that way too.

wvmarle

In any Arduino, the analog output pin can send out different levels of voltage.   
If only it had analog output pins... It only has a number of digital pins that can do PWM (using indeed the aptly named AnalogWrite() command).
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up