buckpuck and tlc5940

Hi, I have some buckpucks (3023) which I ideally would like to control with the tlc5940. It works fine with arduino pwm output to the ctl input of the buckpuck, so I assumed it would be quite easy to get it to work with the tlc5940 outputs as well, but so far no luck.

Anybody on the forum with experience with this combination?

best, hc

The TLC5940 outputs are current sinks, not logic outputs.

What you need to do is first add a pullup resistor (around 10k) from the buckpuck input to +5v.

Then you need to set the current of the TLC5940.

For a 10k resistor, you need a sink current which drops 5v over the pullup resistor (to get a logic 0):
I = V/R = 5/10000 = 0.5mA

For this you need a maximum reference resistance (equation from datasheet):
Rref = 31.5*1.24/Iout = 39/0.5mA = 78k
So
Rref < 78k

This is not a standard value, however, if you round down, then a 68k resistor would give you 0.57mA sink current. This will still result in a logic 0 as the TLC5940 is able to sink 0.57mA, but the current is limited by the pullup resistor.

In summary, 10k pullups on each output to create a logic 1, and a 68k resistor from IREF (pin 20) to GND.

thanks for the answer! I already had a 10k pullup resistor, but had a very different value for the iref, 2k, which I used for a different project. I will try the value you suggested and see if I have better luck with it then.

hc

Changing the value of the iref resistor didn´t help unfortunately. The powerled connected to the buckpuck stays on the whole time, while the other 5mm leds connected directly to the tlc outputs work as expected (using the basic use example).

hc

Could you post a schematic of how you have wired it up?

I hook it up as in the image from https://code.google.com/p/tlc5940arduino/ I have replaced the 2k resistor with the 68 k resistor, one of the outputs from the tlc goes to the ctl-in of the buckpuck, as well as through the 10k resistor to +5v. vin and vout on the buckpuck connected to an external power supply, led+ and led - to the led, common ground between tlc and buckpuck (either led - or vin, doesnt seem to make a difference).

hc

Have you connected the Ref pin of the buckpuck to +5v? (Assuming this is the buck puck: http://www.luxdrive.com/content/3021-BuckPuck.pdf)

Often constant current drivers cannot pull down as far as a transistor. I have had similar problems with the M5451 chip. Check out the TLC5940 datasheet (or test it with a multimeter) to see how far it can pull. If it cannot pull down far enough it won’t register as a logic 0. A solution is to feed the TLC into the base of a PNP transistor to get a hard pull down.

[quote author=Tom Carpenter link=topic=120296.msg907879#msg907879 date=1346255102] Have you connected the Ref pin of the buckpuck to +5v? (Assuming this is the buck puck: http://www.luxdrive.com/content/3021-BuckPuck.pdf) [/quote] I tried it, and it doesn´t work. The vref out is mainly used together with a switch or potentiometer, as it only outputs 20mA.

Do you have this working on your end?

AndrewStone: Often constant current drivers cannot pull down as far as a transistor. I have had similar problems with the M5451 chip. Check out the TLC5940 datasheet (or test it with a multimeter) to see how far it can pull. If it cannot pull down far enough it won't register as a logic 0. A solution is to feed the TLC into the base of a PNP transistor to get a hard pull down.

I am probably misunderstanding something, but since I am able to dim normal LEDs, as well as powerLEDs (using a circuit based on the LM317 chip which also uses a pull-up resistor), I would expect it to be able to pull down far enough?

Ah, I think I have just figured out the problem.

The CTRL input is essentially a 1.5k resistor to ground. You need to be able to get at least 4.2V on it in order to turn the LED off.

Assuming a 5v supply to the TLC5940, that means you need <0.8v across the pullup resistor. This means you need the pullup resistor to be no more than 285R (That is 1.5k * 0.8/4.2).

To be on the safe side, pick a pullup resistor of say 220 ohms, and set the IREF resistor for the TLC5940 to:
V = IR
I = 5/220 = 23mA

Rref = 31.5*1.24/Iout = 39/23mA ~= 1.8k
So
Rref < 1.8k

Use a pullup of 220ohm, and Reference resistor of 1k

(P.S. You are corrent, the Ref pin doesn’t need to be connected, it is essentially a 5v supply)