I'm looking at a diagram and wondering if I could use just one resistor to limit the current of the LEDs instead of multiple resistors so that the cathodes are all connected to the same resistor.
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
What you're suggesting will work as long as only one LED is lit at a time. But as soon as you light more than one LED at once, the current from two LEDs will flow through one resistor. This will cause twice the voltage drop, and both LEDs will be dim. Dimmer still if all three are on at once.
You will need to wire it as shown, with three resistors.
HA! I like the way you think... less parts is always better, right? Well theoretically if all the LEDS were exactly equal, what you're suggesting might work. I've tried it, however, and have found that more often than not the brightnesses will vary between the LEDs, even when the LEDs are supposedly all from the same bin. I suspect that this is the reason the segments in some cheap digital clock seem to glow at different brightnesses depending on the digit displayed. The LEDs are simply NOT infinity identical. If you think about it, if one LED drops 1.70volts, and another drops 1.71, that little < 1% difference can cause a significant current difference, which affects the visual brightness.
Of course none of that is a problem if you're only lighting one LED at a time. So what you CAN do is use the MCU programming to divide the time for the LEDs by the number of LEDs you intend to use (3 in your case). If each LED can only be on for 1/3 of the time, and the cycle is fast enough, the human eye will perceive it as being continuously "ON". If you do this, make sure both the "ON" and "OFF" leds have their 1/3 time slot. In other words, if just 2 LEDs are lit, still give each 1/3 the total ON time, not 1/2, or you will have re-created a similar issue that those cheap digital clocks have. :-) While you're at it, if you can't do this "time multiplexed" lighting with an interrupt, be sure to create a specific time "slot" in your programming for whatever processing you intend to do.