Intelligent RGB LED Support in Flowcode 7

Full colour RGB LEDs just got a whole lot easier to work with…

leds

 

If you’re like me and have created projects in the past using a load of LEDs then you know you’re quickly in the realms of masses of wiring, shift registers and multiplexing to try and cut down the number of individual signals you have to try and drive at one go. If you’ve ever seen the inside of a pinball or fruit machine then you know what I’m talking about (these items generally have lots of LEDs or more historically, single colour filament bulb indicators).

pinball

 

Thankfully this recently got a whole load easier. It started off with bespoke LED driver ICs which basically did the job of the shift register and multiplexer for you by allowing you to clock out data to the driver IC on a serial data connection. The novel thing about the driver IC’s was that they could be daisy chained together so you could drive a large number of LEDs easily using one or two microcontroller pins.

 

Here is an example using the WS2811 driver IC, each with their own individual red, green and blue LEDs.

ws2811

 

These driver ICs became really popular and the next step was even better, the driver IC was whittled down and placed directly inside the LED. This meant that instead of a complicated PCB with pads for the drivers ICs, LEDs, current limiting resistors etc you simply need the pads for the LEDs. Again the LEDs can be daisy chained together but this time the only component required is the LED (and maybe a capacitor to keep the supply voltage stable).

 

Here is an example using the WS2812B integrated IC LED, the dark rectangle inside the LED package is the driver IC. The four signals to the LED’s legs are VCC, Ground, Data In and Data Out. The arrows on the flexible strip show the flow of the data from one LED to the next.

ws2812b

 

These smart LED drivers need fairly precise timings to allow them to function well. Thankfully there are currently plenty of microcontrollers on the market with the processing power to easily deal with the required timings. For example a standard AVR based Arduino running at 16MHz is easily enough to control hundreds of LEDs.

 

There is also now a Flowcode component available to help simplify driving the LEDs and allowing for functions like lines, shapes, text and bitmap images to be easily displayed as well as shifted around and animated. The Flowcode component allows for simple 1D chains, 2D arrays and 3D matrices to be simulated and manipulated so you can perfect your displays and animations before you go anywhere near any circuitry.

flowcode_component2

 

The Flowcode 7 Wiki site has some very useful examples to help you get started.

 

Using off the shelf flexible WS2812B LED strips from eBay and the Flowcode component we have put together an Instructables project on how to create a professional looking sign in a few hours using some laser cut pieces of plastic, some bolts and some hot glue. We used the dsPIC based ECIO device (ECIO40P16) as it has lots of processing power (roughly 8.75 times more powerful that an AVR based Arduino) and also lots of ROM and RAM to store bitmap images, animations and anything else we need to add in the future.

 

Here is the end result.

img_4923_cropped

 

Here is a short animation created by our visiting work experience student Ilpo from Finland.

 

Note that the more LEDs you have the more current you will need to be able to supply to meet the power requirements of the LEDs. We used a large mains connected switch mode power supply that was capable of powering the circuitry at 4.5V at up to 40 Amps. We had 10 x 51 LEDs in our display totalling 510 individual LEDs. Each LED requires up to 30mA of current, approx 10mA for each LED colour channel: red, green and blue. The total current for our display was maxing out at around 16Amps when the entire display was set to output colour 255, 255, 255.

 

The full Instructables project to build the display can be found here.

6,745 total views, 5 views today

Leave a Reply