Do RGB LEDs actually behave like three separate LEDs

ledrgbtri-state

I am trying to operate a lot of RGB LEDs for a project. I came up with a crazy scheme which only works if the RGBs work exactly as three separate LEDs.

What I want to do is connect the R, G and B lines of all the LEDs with the same source of PWM and connect their grounds to separate pins (which have tri state logic).

So when I want to turn on a pin I will give the PWM for the color on the PWM line and drive its ground pin low and ground pins of other RGBs to high impedance (theoretically separating them from the circuit).

Will such a circuit work?

Best Answer

Yes, but they are not full separated LED's, as @Joby Taffey stated they share a common anode or common cathode. In order to use the circuit you said, you'll probably need to get one common anode one and connect the CA pin with the PWM output. The other 3 pins (cathode for R, G and B) will be switched with an transistor for example.

You could use an common cathode, but in this case, with an PWM duty cycle of 100% (turned one) the corresponding led would be turned off.

One problem I'd see is the refresh rate. You can't turn on the 3 leds at once because you want to control each color individually. The solution is multiplexing. You should use an enough high PWM frequency and enough low multiplexing frequency, so the multiplexing will not interfere with the color intensity while trying to avoid flicker with multiplexing.

And keep in mind that the output luminance will be only one third of the tri-led maximum.