SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By rrc1962
#136633
I noticed that the product description on this says the IO pins output 150ma, but the product web page says 40ma. Can anyone confirm what the output current capacity is on this board? I need to drive a small 2A or so relay. If youv'e done this before and wouldn't mind sharing a part number, I'd greatly appreciate it.

Thanks
By esklar81
#136648
rrc1962,

Without looking at the datasheet (If you had provided a link, I might have looked. :wink: ), it may be that the 40 mA is per terminal and the 150 mA is maximum total of all active pins.

As a general rule, though, one should not drive an inductive load (such as a relay) directly with the output of a microcontroller. Inductive loads produce substantial voltages and noise and those are things microcontrollers do not tolerate well.

If you search the SparkFun fora, you'll find plenty of examples of using various devices (optoisolators, such as this convenient package, for example) to protect the microcontroller.

Even with an optoisolator, you should include a flyback diode to suppress most of the spike removing power causes.

You haven't said what relay you have in mind, but 50 mA at 12 V should be enough to switch most 2 A relays.

If you put together a list of parts and schematic and post them here, one (at least) of us will have a look and let you know if what you designed appears feasible.

Have Fun,
Eric

By rrc1962
#136653
Thanks Eric. I was planning on putting a snubber across the relay coils, but the optos would work fine as well. The relays are not driving any current. They just close a sensor circuit. I've used 5V reed relays with PIC's before, just never driven them using an Arduino. Unfortunately, all I have available is 5V, so whatever I use for relays has to have a 5V coil.

I may be able to close the sensor circuits directly from the optos. As long as the output side of the opto delivers a clean on/off signal, it should work. I'll pick up an opto IC and give it a try.