I must not be that bright.. From reading the data sheet and reading forum posts, I don't understand how to determine what the max current and voltage is that can be applied to A) an individual TLC5940 output and B) all TLC5940 outputs combined..
Question 1:
Can I apply 18VDC and 20ma to a series string of 4 LEDs (voltage drop of 3V per LED -- total voltage drop for the string would be 12V) and sink it into 1 TLC5940 output? By my "understanding" that would leave 6V present at the TLC5940 output... which is within the -.3V-18V range listed for Vo in the TLC5940 datasheet. Is this OK?
Question 2:
What is the maximum current that A) a single channel can sink, and B) the total of all 16 channels can sink? How does power factor into this maximum? Are the maximum current and power per channel and per all channels combined related to the voltage applied at that channel (as I need to understand from question 1 above)?
Thanks in advance for hopefully giving me some clarity on this topic.
Answer 1: It would have that voltage drop when current is flowing through the LEDs, but when current is not flowing the voltage drop thru the LEDs is 0 so the entire 18V would be at the TLC. The solution is to put a NPN transistor in series between the LEDs and the chip. The base of the transistor should go to 5v thru a resistor. The transistor's emitter connects to the TLC. Now when the TLC turns off, the voltage at the emitter rises above that of the base and so the transistor turns off, "shielding" the TLC from the high voltage. So the transistor has to be able to handle the voltage.
Thanks for the clarity... I should have known that about the LEDs... I've read a little about the NPN transistor setup, but, I can't wrap my head around why/how that works... it's been quite a few years since I had any dealings with transitors (more studying for me, I guess).
I actually read about using a P-channel MOSFET to accomplish this... apparently using an NPN you'd have to reverse your logic (0 = full on and 1024 = off) plus when the channel is off, you wouldn't get the LED to be totally dark due to some "leakage current/voltage" or something like that... I know I sound totally non-educated, I guess I sort of am, relatively speaking...
Anyway, if anyone wants to take a crack question 2, that would be awesome. How does using a transistor effect maximum current/power of the LED string per channel and if all TLC channels are to be used to control separate strings.
You wont have to reverse your logic, since the TLC5940 sinks current. To prevent leakage just use weak pull up resistor.
With regards to question 2 both are negligible if you use external transistors, since each pin will only be using a very small amount of current (<10ma);
It is sort of a nontraditional use because instead of raising and lowering the voltage at the transistor base to open and close the transistor, you are raising/lowering the voltage at the transistor emitter. But since what open/closes the transistor is the DELTA voltage between these two points it does not matter which side is moving.
Maybe thinking of it using the water metaphor will help. Imagine 2 valves in a row. The inner valve (the 5940) can't handle the full water pressure but the outer valve (the transistor) can. The outer valve is set to close whenever it sees the pressure at the outside of the inner valve increase beyond a certain value (remember that the base of the transistor has to be ABOVE that of the emitter to turn "on"). The value is essentially the voltage you are feeding into the base...
When the valves are open, there is no large difference in water pressure (the water just flows right through) so everything works great.
Then when the inner valve closes, the pressure (voltage) starts to build, but before it gets too high it triggers the outer valve to slam shut. So the outer valve holds back the majority of the pressure...
As with all metaphors, don't take it too literally! And I glossed some details
For more information on using higher voltages do a search for application note
SLVA280 Using TLC5940 With Higher LED Supply Voltages and Series LEDs
and
SLVA253 LED Driver – Paralleled Outputs Provide High-Current Outputs
As to question one. The formulae for calculating the power generated is in the data sheet. Yes it looks complex but just look at it. There is a fixed bit that is for the running of the chip. Then there is a variable bit that contains a multiplying factor for how many LEDs you have and how bright they are (the PWM ratio). All you need to plug in here is the maximum number and on all the time (100%). Finally there is the dot correction clock. If you are applying a lot of correction this reduces the power. Here you just want to have the value of 1 (or remove the term)
What is the maximum current that A) a single channel can sink
Thanks so far everybody, you have all helped me understand a bit better.
How do I size the resistor between 5V and the base of the NPN?
Also, in reading the SLVA280 doc, it mentions using an N-channel MOSFET as the primary way to do the high voltage setup. In your experience, can anyone recommend either method over the other... and why?
User 'rocketgeek' mentioned in another forum using a P-channel MOSFET instead of the NPN or N-channel MOSFET. What's up with that?
In any event, what characteristics should I look for in the device (N-Channel, P-Channel, or NPN) I choose.
I basically want to run 75 TLC channels (using 6 chips) that will control 4 series LEDs per channel. I'm building a "disco-floor" coffee table... really it's more of a full-color version of the Daft Punk Table, if you've see it. It will be epic!
I'll probably start a new post asking for high brightness (but still 20ma) LED recommendations.
How do I size the resistor between 5V and the base of the NPN?
The base resistor should be sized small enough to allow the maximum LED current to pass from collector to emitter, but large enough to minimize base current, and to effectively provide LED overcurrent protection.
The formula is in the application note. The actual value doesn't matter much anything between those limits will do.
N-channel MOSFET as the primary way
As it says in the application note:-
Typically, this alternate solution (NPN transistor) is more cost-effective, but with the trade-off of lower LED current
accuracy. The lower accuracy is a result of the regulated current being the transistor base current in
addition to the LED current.
P-channel MOSFET instead of the NPN or N-channel MOSFET.
Sorry I haven't seen what he suggested but you can't just substitute a P-channel for an N-channel.