200 mA output from the Arduino digital output

First of all, diodes always need a current limiting resistor. In this case apparently at least (5V - 0.8) / 200mA = some 20-25 ohm at the very least. Otherwise you risk burning the diode.

Second, the output current of your MCU is not 40mA per pin! 40mA/pin and 200mA total are absolute maximum ratings.

When reading any electronics datasheet, you should design after typical characteristics and not the absolute maximum ratings. Absolute maximum ratings = what the part can withstand for a short, often unspecified time, if stressed. All engineers know this, though to make it extra clear, it is also explicitly rubbed in the reader's face by the friendly manual of ATmega328P (28.1):

This is a stress rating only and functional operation of the device at these or any 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.

The friendly manual states the following below DC characteristics (28.2):

enter image description here

You need to design after these source/sink conditions depending on MCU pin used.


The correct solution here is to use BJT or MOSFET, or perhaps some manner of specialized LED driver, depending on if you need PWM or not.


The absolute maximum total current from all the IO pins together on an Arduino Uno is 200 mA, so I wouldn't try this.

Also, if you don't switch the five outputs simultaneously, you run the risk of blowing them up one by one.

If it would work, which it won't, then yes, you would need a resistor, as the Arduino Uno has a 5V microcontroller sitting on it and the LED drops less than 1V, so a resistor should be added that drops about 4.5V at the LED current you want.