Parallel LEDs with common ground/resistor, different source? - Page 1
Forum section: electronics / beginners

author: Mpegger
author_rank: Contributor
timestamp: December 07, 2022, 11:21:19 am
content: I'm wiring 4 LEDs to a Raspberry Pi that turn on individually when there's activity on a assigned cpu core. I want to keep the module as small as possible so I wanted to wire the LEDs in a parallel fashion with a common resistor and ground, even though each LED is an individually powered circuit. Is this mixed series/parallel circuit even possible? How would I calculate what size resistor I would need to use if it is possible?

author: DavidAlfa
author_rank: Super Contributor
timestamp: December 07, 2022, 12:04:01 pm
content: Unless only one led is lit at a given time, you can't, current will be shared between leds, so they get dimmer as you Enable more leds.You can't overcome this by lowering the resistor, then enabling only one led would burn it.

author: Ian.M
author_rank: Super Contributor
timestamp: December 07, 2022, 12:07:06 pm
content: Possible, yes, advisable no, as David just commented.You'd have to choose the resistor to suit the case when only one LED is on so that the lesser of the max currents for a Pi I/O pin and for the LED is not exceeded. Then when more LEDs turn on the available current would roughly share between them, all becoming dimmer. However the one with the lowest Vf will hog more of the current, and as Vf is temperature dependent, even if you carefully select LEDs from a larger batch for closely matched Vf, the one that's been on the most will be warmer, so will draw more current and stay warmer and brighter. TLDR: Its a mess!However, as you can get an array of four SMD resistors in a package as small as 1.4mm x 0.6mm(Panasonic EXB resistor array series), bite the bullet and give each LED its own series resistor.

author: rstofer
author_rank: Super Contributor
timestamp: December 07, 2022, 02:59:51 pm
content: There are LEDs that have internal resistors like:https://www.sparkfun.com/products/14563

author: Peabody
author_rank: Super Contributor
timestamp: December 07, 2022, 03:30:53 pm
content: Or, you could have only one LED turned on at a time, and multiplex if multiple LEDs must *appear* to be on at the same time.

author: Mpegger
author_rank: Contributor
timestamp: December 09, 2022, 05:53:04 am
content: I figured as much. I was hopeing that maybe there was some secrect sauce that would allow such a circuit to be possible, but I guess I'll have to use more resistors in the mix. Thanks for the confirmation of what I had hoped I was wrong in my thinking.

author: Terry Bites
author_rank: Super Contributor
timestamp: December 09, 2022, 02:57:43 pm
content: Given that resistors cost about the same as thin air, put one in each leg.

author: Ian.M
author_rank: Super Contributor
timestamp: December 09, 2022, 03:41:30 pm
content: As Peabody noted, its possible to get good results and uniform brightness with only a single resistor if you multiplex the LEDs. Additionally you can save a GPIO pin by charlieplexing them. As three GPIOs can support six charlieplexed LEDs and you only need four, if you omit the LEDs between two of the GPIOs you can get away with a single current limiting resistor in series with the common GPIO, chosen not to exceed the pin's max. continuous current. Use high brightness LEDs as their max. duty cycle will only be 25%. Sequencing the GPIOs to light the desired LEDs will require a high priority background or interrupt driven task. If you don't want to write that yourself, I'd lay good odds that thepigpiodaemon controlled by the wave functions in the pigpio library could handle the sequencing for you.