Monday, March 17, 2014

Open Lighting Architechure

Two BeagleBones driving two LED panels  at 140 fps, and the LED strip at 60 fps


What is the Open Lighting Architecture project? Well basically it adds DMX over IP in a Open Source project. What is DMX you say? If you have been to any concert in the last 30 years you've seen DMX at work, and it is slightly younger than the MIDI standard still in use today.

DMX like MIDI is an serial connection which MIDI is RS-232 @ 31500 baud, DMX is RS-485 and runs at 250 kbps. DMX however has its own standard for marking the start of a lighting frame 513 slots (each slot is one byte), first slot is a command, and the 512 are data ones. However vendors may take more than slot as command if they choose.  These 513 slots are called a universe, and you can have multiple of these which is good for our use case of pure RGB or GRB values.

Now today pure DMX over RS-485 is getting rarer since UDP/IP is cheaper to setup and use.. and not to mention you can have DMX to TCP/IP convertors if need be.

Doing Networked DMX Cheap

In a previous post I showed BeagleBones driving LED panels at a high speed at mostly low CPU usage (about 20%).. other projects show 2% but they are hiding the real CPU hit with PRU stalls.. aka the wrong way to do it.

Now the OLA project supports all the major standards for DMX over IP.. I'll go into the few I've used
  • ArtNet - only 4 universes per IP is supported so it is useless for large light shows
  • e1.31 - up to 63999 universes per IP so you drive a large light show
Each 16x16 LED panels is a total of 256 LEDS which is GRB values so effectively 768 slots, and this will clearly not fit in one universe so we split each panel into two parts of 384 slots or 128 LEDs.

Last panel is the latch panel (aka all data gets written out for all panels when data is written here) and is shown in my last post.

Cheap BeagleBone Setup

DMX Protocape

The protocape above exposes the PRU pins unbuffered to the LED strips or panels. So be sure not to hit the +5V power line on the data line or you may burn out a pin. Buffering wouldn't hurt and probably would increase the actually framerate a bit but after the first WS28xx part it is at +5V anyway.
Universe Pin Mappings on Beaglebone Black/White:
  • 0 -> P8_45 (PRU1 R30_0)
  • 1 -> P8_46 (PRU1 R30_1)
  • 2 -> P8_43 (PRU1 R30_2)
  • 3 -> P8_44 (PRU1 R30_3)
  • 4 -> P8_41 (PRU1 R30_4)
  • 5 -> P8_42 (PRU1 R30_5)
  • 6 -> P8_39 (PRU1 R30_6)
  • 7 -> P8_40 (PRU1 R30_7)
  • 8 -> P8_27 (PRU1 R30_8)
  • 9 -> P8_29 (PRU1 R30_9)
  • 10 -> P8_28 (PRU1 R30_10)
  • 11 -> P8_30 (PRU1 R30_11) (clock line for WS2801)

Open Lighting Architecture Setup

Open Lighting Architecture has various plugins to control USB, SPI, and other propriety protocol devices.

However for the BeagleBone PRU applications we fake a SPIDEV device with ioctls so we can use the SPI plugin of OLA at run at a high speeds.  

Mainly you drive the OLA with external software over the network but you can use a few APIs locally or remotely. Like for instance my WS2801 strips are driven using the Python API for OLA, and it allows you generate raw DMX packets to be sent directly to OLA (not ArtNet or e1.31 but OLA wire protocol).


PixelController driving two 16x16 WS2812 LED panels via e1.31

PixelController is a java application that generates awesome visuals that can export with the common DMX over IP protocols.

Taxes the hell out of your CPU and I suggest using ola_recorder on your device to record a given set sequence and play it back at a much lower CPU cost.


No comments:

Post a Comment