If I wanted to create a circuit (that was plugged into a typical 120VAC outlet) that was able to open/close a 24VAC Sprinkler Valve, where would I start? My ultimate goal is to control it with an Arduino but just a basic circuit to get started is my goal. Even with a simple push button as the controller would be nice. Where should I start for this? I think I would need a transformer to convert the 120vac to 24vac, right? Next think I need to determine the input current requirement for the solenoid/valve. Any help would be appreciated. I'm not a noob to electrical stuff but I can't remember most of it.
2 Answers
Yes, you need the 24 V transformer to start with. We often use transistors as switches to switch loads from a microcontroller, but transistors can't be used to switch AC, and then there's the relay, either an electromechanical one, or a solid state relay (SSR), which uses a triac as switching element.
Most electromechanical relays can't be controlled directly from your Arduino, and need a transistor to increase the current.
The relay shown uses 12 V, which is a common value, and you might have 12 V available for powering the Arduino. But there are also 5 V relays, which you can power from the Arduino's 5 V power supply. Note that many 5 V relays will require more current, and that the Arduino's voltage regulator is limited to 800 mA; you may need the 5 V for other applications too. The 5 V version of this relay, however needs only 15 mA and can driven directly by Arduino's outputs. An advantage of the relay is that its contacts have a low on-resistance and a negligible voltage drop.
The SSR is has no moving parts and therefore a longer life. It's often more compact than an electromechanical relay.
It needs less current to drive it, and since it requires less than 1.5 V you can usually control it directly from a microcontroller's output. Just place a 180 Ω resistor in series with the SSR's LED. If the microcontroller can't supply the SSR's 20 mA you still have to use the transistor the same way as for the electromechanical relay.
SSR's have a voltage drop across their switching triac, for this SSR 1.5 V is specified. That will cause some power losses, but for a 300 mA solenoid this will only be half a watt. Most likely the solenoid will also work at the remaining 22.5 V AC.
You definitely need a 120 to 24 VAC transformer to start. This will provide the proper voltage as well as isolation from the power line. A typical sprinkler solenoid valve needs about 0.3 amperes so a transformer rated for 0.5 ampere or more will be adequate. If you can find the exact requirement for your valve, you can adjust this value. It is recommended that the transformer be rated for at least 25% more than the valve requirement to avoid any possibility of overheating and to increase reliability. Of course you can use a switch to control the power to the solenoid. The switch should be on the low voltage side for safety. A pushbutton, unless it is a latching type, will only provide momentary power to the solenoid. A toggle switch is more appropriate. For external control, some type of relay, either mechanical or solid-state, is required. A solid state relay would be more amenable for computer control. At this point, you need to define your requirements better before any more details can be given.