Are we talking about a common current-limiting resistor for a group of LEDs, each controlled by alternate pins?
In this situation, the voltage across the resistor is defined as the supply voltage less the LED voltage drop. The LED voltage drop of parallel LEDs is (almost) the same irrespective of how many LEDs (of the same colour) are in parallel; that is the very characteristic of LEDs that is under discussion here. So the current through the resistor does not change to any significant degree whether one or ten LEDs are illuminated; the LEDs are forced to share that current among themselves.
The current through the resistor is the same (because) the voltage across the resistor is the same, thus the wattage dissipated by the resistor does not vary either. Do you understand this?
Do you know punctuation?
Whoah! This does look strange, doesn't it? That's what I get for not quoting the post in question which was then removed so we do not even know who it was! Never mind.
Then you'd want a resistor to handle the current of more than one LED. Also, now that more then 1 LED may be one at the same time, you'll want to do the math on wattage. So now you add in 5 LED's current limiting of 5 LED's on at the same time and wattage. 12 LED's and the what if current and wattage.
Sorry but this is nonsense.
A single resistor of 200R will draw 0.025A when placed across 5V. This is 0.125 Watts dissipation which is fine for a normal 0.25W resistor.
No number of extra 5V pins attached to the resistor directly are going to alter this, let alone 5V pins connected with a series LED. The 25mA is the maximum that can flow in a 5V circuit, and given the forward voltage drop of the LED it will in fact be smaller than this.
Edit - it looks like the post that this post and the previous one were responding to has been removed making these two replies look a bit odd. As the post was a total nonsense it make no odds but it might confuse others reading this thread later.
One LED per pin and only one pin at a time is HIGH.
Want to use as a bar graph, as the resistance increases the lights move up one by one. Thanks for the idea to keep the previous ones on to make it look more like a graph) Can even use it to indicate water level of my water tanks.
I have a few applications for this type of design and was just curious why every LED needs a resistor.
Not about saving money or anything else just to clarify my very basic understanding of electronics.
Thanks for all the replies, I actually looked for data sheets on LEDs to understand the difference. Very interesting
HermanJFourie:
Same as the diagram.
One LED per pin and only one pin at a time is HIGH.
I have a few applications for this type of design and was just curious why every LED needs a resistor.
Ok. Thanks for the clarification. The resistor is used to 'set' a particular amount of current through the LED. This could also be seen as to keep the current through the LED at a level below that designed amount of current.
So the voltage balance is ... supply voltage Vs will be equal to the sum of series voltages (due to source resistance Rs, and the forward diode voltage Vf, and the resistance R). The series current will be "I" when everything is working.
Vs = IRs + Vf + IR.
We know Vs = 5 volt. Rs might be approximately 25 ohm ----- just a guess; Vf needs to measured during operation, but could first assume 1.8V for the diode, and a desired current I is some suitable value we could set, such as 10 milliampere or 10E-3 ampere. So could design for I = 10E-3 ampere.
Solve for 'R', and then round UP the value of R to the closest off-the-shelf (available/store-bought) resistance value.
If a current is not 'set' properly by design (or otherwise), then the LED may not be able to handle the power if the current is too large. Under usual operating conditions, the voltage drop across the diode Vf is assumed to be constant (and yes..... diodes have an interesting behaviour where .... when an LED is operating pretty-much normally in a circuit, then the voltage across it will be at some roughly pre-determined fixed value ..... that's their behaviour). If current is too high, then the power associated with the diode will be product V x I, which is Vf x I. Assuming Vf were 1.8 volt ..... then it's necessary to keep the power (Vf x I) below some recommended value, otherwise the LED (diode) can fail due to heating up too much. And how do we know how much power the LED can handle? Manufacturer specifications under manufacturer stated conditions.
OK, for a bar graph, where the number of LEDs illuminated varies widely, you do need separate resistors otherwise it will get dimmer as more LEDs are lit. For a dot graph where only one LED is illuminated at a time, one resistor would be just fine.