How much current does an arduino uno pin 13 output? Is it up to what the device needs? Their seems to be a debate whether or not an LED can be lit safely, without a resistor,by pin 13 and 3v next to it. I measured the current draw on a Nano with and without an LED being lit and their was a 20 mA difference.
The LED was 20 mA so i assume it only outputs up to what it needs. So it would be safe to light LED with it.
My understanding is all the pins have the same current. I am rather new to this and seem to be getting contradicting information. I have not been able to test an Uno and all the info on the pin output always seems to focus on the maximum output and not the minimum. Also is their a way to code the exact amount of current you require? Thanks in advance. Be gentle I am new at this!!!
Hi,
You need resistors in all cases with LEDs to be sure the maximum current is not exceeded.
There is no minimum current on Arduino outputs.
See this page for details: ArduinoPinCurrent - ArduinoInfo
Take this document to the next debate. Page 304 - Notes 3 & 4.
https://cdn-shop.adafruit.com/datasheets/ATMEGA328P.pdf
hopestreet:
How much current does an arduino uno pin 13 output?
Is it up to what the device needs?
...
YES.
quick tip for n00b which i certainly found 'bankable'.
"The device draws the current" - that's where you start, THEN you see whether the origin of the current can supply that much.
so; an LED, a motor, a display - they all will take as much as they need - and we have to ensure that the power supply, whether a wall-wart, a DC-DC convertor or even a MCU/IC pin (that can source currrent) is up to it.
hopestreet:
How much current does an Arduino UNO pin 13 output? Is it up to what the device needs? Their seems to be a debate whether or not an LED can be lit safely, without a resistor,by pin 13 and 3v next to it.
Nope, sorry, no debate at all.
A rather long time ago, an early, Arduino, the "NG" ("New Generation" - like Microsoft's "NT" of the same epoch) had a nasty wiring blunder which connected pin 13 to the indicator LED rendering it useless for any purpose but lighting another LED; and even that poorly.
"Tutorials" by less-than-competent people have perpetuated this myth and it seems you have been reading somewhat less than wisely.
On the current Nano and Pro Mini. there is an on-board LED and resistor which indicates a HIGH (or dimly, if INPUT_PULLUP is enabled) on pin 13, but also pulls the pin down if used as an input. On the UNO and the crop of purported clones which are in fact, actually no more than Duemilanoves (as they lack the 32U4 USB processor), pin 13 has an op-amp buffer driving the indicator LED which does not load the pin significantly which means if it is set as an INPUT and not connected to anything, it will randomly flicker on and off in response to nearby static fields.
You should not connect anything to an output pin which draws more than 30 mA, and preferably no more than 20 mA as that is what is specified in the datasheet. So you require a resistor for any LED on any pin.
BabyGeezer:
hopestreet:
How much current does an arduino uno pin 13 output?
Is it up to what the device needs?YES.
NO!
I would rather word it like, any device will take the power it CAN, not what it "needs"!
If your device (like a motor) is limited to 1A, and your power supply will supply up to 10A, it will still only take 1A. If your power supply is limited to 0.5A, your motor can only take 0.5A.
Similarly your output pin on your arduino will be a "power supply" in itself for the LED, an output pin of the ATMEGA chip on your arduino has an output limit of 40mA (probably depending on your chip supply voltage too). So if you connect an LED directly to your output, it could take up to 40mA, if the conditions allow!
A LED is just a diode that emits light, as such it is not limited in how much current it CAN take. A LED will take several Amperes, if it CAN (if conditions allow, like voltage and available supply current)! Albeit only for a very short time (until it burns up).
So it is always advisable to somehow limit the current to your LED, usually this is done with a resistor. You could connect your LED directly to your output pin, but only if you are sure that it can actually handle the maximum current allowed on that pin. I wouldn't advice it though, since you will have a voltage drop on that pin, which means you will dissipate more power directly in your chip instead of in the current limiting resistor and in turn you may over time damage the ATMega on your Arduino.