3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

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!

6 answers
sort by: active | newest | oldest
Oct 14, 2011. 7:58 AMrayshobby says:
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.
Oct 14, 2011. 7:57 AMrayshobby says:
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.
Aug 22, 2010. 6:43 AMseandogue says:
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.
Aug 20, 2010. 12:32 PMsteveastrouk says:
Use a darlington, like a TIP 120, put a nice big diode like a 1N4007 across the solenoid coil AT The solenoid coil. Steve
Aug 20, 2010. 9:19 PMfrollard says:
Also an option: radio shack has small signal level relays that can easily cope with 24v/small current for a solenoid.
Aug 20, 2010. 1:14 PMsteveastrouk says:
And say 1.5K base resistor...

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!