What do i need to control a sprinkler valve (24V solenoid) with an arduino?

I need to know what parts to get to open and close an electric sprinkler valve with my arduino. It's supposed to use 24V but I've heard that 9V works just as well. I tried using a 2n3904 as a switch with a 9V battery and it turns on but won't turn off unless I disconnect it.

Since it's a solonoid (inductive load), I assume I'll need some sort of protection diode and noise-canceling capacitor. Would a MOSFET be best to control it with 5v output from an arduino?

What models for these components would be best (and can be bought at radio shack)?

Thank you!

sort by: active | newest | oldest
rayshobby5 years ago
You can use a triac (like MAC97) to switch AC valves. Or you can certainly use a relay but that's much more bulky than a triac.
rayshobby5 years ago
You can use a triac (something like MAC97) to switch AC valves. Or you can use a relay, but it's much more bulky than a triac.
seandogue6 years ago
A mosfet (not the 2n sized package, but more like a TO-220 sized 5-10W for beef and longeviety) with a protection diode placed across the load would be perfectly sufficient and small. I've done so many many times. Having said that, I tend to agree with the idea of using a small signal relay, since it's easier for non-specialists to work with. Also, you might consider an IC packaged mosfet relay. 8-pin dip some carry up to 3.5 A @24VDC ~$3-6 at digikey and the like.
Use a darlington, like a TIP 120, put a nice big diode like a 1N4007 across the solenoid coil AT The solenoid coil. Steve
Also an option: radio shack has small signal level relays that can easily cope with 24v/small current for a solenoid.
And say 1.5K base resistor...