LED/Resistor Question.

Hi,

I'm new to electronics and picked up a starter kit recently and have been working through the projects in the book. It appears to simplify/skim over a lot of details on how things are actually working, so i've been doing a lot of searching on the forums/google for answers.

I've come up with a question that I can't find the answer to.

In project 1, on page 30, The book states that the maximum current for an LED is about 23 milli amps.

In the specs for the arduino (https://www.arduino.cc/en/Main/ArduinoBoardUno) it states that the max current per I/O pin is 40 millis amps.

So i have to ask: if i was to place 2 LEDs in series, would a resistor still be required?

I know I could probably try this out, but as I'm inexperienced, I'm not sure if I'm going to fry something by doing that.

Thanks.

You have to do something to Limit the current to 20 or 23mA. Usually a simple resistor is used.
The output pin has 5V. The LED when turned will have voltage across it - say 2.2V for Red (Vf). The rest of the voltage is dissipated the resistor. So since we know the voltage across the resistor, and we know the current we want flowing, the resistor value can be calculated using Ohms Low, V = IR, or V/I = R. (outputVoltage - ledVoltage)/desiredCurrent = resistorValue. (5V - 2.2V)/.02A = 140 ohm 150 ohm is a standard value. Rearranging V=IR to V/R = I, then (5V - 2.2V)/150ohm = 18.7mA.
Now with 2 LEDs in series: (5V - 2.2V - 2.2V)/.02A = 30 ohm
2 Green, Yellow, Blue, Orange, etc. may have too much Vf for 5V to turn them both on, with Vf being 2.7V to 3.2V to 3.5V.
You can power an individual LED from 5V with a 220 ohm to 1K resistor and measure its Vf so you will know, and will not break anything.

Hi, Thanks your you reply.

CrossRoads:
Now with 2 LEDs in series: (5V - 2.2V - 2.2V)/.02A = 30 ohm

So, if I understand correctly, if i have 2 red LEDs in series, I will still need a 30 ohm resistor?

CrossRoads:
2 Green, Yellow, Blue, Orange, etc. may have too much Vf for 5V to turn them both on, with Vf being 2.7V to 3.2V to 3.5V.

Am I right to assume that in this case, since there is not enough voltage, nothing will happen? or will only 1 of the LEDs light up?

Am I right to assume that in this case, since there is not enough voltage, nothing will happen?

Yes.

So, if I understand correctly, if i have 2 red LEDs in series, I will still need a 30 ohm resistor?

Yes ish, If your resistor ever turns out to be under 50R ( ohms ) then You do not have enough voltage or "head room" for the circuit.