Go Down

### Topic: LED/Resistor Question. (Read 2300 times)previous topic - next topic

#### wired67

##### Jul 05, 2015, 05:53 am
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.

#1
##### Jul 05, 2015, 07:03 am
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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### wired67

#2
##### Jul 05, 2015, 07:27 am

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?

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?

#### Grumpy_Mike

#3
##### Aug 22, 2015, 11:49 pm
Quote
Am I right to assume that in this case, since there is not enough voltage, nothing will happen?
Yes.

Quote
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.

Go Up