Constant current driver protocol

Hi Everyone,

First post in the forum, hope you guys can help me.

I have been searching for the past two days and cannot find the information I’m looking for, so here goes.

I want to use the Rainbowduino to drive some flexible LED strips, I have read the blog entry on driving the strips. I have read the posts that describe connecting the common anode from the strip to to the VCC port and connecting the cathodes to the constant current sink ports. However, I want some minimal control over color mixing/fading, but I cannot find any posts that are just a general description of the structure of the serial protocol used to communicate with the constant current driver.

If someone could just describe the structure of the LED driver’s serial “packet”, it would be of great help to me.

I don’t actually own this product. but from what I have read in the datasheet for the MBI5168 (constant current sink controller) it seems to implement a simple serial to parallel protocol.

here is the datasheet returned with a quick google search.
datasheetcatalog.org/datashe … 5778_1.pdf
page 4 describes the protocol.

Thanks for the reply. :slight_smile:

I have looked at that datasheet several times, it does describe the timing of the serial communication as well as the data “latch” function.

However, what I find quite strange, is that it does not actually describe how the bits that are sent, over serial, are “decoded” by the driver chip.

For example, in order for the Rainbowduino to produce such a large variation of colors, each channel on the sink driver must have a variable brightness value for each channel. But, nowhere in the datasheet does it say, something to the effect of:

“Serial data to the driver interface is 2 bytes long. The first 8-bits represent the channel(s) being updated, by setting the bit to ‘1’, the second 8-bits are the brightness value for the indicated channels.”

I don’t know if I am explaining myself very clearly, sorry.

Ok, after re-orienting myself on this topic, I have finally wrapped my head around my question. I’ll just wrtie out my understanding and maybe it will someone else, someday, that had the same misunderstanding.

The 8 ports on the constant current sink drivers are binary constructs. The bits that you shift into each chip represent an on/off switch. The “trick” that gives the Rainbowduino its power is the fact that it is using a pretty intricate, software PWM, to generate a 12-bit color palette.

The software PWM takes a 12-bit RGB value and then takes each 4-bit color intensity level and “modulates” the ports of the current drivers to produce the requested color. I will add that, the ingenious part of this is that the developer uses a gamma table to allow for “color correction” based on differences in brightness perception to the human eye.

There is actually quite a bit of ingenuity built into this little device.

However, I will offer one critique of the device, in its current implementation. Why not just use a constant current driver with PWM built-in, like the TI TLC5940, or something similar?

In my personal opinion, I would be more than willing to pay a little extra for that board as it would free up processing power of the on board processor…just a thought. I still really like the product!

Because you would need enough TLC5940’s to drive 192 LEDs. Each TLC5940 does 16 channels, so you’d need 12 of them. That adds a lot of cost and complexity.

By doing it in software you can multiplex your outputs by the source drivers.