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.
I'm not sure either way, but it definitely can't hurt to simply throw some line drivers in the mix
Wouldn't want to risk the $30 arduino, better the $1 line driver
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.
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.
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.