Author Options:

What relay to use to switch 12V source using 5V arduino board? Answered

I need to activate
-4 solenoids 12V 250mah each
For as long as 3 hours at a time with a arduino.

I have
-2A 12V source for solenoids.

I know I need a relay but idk which one I should get. If you could suggest one and send me a link that would be much appreciated.


Just get a ULN2803. Tie pin 9 to ground, pin 10 to 12V supply.
Tie pins 1,2,3 and 4 to your processor pins, tie pins 18,17,16,15 to one end of your relays. Tie all the other ends of your relays to +12V.

Tie the 12V and 5V GROUND lines together.


Can this run all 4 solenoids at once? or will it be a 2 on 2 off deal. Im fine with that but was just wondering. The listing I looked at rates it at max 500mah.

That's 500 per channel, so 250 should be fine, and you are only using half the package. You'll have a worst case dissipation of about a watt.


Ok last question. There is a lot being sold as ULN2803A, ULN2803xx etc but I want just the ULN2803 right?

Doesn't make a lot of difference. There are minor differences in performance, but you are 50% off the top limits here, so I don't think you'll have issues with any version.


I really appreciate it and in my budget too! Im learning about gates in my digital logic class but never know what chips are ones everyone else likes.

Hi steveatrouk, newrev426,

I have a similar set up, only with 12v fans/ventilators instead of solenoids. Being a newbie to electronics, I was wondering if this is the set-up steveastrouk proposed:

If so, I was wondering also about the output of the 12v source in terms of mA. Does it have to output enough mA to power all 4 solenoids, so 1,000mA (or 1A), and then, does it require some resistor in case only one is on at any particular time or does it have to output just 250mA?



Also, put big diodes across the relays, cathode to 12V, anode to the ULn2803. Put the diodes as close to the relays as possible.