Go Down

Topic: General Idea for Sprinkler System Controller (Read 11498 times) previous topic - next topic

perfect_disturbance

OK so I'm a software engineer and am comfortable with software but I am an extreme newbie when it comes to building electronics (so go easy on me).  But I am thinking about building a sprinkler system controller that can query a web service periodically. The actual controller can be super simple It hits a web address which returns an ASCII character that represents the zone that should be watering, and sets a corresponding output pin high which should switch on the desired zone.  All the logic as to when the sprinklers should run etc is built into the web service.

So the trick is the sprinkler solenoids run on 24VAC and of course the circuits run on  12-5VDC.  I want to run the the whole device off one wall wart and the transformer provided with my current sprinkler controller outputs 24VDC 650mA.  And keep the circuit as simple as possible.  So I've come up with the following as a general idea (As stated before I'm an extreme newbie so forgive the crude schematic)



OK so I got the idea for converting the power supply from 24VAC to 8DC from this thread:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236966759/all
and the wikipedia page on rectifiers:
http://en.wikipedia.org/wiki/Rectifier

I have 2 concerns:
1. Is this a valid solution (is it wired correctly) in the first place?
2. What size of capacitor do I need (and how can I figure this out on my own in the future)?

I got the general idea for using the resistors and triacs from here:
http://rayshobby.net/blog/?page_id=160
http://rayshobby.net/blog/wp-content/uploads/2011/08/svc_schematic_updated.png

This apparently works in his circuit is there some difference that I'm missing that will keep it from working in mine?

Once again I'm really new at this so any help is appreciated

Thanks


dc42

#1
Jan 10, 2012, 07:31 pm Last Edit: Jan 10, 2012, 07:45 pm by dc42 Reason: 1
Here are a couple of few comments on your circuit:

1. You need to have a common ground between the 24vAC supply to the triacs/sprinklers and the Arduino. Using a bridge rectifier doesn't give you that. I suggest you pick a 24-0-24v transformer instead, then the centre tap can be the common ground and you need just 2 diodes in a conventional full-wave rectifier arrangement (middle diagram in http://t3.gstatic.com/images?q=tbn:ANd9GcSnmo73cEKnNeDyl_qenJnlBi-9FHoVGGX-ZFbwwXlf-jshwdUxcg. Use one of the 24v outputs from the transformer for half the sprinklers and the other one for the remainder. [EDIT: or use a half-wave rectifier as the next post suggests, but then you'll need a larger smoothing capacitor.]

2. You don't need 3 regulators to drop the output from your rectifier (around 30v) to a value that the Arduino can accept. A single LM7912 or LM7915 is sufficient.

3. Those triacs need 7mA gate current @ 1.3v worst case to switch them on, so the maximum value for the resistor is around (5 - 1.3)/0.007 = 530 ohms. I would use 220 or 330 ohm resistors.

4. To calculate the smoothing capacitor, see the Smoothing section of http://www.kpsec.freeuk.com/powersup.htm.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

adis

#2
Jan 10, 2012, 07:36 pm Last Edit: Jan 10, 2012, 07:40 pm by adis Reason: 1
The diodes bridge is not wired well. Rotate it 90 degrees to the left.
To have the triacs wired well you should have your AC ground connected with the Arduino GND. For that forget about the rectifier, connect the 2 GNDs and the 24VAC to 7824 IN thru a 1n4007 diode (cathode to 7824 IN).
The capacitor depends on the current consumption. 100u might be ok. Make sure you measure the AC voltage component on your arduino and you have less then 10mV.  
If you intend to water only one zone at a time there is a more convenient solution: one solenoid valve and one indexing valve (http://www.sprinklerwarehouse.com/K-Rain-Indexing-Valves-s/8343.htm)
Another advice is to turn your arduino into a web service server, so you can start it from a normal web page. Once you trigger the web server, the arduino will cycle thru all the zones then stop.

perfect_disturbance

OK so your recommending something more like this?:



I have a few questions.
1. So I get this uses the diode as a half rectifier and the capacitor and regulator just do more work to finish smoothing out the voltage why is this preferable to the full rectifier?
2. I used the formula linked dc42 in response 4 (5 * .65A)/(24VAC * 60hz) = 0.00225F double that since we are using only half wave ac and that's 4.5mF or 4500uF so why do you suggest a 100uF Cap?
3. So In my previous circuit I was using 3 regulators since in the previous ardunio.cc discussion I linked to they were concerned that using only one would require it to dissipate to much voltage and run hot why is that different in my circuit?

I like the idea with the switching valve if I were starting from scratch that's probably the way I would go. unfortunately I already have much of this system in the ground and I was hoping to get a drop in replacement for my current controller so I didn't have to dig up pipes and mess with the valves already in place.

dc42

#4
Jan 10, 2012, 09:29 pm Last Edit: Jan 10, 2012, 09:38 pm by dc42 Reason: 1

1. So I get this uses the diode as a half rectifier and the capacitor and regulator just do more work to finish smoothing out the voltage why is this preferable to the full rectifier?


It's slightly simpler than the solution I proposed using a 24-0-24v transformer.


2. I used the formula linked dc42 in response 4 (5 * .65A)/(24VAC * 60hz) = 0.00225F double that since we are using only half wave ac and that's 4.5mF or 4500uF so why do you suggest a 100uF Cap?


The rectifier only feeds the Arduino, so the current in your calculation should be the 40mA or so consumed by the Arduino + the 50mA triac drive current when all triacs are on, not 5 * .65A. Still, 100uF looks a little on the low side.

3. So In my previous circuit I was using 3 regulators since in the previous ardunio.cc discussion I linked to they were concerned that using only one would require it to dissipate to much voltage and run hot why is that different in my circuit?


The regulator is only powering the Arduino and the triac drive current. If you were drawing lots of current from the Arduino +5v line, then power dissipation might become an issue. Nevertheless, the regulator will dissipate a little under 2 watts, so a small heatsink would be in order.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

perfect_disturbance

OK so 90mA to drive the arduino and triacs we would calculate to (5×.09)/(24×60)=0.0003125 or 312.5uF. so would a  300-330uF cap work?

I was looking at capacitors what voltage would that need to be rated for 24Volts? or since this is after the diode do we need to apply either Vrms=Vpeak/2 or Vdc = Vpeak/3.14 and a 1.4 multiplier to determine the required voltage rating of the capacitor?

dc42


OK so 90mA to drive the arduino and triacs we would calculate to (5×.09)/(24×60)=0.0003125 or 312.5uF. so would a  300-330uF cap work?


Yes. As you are starting from ~30v and the LM7912 only needs ~14v, you can tolerate about 50% ripple voltage rather than the 10% assumed in that calculation. So 220uF should be adequate.


I was looking at capacitors what voltage would that need to be rated for 24Volts? or since this is after the diode do we need to apply either Vrms=Vpeak/2 or Vdc = Vpeak/3.14 and a 1.4 multiplier to determine the required voltage rating of the capacitor?


You need to use the 1.4 multiplier and then some, because the 24v transformer will produce more than 24v when lightly loaded (sprinklers all off). The standard voltage ratings are 35v, 50v and 63v. IMO 35v is too close for comfort. So go for 50V or 63V.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

adis

Don't forget the current needed by the ethernet shield.

perfect_disturbance

Where can i find the current used by the ethernet shield?

dc42

I can't find any specification for the current drawn by the Ethernet sheild. However it looks like the only significant devices on that board are the W5100 chip and 6 LEDs with 1K series resistors. The datasheet for that chip says it takes 183mA maximum. So the current consumption probably doesn't exceed 230mA.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

dc42

PS - if you use a 24v transformer with a centre-tapped secondary (or two separate 12v secondaries in series), then you could drive the rectifier diode from the centre tap. This means that you only have around 17v (rather than 34v) that needs to be dropped to 5v, which reduces the power dissipation in the regulators.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

rayshobby

Hi, as dc42 noted, the Ethernet controller consumes about 180mA current. Including other components, the total current draw is probably around 200mA. If you use a linear regulator, the power wasted on the voltage drop is roughly (24-5)V * 0.2A = 3.8W, which is somewhat significant. The reason I used a switching regulator in the design of OpenSprinkler is exactly to reduce the power waste, because switching regulators are more efficient.
DIY electronics project at http://rayshobby.net

Go Up