I'm trying to work out what value resistor to use in a LED circuit. The equation I'd use to do this is:
$$ R = \frac{V_{cc} - V_f}{I_f} $$
Seems logical, and makes complete sense. The answers to the question How do I calculate the resistor value for a simple LED circuit? confirm this too.
I have the following LEDs:
- \$ V_f = 3.3V \$
- \$ I_{f_{typ}} = 20mA \$
Using a 5V power supply:
- \$ V_{cc} = 5V \$
Plugging these into the above equation gives:
$$ \begin{eqnarray} R & = & \frac{V_{cc} - V_f}{I_f} \\ & = & \frac{5V - 3.3V}{20mA} \\ & = & 85\Omega \end{eqnarray} $$
All good so far.
However, if I use the calculator at http://led.linear1.org/1led.wiz, that gives me 100Ω. If I use the ElectroDroid app on my phone, that gives me 85Ω.
So, I assume that the linear1 calculator is using a different method of calculating this resistor value; is there some better way of doing this?
Answer
Your calculation is correct. linear1 rounds up to the next E12 value, which happens to be 100\$\Omega\$. The nearest E12 value would have been 82\$\Omega\$, and that would still be safe, because, even if the current will be higher, the difference will be small, within the 10% tolerance of the E12 series.
edit
Purists may say I'm cutting corners here. Russell has a long answer about iterating the solution, and others whine (hey, no offense!) about rounding up being more safe. My answer is meant to be pragmatic; no professional design engineer can afford to spend 15 minutes to calculate the resistor for a classical color LED. If you stay well below the maximum allowed current you'll have enough headroom to allow some rounding, and the rounded value won't be noticeable in brightness. For most LEDs perceived brightness doesn't increase much above a value of typically 20mA, anyway.
No comments:
Post a Comment