SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By maurobarreca
#195633
Hi, I bought some PicoBuck LED drivers to control some high power LEDs with an Arduino. I have 45 RGB LEDs so for the multiplexing I bought some Adafruit TLC5947 breakout boards. I wanted to know if it was a good choice or if I will have some kind of problem working with the data signal from that chip. My choice was justified by the need to keep the 45 LEDs turned on at the same time. I tried with the Arduino connected directly to the PicoBuck driver and it works perfectly, but I'm having some problems when I connect the TLC between them (the problem being that the RGB LED stays in the same state all the time).

Thank you.
User avatar
By phalanx
#195642
Hi maurobarreca,

I'm having a hard time understanding what it is you are really trying to accomplish and what you have tried so far.

While they are both LED drivers, the PicoBuck and the TLC5947 serve pretty different rolls. A single channel of the PicoBuck is intended to drive a small number of high current(330mA or 660mA) LEDs in series. The number in series depends on your source voltage. You can vary the intensity of the string by applying an analog or PWM signal to the control pins. The TLC5947 is designed to drive strings of low current LEDs (up to 30mA) with 12-bit PWM control. String size is a function of your input voltage and the part has 24 total channels so you can connect quite a few low power LEDs to it. It's PWM control is accessed by its SPI port which requires some intelligence on your microcontroller's end.

Here is a list of things we need to know to better help you out:
1. What RGB LEDs are you using (datasheets are always helpful)?
2. Does each LED need to be controlled independently or do they all need to be the same? (3 colors * 45 LEDs = up to 135 channels to control)
3. Can you provide a basic schematic of test setup with just the PicoBuck and one with how you integrated the TLC5947?
4. Can you provide us with an explanation of what you are trying to accomplish? There may be simpler ways of accomplishing whatever it is you are trying to do.

Let us know!

-Bill
By maurobarreca
#195644
Sorry, I'll try to answer your questions:

1. I'm using 3W RGB LEDs (1W per channel, here's the datasheet: http://tinyurl.com/yajve6c3).
2. Yes, each LED needs to be controlled independently, I have 1 PicoBuck for each RGB LED.
3. I'll describe it to you, it's simple really: I made a little program with Processing that sends an array of 135 12bit values (45 RGB LEDs) via serial port to an Arduino UNO. The Arduino runs a code that distributes these values through the TLC Drivers (using Adafruit's libraries). Each output of the TLC board goes to the inputs of the PicoBucks. Basically what I'm trying to do is to use the multiplexing capabilities of the TLC to drive through the PicoBuck some high power RGB LEDs instead of the low power ones the TLC can manage by itself. All the code is working well, my doubts are about the connection between the TLC outputs and the PicoBuck inputs. I tested the complete chain (Processing > Arduino > TLC > PicoBuck > High Power RGB LED) last night and it worked really well. There's no way I could test the 6 TLC and 45 PicoBucks before final installation, so my question is: is there an obvious problem that I'm missing? I know there could be a problem with the TLC being a constant current driver (with a 30mA limit), where the PicoBuck is meant to be driven with pure voltage inputs.
4. I explained it briefly in point 3, but what I'm trying to do is control a 5x9 high power RGB LED matrix through Processing and Arduino. But I want the RGB LEDs to be turned on at the same time, not using the the traditional method of turning each one on and off in sequence.

Thank you very much for your thoughtful comment.
User avatar
By phalanx
#195646
Now I understand. You need a large amount of PWM channels to control 45 3-channel PicoBucks. When you say it's working well right now, are you connecting the control pin directly to one of the TLC's output pins? Since the output pins of the TLCs appear to be open collectors and the control pins of the PicoBuck do not source 15mA (what Adafruit set the current limit to be), the TLC should never be in a current control state and would instead just be acting like a switch. The AL8805 is designed to work in this manner where you pull the control pin to ground for PWM dimming.

You probably won't get the full 12-bit dynamic range of the TLC however. The AL8805 says it can support 10-bit PWM at 500Hz. Instantly you are losing 2-bits of resolution, and if I did my math correctly the TLC has a 1KHz PWM frequency which is twice as high as the recommended value for the AL8805. It will still work but it will cut into your overall dynamic range so don't be expecting to get 68 billion color combos out of it! I don't know what your requirement it for color palettes but keep in mind that you won't be able to reach the theoretical max of the TLC.

Since you appear to have it running with a reduced number of LEDs, were there any problems with what you had running or is your concern about scaling this up to your full 135 channels?

-Bill
By maurobarreca
#195648
phalanx wrote:Now I understand. You need a large amount of PWM channels to control 45 3-channel PicoBucks.
Yes, that's exactly what I'm trying to do, sorry if my english didn't expressed it very well.
phalanx wrote:When you say it's working well right now, are you connecting the control pin directly to one of the TLC's output pins?
Yes, it works (almost*) perfectly having it connected directly to the TLC output pins. I was told that I should try to maintain the supply voltage of the TLC below the PicoBucks data input voltage maximum ratings and it should be fine.
phalanx wrote:Since you appear to have it running with a reduced number of LEDs, were there any problems with what you had running or is your concern about scaling this up to your full 135 channels?
Yes, since I'm just starting with the use of microcontrollers and breakout boards (and I have some basic knowledge in electronics) I don't know if there could be a problem, for example, when having all the TLC outputs connected to the PicoBucks.

(*) I'm having a little problem now, maybe you can help me with this too: my code works but the TLC boards are meant to drive common anode RGB LEDs, and the inputs on the PicoBuck are equivalent to a common cathode RGB LED. I worked around this simply by inverting the RGB values in the code (4095-R, 4095-G, 4095-B), but I encountered a problem when the values sent are equal to 4095 ("black" in this inverted logic). The driver acts like the value is 1 instead of 0, and I have a very subtle but very noticeable low light flickering when it is meant to be off. I tried sending values of 4096 with the same results, maybe I should modify something in the TLC libraries? Or there are better solutions to make the convertion from common anode to common cathode using electronics? (I tested with a common anode low power RGB LED, without the inversion and without the PicoBuck and it works perfectly)
By maurobarreca
#195650
It seems that the last problem is related to the logics of the TLC5947. Because I'm using inverted logic some of the signals the TLC uses is visible in the LED (because is up when it should be down). Is there an easy way to drive these PicoBucks as a common anode LED instead of a common cathode one using positive logics?
User avatar
By phalanx
#195653
The datasheet you linked to for the LEDs would suggest that the RGB channels are independent and not common cathode although note 3 on the 4th page makes things a little confusing. Did you modify the LEDs or do you have something different from what the datasheet illustrates?

Unfortunately in your case, the PicoBuck will not work properly with common anode or cathode LEDs. The way the board is laid out, each channel shares a common Vin and GND so there is no way to connect a common cathode LED without corrupting the current regulation loop of each channel.

-Bill
By maurobarreca
#195655
Hi. I think I have answered all my questions. The LEDs are independent so they work well with the PicoBuck. The only problem I encountered was that the outputs of the TLC are meant to drive common anode RGB LEDs, and the inputs of the PicoBuck are equivalent to a common cathode LED. First I tried inverting the RGB values in the code, but the result was an inverted TLC output signal that showed some flickering because of some data the TLC uses for itself. It shouldn't be visible on normal use, but it was because of the inverted signal. I made a little inverter circuit with a transistor and connected it between the TLC and the PicoBuck and that was the final solution. It works flawlessly now.
User avatar
By phalanx
#195661
Glad you got it worked out and that the RGB LEDs aren't common cathode. That would have been difficult to quickly fix! There shouldn't be any difference scaling it up to all 135 channels so hopefully everything goes smoothly from here on out.

-Bill