

I have edited some parts of this post and inserted a short explanation of how this works. Finally found a solution that works, and it requires only 3 extra parts. I’ve captured a few more waveforms with the original controller. Also opening works fine if a 10 ohm / 2w resistor is placed in series with the valve. It seems that the valves close fine if they are placed in series with a 56 ohm/2W resistor. I’m still investigating this issue and I hope to have a solution in a few days. Funny though, with the original electronics the valves work fine. It opens the valves correctly, but they don’t close.
#USING ARDUINO AS TIMER CODE#
I tried this code with two old Gardena valves, which have been used for about 4 years in an area with hard water. If things are not working either reverse the pins for the valve, or change in the code the dir_a from HIGH to LOW and from LOW to HIGH.
#USING ARDUINO AS TIMER HOW TO#
The following code demonstrates how to turn on and off the water: A little higher than the original controller, but it works fine. In the Arduino world the Servo library uses Timer1 on Arduino Uno (Timer5 on Arduino Mega). If you change Timer0 registers, this may influence the Arduino timer function. When closing the valve, D1 is blocked, and current flows only through R2. In the Arduino world Timer0 is been used for the timer functions, like delay(), millis() and micros(). The voltage drop across the valve is about -7V. The circuit works as follows: for opening the valve, the diode D1 is open, so the current flows both through the R1 (10 ohm) resiohmsr and R2 (1oo ohm) resistor. The simplest way to replicate this is to use an H-bridge, such as the Ardumoto shield, but with a twist: a circuit made from two resistors and a diode is inserted in series with the valve. To turn the water off a positive pulse of 150 ms is applied to the center pin. With respect to the RCA sleeve, to turn on the water a 9V negative pulse with a duration of 500ms is applied. Gardena water valve control circuit schematic For closing the series resistor is 100 ohms.Īfter many tries, I ended up with the following schematic: A Timer is capable to run multiple countdown timers, which you can check anytime with the timers command as you can see in. Considering the internal resistance of the valve winding, it looks that for opening there’s a 10-ohm series resistor in circuit working as a current limiter. The results show for opening that a 500ms negative pulse is applied, and the voltage across the valve is about 7V. Back to measurements, this time with the original controller and the valve connected. I used an Ardumoto shield to replicate this, but when doing extensive tests I went into trouble: some old valves open correctly, but they don’t close. Initially, I thought this is simple: a 9V negative pulse should have opened the valve, while a 9V positive pulse should close it. In this project arduino uno board is used to control SPDT (Single pole double throw) Relay and 16 x 2 character LCD indicates the time duration status.
