The Digital Multiplex (DMX) protocol is everywhere in lighting, so if you’re fiddling with lighting, it’s not going to be long before you start to have questions about the versatile lighting control protocol, which allows you to have the ultimate control over your lighting requirements. Presented below is a primer to explain the simplified function of a DMX signal control system.
What is DMX?
DMX was developed by the United States Institute for Theatre Technology (USITT) in 1986 mainly for controlling lighting equipment and accessories in entertainment applications. DMX set the bar for lighting manufacturers to build fixtures that would all be compatible with each other for controlling everything from a single source, thus giving improved freedom and flexibility, especially when it came to creating lighting shows. DMX is, in fact, a very popular protocol in which a DMX controller communicates to DMX luminaries. Nowadays, it is widely used in architectural scene-setting applications as well.
DMX requires different components to work. DMX control is usually achieved with a DMX controller/console, and the “addressable” lighting fixtures are usually interlinked with each other (daisy-chained) using DMX cables, usually three- or five-pin XLR. The DMX controller sends DMX values, which is an 8-bit value (between 0 and 255) corresponding to a 0% to 100% intensity. In DMX512, strings of 512 values are send 40 times per second, and the location of a DMX value is referred to as the “address.” By addressing the DMX device, it knows which DMX value to use.
“DMX512” stands for Digital Multiplex 512, meaning that 512 channels are controlled digitally through a single data cable. The “address” is the location in the 512-channel DMX universe that the DMX device begins (most DMX lighting fixtures have a series of DIP switches to set the desired device addresses). The “DMX universe” is the 512 channels of output from the DMX controller/console. When we complete the first universe of 512 (DMX A), we should move over to the second universe (DMX B). Note that universes can’t be combined because each needs its own DMX cable run. Regarding DMX512 limitations, one rule in practice is that we can’t have more than 30 devices on one DMX cable run (1,800 feet on paper). After this, the signal needs to be boosted with a proper DMX booster.
As stated earlier, DMX control is usually achieved with a standard DMX controller/console. But it is also popular with DMX software connected with a DMX USB interface (PC-based console) that converts USB output to DMX output.
The standard DMX control cable is an RS-485 “shielded twisted-pair” cable with three connections: two signals (DATA+, DATA–) and a ground (GND). The DATA+ and DATA– signal create the actual DMX signal, while GND is for reference (and to prevent interference). To create a stable DMX signal, the end of each DMX line should be terminated with a 120-Ω resistor wired between the DATA+ and DATA– signals. Recommended DMX connectors are RJ45 and Neutrik XLR five pin. In RJ45, Pin 1 is DATA+, Pin 2 is DATA–, and Pin 7 (and 8) is GND, while Pin 1 of XLR is GND, Pin 2 is DATA–, and Pin 3 is DATA+.
A few (but not all) DMX key points:
- DMX is a special language in which a DMX controller talks to DMX luminaries.
- A DMX controller sends 8-bit DMX values.
- The location of a DMX value is referred to as the address.
- By addressing a DMX device, it knows which DMX value to use.
- Most DMX devices use more than one DMX address (for example, RGB LED lights).
- One DMX line can control 170 individual RGB LED devices.
- The DMX topology is serial, and DMX is based on RS-485 communication.
- At the data level, a DMX512 controller sends asynchronous data at 250,000 baud (1 start bit, 8 data bits, 2 stop bits, and no parity check).
- The communications method entails sending bytes of data in a stream of 8 bits per byte, wrapped around a start bit and stop bits. The start bit is a single bit period set to logic zero. The stop bits, when using DMX, are two bits set to logic 1. The combination of 1 start bit, 8 bits in the byte, and the 2 stop bits (a total of 11 bits) is called the frame.
- It is possible to split a DMX line and boost a DMX signal.
- DMX termination (end of line) is very important.
So what you do need to get started with DMX? In a nutshell, you’ll first need DMX lights and devices. If you’re on a tight budget, then you can use your Arduino as a DMX slave device, too. Next on the list is a DMX controller — your laptop will do that, but you should buy/build a USB-DMX converter to put in the middle.
Finally, you must have the proper software to program your light/stage shows. DMXControl (https://www.dmxcontrol.org/en/downloads.html) is one widely appreciated freeware. Below, you can find the screenshot of “DMX Control 3.1” running on a Windows 7 (x64) system. If you don’t mind paying a bit more, you can find many other software alternatives.
DIY DMX Arduino shield
First, take note that the following is not a full-fledged DIY project. Rather, it’s merely a pointer to design your own Arduino DMX shield for hobby/professional application. The Arduino DMX shield is a low-cost solution that allows you to use an Arduino as a DMX master, slave, and remote device management transponder. Fortunately, numerous Arduino libraries are now available for making fantastic DMX controllers and devices. The electronic foundation here is the differential signaling over RS-485. To send DMX data as a differential signal, we can use a devoted transceiver chip like the MAX485 (or MAX481).
In addition to power supply rails, the DMX shield circuit shown here consists of three input channels (uC interface) and two output channels (DMX interface). The shield also supports the DMX-RDM protocol, which is an extension for DMX to enable bi-directional communication between the controller and the devices. To handle DMX and Arduino the right way, the circuit uses a common driver chip MAX485, and for perfect galvanic isolation, there are three high-speed 6N137 optocouplers. Finally, a compact DC/DC isolated power supply (B0505S-1W) is included to ensure 100% galvanic isolation. Refer to the well-annotated schematic shown below.
The following (recommended) practical application points should be noted before your first try:
- Data transmission is via TX1 (or D3 optional).
- Data reception is via RX0.
- RDM shift is via D2 (or D4 optional).
- Remember to disable the shield (jumpers are there) before a new sketch upload onto the Arduino board.
- For non-RDM applications, just remove resistors R8 and R9 from the circuit (see the jumpers).
- If the shield is in SLAVE mode, resistors R8, R9, and R10 are not necessary. But it’s crucial to terminate the last node with a 120-Ω termination resistor.
Well, now you’ve got your own Arduino DMX shield with the help of a couple of inexpensive components. Now is the right time to start your low-cost experimentations with DMX electronics. Because this design is an inspired one, I’d like to recommend the original designer’s (Matthias Hertel, www.mathertel.de) Arduino Library — DMXSerial — to get off the ground easily.