Illuminated with Lee Cyborg: Getting to Know DMX

Learn the basics of stage lighting, tools, and techniques!

Lee Cyborg
2 days agoLights / Art

I'm really excited to launch my new column here on Hackster, Illuminated with Lee Cyborg. I love to share technical knowledge but I know it can also be overwhelming! I will continue making zines and writing for Make, but my hope is this column will be a regular (bi-weekly) way for me to share technical information for people who are a bit beyond beginners, but not quite experts. Maybe you've been using Arduino for a few years and want to get a bit better. Maybe you feel like you're missing some key details on how code works. Or maybe you just want to know how exactly transistors work anyway?! I intend to shed some light on intermediate topics form my perspective as an artist.

It feels right to start illuminated by looking at light, so the next few entries will be focused on working with lights specifically. If you’ve ever seen giant, bright lighting on stage, at concerts, on big outdoor art installations, you’ve been looking at DMX lighting. DMX is a control protocol used by the pros but it’s easy to use in your own projects. I’ll share a bit about how to do it with your Arduino, via USB from your computer, or from a networked device.

DMX stands for Digital Multiplex. It was first invented in 1986 as an easy way to control lots of theatre lights. DMX is really useful because it is a very simple protocol that lets a large number of elements be controlled with a single controller. Lots of off the shelf DMX lights are really made to light big things: like a stage, building, or sculpture. Using devices that are controlled through DMX can really make your work feel more professional. Harnessing the power of DMX lights also helped me bring my work from desktop to full installations. DMX fixtures are also often available in waterproof enclosures and are able to be mounted easily onto basically anything. With these tools, you can create cool distanced lighting effects and make some truly immersive stuff! Personally I’ve used it a lot on outdoor or large scale installations. You can just get way more power out of a standard DMX fixture than basically any other standard LED strip. They are super bright, I’ve used them to light sculptures even in full daylight. After all, they’re made for this kind of thing!

DMX is a one-way communication, so devices cannot talk back to the controller. While it is most commonly used in stage work, I’ve seen a ton of really cool projects that use DMX to control a big array of other smaller things. In the end DMX is just a standardized protocol that

Let's break down a few concepts that DMX uses.

Video of Fiddle Hex at the Toronto Waterfront

Channels

DMX uses channels to transfer information along a chain of elements. Think of a channel like a numbered slot for information. Channels are arranged in a DMX Universe, which contains 512 channels. You can have multiple universes if you want to control a lot of channels. Channels can also have a “personality”, which is the attribute they are controlling. For example, a channel might control light color, but it could also control the rotation or strobe of a lighting fixture. In a standard DMX stage lighting situation your channels might be Red, Green, Blue, White, making it a 4 channel light. In a more advanced DMX fixture, you may have Red, Green, Blue, White, Pan, Tilt and Strobe. It takes 23 ms to transmit a DMX packet, which means we have a maximum frame rate of 44 Hz.

Controllers, fixtures and scenes

Every DMX light, often called a fixture, contains a particular number of channels. The simplest way to control many lights is a primary DMX fixture that all other fixtures mimic. Commonly, you’ll see controllers referred to as “master” and each light referred to as “slave”. I only reference this here so that you are aware of language when researching, and from here out I will be referring to them as Controller and Peripheral or Fixtures. This is in reference to the Open Source Hardware resolution to replace master/slave words in SPI protocols, but I think it applies here too. You can read more about why here.

If you want more dynamic control over your lights, you can use a DMX controller. Controllers usually have sliders linked to each channel that you can manually set. I use the SHEHDS 192, because it's very cheap and lets you get control over your lights quickly. In the diagram below, you can see how the channels are sequential in groups defined by the fixtures. Settings can be saved in a typical DMX controller that are called “scenes”.

DMX channel addresses are configurable, so you will be able to set each fixture to its own address. If you’re using your own code or a controller, you’ll need to be aware of how many channels each fixture uses and the order they are in so that they don’t overlap. For example, if you have lamps of varying amounts of channels. If you’re using off the shelf controllers and lights, it's important to read the documentation clearly to understand how the channels are working in that particular unit. It's really something that is impossible to guess, so don’t be like me and waste hours playing with channel addresses - read the manual. Every single DMX light or model is different, but commonly there are buttons on the side or back that can be used to set both the channel number and in controller or peripheral modes. This is done on the fixture itself. If you’re in a bind and really can’t recall channels, plug it into a controller and begin moving some sliders!

Connectors

DMX controllers used a 5 pin connector, but most entry level DMX controllers use XLR connectors which use 3 pins. For most cases, DMX and 3 pin XLR are interchangeable for the majority of hobby or small installation level work. The XLR is the same dimensions except 2 pins are missing, which is why they are able to mesh. There are mini XLR and mini DMX connectors, as well as a variety of intermediate sizes that are hard to assess without looking at the specs. One thing I ran into is that there are a variety of 3 pin XLR sockets on mid range, weatherproof DMX lights that are in between mini and standard size. Weatherproof or stage quality DMX lights can be really expensive, so you’ll find a wide range of qualities and with them a wide range of connectors. It's really worth double checking the specs on each connector while you're sourcing lights. I have been using DMX lights for outdoor installations, so it's important to me that they be IP65 rated which have specific connectors and are very well sealed. You can find affordable non waterproof DMX lights on Amazon or AliExpress, but be aware they might really not be waterproof and have open enclosures, which is fine for indoor installations. I’ve seen people manufacture boxes to put them in with acrylic covers to keep the safe too!

In the end, the connector is just a 3 pin mechanism that you need to plug into the DMX socket, so there are a few simple solutions if your connectors don't match. I bought a few spare DMX cables and a variety of XLR sizes and created a series of adapters. They are pretty easy to make because there are only 3 wires. Cut your standard DMX cable and use a multimeter to find the corresponding wires and solder them. Make sure to use heat shrink over each connection and the whole wire, then you’re ready for any budget DMX lamps. If you are chaining together many lights, you only need to create 1 adapter to connect the Arduino breakout to the first fixture. Then, each subsequent fixture can use whichever style connector they came with.

Fixtures

DMX lights come in a range of shapes and sizes, most commonly aimed at lighting stages or shows. There is a massive range of quality in buying fixtures, so its important to understand what you want, your budget, and application before you embark on this journey to not get overwhelmed. The main types of lights I use are parcans, pin spotlights or light bars. Spotlights are probably the most familiar, they produce a beam of light that is narrow and defined. A parcan is often used in stage lighting and is similar to a spotlight, although it produces a wide beam. That can be a bit more diffused. Light bars are wide and good for lighting up a wall or big area. We also used light bars to edge-light large acrylic panels below. They are great for covering a large area with lights rather than highlighting a particular element, or edge lighting a piece of plastic.

Each of these might have a range of features and channel configurations. Some parameters to keep an eye on are light colors, weather proofing, and if you want any movement or motion control, and their overall brightness. Not all lights will have all of these features, but each individual property is not a direct indicator of quality. You may be able to save a lot of money if you don’t need a particular feature.

You’ll find that some of the lower quality lights have an R, G and B lamp individually on the fixture. While this might seem at first like you won’t get clean light colors you want to make, you’d be surprised at how well they do mix with a bit of distance. In the example above, we used a cheaper lamp to create an edge-light effect by putting it on the edge of a large piece of acrylic. At the base of the acrylic the three colors aren’t mixed, but after a few inches they fully mix to create really nice colors. We covered the first few inches of the acrylic so that only the full effect was visible. If you want lamps with RGB integrated together, it will cost you. But I really don’t think it’s a big deal!

DMX through Arduino

For controllers, I tried a variety of DMX breakout boards and settled on this DFRobot Breakout as my favorite. The reason for this is that it fits neatly onto an Arduino Uno, which is my preference for installation work. It has a few jump switches that let you quickly program it and set different modes.

After testing a range of DMX libraries for Arduino, I have been using the Conceptinetics DMX Library. This library does a great job of providing a series of really clear functions to use fixtures. I made a few examples myself that use this library to mimic NeoPixel patterns, you can find those here. This is super useful if you want an affordable way to control your pixels, using tools you probably already know. You can even use this shield with other Wi-Fi connected sensors already in your Arduino tool kit.

DMX from your computer

It's important to understand that DMX can’t be controlled directly over USB. Even though there are XLR or 3 pin Midi cables that physically plug your USB into a DMX port, the protocols do not work together. The simplest solution I have found is to use an Enttec USB to DMX adapter. There are two options, the Enttec Open and the Enttec Pro, the pro has a microprocessor that ensures that the data flow is consistent. But the Open works just fine for small work and is only 70$. Both of these will allow you to package data in the appropriate format and send it via your serial port.

The other most common way to use Artnet. Artnet is a way of controlling networked DMX that is super scalable. It's probably the most common, most scalable, and most reliable way to control large amounts of DMX. To get you started, I like this PKnight CR011R Artnet Node which will run you about 70$. It can only control one universe, but its perfect for getting started. There is a bit of a learning curve in setting up your artnet nodes, you’ll have to make sure your IP address matches your subnet mask, here's a quick primer on that.

In terms of software, there are a TON of ways to actually program the light. Some easy ways to get started (that are not industry level) are MaxMSP or Touch Designer, both of which are visual programming environments that often engage with interactive media. I really like this JavaScript example that uses the Enttec through your browser, or this Node.JS DMX library. A very user friendly example is LightKey, which is free and has a simple graphic interface.

Once you’ve got your fixtures, connectors, interfaces and software, you’re good to go making large DMX installations! Let me know what you end up making, or what your favorite tools are for DMX lighting.

Lee Cyborg
Artist, cyborg, maker.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles