Watering system control


6 posts
by zard_cz » Tue Sep 18, 2012 8:31 am
Hi all,

I after an irrigation system control. I already have an existing solution in place, a valve with a timer (http://www.gardena.com/uk/water-management/water-controls/water-computer-c-1030-plus/).
You can disconnect the main panel from the base, where it has a single RCA connector between the "computer" and the valve. The computer itself is powered from a 9V battery only so I am assuming that it is some sort of a solenoid valve.

I would very much like to re-use the existing valve so I would just like to connect to it. Is there any way to "debug" what is the computer sending to the valve to make it work?

I have a few relays (220V, 10A() laying around but I've read that you need some protection from inductive loads (which I am assuming the solenoid valve would be).

So, where shall I start? I would appreciate any pointers!

Petr
Posts: 24
Joined: Tue Aug 14, 2012 3:35 pm
by scorp » Tue Sep 18, 2012 9:41 am
The solenoid valve most likely works from 5-9V. Try to apply 9V to those two pins for a second, then do the same with opposite polarity and observe the valve opening and closing. Then try the same with 5V to check if 5V PSU will be enough. Then you need to design electronics part which will connect PSU for short period(need to experiment) of time to the valve. I personally would make circuit which will produce long pulse for relays rather than generate it by RPi in case software stuck. It may help to reduce number of control pins from RPi to only one so the transient on pin will start opening/closing. But simplest circuit is to use two pins to switch on one of two relays, one will connect PSU for valve opening, another for closing.
As for your relays, they are useless in this situation, need to buy low voltage one, 5V coil
Posts: 96
Joined: Tue May 29, 2012 6:21 pm
by zard_cz » Tue Sep 18, 2012 9:51 am
Thank you very much for the input!

I am actually not using the Pi in a direct sense, the actuator will be connected to an Xbee series 2 device. So Rpi will send a signal there to switch the digital outs.

I will then have 3.3V I will need to change into the whatever voltage needs to be used by the relay. As you have said, I would need to have a way to reverse the polarity and to apply it to the solenoid.

The relays I have are controlled by 3.3/5V I believe and they are rated for 220V - would that now work? I have used them to try and switch LEDs before without any problem. Is it correct that I am going to need to relays, one switching on the positive voltage and the other negative one? They would all be connected to a single Xbee out, one of them via a negation circuit of some kind to make sure they do not switch on both at once.

Lastly, what about the solenoid's inductive kick? Do I need to worry about that?
Posts: 24
Joined: Tue Aug 14, 2012 3:35 pm
by scorp » Tue Sep 18, 2012 10:15 am
If your relays can be switched by 5V then they are ok, contacts rate(220V in your case) is not very important because you will be switching low voltage.
Designing your circuit you need to remember that relays have to be in three different states:
1. first on, second off (for let's say opening)
2. first off, second on(for closing)
3. both off, which is normal state(make sure your circuit can provide this state).
4. both on shouldn't be but depending on your diagram one of the relays can override another so it shouldn't make any harm to PSU or solenoid, it will just mean that function will be opening(or closing).
As for solenoid's inductive kick, I don't think you need to worry about it, it is important if you are using transistors, but I may be wrong and you may need diode in series between PSU and contacts of the relay(which will connect solenoid) for not feeding kicks back into PSU.
Posts: 96
Joined: Tue May 29, 2012 6:21 pm
by pattagghiu » Thu Jul 24, 2014 6:45 pm
scorp wrote:The solenoid valve most likely works from 5-9V. Try to apply 9V to those two pins for a second, then do the same with opposite polarity and observe the valve opening and closing.


taking out this topic from its grave, because gardena's solenoid valve is not working in this way.
Since i'm trying to control it (i have an old computer, this http://www.gardena.com/it/water-managem ... 1030-plus/ , and i'm planning to keep only the valve and control it with the raspberry), i've done some tests and:
- the valve is opened with a "high voltage" burst (7V from direct from the battery opens it)
- the valve is NOT closed with an opposite voltage.
- the valve is closed with a "low voltage" burst (less then 2V, from a AAA battery)

this is driving me crazy because i can't obtain the correct voltage to close the valve from the big battery.. trying with a couple of resistors, but since i haven't found the datasheet of the valve or of the computer, i'm just going by tries and at the moment i can't close it.. for sure i'm not going to leave 2 batteries :)

ideas?
thanks
Posts: 172
Joined: Fri May 02, 2014 1:52 pm
Location: Italy
by FLYFISH TECHNOLOGIES » Thu Jul 24, 2014 7:31 pm
Hi,
pattagghiu wrote:the valve is opened with a "high voltage" burst (7V from direct from the battery opens it)
- the valve is closed with a "low voltage" burst (less then 2V, from a AAA battery)
ideas?

Since you found the driving voltages, you need now a driving circuit which is capable to output them. ;-)

You haven't mentioned required current, but my first approximation would be to find&trim (actually I'd make it since I'm a developer ;-) ). a circuit with LM317 (optionally with LM78S09 or similar) where two digital inputs (3.3V) would cause the LM317 to output 7V, 2V and 0V. This combination would give you probably enough current (> 1A) to drive the valve.

The basic idea behind his circuit is to have a couple of transistors controlling mentioned few discrete output voltages -> these transistors provide (via related resistors) some voltage on the LM317's reference pin, causing it to change voltage on the output.
There are tons of circuits on the net showing variable voltage power supply with LM317, controlled with a potentiometer. This your circuit would be very similar, but instead of the potentiometer a couple of discrete resistors would be used, one selected at the time (connected via related transistor).


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32
User avatar
Posts: 1696
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia