Voltage and max current of digital output?

i didn't see the specifics and Google search isn't helpful. I probably didn't use the right keyword. So what are the typical voltage level and max current of the digital output? I wanted to get optimal resistor value to drive LEDs using this old formula: Vsource-2.2/.02 (voltage source minus 2.2v for LED, divided by 0.02A)

Blue, purple, and white LED typically requires 3v.

TIA

wilykat:
i didn't see the specifics and Google search isn't helpful. I probably didn't use the right keyword. So what are the typical voltage level and max current of the digital output? I wanted to get optimal resistor value to drive LEDs using this old formula: Vsource-2.2/.02 (voltage source minus 2.2v for LED, divided by 0.02A)

Blue, purple, and white LED typically requires 3v.

TIA

The voltage level output of a digital output pin is the same voltage that is powering the chip on the board. Most arduino boards use a +5vdc for the Vcc value, so output pins go from 0 to just short of +5vdc, however if the chip is powered from a 3.3vdc Vcc value then the output pin will go up to just short of 3.3vdc. Output current limits are also related to what voltage the chip is running at, but absolute maximum when running at +5vdc is 40ma, with 20ma a recommended continuous working current rating limit.

Red leds usually have around a 1.5 Vf rating. Best to always check the datasheet for the specific leds you obtain to find their Vf ratings. Also most modern LEDs can be run at much lower then 20ma and still give good brightness, it really comes down to how bright your specific application requires. The power led on a arduino uses a 1k ohm resistor limiting the led current to just a couple of ma, and works just fine as a power on indicator.

Lefty

Thanks!!!

Did you google the actual question?

I just added "Arduino" to your subject line and searched with: "arduino Voltage and max current of digital output"

Brought up this as the 2nd link:

You want to read the section "Input and Output".

Hmmm that did not come up when I googled. Maybe a typo on my search words? Oh well. I got what I needed, 5v, max 40ma

FWIW the SMD LED uses far less current than a common 5mm LEDs, so while 1k resistor would work for SMD LEDs, it may make 5mm LED a bit dim.

wilykat:
Hmmm that did not come up when I googled. Maybe a typo on my search words? Oh well. I got what I needed, 5v, max 40ma

FWIW the SMD LED uses far less current than a common 5mm LEDs, so while 1k resistor would work for SMD LEDs, it may make 5mm LED a bit dim.

Certainly, but my point was there is not always a reason or justification for running an led at it's maximum continuous current rating, they continue to work well at less then that amount and the current consumed Vs brightness created leaves a lot of room for circuit optimization and efficiency trade-offs.

And again the 40ma max spec is an absolute maximum electrical safety warning limit, at which any additional current will cause chip damage. Most of the manufacture datasheet examples and specs show or recommend a 20ma maximum continuous current usage limit. There are also maximum current limits per 8 bit ports and a 200ma total chip current usage limit, it's up to you to determine which limit you hit first and to stay at or less then that limit.

Lefty

Any idea of the maximum current the 5V pin can source (on a nano)? I realize that a USB can give a max of 500mA to the arduino, but how much of that can you access on the 5V pin?
Thank you!

Meaghan:
Any idea of the maximum current the 5V pin can source (on a nano)? I realize that a USB can give a max of 500mA to the arduino, but how much of that can you access on the 5V pin?
Thank you!

The 5V pin has whatever the on-board chips aren't using. A conservative estimate would the board itself draws 50mA.

I got what I needed, 5v, max 40ma

Try 4.2V, 20mA, any more current than that and the voltage output can be expected to drop.

VOH Output High Voltage(3) except Reset pin: Minimim 4.2V
Condition: IOH = -20mA, VCC = 5V

  1. 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:
    ATmega48A/PA/88A/PA/168A/PA/328/P:
    1] The sum of all IOH, for ports C0 - C5, D0- D4, ADC7, RESET should not exceed 150mA.
    2] The sum of all IOH, for ports B0 - B5, D5 - D7, ADC6, XTAL1, XTAL2 should not exceed 150mA.
    If IIOH exceeds the test condition, VOH may exceed the related specification. Pins are not guaranteed to source current
    greater than the listed test condition.

Meaghan:
Any idea of the maximum current the 5V pin can source (on a nano)? I realize that a USB can give a max of 500mA to the arduino, but how much of that can you access on the 5V pin?
Thank you!

I've had the same question before many times too, so I decided to write a bit on the matter on my blog here:
ElectricRCAircraftGuy.com--RC, Arduino, Programming, & Electronics: Arduino Power, Current, and Voltage Limitations

Here's a snippet:
--See the link above for much more detail, including sources, links to datasheets and schematics, etc.

"Summary of information below:

Input Voltage Limits:
Recommended: 7~12V
Absolute: 6~20V
Input/Output pins: -0.5V - 5.5V

Output Current Limits:
When powered by USB: total of 500mA
With external battery or power supply: total of 500mA~1A (see below for specifics)
5V pin: same as above: 500mA or 500mA~1A
Each input/output pin: 40mA
Sum of all input/output pins combined (but NOT including the "5V" pin): 200mA"

Again, check out the whole post please for more details and links to datasheets:
ElectricRCAircraftGuy.com--RC, Arduino, Programming, & Electronics: Arduino Power, Current, and Voltage Limitations

1A is not correct - the regulators are only rated for 800mA, and you can only achieve that if the incoming voltage is low.

CrossRoads:
1A is not correct - the regulators are only rated for 800mA, and you can only achieve that if the incoming voltage is low.

Here's the datasheets for the regulators to which I'm referring:

  1. http://www.unihedron.com/projects/sqm-le/PDFspecs/NCP1117-D.PDF - used on Uno - specifies it can output > 1A, but Note 4 says not to exceed 1A w/Vin > 12V.
  2. http://www.advanced-monolithic.com/pdf/ds1117.pdf - used on the Nano-compatible to which I refer in my blog post - page 3 specifies one test condition Iout = 1A with Vin = 6.5V; also, first page says output up to 1A.

panther3001:
Here's the datasheets for the regulators to which I'm referring:

  1. http://www.unihedron.com/projects/sqm-le/PDFspecs/NCP1117-D.PDF - used on Uno - specifies it can output > 1A, but Note 4 says not to exceed 1A w/Vin > 12V.

Yes, that's what the datasheet for that component states. There is a difference between theory and practice.

After testing, I found that with 12V in, you're really limited to about 300mA. It does depend on which package the regulator is in (R1/R2 Uno has a larger package than R3, so handles more current.)

So it is foolish to suggest you're going to get anywhere near 1A with 12V.

James, in your testing, what's the highest current you've gotten out of the 5V pin then? And under what conditions, and with which regulator on the board?

Nano tho:

Any idea of the maximum current the 5V pin can source (on a nano)?

uses UA78M05, only rated for 500mA.

panther3001:
James, in your testing, what's the highest current you've gotten out of the 5V pin then? And under what conditions, and with which regulator on the board?

That's too many variations to summarize. I'm working on a post that covers it all. I looked up my notes last night when replying, but can't find it now. I need to re-run my tests.

However, at 12V, I never got more than 500mA before either regulator shut down. Which was the point of my testing. To help explain why projects work on USB but not with 12V in.

9V you can draw quite a bit. Nearly 1A. I think I ran out of resistors before I could kill it.

At 16V, you can get about 300mA out before shutdown hits.

Ok. Just to make sure I got this correctly:
If I have red LEDs that work at 2v, 20mA and I put them in series in groups of 2 and put 3 groups in parallel (plus a 50 Ohm resistor for each group) then I'd draw 3x20mA at 5V, so 60mA from a single pin, rigth? And that's more than the 40 or so mA that are recommended for one pin?

In other words: If I run 6 of those LEDs off a single pin, then I could damage the pin?

Old post revived.
Better to start a new thread.

Arduino pins shouldn't switch more than 20mA.
A small NPN transistor with 1k base resistor could do the heavy lifting.
Then the pin only has to provide 4mA base current.
Leo..

Take a look HERE: and see "Arduino Pin Current Limitations"..

For more 5V current, the solution is a switch-mode power regulator. You can get about 2A at 5V from the RoboRED (Arduino UNO Compatible) board HERE:

DISCLAIMER: Mentioned stuff from my own shop...

I managed to get out of digital pin using knock off nano:
70ma when powered from 500ma computer USB port,
76ma when powered from standard Samsung USB 2A charger,
87ma when powered from standard Samsung USB 2A charger, but fed directly to VCC rail.

cheers