Go Down

Topic: Max High Pins (Read 5430 times) previous topic - next topic

danofri

Hello,
I have the Arduino Mega board and I'm wondering how many digital pins can be high in parallel.
I have a scenario that might lead to 15 digital pins which are high all togther.

Will that be OK?

Thanks!
Danofri.

CrossRoads

Sure, as long as you are not exceeding the max current limits individually or in groups or in total.
Just driving other logic devices wouldn't be a problem.
Driving 15 LEDs at higher currents might be an issue.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

robtillaart

#2
Jun 27, 2011, 03:01 pm Last Edit: Jun 27, 2011, 03:15 pm by robtillaart Reason: 1
Yes, that is no problem.

That said, it can be a problem if the load on the pins is going to draw current, especially too much current.

According to - http://arduino.cc/en/Main/ArduinoBoardMega - every pin can deliver 40 mA max @5V
-- update --
this seems not be true, see below
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Grumpy_Mike

#3
Jun 27, 2011, 03:03 pm Last Edit: Jun 27, 2011, 03:06 pm by Grumpy_Mike Reason: 1
Quote
every pin can deliver 40 mA max @5V


No No No ... this is not correct at all.
40mA is the limit where damage starts to be done and the output is not 5V when this much current is being drawn.

It dose not say 40mA @ 5V you have misunderstood the page. It also does not say all these pins can delver this current at the same time.

CrossRoads

Output level drops when 20mA is being drawn even.
Voh at 20mA source with VCC = 5V will be a min of 4.2V.

Need to watch how much current is going out in total also:

Although each I/O port can sink more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state
conditions (non-transient), the following must be observed:
ATmega640/1280/2560:
1.)The sum of all IOL, for ports J0-J7, A0-A7, G2 should not exceed 200mA.
2.)The sum of all IOL, for ports C0-C7, G0-G1, D0-D7, L0-L7 should not exceed 200mA.
3.)The sum of all IOL, for ports G3-G4, B0-B7, H0-B7 should not exceed 200mA.
4.)The sum of all IOL, for ports E0-E7, G5 should not exceed 100mA.
5.)The sum of all IOL, for ports F0-F7, K0-K7 should not exceed 100mA.
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.

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:
1)The sum of all IOH, for ports J0-J7, G2, A0-A7 should not exceed 200mA.
2)The sum of all IOH, for ports C0-C7, G0-G1, D0-D7, L0-L7 should not exceed 200mA.
3)The sum of all IOH, for ports G3-G4, B0-B7, H0-H7 should not exceed 200mA.
4)The sum of all IOH, for ports E0-E7, G5 should not exceed 100mA.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

robtillaart

Quote
It dose not say 40mA @ 5V you have misunderstood the page.


Summary
Microcontroller   ATmega1280
Operating Voltage   5V
Input Voltage (recommended)   7-12V
Input Voltage (limits)   6-20V
Digital I/O Pins   54 (of which 14 provide PWM output)
Analog Input Pins   16
DC Current per I/O Pin   40 mA  <<<< what does this say then ???
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

CrossRoads

It says an Electrical Engineer did not review the Summary spec sheet (or wherever you copied that from) when it was released!

From the ATMEGA 2560 Data Sheet:

"Absolute Maximum Ratings*

*NOTICE: 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.

Maximum Operating Voltage ............................................ 6.0V
DC Current per I/O Pin ................................................ 40.0mA"
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

danofri

#7
Jun 27, 2011, 03:23 pm Last Edit: Jun 27, 2011, 03:29 pm by danofri Reason: 1
Now I'm confused...

I have 8 digital pins (34-41) connected to 8 SSR (in normal state, they are all HIGH) - this is the type: http://cgi.ebay.com/Solid-State-Relays-SSR-3-32V-DC-Output-24-380V-AC-25A-/320708592736?pt=LH_DefaultDomain_0&hash=item4aabb8c460

I have another 4 digital pins (22-25) connected to 4-way opto relay board (in normal state, only 1 of them is HIGH).

I have 1 input digital pin (50) for temperature probe (DS18B20).

I have 2 input digital pins (52-53) for floating switchs (water level).

I have 1 input analog pin (0) for pH board (the power is from external source).


will that be OK?

Thanks!!
Danofri.

CrossRoads

Input pins are no problem, the ATMega requires very little current from the source device.

The Opto relay board is likely also buffered to put little load on the arduino output pins.

The solid state relay, being solid state and not mechanical relays, will also not be much load to arduino output pins.

When the arduino powers up, the I/O pins are all inputs until the sketch kicks in to make them outputs and commands them high or low.
If your SSRs are sensitive to what happens while that is going on, you may want to add pulldown resistors to the inputs to ensure they are off as power comes up (or pullups, if you need them high). I can't access the link you sent from here to be able to say more.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

danofri


Input pins are no problem, the ATMega requires very little current from the source device.

The Opto relay board is likely also buffered to put little load on the arduino output pins.

The solid state relay, being solid state and not mechanical relays, will also not be much load to arduino output pins.

When the arduino powers up, the I/O pins are all inputs until the sketch kicks in to make them outputs and commands them high or low.
If your SSRs are sensitive to what happens while that is going on, you may want to add pulldown resistors to the inputs to ensure they are off as power comes up (or pullups, if you need them high). I can't access the link you sent from here to be able to say more.



Many thanks!!

These are the important details about these SSRs from the link:
Input voltage: DC 3-32V
Input current: 6-35mA

Grumpy_Mike

That means you can simply connect the SSR to an arduuino pin without any additional resistors and it will take a bit under 10mA, so you are well in with your specification.

danofri

Many many thanks!!!

Go Up