When Driving An Indicator L.E.D.

# Thread: When Driving An Indicator L.E.D.

1. ## When Driving An Indicator L.E.D.

I've thought of this for a while and it has come up I need to know how it applies to a usage:
In the PBP Manual, there is a simple blinking of an L.E.D. test in one of the commands as an example.
The circuit shows an output pin on a PIC to the L.E.D. anode and the cathode though a resistor to ground. PIC is running at 5 volts.
My question is how (since most L.E.D.s forward voltage is rated at 1.5 to maybe 3 volts) is the L.E.D. handling the output of the PIC without being destroyed.

I'm pulsing the IR L.E.D. in a Solid State relay (see link) and would love to avoid translating through a mosfet down to the nominal forward voltage of the L.E.D. shown in the data sheet. Pulses are from 1 to 40 milliseconds long. All of supply is a regulated 5 volts. Can I skip the translation voltage?

I've also seen 'power on' indicators go from Vin to resistor/L.E.D.

I don't get it.

https://media.digikey.com/pdf/Data%2...zzzERzz_DS.pdf

2. Did you find this post helpful? |

## Re: When Driving An Indicator L.E.D.

That's what the resistor is there for, it's basic Ohms law (look it up if you don't know about it, it's fundamental in electronics)

The PIC outputs 5V, the forward voltage of the LED is 1.5V at 10mA. So you need to drop 3.5V across the resistor when 10mA flows thru it.
R=U/I or 3.5V/0.01A=350Ohm. For a LED this is not at all critical, a 220Ohm resistor will work and so will a 680Ohm resistor.

EDIT: Oh, another thing that might confuse you. LEDs (being diodes basically) are highly non linear, they're not meant to be driven by a low impedence voltage source. They are current driven devices and the Vf figure is the voltage that is being dropped across the LED at a specified current.
Last edited by HenrikOlsson; - 11th November 2021 at 18:20.

3. Did you find this post helpful? |

## Re: When Driving An Indicator L.E.D.

I thought the resistor only provided current limiting? Maybe you've explained but I don't get how it drops the voltage. I've used voltage dividers using 2 resistors, etc.
Last edited by Keith55555; - 11th November 2021 at 18:59.

4. Did you find this post helpful? |

## Re: When Driving An Indicator L.E.D.

Also, when you say 'L.E.D.s aren't meant to be driven by a low impedance voltage source; isn't when a circuit using an L.E.D. for a power indicator (which I've seen) driven by a regulators output (to say power is turned on via throwing a switch in the circuit) a low impedance source?

5. Did you find this post helpful? |

## Re: When Driving An Indicator L.E.D.

I thought the resistor only provided current limiting? Maybe you've explained but I don't get how it drops the voltage. I've used voltage dividers using 2 resistors, etc.
As before, Ohms law says that U=IxR, voltage = current x resistance. For a given current thru a given resistance there is a given voltage drop. The voltage drop across the LED is relatively constant (around 1.5V in your example). For a voltage drop of 5V across the LED the current would be in the tens of amps, instantly destroying the LED - provided the source could deliver that amount of current of course.

Also, when you say 'L.E.D.s aren't meant to be driven by a low impedance voltage source; isn't when a circuit using an L.E.D. for a power indicator (which I've seen) driven by a regulators output (to say power is turned on via throwing a switch in the circuit) a low impedance source?
The voltage regulator itself is a low impedance voltage source but surely there was a resistor in series with the LED wasn't there? That resistor turns that low impedance voltage source into a high(ish) impedance source, limiting the current thru the LED to whatever the designer of the circuit has decided.

6. Did you find this post helpful? |

## Re: When Driving An Indicator L.E.D.

Originally Posted by Keith Connelly
I'm pulsing the IR L.E.D. in a Solid State relay (see link) and would love to avoid translating through a mosfet down to the nominal forward voltage of the L.E.D. shown in the data sheet. Pulses are from 1 to 40 milliseconds long. All of supply is a regulated 5 volts. Can I skip the translation voltage?
Once you figure out how an LED works, then you can skip any additional circuitry you have driving the MOSFET relay LED input, and just treat it like a normal LED.
All you need is a resistor in series with the input LED. According to the datasheet you want a min of 3mA to turn it on, so to be safe calculate R so that you get 5mA,
something like R=(5V-Vf)/0.005, where Vf is the LED forward voltage taken from the datasheet.

7. Did you find this post helpful? |

## Re: When Driving An Indicator L.E.D.

Yes there was always a resistor. Thank you for the lesson.

8. Did you find this post helpful? |

## Re: When Driving An Indicator L.E.D.

The PIC outputs 5V, the forward voltage of the LED is 1.5V at 10mA. So you need to drop 3.5V across the resistor when 10mA flows thru it.
R=U/I or 3.5V/0.01A=350Ohm. For a LED this is not at all critical, a 220Ohm resistor will work and so will a 680Ohm resistor.
I thought the resistor only provided current limiting? Maybe you've explained but I don't get how it drops the voltage. I've used voltage dividers using 2 resistors, etc.
It may be helpful to try what HenrikOlsson suggested. Put a volt meter at the LED Anode (the + side, assuming the resistor is placed on the LED's "+" side) with a low value resistor (referencing the math provided by Henrik, try 220 Ohms) and see what the actual voltage is. Then replace the resistor with one a bit higher in value and retest the voltage. Repeat with an even larger resistor. You'll see that the voltage at the LED Anode doesn't change much as you swap out different resistors. HOWEVER, the CURRENT flowing through the circuit DOES change. (Ohm's Law stuff.) This will eventually affect how bright the LED appears to your human eye.

Most 8-bit PICs have 25ma ratings on the individual pins (some are as low as 10 ma, some as high as 50; you didn't mention the PIC part you're playing with). Therefore, driving an LED is perfectly safe, so long as you include the 'current limiting' resistor.

9. Did you find this post helpful? |

## Re: When Driving An Indicator L.E.D.

Thanks Mike. I'm using the 16F1823.

10. Did you find this post helpful? |

## Re: When Driving An Indicator L.E.D.

Take a look at charlieplexing if you'd like to see LED indicators taken to the extreme. Not saying this applies to your question, but it will give you some insight into how cleverly these simple rules can be applied.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts