14
\$\begingroup\$

This question mentioned that pin 13 has a built-in resistor for the LED that comes standard on most Arduino units. A friend of mine told me that because there's already a resistor on the pin, I don't have to put one on when I plug an external LED into the pin.

This doesn't sit right with me, as I read all over the place that it's very bad to plug in an LED without a current-limiting resistor. I can't find where pin 13 is on the circuit diagram (still getting used to reading those), so I don't know how the built-in resistor is wired.

Question-in-short: Do I need a current-limiting resistor when using pin 13 for a (small) LED?

EDIT: As Polar pointed out below, a single resistor would do the trick. However, I'm really curious as to the positioning of this single (built-in) resistor. If it's in series with the header for P13, then it should limit current. If it's in parallel, I don't think so. However, my electronics knowledge isn't that vast, so I could be mistaken...

\$\endgroup\$
0

2 Answers 2

11
\$\begingroup\$

If you examine the schematics for any of the Arduino boards (other than the Arduino NG Revision C, which does not have an on-board user LED), e.g. the one for the Arduino Uno, the pin has a resistor and then the LED wired off it to ground, in parallel to the actual output pin header.

Crop from schematic

Thus, if you do not use a separate resistor in series to your own LED, there is a fair chance of damaging your LED.

Thus, yes you do need a resistor for your external LED.

\$\endgroup\$
4
  • 3
    \$\begingroup\$ nice diagram usage! \$\endgroup\$
    – Robert
    Commented Apr 10, 2013 at 23:21
  • \$\begingroup\$ I hooked it up to a multimeter, no load, and it read 4.93v, no load. That is weird. The Arduino site also has a resistor. I had a book that said it was okay to do it just with pin 13. Never knew that. Oops. I am going to retry with a LED hooked up tomorrow. \$\endgroup\$ Commented Apr 11, 2013 at 1:46
  • \$\begingroup\$ @AnnonomusPerson - 4.93V sounds about right. Incidentally, you do have a load - the built in resistor. Measure the 5V output while you're at it. Most voltage regulators are typically only specified to be within 1-5% (it depends on the specific part) of the voltage they're specified for. \$\endgroup\$ Commented Apr 12, 2013 at 4:06
  • \$\begingroup\$ please note the latest UNO (R3) use a transitor to light up the led, so new user wont get strange result while using the pin for read/write \$\endgroup\$
    – Lesto
    Commented Mar 12, 2014 at 22:26
10
\$\begingroup\$

Only the very early boards had a resistor on pin 13. The numerous tutorials out that there that still claim pin 13 has a resistor are just flat out wrong. No recent (well over 2 years now) Arduino has a built-in resistor on Pin 13.

Question-in-short: Do I need a current-limiting resistor when using pin 13 for a (small) LED?

ALL LEDs, regardless of size, require some form of current limiting. When the forward voltage of the LED is applied, it turns into a short circuit. A LED only drops its forward voltage. So if the forward voltage is 3volts and the I/O pin or supply provides 5volts, something else needs to drop the remaining 2volts.

A series resistor will drop the rest of the supply (or pin) voltage and limit the current running through the LED.

For higher power LEDs you would probably want to use a constant current supply so that the series resistor isn't just wasting power.

\$\endgroup\$
2
  • \$\begingroup\$ All Uno R3's had an on board LED with a resistor. All Nanos and Pro Minis also have an on board led with a resistor. Even the clones. There are also resistors on Tx and Rx LEDs. Even in 2013. You coud also drive a LED without a resistor from the reset pin on the reset as well if you (were brave enough to) make it I/O and have a high voltage programmer to recover. \$\endgroup\$
    – mckenzm
    Commented Apr 26, 2023 at 22:43
  • \$\begingroup\$ @mckenzm Yes, there are resistors for the ONBOARD LEDs. The external pins do not have a series resistor. So if you connect an external LED to pin 13 (or any other pin), you must include a current limiting resistor. \$\endgroup\$ Commented Apr 28, 2023 at 2:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.