Another common cathode RGB led and tlc5940 solution?

I know you can not use common cathodes with the tlc5940 but ....
This forum already describes a solution with extra PNP's.
And here is also an interesting view Serial LED driver with individual PWM, compatible with common cathode bargraphs? - Electrical Engineering Stack Exchange
Basically by adding a resistor between the pin and Vcc you invert the working of the pin (on becomes off). So if tlc5940 says led is off the tlc5940 can be remved from the equation and we have a simple led with resistor on constant voltage source.

I know this works as I have a setup working this way but ...
The setup I have seen working with my RGB leds uses 470 ohm resistors for all colours.
The article I linked to states

if you put the current limited resistors ahead of the LED pins to Vcc

This makes me think that I should use different resistors for the colours ( assuming Vcc=5V and 20mA: red 180 ohm , Green 150 ohm, blue 82 ohm)
These values are way below the 470 currently used and as I can't get my head around how it works when the tlc5940 switches the led on (in other words the led is off) I would like to get a second opinion on these values.

Best regards
Jantje

I have been thinking about why the led turns of when the tlc5940 tries to turn it on.
My theory (or call it a bump of this post :smiley: )
The tlc5940 works as a current source (actually a current sink). Assuming I have a resistor so it will sink 20mA.
When the tlc5940 turns the led on the current can only pass though the resistor (due to the led blocking the current)
This will cause a voltage drop over the resistor.
If the voltage drop is big enough there is not enough tension over the led to allow a current.
Assuming a voltage drop of 1.5 volt over the led the voltage drop over the resistor needs to be more than (5-1.5) 3.5
In other words the resistor must have at least (r=u/i 3.5/0.02) 175 ohm

The nearest I have is 180 ohm but I think this is to close so I would go for 220 for the blue led.
Now I can calculate/measure the blue current and calculate the resistors for reg and green.

Does this seem correct?
Best regards
Jantje

When you operate the TLC5940 like this what you are doing is called current shunting. That is when the LED is off the current is being sunk by the chip.
However this chip is a constant current chip so the amount of current it is taking is set by the current limiting resistor. It is this current through the pull up resistor that determines the voltage on the chip's pin when the LED is supposed to be off ( that is on if the LED were wired up as normal).
As you rightly point out this voltage has to be below the forward voltage of the LED in order to ensure that it is off. So this resistor not only determines the current through the LED when it is on but also, in conjunction with the current setting resistor determines the voltage across the LED when it is off.

Hope that helps.

Grumpy_Mike:
Hope that helps.

Yes it does.
Thanks
Jantje