Maker Pro
Maker Pro

LED curiosities of a non-expert

P

Peter S. May

Jan 1, 1970
0
A curiosity.

The first:

The trivial circuit for lighting an LED is something like:

Vcc <----/\/\/\--->|----| GND
R LED

Where the current flowing is (Vcc - Vf)/R. For example, if it's a red
LED (say Vf = 1.2V) and a 5V supply, a 200-ohm resistance will run it at
19mA.

So, what's going on if I connect an LED with Vf = 1.2V directly (R = 0)
to a cell of 1.2V? It seems to light, but what governs the current to
the LED?


Another curiosity I've seen argued by non-experts.

Let's say that instead of going directly to the supply, we're using an
I/O pin on a microcontroller:

uC pin ----/\/\/\--->|----| GND

Some people justify omitting the resistor by saying that the uC's
sink/source capability is only, for example, 25mA. Others (including
me, unless I'm schooled otherwise) believe that without the resistor the
LED will tend to pull as much as it can until it, the uC, or both are
fried for being pushed past specifications. Who's right?


Thanks
PSM
 
J

Jan Panteltje

Jan 1, 1970
0
A curiosity.

The first:

The trivial circuit for lighting an LED is something like:

Vcc <----/\/\/\--->|----| GND
R LED

Where the current flowing is (Vcc - Vf)/R. For example, if it's a red
LED (say Vf = 1.2V) and a 5V supply, a 200-ohm resistance will run it at
19mA.

So, what's going on if I connect an LED with Vf = 1.2V directly (R = 0)
to a cell of 1.2V? It seems to light, but what governs the current to
the LED?

The internal resistance of the LED, or, if you want, the diode chracteristic
of its junction (I versus U).

Another curiosity I've seen argued by non-experts.

Let's say that instead of going directly to the supply, we're using an
I/O pin on a microcontroller:

uC pin ----/\/\/\--->|----| GND

Some people justify omitting the resistor by saying that the uC's
sink/source capability is only, for example, 25mA. Others (including
me, unless I'm schooled otherwise) believe that without the resistor the
LED will tend to pull as much as it can until it, the uC, or both are
fried for being pushed past specifications. Who's right?

Uc outputs do not have zero ohm when on (in pull up, or pull down).
Those MOSFETS will limit the current,
But that limit depends on temperature, supply voltage, etc...

Better have a resistor or driver.
 
N

Nobody

Jan 1, 1970
0
The trivial circuit for lighting an LED is something like:

Vcc <----/\/\/\--->|----| GND
R LED

Where the current flowing is (Vcc - Vf)/R. For example, if it's a red
LED (say Vf = 1.2V) and a 5V supply, a 200-ohm resistance will run it at
19mA.

So, what's going on if I connect an LED with Vf = 1.2V directly (R = 0)
to a cell of 1.2V? It seems to light, but what governs the current to
the LED?

Its I-V characteristic curve. For an ideal diode, the I/V relationship is
roughly exponential; see:

http://en.wikipedia.org/wiki/Diode_modelling#Shockley_diode_model

At higher currents, the cell's internal resistance will also be a factor.

The simplified model of a diode as a switch, with zero conductance below
the turn-on voltage and infinite conductance above it falls down in the
case where you're connecting a low impedance voltage source directly.

Such situations are generally avoided, as the current varies significantly
with small changes in both the applied voltage and the diode's turn-on
voltage, resulting in circuits which tend to work significantly less well
in practice than in theory.
 
D

D from BC

Jan 1, 1970
0
A curiosity.

The first:

The trivial circuit for lighting an LED is something like:

Vcc <----/\/\/\--->|----| GND
R LED

Where the current flowing is (Vcc - Vf)/R. For example, if it's a red
LED (say Vf = 1.2V) and a 5V supply, a 200-ohm resistance will run it at
19mA.

So, what's going on if I connect an LED with Vf = 1.2V directly (R = 0)
to a cell of 1.2V? It seems to light, but what governs the current to
the LED?


Another curiosity I've seen argued by non-experts.

Let's say that instead of going directly to the supply, we're using an
I/O pin on a microcontroller:

uC pin ----/\/\/\--->|----| GND

Some people justify omitting the resistor by saying that the uC's
sink/source capability is only, for example, 25mA. Others (including
me, unless I'm schooled otherwise) believe that without the resistor the
LED will tend to pull as much as it can until it, the uC, or both are
fried for being pushed past specifications. Who's right?


Thanks
PSM

In the case of R=0, the LED current is due to semiconductor physics.
See the I(V) graph on the LED datasheet.
It follows a diodelike transfer function.
Temperature dependant too.

Sure LED direct drive by 5V logic with a continous max output current
spec that doesn't blow the LED can limit the current but at a
price....higher IC temp.
If the IC can handle the heat and works ok, it's ok.


D from BC
 
S

Spehro Pefhany

Jan 1, 1970
0
Another curiosity I've seen argued by non-experts.

Let's say that instead of going directly to the supply, we're using an
I/O pin on a microcontroller:

uC pin ----/\/\/\--->|----| GND

Some people justify omitting the resistor by saying that the uC's
sink/source capability is only, for example, 25mA. Others (including
me, unless I'm schooled otherwise) believe that without the resistor the
LED will tend to pull as much as it can until it, the uC, or both are
fried for being pushed past specifications. Who's right?

The relevant part of the output structure on the micro in this case is
a p-channel MOSFET which is likely operating as a more-or-less
constant-current source without the resistor (because Vds >> Vth). The
problem is that the current is not well defined and could be too large
for reliable operation of the micro and/or the LED. Chances are very
good it will work most or all of the time with some chips, in fact the
early Sinclair calculator omitted the drivers and series resistors in
just this way to simplify the circuit and meet a GBP 99 (IIRC) price
point. Something like a 5V PIC might not have as happy a result since
their short-circuit current will likely be excess of LED and output
rating. It may or may not work for a fair length of time at room
temperature with a given chip. Microchip do not provide even typical
graphs for their current chips, however the information was included
on early datasheets. See, for example: (page 135)
http://download.siliconexpert.com/pdfs/mcu/mcp/30453c.pd

For real designs that have to work reliably, it's best avoided,
however that doesn't mean it won't work sometimes.

Best regards,
Spehro Pefhany
 
The relevant part of the output structure on the micro in this case is
a p-channel MOSFET which is likely operating as a more-or-less
constant-current source without the resistor (because Vds >> Vth). The
problem is that the current is not well defined and could be too large
for reliable operation of the micro and/or the LED. Chances are very
good it will work most or all of the time with some chips, in fact the
early Sinclair calculator omitted the drivers and series resistors in
just this way to simplify the circuit and meet a GBP 99 (IIRC) price
point. Something like a 5V PIC might not have as happy a result since
their short-circuit current will likely be excess of LED and output
rating. It may or may not work for a fair length of time at room

Not just that but I recall there is a max current you can pull through
the PIC's power pins. Even though a single PIC output may be able to
source 25mA, the PIC can't source 25mA on all pins simultaneously.
IIRC, YMMV, etc
 
S

Spehro Pefhany

Jan 1, 1970
0
Not just that but I recall there is a max current you can pull through
the PIC's power pins. Even though a single PIC output may be able to
source 25mA, the PIC can't source 25mA on all pins simultaneously.
IIRC, YMMV, etc

Quite true, and with some micros there is also a per-port maximum,
IIRC.


Best regards,
Spehro Pefhany
 
J

Jim Yanik

Jan 1, 1970
0
A curiosity.

The first:

The trivial circuit for lighting an LED is something like:

Vcc <----/\/\/\--->|----| GND
R LED

Where the current flowing is (Vcc - Vf)/R. For example, if it's a red
LED (say Vf = 1.2V) and a 5V supply, a 200-ohm resistance will run it at
19mA.

So, what's going on if I connect an LED with Vf = 1.2V directly (R = 0)
to a cell of 1.2V? It seems to light, but what governs the current to
the LED?

internal impedance of the cell.
That's how those keychain LED lights limit LED current.
 
Top