ShiftBrites are modules by macetech that integrate the Allegro A6281 3-channel constant current LED driver with a large, high-brightness RGB LED. Using just three digital output pins and a simple protocol, your microcontroller can control a long chain of these modules. Each ShiftBrite in the chain can be independently changed to any of the 1,073,741,824 possible colors to create dynamic displays and decorations. Adjustable current for each color channel lets you correct for slight differences in brightness. In addition, the LED driver is protected from overheating by automatic over-temperature shutdown.
The ShiftBrite V2.0 is a redesigned version of the original ShiftBrite that offers the following key improvements:
The ShiftBrite V2.0 is only available with male header pins soldered in, but a headerless version of the original ShiftBrite is still available. The pin spacing is 0.1", making ShiftBrites compatible with breadboards and perfboards. Our custom six-conductor cables, available in lengths of 6" and 12" and 24", can also be used to easily chain together multiple modules.
The original ShiftBrite and new ShiftBrite V2.0 are pin-compatible and have the same basic functionality, so a mix of original and new ShiftBrites can be chained together on the same strand. Please note that several of the pictures, diagrams, and videos on this page show the original ShiftBrites (with green solder masks); the V2.0 model has a larger PCB with a black solder mask as shown in the main product picture.
Several ShiftBrite applications are shown below, including an example setup using a Micro Maestro as a ShiftBrite controller. In the Micro Maestro example, digital outputs 0, 1 and 2 are used to send the control signals to the clock, latch, and data lines, the enable line is connected directly to GND, and 6 V power to the Maestro is delivered from the ShiftBrite chain. Maestro source code to control a ShiftBrite is available in the Example Scripts section of the Maestro User’s Guide. Our Orangutan robot controllers can also be used to control ShiftBrites, as can the Arduino. Source code for the Orangutan is available at the bottom of this page.
Since ShiftBrites are controlled by Allegro’s A6281 LED driver, careful reading of the A6281’s datasheet (315k pdf) is recommended. Each ShiftBrite input is buffered and output on the corresponding output pin. This allows you to chain together ShiftBrites without increasing the number of IO pins dedicated to controlling the modules. The picture below shows three ShiftBrites chained together.
Each ShiftBrite has a 32-bit shift register. When a rising edge is detected at the clock in pin (CI), the data in pin (DI) value is shifted onto the first bit of the shift register, and the last bit sets the value of the data out pin (DO). After you have loaded a 32-bit packet into the shift register of each ShiftBrite in the chain, bringing the latch in pin (LI) from low to high causes the data to take effect (changing the color or updating a configuration setting). LI must be brought low again before clocking in additional data.
The data packet format is shown in the picture below. For more details about the data packet format, as well as timing and other electrical parameters, see the A6281 datasheet (315k pdf). You can find further documentation and Arduino sample code at macetech’s ShiftBrite documentation page.
To send data to the ShiftBrite, you need to use at least three digital I/O pins (four if you want to use the EI pin). Our Orangutan robot controllers work well for this. Here is some sample code for setting the colors of a chain of ShiftBrites using bit banging on the AVR. The chain can be arbitrarily long, but the changing color pattern will repeat on every sixth module.