30 MA 5 v relay driving

  1. Are there any problems sinking 30 ma from a UNO output pins for a 5 volt relay coil if the coil is shunted by a diode to eliminate the coils' s inductive spike.

  2. Anyone know of a 5 volt relay card shield for the UNO that has four or more relays preferably DPDT but SPST would work if there were at least four relays. The contacts have to be for 2 amp DC minimum (@ no more than 20 volts)?

  3. Are there shield prototyping cards that I could put four 5 volt DPDT relays on and any transistor logic that might be needed? How important is isolation of the relay coil from the UNO outputs if the relay does not exceed the 40 ma capacity of the UNO outputs and the relay coil shunt diodes are used?

I'd like to drive the relays directly from the UNO or from a shield card or as a last resort make up a relay card. Anyone got any ideas on this?


Look at my signature link - I created a card with 15 or so such relays. I don't have any on hand at the moment, but I can order some and get you one in about 3 weeks. Pretty sure it can be populated with this relay http://www.digikey.com/product-detail/en/D3209/PB1111-ND/1633997 or a shield can be done up pretty quick if you'd rather do a shield.


Is it a Arduino UNO Shield?

Is there a relay driving circuit isolating the relay coil from the UNO outputs? (Is this necessary?)

Could you do a four relay DPDT 2A contact (20 volt max) 5V 30ma coil? (the relay you linked looks fine)

Would it require a 5 volt PS or could it be powered by a 12 volt PS (on board regulator to 5 volts)?

What is the pricing? Credit card on delivery?

Sorry to get so detailed but these are things I must know to do the UNO design I have in mind.



To be clear I am planning to use an UNO or equivalent to control a point to point model railroad (actually trolleys). I need a relay to stop and start the trolley, and to reverse the polarity on the track to change the direction of the trolley (takes a DPDT relay to do it efficiently). The UNO will be used to stop at stations, vary the stop times, miss stations randomly and to start a sound module (Ding -Ding bell). The sound module takes a relay closure to start. That means I need three relays and a spare on the board for future expansion. I want it to be a shield if possible. But the program capacity of the UNO may be insufficient and I may have to go to the MEGA 2560. Will UNO shields fit that board too?


Sure, I can do a board with 4 DPDT relays that will fit on Uno or Mega.
5V relay coil controlled directly from Arduino pin with diode. I can do it with transistors too to give you more flexibity if you decide to change relays.
You let me know which pins you want control coming from, and what kind of connector to connect the relays to for offboard connection.
Can’t imagine you’d need more memory than an Uno has for that. I did way more programming for my fencing scoring machines, 7 tabs of programming in the IDE, and I only took up 13K of memory.
I don’t do CC, paypay will be fine.

The abs max for a pin is 40mA, 30mA is a bit high for comfort, but actually you won't get 30mA, you'll get more like 25mA since each pin output transistor has an Rds(on) of very roughly 40ohms. 25mA is reasonable from a pin - I'd not like to go higher. You will need to know your relay works reliably at 4V, since that's about what it can expect.

4 relays would take upto 100mA from the chip's supply - note that the abs max current from Vcc or gnd pins is 200mA so that you wouldn't want to drive 8 relays this way...

Here’s what I have so far, pending some input:


In thinking about it I believe the relays need the driver as you have shown. But I think I want it not to be on a shield. Each I/O on the board has to have an islet or pin to solder a wire to. The power should not come from the UNO but its input should be terminated in islets or a solder point pin. The power in should be 5 volts DC from an external regulated power supply (wall plug type I would provide). The board also needs four holes in the corner for mounting with screws on standoffs. All of this would mean maximum versatility on choice of output pins from the UNO, an external Power supply source as an input of power, and easy connections via soldered wires.

But you have yet to give me a ball park price. Have you any idea with the above changes what we are talking about price wise? Before you do any more please give me a price. I have no intention of wasting your time but if reasonable I'll want the relay board so I don't have to do it myself. You can email the cost numbers if that is better for you. Thank you for your efforts so far. It was beyond my expectations.

LDBennett ldbennett1@verizon.net

Ok, ballpark is $120 for 2 hours of effort, end result will be gerber files you can send to iteadstudio for boards.
All thru hole parts for easy assembly as shown.
Your requested changes are minor.
Create a drawing showing dimensions, mounting hole sizes, connector type for power (barrel jack? screw terminals? just holes?).
Connection to Uno will be 4 pins & Gnd.
Coils powered from 5V.
Relay connections to holes only like I show already.

If you want assembled boards, I will have to price up parts too.
Relays were around $2.50 each, transistor/diodes/resistors are not much, like pennies each.

Was thinking maybe add an LED as well to show relay energized status.

Yes, you can drive 4 x 30mA relays from an Arduino, but see MarkT’s comments in reply #5. Alternatively, buy a cheap relay board from eBay, for example http://www.ebay.co.uk/itm/4-Channels-5V-Relay-module-board-for-Arduino-PIC-ARM-AVR-DSP-PLC-UK-SELLER-/320921199075?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item4ab864e1e3#ht_1332wt_1396.

That's a deal now that shield form factor is no longer needed. Is there a US supplier?

Just search ebay.com for “relay shield” or “relay board”, you’ll get lots of matches.

That layout - I'd make the supply traces wider (unless one of the planes is 5V), and add 10uF decoupling capacitor. You could add a jumper to select 5V from the Arduino or external power for the relay coils. The relay switch traces could be thicker too, there's room for 0.05". Keep thin traces are for low power signals.

MarkT, the effort might be dead in the water with the availability of COTS cards. Was an interesting thought experiment tho.

Not double throw but http://www.amazon.com/SainSmart-8-Channel-Relay-Module-Arduino/dp/B0057OC5WK/ref=sr_1_1?s=toys-and-games&ie=UTF8&qid=1343409457&sr=1-1&keywords=arduino+relay 20 bucks and on prime so it's shipping from north america seems to fit the bill or am I missing something? Can get the same thing from asia for half the price and 3 weeks shipping.

I'm trying to figure out what would need double throw for for a trolly/train layout? Mind you it's been years since I tinkered with them.

And 4 relays for $13 http://www.amazon.com/SainSmart-4-Channel-Relay-Module-Arduino/dp/B0057OC5O8/ref=pd_sim_t_1