Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Resistance in Series for LED connected to Microcontroller

Status
Not open for further replies.
E

expertengr

Guest
Hi, Normally we use a resistance in series to limit current for LED between 15-20mA otherwise it burns. I am wondering how to calculate the value of resistance when LED is connected to Microcontroller. Let's suppose we have a LED which needs 20 mA current. At some places they consider voltage drop of 2 V across the LED and then they calculate the resistance value as given below.

R = V/I = (5V-2V)/20 mA = 150 Ohm

But logically, a LED in forward bais drop 0.7 V like an ordinary PN diode, is that right ? If so then the calculation should be like this

R = V/I = (5V-0.7V)/20 mA = 215 Ohm

The other way of solving this is by including the internal resistance of LED, at some places it says 25 Ohm. The total resistance will be then the series resistance + the LED internal resistance. The calculation of series resistance in this case will be then

R + Internal Resistance = V/I
R + 25 Ohm = 5/20 mA
R + 25 Ohm = 250 Ohm
R = 225 Ohm

Q1: What is the actual voltage drop across the LED in circuit ?
Q2: What is an internal resistance of LED ?
 

Hi,

I am wondering how to calculate the value of resistance when LED is connected to Microcontroller.
There´s nothing (very) special with it. Just consider the microcontroller as a usual voltage source.
Only...if you want to go into detail then you need to consider the microcontroller_internal voltage drop.

But logically, a LED in forward bais drop 0.7 V like an ordinary PN diode, is that right ?
Not right.
A hint for the future: There are datasheets. A look in the datasheet gives you reliable information. No need to guess.

internal resistance of LED, at some places it says 25 Ohm
You talk about r not R. R is the absolute resistance at a given operating point, r is the differential resistance at a given operating point.
--> here a gain: read the datasheet. No need to rely on information seen on "some places".

Q1: What is the actual voltage drop across the LED in circuit ?
Q2: What is an internal resistance of LED ?

Please read the datasheet. Then try to find the soultions on your own. In doubt you are welcome here to get your values verified.

Klaus
 

If this is for an actual application, something else to consider is how much current the microcontroller can source. In some instances, it may be able to sink more current so you would connect your LED differently. All things to look at which will be listed in the datasheet for the micro.
 

The current on Microcontroller I/O pin is 30 mA maximum. Is it OK to connect LED (needs 20 mA) without a series resistor ?
 

Hi,

The current on Microcontroller I/O pin is 30 mA maximum. Is it OK to connect LED (needs 20 mA) without a series resistor ?
Surely not. But in detail we need to know to consult the exact datasheet for your microcontroller.
1) usually the 30mA limit is the max allowed limit. It´s not limited internally, but you have to ensure not to overload the IO pin.
2) the LED doesn´t need 20mA. It will work even with 1mA. Again here most probably 20mA it the max allowed limit. You have to take care for this.

You really need to read datasheets.
Even we professinals need to do this.. every day, many of them.

Klaus
 

This archive may be help you:

htt ps://ww w.4shared. com/photo/jMEbg2dCca/LED_Ref.html

As said read the datasheet for correct LED that you are using.
 

hello

But logically, a LED in forward bais drop 0.7 V like an ordinary PN diode, is that right ?

you don't specify the led color .. wich is an important parameter to define serial resistor to use..


tension de seuil d'une LED
Couleur Long Onde(nm) Tension de seuil
Ultraviolet <400 3,1
Blanc 3,4 - 3,8
Violet 400-450 2,7 - 3.1
Bleu 450-500 2,5 - 2,8
Vert 525-565 2,1 - 2,5
Jaune 585-590 2,1
Orange 600-620 2,0
Rouge 625-655 1,6 - 2V
Infra rouge >760 1,6
 

The datasheets of LEDs usually contains maximum and typical current and also forward voltage drop. How about the internal resistance of LEDs ?

If I have a LED which has voltage drop of 2 V. Then the current can be calculated as

I = V / R
I = (5 V - 2 V) / R

Here R is the sum of series resistance and the LED internal resistance. Is there any table for internal resistance of different color LEDs ?
 
Last edited:

Q1: What is the actual voltage drop across the LED in circuit ?
Q2: What is an internal resistance of LED ?

I think first you need to get the internal resistance of LED from its datasheet. After that you simply need to use voltage divider formula which is:

Vout = R2/(R1+R2) * Vin

R2 is your LED resistance and R1 is the simple resistance you are using. Vin is like 5V if you are using some microcontroller. So Vout will be the output voltage or the voltage across your LED.
 

The datasheets of LEDs usually contains maximum and typical current and also forward voltage drop. How about the internal resistance of LEDs ?

In your Led datasheet , use the curve Intensity (mA) f( Forward voltage )
for example at 10mA ou have a forward voltage of 1,5V
so you have the dynamic value of R Led : 1500 mV /10mA= 150 ohms.

if you power supply is 4,5 V add a resistor of 300 ohms in serial with the led
(4,5v - 1,5V)/10mA => 300 ohms

and check : R=300 + R led=150 => 450 ohms 4.5V/450=> 10mA

in reality, if the output is an MCU output to drive the led ..
you will loose maybe 0,2V to 0,5V in the MCU .. so maybe 270 ohms instead of 300..
 

Hi

The datasheets of LEDs usually contains maximum and typical current and also forward voltage drop. How about the internal resistance of LEDs ?
As with any device:
If you have
* voltage_across_the_ device
* current_through_device
Then use ohm´s law to get the device´ resistance.

so you have the dynamic value of R Led : 1500 mV /10mA= 150 ohms.
No, that´s not the dynamic resistance it´s the absolute resistance.
But here we need the abslolute resistance - so the calculation is correct, just the name is wrong.

Btw:
The dynamic resistance is: rd = ΔV / ΔI

Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top