DMX512 Lighting Control with the NB3000 – Part 1

Lighting is and always will be of significant technological and commercial interest to the electronics design community. With growing global environmental concerns, much of the recent research into power supply design and semiconductors has been around improving the power efficiency and light output of LEDs and their associated driving circuitry. In fact, LEDs are a very good example of what Clayton Christensen terms a “disruptive technology” – one that eventually becomes so cheap, and “good enough” that it replaces the highly optimized prevailing technology (incandescent and compact fluorescent lamps, in this case).

While LEDs are on the rise in terms of production quality and Lumens Per Watt, so too are the lighting fixtures that employ them. Today, nightclubs, bars and live performance venues are offered a plethora of options when it comes to LED based fixtures including moving heads, gobo projectors, diode laser projectors, and “PAR cans” that replace traditional incandescent lamps that generate a lot of heat, and use gel emulsion or dichroic filters for coloring the light. LEDs are more flexible and efficient in all cases, offering infinite colors (with Red Green and Blue chips) and high brightness that in the dark environment of a bar can be impressive. While the technology is not yet able to replace the brightness offered by HID (High Intensity Discharge) lamps, it will only be a matter of time, and already LEDs are favorable in a number of circumstances.

What remains the same is the protocol that’s used to control these fixtures: DMX-512. DMX-512 is a well known and fairly simple standard maintained by USITT (standard E1.11 is the current version). This standard has been in widespread use since the mid 1980’s, but is so easy to implement and provides enough functionality that it is still the most widely used protocol for lighting control, and is likely to continue as such well into the future.

The Nanoboard 3000 is a perfect platform for developing lighting controller applications that use DMX-512 (and other protocols). This month, we will present a short overview of the DMX-512 lighting protocol and introduce some key components that enable the NB3000 in this domain.

DMX-512 Protocol – A High Level Overview

DMX512 uses RS-422/485 (now called EIA-485) to transmit asynchronous serial data over a twisted pair balanced line. While the original standard specified shielded twisted pair of 120Ω nominal impedance connected via 5-pin 180º XLR connectors, the revised standard allows for use of CAT-5 unshielded or shielded twisted pair cable and RJ-45 modular jack type connectors. This allows commercial lighting installations to make use of unified CAT-5 cabling and patching in the building infrastructure that is so common thanks to Ethernet and PABX systems.

As in any RS-485 based serial link, the twisted pair transmission line is shared in a multi-drop bus topology, as shown in Figure 1. This is facilitated by each device having input and output sockets, with shorter cable lengths daisy-chaining the fixtures together. Unlike RS-485 which is a multi-master bus, DMX-512 is specified as a single-master multi-slave bus (so it’s really more like RS-422), as the lighting controller typically only issues commands to the fixtures. However many LED based fixtures are capable of being bus masters for simplified modes of operation that do not require a separate control surface. It’s important to note that there should be a 120Ω terminator at the end of the line, as reflections will otherwise render the data unintelligible by the fixtures.


Figure 1 – DMX 512 Bus Connection

The RS-485 physical signaling in DMX-512 uses a differential balanced line and transmits baseband signals at 250K bits/second, so by today’s standard is relatively slow, though it’s still quite fast enough in most cases. Some proprietary systems use higher speed versions of the protocol to enable rapid scene changes involving many hundreds of channels (such as would be found in a rock concert with multiple moving head fixtures). In most implementations where latency or number of channels is an issue, more than one DMX bus is typically used.

The serial data format is pleasantly simple and most any UART can be configured to send and receive it, with a single start bit, 8 data bits, and two stop bits. The caveat is that with DMX the beginning of each frame begins with a long space (called BREAK), then a mark (Mark After Break or MAB), in order to delimit each set of data.

Referring to Figure 2, the first byte of each frame is Slot 0, and for normal dimming applications is a NULL (all zeros) byte, but can be used as a means of transmitting vendor codes to intelligent devices for configuration and diagnostics. The next slot, Slot 1, is merely the brightness value from 0x00 (fully off) up to 0xFF (fully on) for the first of the 512 dimming channels controlled by the frame. Each subsequent slot up to number 512 carries the dimmer setting for its associated channel.


Figure 2 – DMX Frame

Using the NB3000 for DMX

Figure 3 – RS485CNTR

Since the NanoBoard 3000 is equipped with an RS-485 output, it can be used to transmit DMX-512 protocol data. The RS485CNTR component (shown in Figure 3) from the FPGA NB3000 Port Plug-In.IntLib library is used to connect to the RS-485 bus for the DMX interface. Since the NB3000 uses an RJ-45 connector, and most lighting fixtures use XLR-type connectors, an adapter cable needs to be made or purchased. In reality, cutting the end off an XLR DMX-512 cable and crimping on an RJ-485 connector does the trick.

The 3.3V LVCMOS signal from the FPGA is level shifted and complemented by an ISL8491 chip to provide the RS-485 standard 5 volt differential signaling required. This device also has enable inputs for transmit and receive, which are normally pulled high through the RS485_RX_EN and RS485_TX_EN pins of the RS485CNTR component by being tied to a VCC power port object.

Figure 4 – WB_UART8

In order to obtain the necessary serial data format, the Altium Wishbone UART (WB_UART8) IP core is used. A schematic version of the component is found in FPGA Perhipherals.IntLib library, but for this article the OpenBus version will be used (shown in Figure 4).

While the WB-UART is pre-fixed for 8 data bits, 1 start and 1 stop, we can trick it into providing 2 stop bits as used in the DMX-512 protocol. But we've run out of space here, so more on that next month.

In the next instalment, we will present three simple reference designs that perform real-time control of DMX-512 LED-based lighting fixtures. Stay tuned!

► December 09 Envision home