multiple resistors

if I want to turn on 3 led diods connected to 3 output pins,
why does every online exercise predict 3 resistors (eg. 200 ohm), each for every led?

would it also be acceptible to connect only one 200 ohm resistor to the sink (minus, ground)?

if not, why and what are the downsides?

49da58d64b6b79449ea1542411109a5656fc9fef.jpg
Well, that means the LEDs are sharing the current the resistor allocates.

If you have three kids, they can’t each eat the whole cake.

And since different colour LEDs have different threshold voltages, even that sharing will be unequal, in general the redder LEDs will win out if there is a contest.

Now note, if you do not want more than one LED to be lit at one time, that arrangement is just fine.

thanks!

is there any reason they often put the resistors before the leds (between source and +?
my guess would be that after the leds (between gnd and -). am i correct?

Hi,
It doesn't matter, as long as the resistor and LED are in series, the current flowing through them is the same.
The important part is making sure the ANODE of the LED is Positive and the K(C)ATHODE is Negative with respect to each other.

Tom.... :slight_smile:

TomGeorge:
The important part is making sure the ANODE of the LED is Positive and the K(C)ATHODE is Negative with respect to each other.
Tom.... :slight_smile:

Yep - unlike in the posted Fritzing diagram. :slight_smile:

OP might find my pictures in replies #7, #8 and #9 of this thread helpful.

If you always connect the led cathode to GND, you can measure the led foward voltage on the anode, and the led current across the resistor

Standard current limiting resistor value for MOST tutorials is 220 ohms (NOT 200 ohms)

LED forward current given on datasheets is considered to be the SAFE maximum current.
This means you can choose any current equal to or less than that value that gives you the desired brightness. Many people complain 20 mA is too bright and "hurts" their eyes.
I personally find this ridiculous but that's just me. I like bright leds.
I think 10 - 12 mA is probably the most "popular" amount of led current as far as desired brightness is concerned, based on past forum posts.
Brightness and led current are really a matter of personal preference.
As long as you know the rated forward current (maximum) , you can choose.

The led forward voltage in the datasheet ( do you know what that is?) is always given at s specified current.
ie:
Vf (V forward) = 2.3 V @ 20 mA

Let Vcc = 5V
Vf=2.3 V
If 20 mA

Rcl = ?
Vrcl= 5V-2.3V = 2.7 V
Ircl= 20 mA

R =?
2.7V/0.020 V = 135 ohms (value to obtain exactly 20 mA)

2.7/220 = 12.27 mA ( current obtained using 220 ohm resistor)

If you share one resistor common to three LED, then
upside) NONE - you don't save any money because those things are sold in packets of ten or more
downside) while all three LED are ON, their current all goes through the one resistor, and you get about 1/3 brightness. Chances are that is not what you want or were asked for.

If you have pinboard then it only takes a minute to try it and see.

6hearts:
is there any reason they often put the resistors before the leds (between source and +?
my guess would be that after the leds (between gnd and -). am i correct?

No if you think the order matters then you are fundamentally miss understanding how electricity works. In a seriese current flows through all parts at the same time. It does not flow into one component and then into another.

ad2049q:
upside) NONE - you don't save any money because those things are sold in packets of ten or more

Not quite :wink: Sell a million devices where you can save one cent per device and transfer the saved money into my bank account please :smiley: