# can UNO digital out pins drive 8 channel relay?

I am thinking of using an 8 channel relay like this

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=110836428701

to turn on/off power outlets. the spec says it take 15-20ma to drive the relay.

my question is, will the arduino be able to drive all 8 channels high at the same time (so total 160ma) just by connecting the digital out pin without additional circuit? assuming my power supply has enough amps of course. is that fine with the atmega328 or is it too much to handle. the atmega328 spec says the digital out can drive 40ma, but I don't know if that means one pin at a time or it can drive all pins at 40ma simultaneously.

or is there a better way to turn on/off 8 outlets. I basically need an 8 outlet timer, that can turn on then off down to 1 second.

thanks jerry

I think you would be fine. The spec sheet says the ATMega328 can handle about 200 mA so as long as you're not hanging too much more off the chip then you're within the tolerances.

Good luck!

To improve on the answer: Yes, but you may have to watch out how many outputs on 1 port are connected to the relay.

Read the Notes to the tables in Section 29 of the '328 datasheet:

Notes: 1. “Max” means the highest value where the pin is guaranteed to be read as low 2. “Min.” means the lowest value where the pin is guaranteed to be read as high 3. Although each I/O port can source more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state conditions (non-transient), the following must be observed: ATmega48A/PA/88A/PA/168A/PA/328/P: 1] The sum of all IOH, for ports C0 - C5, D0- D4, ADC7, RESET should not exceed 150mA. 2] The sum of all IOH, for ports B0 - B5, D5 - D7, ADC6, XTAL1, XTAL2 should not exceed 150mA. If IIOH exceeds the test condition, VOH may exceed the related specification. Pins are not guaranteed to source current greater than the listed test condition. 4. Although each I/O port can sink more than the test conditions (20 mA at VCC = 5V, 10 mA at VCC = 3V) under steady state conditions (non-transient), the following must be observed: ATmega48A/PA/88A/PA/168A/PA/328/P: 1] The sum of all IOL, for ports C0 - C5, ADC7, ADC6 should not exceed 100 mA. 2] The sum of all IOL, for ports B0 - B5, D5 - D7, XTAL1, XTAL2 should not exceed 100 mA. 3] The sum of all IOL, for ports D0 - D4, RESET should not exceed 100 mA. If IOL exceeds the test condition, VOL may exceed the related specification. Pins are not guaranteed to sink current greater than the listed test condition.

What happens if you source to much current from the output pins? Does the chip just give the maximum it can source or do you risk destroying the pins or even the microcontroller?