Really basic question [leds and resistors]

So I got my Arduino today, after half a week of waiting in excitement.
My question is simple: if using the digital pins and say a PWM sketch like http://www.arduino.cc/en/Tutorial/Fading, do I need to use resistors to keep my LEDs from dieing?
I've tried this setup without a resistor (on both pin 9 and 13) and it works, but I'm afraid I'll kill off my LED if I let it run for longer than say 10-20 seconds.
I'm unsure about if it's necassery to use a resistor because the first 'real' tutorial (Arduino Tutorial - Lesson 1 - Let there be blink!) doesn't mention using one, but two tutorials later it is mentioned (http://www.ladyada.net/learn/arduino/lesson3.html). Could you guys help the noobie out here? ^^

Some LEDs have a resistor built in but most don't. If you are not sure then you should use a resistor.

Some LEDs have a resistor built in but most don't. If you are not sure then you should use a resistor.

Thanks :slight_smile: Is there anyway a noob like me can check wether a LED has got a resistor built-in? I want to start building some stuff tonight but the shops closed and I haven't got any resistors...

mem is right, some LEDs do have a resistor built in, but I would add that these LEDs are extremely rare. 99.99% of LEDS that you would buy at the electronics store don;t have one built in. the way to test is to connect first with resistor.

D

mem is right, some LEDs do have a resistor built in, but I would add that these LEDs are extremely rare. 99.99% of LEDS that you would buy at the electronics store don;t have one built in. the way to test is to connect first with resistor.

D

I've connected my LED now with a 700ohm resistor, and while it works, it's a lot less bright than without any resistor at all. And after running for a couple of minutes (without a resistor), my white LED (I've got a few, so I tested) didn't die. Can I conclude it's got a resistor built-in or will it still die after an extended amount of time?

It will be a less bright with the resistor, that is normal. But if its so dim you can hardly see it then your LED may be ok without one. In my experience, they die in seconds if they are connected across 5 volts without current limiting.

(I wonder if the arduino pins are designed to limit the current?)

I can actually run my LEDs for longer than a few seconds, though I'm afraid to test all of them a longer amount of time (of some colors I only have one right now) without resistors. But if a LED doesn't die out in half a minute, is it safe to use them without resistors? There is quite a difference in brightness and I would like to have them as bright as possible...

The formal answer to your question is to measure how much current the LEDs are drawing with a multi-meter and check this with the specification of each LED (they are different for different colors).

Do you have any way of finding out what the specs are for your LEDs?

The formal answer to your question is to measure how much current the LEDs are drawing with a multi-meter and check this with the specification of each LED (they are different for different colors).

Do you have any way of finding out what the specs are for your LEDs?

Nope, I am afraid not. Bought them in Leeuwarden (a city up north of Holland, far away from my home), and haven't got a clue which store it was. The only specs I have is that I've got one red, one green, one blue, and one white LED, that they are running fine without resistors for say 20 secs, that they still work now after multiple times say 20 secs, and that they go considerably less bright when adding 700 Ohm resistors in the mix.

I once found this PDF explaining current limiting resistors with LED's

http://mikmo.dk/misc/led_hook_up.pdf

I long since forgot where, so i'm unable to give credit where credit's due

Ah, now after reading that I recall something else. I specifically ordered ultra bright LEDs, maybe that ought to clear up something. Thanks for all the help so far by the way :slight_smile:

I've run normal LEDs off 9v batteries for ages without resistors.
Sure they get rather hot and they do eventually die but they last a hour or two.

I've run normal LEDs off 9v batteries for ages without resistors.
Sure they get rather hot and they do eventually die but they last a hour or two.

Thanks, I'll stick to my resistors until I find really solid proof of my LEDs having built-in resistors.

For most LED's a 470 Ohm resistor is good for 12V supply

If your LED's are too dimm when using 700Ohm resistors, try 470 Ohm.

if you follow the traces on pin 13 you will see it already has a resistor in place.