IO board - 40ma on all digital pins to much?

Greetings Folks,

I want to make a IO board for my Diecimila. I was thinking of using small 5v relays which each use 30ma (±10%) when on.

If I arrived at a situation when I have all 14 relays on, would it be to much for the Arduino?

Below would suggest it would be ok so long as you don't exceed 40ma per pin. How about the spike as it turns on? Would a relay have an initial spike when energising that would exceed the 40ma?

(I will include a diode for the back EMF)

Each of the 14 digital pins on the Diecimila can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms. In addition, some pins have specialized functions:

Would the above be better accomplished with something solid state?
All I want to do is switch 12V, typically less than 2A. Anything larger and I will use a 40A automotive relay.

TIA

Cheers,
Crisin

I'm not sure either way, but it definitely can't hurt to simply throw some line drivers in the mix :wink:
Wouldn't want to risk the $30 arduino, better the $1 line driver

This is true.....

Any suggestions on what would be a good option?

How about the spike as it turns on?

The spike on a relay is as it switches off, not on.
When the current is switched off, the magnetic field in the coil collapses and induces a current in the opposite direction.
The diode across the coil absorbs this.

I love the circuit simulator Blocking Inductive Kickback

I thought a relay would be slightly like a motor with a startup or stall current? was just pondering :wink:

Although an Arduino pin can source 40mA (absolute max), the board as a whole can only source 200mA. So 14 * 40 is way too much current to draw from the board.

I would use 2 darlington tranisitor arrays or similar in between the Arduino pins and the relays.

Thats just my 2 "pins"

A common item used to accomplish this task is the ULN2003. There are others that would also work, but ULN2003 is most commonly mentioned.

Check here for info:

Although an Arduino pin can source 40mA (absolute max), the board as a whole can only source 200mA

There's the nugget I was looking for - thanks.

pwillard - thanks for the details, that's what I was after.

Thanks folks!

Although an Arduino pin can source 40mA (absolute max), the board as a whole can only source 200mA

These are stress ratings, they are NOT what the chip can provide safely.

The data sheet says:-

Stresses beyond those listed under “Absolute
Maximum Ratings” may cause permanent damage
to the device. This is a stress rating only and
functional operation of the device at these or
other conditions beyond those indicated in the
operational sections of this specification is not
implied. Exposure to absolute maximum rating
conditions for extended periods may affect
device reliability.

Yes Grumpy is absolutely right. But it should not be an issue if you use ULN2003 or similar to drive the LEDs