Properly calculating resistance

It's been many years since I dabbled in electronics. So I'm gonna have some very elementary questions, as I get myself caught back up.

As I continue to bring myself back up to speed, I'm trying to calculate resistance values needed for componenets, like LEDs.

So if I have a red LED, rated 2v, 20ma, and a 5v power supply, then my calculation is thus:
5v-2v / .02a = 150ohm
Is this math correct? So when I see people recommending 330ohm, they're just allowing for +- tolerances?

Hi,
yes it is.

If you are using an Arduino UNO the maximum current drawn from a pin is 20mA.
recommended from a pin is 20mA.

The LED lights up well with +- 9 mA. (3V/330 Ohms).

1 Like

I think they just want less current == lower brightness.

Modern LEDs are dazzlingly bright, compared to those that first appeared back in the '70s, for the same current. If used for illumination or a light show, fine, use the maximum current. But if used simply as indicators on a control panel, you don't want the maximum brightness, especially in a darker environment, modern LEDs at full brightness would leave spots in front of your eyes!

Another reason could be life. LEDs don't last forever. Generally they don't fail like incandescent bulbs, as long as they are good quality. But they do fade over the years. The more current you push through them, the faster they fade.

1 Like

Over the years I have changed LED resistors from 330 ohm to 470 ohm and now I use 1K to 1.5K. And this is in spite of poorer vision. LEDs have improved a lot.

There are so many types of LED's.. some work fine from 3.7V, others do lit from 1.5V.... Currents? the same 1mA or 10mA.. check the datasheet.... or your eyes... Less is more: if you can find a LED that works with a low current, you won't overheat the processor..

Eh?
:face_with_raised_eyebrow:

Again, some great info from a bunch of people!
@ruilviana Thanks for the clarification on max/recommended values.
@PaulRB and oldcurmudgeon The few times through the years I'd goofed with LEDs, I thought the same about the brightness changing. I will probably be playing with the values to keep it comfortable.

Sorry, oldcurmudgeon. forum newbies can't mention more than two people in a post. :frowning:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.