I am using a TLC5940 to control some leds. Some of these LEDs go to buttons that already have resistors, but some of the LEDS do not.
The issue is that the button's LEDS are dim because their is an internal resistor in the button, and the TLC5940 has it's own resistor...
I was wondering if there was an easy way to bypass the buttons resistor (short of taking the button apart).. or if the TLC5940 has some way to bypass it's resistor for certain pins (seems dangerous for the health of the chip)...
Do you know the specs of the button (voltage, LED current).
Connecting a LED with inbuild resistor to a current limiting IC should not be a problem.
The problem could be that the resistor limits the current before the IC does.
e.g the LED/resistor draws 5mA@5volt, and the IC is set for 10mA.
Raise the LED supply voltage to the point that the IC starts to limit. e.g.12volt.
Leo..
Are the LED/resistor buttons bright enough when connected directly to 5volt.
And what is their LED current on 5volt, measured with a DMM.
I see that you have set the brightness for the normal LEDs to 19.5mA (2k Iref resistor).
That could be a lot higher than the standard current for the LED/resistor buttons.
You could lower the current for the other LEDs by changing the 2k Iref resistor. e.g. 4k7 gives 8.3mA LED current.
Or raise the rail voltage for the LED/resistor buttons (more current could be unhealthy for the LEDs).
Leo..
Wawa:
Are the LED/resistor buttons bright enough when connected directly to 5volt.
And what is their LED current on 5volt, measured with a DMM.
I see that you have set the brightness for the normal LEDs to 19.5mA (2k Iref resistor).
That could be a lot higher than the standard current for the LED/resistor buttons.
You could lower the current for the other LEDs by changing the 2k Iref resistor.
Or raise the rail voltage for the LED/resistor buttons (could be unhealthy for the LEDs).
Leo..
yes, they are bright enough. how do measure the current? I have a dmm and I'm generally familiar with the symbols..
I assume you mean putting a smaller resistor for iRef? What will that do to the other LEDs I have connected to this? I have a 5050 rgb led, and then four encoders with rgb LEDs hooked up (on three of the encoders, only the red, green, or blue led is connected)..
I'm not sure what the second paragraph means.. I'm assuming in a higher current would make the LED brighter?
here is the datasheet for the encoders... page 3 is where they talk about the LEDs.
Set your DMM to current (e.g. 200mA), and plug the red lead in the current socket.
Connect the +5volt to the red lead.
Connect the black lead to the +LED
Connect the -LED to ground.
The current flows THROUGH the DMM to the LED.
If the brightness of the LED/resistor button is ok, then lower the brightness of the other LEDs to match.
The 2k Iref resistor sets the current for all outputs of the IC.
You can calculate the LED current by using the formule in the datasheet.
1.24 divided by the resistor value, times 31.5 gives you the LED current.
A 4k7 resistor gives 8.3mA LED current. A 3k3 gives 11.8mA. etc.
LED current changes brightness, but not lineair.
Half the current might be 70% brightness (guestimate).
You could put a 5k trimpot in series with the 2k resistor, so you can adjust the current/brightness.
If you have found the right brightness, remove it, measure it, and replace with a fixed resistor.
Leo..
The TLC5940 has a dot correction circuit that will set selected outputs to a higher / lower current. It is used to even up brightness. You could use that to change the brightness of some of the LEDs. See the chip's data sheet.
Alternatively a simpler solution might just be to put a resistor in series with those LEDs that don't have one.
Currently I have 2k resistor installed on iref and that correlates to around 20ma...
All of my LEDs except with the ones with the resistor already installed have a limit of 25ma
From what I can tell, the chip can do 120ma per channel.
What I was planning to do, if it would work is change the resistor on iref to output 40ma per channel.
That would? brighten the LEDs with the resistors already installed, but be too much current for the rest of my LEDs.
In order to lower those LEDs to an acceptable level, I plan on using the dot matrix adjustment to lower those back down to 20 ma..
I think I was reading somewhere that at startup of the chip, the dot adjustement doesn't occur instantaneously and that might damage the chip... But I can't find wher it says that now.
What voltage is the chip running off of? Is that the highest voltage it's spec'ed for?
I'm wondering if it's having this problem because it's trying to push 20mA through all the LEDs, which should make them similar in brightness - but because of the extra resistance, the highest voltage it can apply to the LED isn't able to push 20mA through it (note that there's some dropout in the driver chip).... In this case, no matter how high you set the current target, it won't be any better - you could get them equal (maybe) by dimming everything down, or running off a higher voltage.
Why can't you use LEDs that don't have a resistor in series with them, anyway?
What do you mean "the TLC5940 has its own resistor"?
Pin-20 (IREF) connects to a 1.8k resistor to ground to set the maximum current for the 16 outputs.
The OP wants to bypass the internal push button resistors , which cannot be done without opening them if they only have two terminals. The push buttons leds should not be powered by the TLC5940.
Wawa:
Why do you want to push 40mA through a 20mA 5050rgb LED.
To compensate for the resistor.
However
Another thing I could do is add resistors to all of my other LEDs, then lower the value of the IREF resistor.
If you are only running off 5V then there is nothing you can do to make the ones fitted with a resistor brighter. This is because the constant current drive can only push the voltage up to 5V no matter what the Iref is set at so it is running at the brightest it can. You could increase the Iref resistor to drop the current in the "naked" LEDs to match without affecting the brightness of the ones with a resistor.
Hi,
I think DrAzzy is correct here, the TLC5940 is a constant current driver, it can only supply that reference current with the available voltage.
The LEDs in the switches with their series resistors, need a higher voltage applied for the same current and hence brightness.
The TLC5940 cannot accomplish this because it is limited with 5V supply.
While the LEDs of the switch and LEDs without their resistors are controlled by the same TLC, you have no alternative, as you suggest, to fit the non resistor LEDs with resistors and let the TLC run flat out trying to apply ref current to all of them.
The LEDs will be duller but somewhere near even in brightness.
Perhaps connect the switch to a transistor and let that create the circuit?
Something like http://elinux.org/images/7/76/Npn_switch.png where the "+5v" is of course the output of your circuit and the "GPIO / resistor" combo is your switch?