TLC5940NT alternative but with current sourcing

Thread Starter

slisgrinder

Joined Dec 7, 2008
45
*** Problem somewhat solved :) but please read the last post for new problem :( ***


Ok, I am looking for an alternative to the TLC5940NT but instead of it sinking current, I want it to source current. The reason would be because I have common cathode RGB LEDs. If there is no alternative, what else could I do to wire my RGB leds to the TLC5940NTs? Would I need to have some sort of transister/s to do that or is there something more simpler that I am not getting?

This is just a prototype that I am building with 16 common cathode LEDs. There are 3 TLC5940s connected in series, each one is responsible for a color (R-G-B). For each anode representing a color on the LED, goes to its respective TLC5940. For example, LED 1 has an anode for red, is connected to pin 28 on the 1st TLC5940, the anode for green is connected to pin 28 on the 2nd TLC5940 and the anode for blue is connected to pin 28 on the 3rd TLC5940. The same goes for every LED but is assigned to different pins on each TLC5940. There is a sanguino that is connected to the TLC5940's which will control the LEDs.

Because the LED driver sinks current on the output pins, the above mentioned circuit would not work. So between the anodes of the LEDs and the pins of the drivers (TLC5940) what can I do to keep the same setup?


Thanks for your help. I will make a schematic and post it up if needed.
 
Last edited:

Thread Starter

slisgrinder

Joined Dec 7, 2008
45
Could I add a PNP transistor with the base connected to the TLC5940 output pin through a resister, the emitter connected to +5V or +3V from the sanguino (bigger than normal arduino) and the collector going to the anode of the LED and the cathode of the LED grounded? This would mean that I would need 3 PNP transistors for every RGB LED (3 anodes and a common cathode). I was thinking of a 2N3906 transistor to do the job. So would this work?
 

Thread Starter

slisgrinder

Joined Dec 7, 2008
45
Well, I tried the circuit as mentioned above and it works, but I just have one problem. The red LED always stays on and when I run a sample program from TLC5940 library for arduino, it is reversed. Meaning that since the red LED is always on, it remains on, and when its actually suppose to be one, it turns off. So what am I doing wrong?

Here is the schematic that I am following except that the Pins 0, 7, 15 on only one TLC5940 instead of 3 of them.

 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
PNP transistors don't invert the signal; you've just more or less duplicated the output stage of the TLC5940.

Try this instead:


Values for R1 through R3 will need to be adjusted to suit your particular RGB LEDs.
[eta]
Don't forget that when you are calculating the values for R1 through R3, you will need to compensate for the 0.7v drop across the transistors. I've used them as voltage followers; as a result they won't go into saturation.

You would certainly reduce your parts count if you would simply go to common anode RGB LEDs.
 

Attachments

Last edited:

Thread Starter

slisgrinder

Joined Dec 7, 2008
45
Oh, so R4 thru R6 are the infamous pull up resistors? And yes, I did forget about the 0.7V drop through the transistors. The thing is, that I ran my LEDs at full voltage (5V) without any resistors, I did have resistors before but I wanted to see what the max was, and they didn't burn out, simply were really (blindingly) bright! But I will definitely add resistors just to be safe. And I noticed that you are using NPN transistors, I am using PNP transistors 2N3906 so could I simply add the pull up resistors or do I need to change the transistors to 2N3904 (unless I am getting the pullup resistor concept wrong)? Thanks for your help Sgt.
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
Oh, so R4 thru R6 are the infamous pull up resistors?
The outputs of the 5940 can't source current; only sink it - thus pull-up resistors are required for the NPN transistors I've used.
And yes, I did forget about the 0.7V drop through the transistors.
The PNP transistors as you used them would go into saturation, so they would have a low Vce. However, you need the logic inverted, so it was necessary to use NPN transistors instead.

The thing is, that I ran my LEDs at full voltage (5V) without any resistors, I did have resistors before but I wanted to see what the max was, and they didn't burn out, simply were really (blindingly) bright! But I will definitely add resistors just to be safe.
Operating LEDs without current limiting is a very bad idea; they will have a very short life. Even running with their rated current, LEDs will gradually grow dim over their normal lifespan. At higher current, they will grow dim much more rapidly. I suggest that you discard those LEDs that you have subjected to high current, as they are very likely permanently damaged.

And I noticed that you are using NPN transistors, I am using PNP transistors 2N3906 so could I simply add the pull up resistors or do I need to change the transistors to 2N3904 (unless I am getting the pullup resistor concept wrong)?
You'll need to change transistors. The 2N3906 transistors won't invert the logic.

As I've already mentioned, I strongly recommend that you use common anode RGB LEDs instead of the common cathode LEDs you already have. Your resulting project will be much easier to build and maintain. The 5940 IC has a single resistor to set the current for all of the LED current sinks. With this discrete component solution, you will have to have a current limiting resistor, an NPN transistor, and a pull-up resistor for each LED anode lead.
 

Thread Starter

slisgrinder

Joined Dec 7, 2008
45
The use of the NPN transistor makes sense now. Thanks, the final version will have common anode LEDs to make life easier, I just wanted to get this one working so that I can make the program and test it. I discarded the LED that I subjected to the 5V. I am bread boarding schematic you gave me now and will get back when I am done...
 

SgtWookie

Joined Jul 17, 2007
22,230
slisgrinder,
Don't worry about mido's post; it will be removed from this thread and placed into it's own thread. Mido is a new member who hasn't yet read the forum rules for posting; what they have done is called a "topic hijack" which is considered bad manners.
 
Top