could anyone please help as for how much total current I can draw from my Arduino Mega? Planning to connect 25 LEDs, each taking 20 mA, sourcing from USB. Is that OK in terms of the total output limit and USB powering? I know one pin can source up to 40 mA which does work for me but am worried about the sum of the currents.
I would like to know that too. My application is different but I still have to drain a significant amount of power from the mega. I have some optical fiber transmitters which drain about 10mA but I have 48 of them and the only thing I'm concerned about is power supply.
From the datasheet 40mA from each I/O port seem to be enougn though. Maybe we should check on the MCU datasheet if there are any limitaions, this is not strictly an arduino issue.
DC Current per I/O Pin ................................................ 40.0mA
DC Current VCC and GND Pins................................. 200.0mA
So you shouldn't draw more than 40mA from a single pin, or more than 200mA in total. I have seen it on the forums a number of times that you should limit single pin draw to 20mA for continued good health of the Arduino.