Electrical – How to solve for current given resistor value for LED circuit

circuit analysiscurrent measurementcurrent-limitingledresistors

So I have the following LED circuit:

enter image description here

I know how to find the forward voltage and current from the datasheet of the LED and how to then solve for the appropriate value of \$R\$.

However, what I really want to do is fix the resistor value at \$R=100\$ (I'm just picking a resistor value that exists in a kit I have) and solve for \$I_F\$:

enter image description here

The only way I can currently think of to solve this is:

$$V_F+V_R=V_{CC}-V_{OL}$$
$$V_F+I_FR=V_{CC}-V_{OL}$$
$$V_F+100I_F=4.3$$

I found \$(V_F,I_F)=\{(2.3, 20), (2.8,15)\}\$ to be 2 arbitrary solutions to the equation. Then I graphed a line on the VI plot to determine all possible solutions to the equation. Finally I found the intersection of the line and the VI plot to determine what was the true solution to the equation is.

enter image description here

From this it looks like \$V_F=2.1\$ and \$I_F=22\$.

However, this was a lot of work for such a basic circuit. Is there an easier way to solve for or at least nicely estimate what \$I_F\$ would be given \$R\$? The value of the current matters a lot to me because I need to make sure I don't fry my microcontroller!

Best Answer

Is there an easier way to solve for or at least nicely estimate what \$I_F\$ ... because I need to make sure I don't fry my microcontroller!

Two easy solutions:

  • Choose a target current that's well below the limits of the micro or LED, like 5 mA instead of 20 mA, then just assume \$V_F\$ is close to its nominal value (say, 2.2 V in this example). If the LED doesn't have to be visible in very bright light, 5 mA should be adequate (or you should be able to find a different LED that is adequately visible with 5 mA)

or

  • Use a transistor buffer with much more than 20 mA capability to eliminate risk to the micro.

Before you try to calculate the diode current any more precisely, you should consider that the diode forward voltage is likely to vary by 100 mV or more as its temperature changes.