Author Topic: Can you drive multiple leds with a single resistor?  (Read 5838 times)

0 Members and 1 Guest are viewing this topic.

Offline MrOmnosTopic starter

  • Frequent Contributor
  • **
  • Posts: 268
  • Country: np
  • BE in Electronics and Communication
Can you drive multiple leds with a single resistor?
« on: January 26, 2018, 04:47:17 pm »
So, If I my microntroller had 100 pins I could control , and I was multiplexing so that only one led was turned on at any given time and used a single resistor at the GND of all the resistors, would it work? And would I need a power supply for the leds?
 

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: Can you drive multiple leds with a single resistor?
« Reply #1 on: January 26, 2018, 05:26:04 pm »
For driving a led from IO you need to apply a certain voltage accross it for the light be intense enough. A blue led is in kind of 3.4V range for normal operation, a red one typically 1.5V etc. An ultraviolet one is 3.5V or higher I think. If you apply 1V accross red led then it won't work bright enough to be satisfactory, you may not notice it at all (although it would still emit some tiny-tiny amount of light at 1V) as it has exponential characteristics of i(u), just as most of the diodes.
The intensity is linearly proportional to the current, not voltage.

Now, a led does not care where the anode or the cathode lies with respect to uC's GND. It only cares about its A-K difference in voltage. So it might be 101V anode and 100V cathode (w.r.t. uc gnd) and still no dice as the difference is only 1V which is too low for most leds (unless it is IR led).

Mind that a regular 0603 led works 100k hours at 20mA currents and ~100us at 20A so I suggest never letting it exceed that rating (unless it is your intention to make one intense blink with it).

Quote
a single resistor at the GND of all the resistors
« Last Edit: January 26, 2018, 05:29:52 pm by Brutte »
 

Offline MrOmnosTopic starter

  • Frequent Contributor
  • **
  • Posts: 268
  • Country: np
  • BE in Electronics and Communication
Re: Can you drive multiple leds with a single resistor?
« Reply #2 on: January 26, 2018, 06:00:39 pm »
Hi! This configuration is what I am taling about.


If one pin is turned on at a time, the MC is going put 5v across the led connected to that pin and the single resistor only. So, the resistor is going limit the current. In theory I should be able to drive leds with a single resistor without requiring a separate power supply for the leds porvided that I am turning on only one of them at any given time.
 

Offline rdl

  • Super Contributor
  • ***
  • Posts: 3667
  • Country: us
Re: Can you drive multiple leds with a single resistor?
« Reply #3 on: January 26, 2018, 06:20:41 pm »
Yes, that will work.

I've done it during development with 7 segment displays for quick testing. The only problem there is that the brightness differs depending on how many segments are lit. Since you will only light one LED at a time that won't be a problem.
 
The following users thanked this post: MrOmnos

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3451
  • Country: us
Re: Can you drive multiple leds with a single resistor?
« Reply #4 on: January 26, 2018, 06:36:29 pm »
Of course you can.  You don't even have to limit it to 1 LED at a time if you PWM the LED drive to keep the brightness constant.
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 6375
  • Country: de
Re: Can you drive multiple leds with a single resistor?
« Reply #5 on: January 26, 2018, 06:52:33 pm »
Of course you can. As you say, you'll only turn on one LED at a time, some there'll be no brightness problem or other issues.
 

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: Can you drive multiple leds with a single resistor?
« Reply #6 on: January 26, 2018, 06:55:35 pm »
Quote
If I my microntroller had 100 pins I could control , and I was multiplexing so that only one led was turned on at any given time
What you show is a direct drive, not multiplexing. With N = 100 IOs:
-Direct drive allows controlling N leds = 100
-With multiplexing you would get (N/2)^2 = 2500
-With charlieplexing you would get N*(N-1) = 9900
 

Offline MrOmnosTopic starter

  • Frequent Contributor
  • **
  • Posts: 268
  • Country: np
  • BE in Electronics and Communication
Re: Can you drive multiple leds with a single resistor?
« Reply #7 on: January 26, 2018, 07:01:40 pm »
Quote
If I my microntroller had 100 pins I could control , and I was multiplexing so that only one led was turned on at any given time
What you show is a direct drive, not multiplexing. With N = 100 IOs:
-Direct drive allows controlling N leds = 100
-With multiplexing you would get (N/2)^2 = 2500
-With charlieplexing you would get N*(N-1) = 9900
I know what multiplexing is but Someone on another thread said, POV is also called multiplexing so I used the term. I stand corrected. But even if I multiplexed I think it should work. I just wanted to know if it would work. Thanks!!
« Last Edit: January 26, 2018, 07:03:29 pm by MrOmnos »
 

Offline soubitos

  • Frequent Contributor
  • **
  • Posts: 352
  • Country: gr
    • I sell on Tindie
Re: Can you drive multiple leds with a single resistor?
« Reply #8 on: January 26, 2018, 10:45:40 pm »
It will work just fine with 1 LED lit at a time... it will also work the same way if more than one LEDs are lit at a time provided your resistor can handle the power!
 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2418
  • Country: us
Re: Can you drive multiple leds with a single resistor?
« Reply #9 on: January 26, 2018, 11:20:19 pm »
it will also work the same way if more than one LEDs are lit at a time provided your resistor can handle the power!

Incorrect. Ohms law still applies to the circuit, and parallel LED's will share the available current. Try it on a breadboard if you need to convince yourself. It's a simple experiment.
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12411
  • Country: au
Re: Can you drive multiple leds with a single resistor?
« Reply #10 on: January 26, 2018, 11:26:40 pm »
... and parallel LED's will share the available current.

And odds are that they won't share the current equally.
 

Offline soubitos

  • Frequent Contributor
  • **
  • Posts: 352
  • Country: gr
    • I sell on Tindie
Re: Can you drive multiple leds with a single resistor?
« Reply #11 on: January 26, 2018, 11:47:10 pm »
What are you talking about? Who said anything about PARALLELED LEDS?
I thought we were talking about driving x amount of LEDs from DIFFERENT pins of said uC or any other IC for that matter..... 1 LED drawing 10mA@2V driven from 5V source means you need a 300ohm resistor capable to dissipate 0.03W. 2 LEDs drawing each 10mA@2V driven from two 5V sources means you need a 300Ohm resistor capable to dissipate 0.06W etc... not?
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12411
  • Country: au
Re: Can you drive multiple leds with a single resistor?
« Reply #12 on: January 27, 2018, 12:11:54 am »
You are relying on each of the outputs from the pins having some amount of internal resistance that is going to compensate for the slightly different Vf of each of the LEDs - since the common resistor is going to provide a single voltage drop.  It's not quite as bad as directly paralleled LEDs, but it doesn't quite sit well with me.

Also, such a design will need to ensure that if you choose a resistor for 2 LEDs being on, then you had better make sure that there are always exactly 2 LEDs on (or none).  If not, then you had better have worked out what is a safe number of LEDs to have on for the resistor chosen.
 

Offline soubitos

  • Frequent Contributor
  • **
  • Posts: 352
  • Country: gr
    • I sell on Tindie
Re: Can you drive multiple leds with a single resistor?
« Reply #13 on: January 27, 2018, 12:17:51 am »
You are relying on each of the outputs from the pins having some amount of internal resistance that is going to compensate for the slightly different Vf of each of the LEDs - since the common resistor is going to provide a single voltage drop.  It's not quite as bad as directly paralleled LEDs, but it doesn't quite sit well with me.

Also, such a design will need to ensure that if you choose a resistor for 2 LEDs being on, then you had better make sure that there are always exactly 2 LEDs on (or none).  If not, then you had better have worked out what is a safe number of LEDs to have on for the resistor chosen.

I never say DO IT did i? LOL
Actually, if you parallel LEDs you still need smaller resistor value AND one capable to dissipate more power so.....
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12411
  • Country: au
Re: Can you drive multiple leds with a single resistor?
« Reply #14 on: January 27, 2018, 12:24:28 am »
... and what happens if you choose a resistor for 5 LEDs - and then only have 1 LED on?



But it's all good discussion.
 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2418
  • Country: us
Re: Can you drive multiple leds with a single resistor?
« Reply #15 on: January 27, 2018, 12:30:48 am »
What are you talking about? Who said anything about PARALLELED LEDS?
I thought we were talking about driving x amount of LEDs from DIFFERENT pins of said uC or any other IC for that matter..... 1 LED drawing 10mA@2V driven from 5V source means you need a 300ohm resistor capable to dissipate 0.03W. 2 LEDs drawing each 10mA@2V driven from two 5V sources means you need a 300Ohm resistor capable to dissipate 0.06W etc... not?

You might have a point if you truly had separate sources. However, microprocessor pins are almost always supplied from the SAME source. I agree it's not quite the same as a simple switch, but it's close enough.

The flip side of the circuit might be more obvious. What if the pins were used as sinks instead of sources and the resistor were the only path to 5V? Would you assume the sinks were to different grounds or to a common ground?
 

Offline soubitos

  • Frequent Contributor
  • **
  • Posts: 352
  • Country: gr
    • I sell on Tindie
Re: Can you drive multiple leds with a single resistor?
« Reply #16 on: January 27, 2018, 12:59:27 am »
... and what happens if you choose a resistor for 5 LEDs - and then only have 1 LED on?



But it's all good discussion.

pffffffffsssssszzzzzzttttt and smoked salmon!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf