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\$
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\$
  • 3
    \$\begingroup\$ nice diagram usage! \$\endgroup\$ – Robert Apr 10 '13 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\$ – Anonymous Penguin Apr 11 '13 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\$ – Connor Wolf Apr 12 '13 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 Mar 12 '14 at 22:26
11
\$\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\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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