This project is a notes-to-selves (myself and others) about the various aspects of controlling lots of LED lights using network protocols such as DMX, Art-Net, sACN/E1.33, king-net etc.  Generally this would be considered Lighting/Effects Show Control, where "Show" is a theatrical, or architectural setup of lighting and other devices (fog machines, etc.)

Jordon Monson wrote this nice article on "LED Tape and PixelMapping".  Shabaz's article on  Element14 has a detailed look at the DMX512 protocol, including oscilloscope traces!

Rough TOC of sections below

Basic DMX

DMX (Digiital MultipleX aka DMX512,  EIA E1.11, original: 1986, latest 2018) is a standard for  serial communications networks to control theatrical, architectural lighting  and effects (fog, flames, etc).  It is officially known as "ANSI E1.11 - 2008 (R2018)<p>Entertainment Technology -- USITT DMX512-A, Asynchronous Serial Digital Data Transmission Standard for Controlling Lighting Equipment and Accessories". Scroll down on the TSP document page to E1.11 to find link to PDF.

A single DMX network (aka "universe") can control a up to 512 channels on up to 32 daisy chained 'fixtures'.  Fixtures may have multiple channels (colors, motion axis, etc.), each of which consumes one of the 512 available. Individually addressed RGB strips and matrices take 3 channels for each pixel, and can easily consume whole universes.  Additional Fixtures beyond the limit of 32 can be added by using DMX Repeater.  The last Fixture in a DMX daisy chain should have a 120 Ohm termination resistor.

DMX uses a fairly simple serial oneToMany unidirectional protocol that runs over an RS485 (aka EIA-485, TIA-485) standard differential signals daisy chain network. configuration. The same 485 standard is used by many different industrial systems. They are likely NOT compatible. The 485 standard allows voltages from -7vdc to +12vdc, while the DMX standard specifies a maxiimum of +6 volts between signal and Common. As a Differential Voltage Standard, a pair of lines are used to carry the signal with opposite voltages, thus the voltage between Data+ and Data- ranges from -6vdc to +6vdc.

Receiver electronics may or may not be Isolated from the network. Computer systems will likely need additional hardware to transmit/receive 485 signals, in particular performing voltage regulation/isolation. Devices like the MAX485 are often used with optoisolators.  (see isolated vs non-isolated portions of standard)

The DMX Standard specifies 2 pairs of data lines (Data1, Data2), with impmentation of Data2 being optional. An XLR5 (5pin) connector is specified, but concession is made by the standard forCat5 cable using RJ45 (aka IEC 60603-7 8-position modular connectors).

CAUTION: while the CAT5/RJ45 cables are identical to conventional Ethernet cables, you can NOT mix the networks. Connecting a DMX Cat5/RJ45 cable to an Ethernet Hub (or computer) may permently damge the equipment.   This gets a bit worse in my test system where I use the PJRC OctoWS2811 board with 2 RJ45 connections to drive 8 LED strips. 3 very different networks using the same Cat5/RJ45 cables!

ALSO NOTE: while the standard specifically prohibits any other XLR connectors, XLR3 (3pin) is often used on fixtures and controllers. I have yet to see devices with XLR5 connetctions.  XLR3 is also used as audio (microphone) cables. Mixing Audio and DMX signals can damage both systems badly.

DMX Serial Data Packets

The serial protocol used by DMX is fairly simple 512 byte packet. A StartCode byte is followed by up to 512 other bytes called "slots" or "channels".  A zero value (aka NULL) StartCode byte indicates a default DMX frame, in which subsequent bytes are interpreted as the value for the corresponding Channel in that universe. Generally this will be the intensity of that light but a Fixture may interpret channels differently (i.e. rotations for swivel lights, etc.)  Non-Null Start Codes (values 1-254) are allowed with The Standard defining a number of reserved values in Appendix D.  These includes StartCodes for  text (ansi, utf-8), test, system information packet (SIP), vendor specific, reserved for future standards, and Prototyping.  SIP data is further defined in the standard with specific data in each slot. See the standard document for further infomation.

ELOLED has a decent article How To Wire DMX Lighitng Systems.  It barely mentions use of Cat5 cables but does include this nice pic of DMX wiring.

Ethernet Protocols related to DMX

The 512 channel limit per DMX network may have seemed large back in the 1980s but with the advent of inexpensive LED strips and matrices that seems quite small.  Ethernet protocols (UDP/IP, TCP/IP) allow a Show Controller to control multiple DMX universes with effectively thousands of channels.

There are three main network protocols: Art-Net, sACN, King-net and a number of proprietary standards. (Standards Aren't.)

Art-Net is a royalty free protocol for sending DMX packets over Ethernet using UDP packets.  It is perhaps the most commonly named, if not used.  Some folks use Art-Net to refer to any ethernet connected DMX setup.

sACN (streaming Architecture for Control Networks) is a newer, not quite compatible standard. It is officially .known as  "ANSI E1.31 - 2018, Entertainment Technology - Lightweight streaming protocol for transport of DMX512 using ACN" (download from TSP).  RDM (aka E1.33-2019) is a companion protocol for bi-directional communication, allowing interrogation and remote management of devices.

King-Net is a relatively new standard specifically for controlling very large LED pixel displays.  It includes advanced features such as video mapping.  For now we will ignore this method..

RDM (Remote Device Management) is a bi-directional protocol that allows interrogation and setup of lighting devices over DMX and ethernet networks.

The wonderful thing about Standards is there are so many from which to choose. And if you dont like existing ones, you can always create your own proprietary version


Show Control Systems

Shows can be simple or very complex. Some sort of "Show Control" application is required to control the setup.  This may be standalone a control/mixing deck or it may be an application on a computer/tablet/smartphone.  Some of these are free and some are quite expensive professional systems.  A decent system provides for definition of the fixtures, universes, cues, etc. Many provide 3D positioning of fixtures and rendered previews of the Show.

Standalone consoles are professional decks that provide displays and physical controls (knobs, sliders, etc) to design and run a Show. These may connect to MIDI and Sound Mixing boards.  Other than this drool worthy example (MA Lighting grandMa3), we ignore these.

A computer (Windows/Mac/Linux) system will need both a software application and a hardware device to interface to DMX devices.

Computer Software

DMXControl - free, fairly easy setup.  So far only one that works for me.

MagicQ - a free cross platform (Windows, Apple, Linux) show control system.  It used/recommended by some pro friends. Lots of production features (visualize, etc) but complex.

Freestyler - is free show control software for Windows PCs. The main page for it is http://freestylerdmx.be/ while the prior link is for FreestylerSupport org

Open Lighting Architecture(OLA) is avaiable for OSX and Linux sytems. Notably it supports Raspberry Pi

Pixlel Mapper - several with same or similar names,  aimed at LED shows, mapping images to pixel strips. FaithChapel fre PixelMapper, DVision's AfterEffects plugin,  Enttec LED Mapper ( ELM

TouchDesigner- TD is a powerful animation tool for creating/controlling video and audio. It programmable using a visual scripting system, and Python. There are a number of examples of its use for controlling LED strips etc.

Computer-DMX Hardware Interface Devices

Hardware devices connect a computer to the DMX multiverses. Online searches will find a multitude of options. Quality will vary from high end profe$$ional devices to cheap knockoffs.

USB is the simplest way to connect a computer to a DMX universe.  Generally these only talk to one universe. Enttec defined the Open DMX USB Pro device and there are many variants from Enttec and others. These range from cables with USB on one end and XLR connectors on the other, to more elaborate professional boxes supporting 2 (more?) universes.  DMXKing has a selection of these and many more can easily be found online.

Ethernet controllers connect a computer or ethernet hub to one or more 'universes' of dmx512.  DMXKing offers a number of these ArtNet/sACN products.  Many more are available from other vendors.

Lights

COTS lighting and Effects devices

There are a huge number of Commercial Off The Shelf lighting and effects devices that can be driven by a DMX network. These include simple spot lights, multi-color lights, lights on controlled pan/tilt mounts, fog machines, lasers, pyro (flame) effects, etc.  There are even LED strips with direct DMX connections (SIRS-E RGB LED Strips).

LED Strips

LED Strips can be characterized by the pixel density, power draw, colors, enclosures and control methods.

Strips are available as simple tape, encapsulated tape with variety of diffusers and weather protection, and mounted to hard circuit boards. Some are even intended to be sewn to clothing.

A primary distinction between strips is whether they display a single color (aka Analog) or have individually controlled pixel strips (aka Digital). Single Color strips come in a variety of colors including several flavors (color temperature) of White (warm 3000K, neutral 4000K, cool 11000K), Red, Green, Blue and RGB.  Digital strips use extra chips (often integrated into the LED module) to control the leds, with variety of protocols used to communicate with them.  Digital strips are available as RGB or RGBW (add white) and generally use either a  standard SPI interface (+Vdc, Ground Clock, Data) or one specific to the strip style.

Single (Analog) Color LED Strips

Some Analog strips may use a filter to provide the color. Simple strips have only one fixed color and only require power to light up.  Multicolor strips of RGB pixels will have individual control lines for RGB plus a common (which may be + or -).  These strips are generally 12vdc, but large installations will use 24v strips for better power distribution.  Note: the underlying chips are generally 3-5vdc and resistors are used to divide the supply voltage appropriately.  

Digital LED WS8211/12 (Neopixel) family

The most common digitally controlled LED style is the WS8211/8212 family (aka Neopixel, etc).  These use a 3 wire connection of +V, Ground and a single Data line. I mostly use this type of strip which is available in a huge multitude of form factors from strips to rings to individually mountable/sewable pixels.

Other Digital LEDs

APA102 (aka Dotstar, etc)  newer, expensive style of LED strip. It uses the standard SPI 4 wire interface. APA104 are another new style led strip.


My Test Rig

My initial testing setup has a Win10 PC running DMXControl3, an inexpensive (amazon) usb-dmx cable, an inexpensive Par Can with 12 leds light (looks similar but borrowed from friend), daisy chain a dmx out cable to an xlr3 breakout  and then into the Teensy 3.2 Serial 1 (RX1 pin 0).  Initial test uses  a modified version of TeensyDMX/examples/BasicReceive (mod to show rgb on 2,3,4 for the simple light).

The light works fine with DMXControl3, setting the DMX interface as "Elector USBtoDMXConverter (per comment on Amazon product page)", and defining a 7 channel device (dim, r,g,b,w, strobe, patterns).   I chose DMXControl3 (after trying a couple others) because it was pretty simple to setup my basic one universe test.

I had thought that a MAX485 would be needed to interface the Teensy 3.2 to the DMX line, but was surprised to find it isn't needed.  Actually, if i wire in the Max485 i got from amazon, the moment I connect 5vdc to lights shut down.  This may be different if/when I connect the system to a different DMX interface (eg an Art-Net/sACN powered from 12v)

Future Work

Next up will be working in control of several strips using the OctoWS2811 board and the Adafruilt NeoPixel library... or my NeoEffects library that provides not blocking effects on multiple windows/strips.   The OctoWS2811 library is not useful here as it expects all the strips have the same length, which is not the case for my next setup.

I have a number of different RGB and RGBW 5v strips (ws2811 family) and a bunch of NeoPixel circles, matrix, and individual form factor leds.

Aside from the 5v Digitals, i have some 12v RGB LED Neon.   "LED Neon" is basically a regular LED strip encapsulated in a diffuser. The strip is actually sideways and thus reflects thru the diffuser material.  I have verified works with the Teensy/Octo setup if i connect the +- for strip to the 12v supply (shared ground via 2 channel bench supply).

Commercial DMX-LED controllers

I have two commercial DMX controllers for LED strips and a collection of 12v LED tape (both RGB and various White), including a length of 'Analog' (single color at a time) rgb neon strip.  I'll define these as DMXControl3 fixtures and perhaps combine with the DIY controller, noting that led strips eat up a LOT of channels (3/pixel)

Altova SP201e provides dmx in/out via screw terminals, and drives one 3 digital led strip and 5 analog channels. These will be 12v channels.

Lixada DMX512 Decoder has both RJ45 and XLR connectors for DMX in/out, and drives up to 4 channels of analog LED at 12-24vdc.  I have alreday tested this device using my bench supply (12vdc) and a pair of 12v LED strips, one RGB and one bright white strip.  Using the FUN setting, I was able to show the Decoder drives the LED strips when the DIP Switches are set to various Function modes. To enter Function Mode, switch 10 is on (down). Individual switches then set the function as follows (doc'd here as manual is hard to find)

  1. chan1 (strip red)
  2. chan 2 (strip green);
  3. chan 3 (strip blue) ;
  4. yellow;
  5. purple;
  6. cyan;
  7. chan 4 (white strip)
  8. step Colors (red, green, blue, yellow, purple cyan)
  9. smooth fade between Colors. 

When in mode 8 or 9, the lower switches control the speed of cycling.

Art-Net

I have a more elaborate ArtNet/sACN-DMX device (DMXKing eDMX4 Pro ISODIN) that provides ethernet connectivity to multiple universes.   Those will be essential for controling lots of LED strips, and other DMX devices.

Other Control Devices
I have done quite a few different digital LED controllers using microcontrollers such as Arduino, Teensy and ESP32. However, these were mostly self contained and did not provide DMX control.  One family of projects used the Feather ESP32 and ESP8522 with an adhoc wifi net and our own UDP message system.

I plan to modify some of these devices/code to support DMX, either directly using RS485 serial or via alternative control from a DMX connected machine.  For example the PixelBlaze device (ESP12) is closed source but connects by wifi with control software and someone has released Python code to send color patterns to the PixelBlaze.

I also have a number of Raspberry Pi (rPi) devices.  There are both Art-Net/sACN and simple DMX libraries available for the rPi.  I plan to try out some of these as time allows.

Long time back I also built an Arduino/MIDI controlled propane poofer. It would be fun to revisit that as a DMX device.