Just another in the neverending world of blogs

Tag Archives: DMX

I seem to be working on more and more shows where video is used, usually controlled via something like a PowerPoint or Keynote presentation running on a Mac or PC. Being able to control that remotely via a lighting console would be useful for a number of reasons. Not only does it let you synchronize things more closely, but it makes it easier for a stage manager to call a show, and also easier for a running crew since they don’t have to worry about whether the next cue means pressing something on the lighting console, something on a keyboard or laptop, or both.

You can find commercial products available that let you simulate pressing a key on a PC/Mac keyboard via DMX, such as Rosco’s KEYSTROKE™, but unless you need to trigger lots of fancy key sequences then the approx. $400 US price tag may be a little much for you. If all you want is an inexpensive way of pressing a button like the space bar via DMX then there are much more inexpensive ways if you don’t mind a little tinkering.

You basically need two components. First, you need a DMX decoder that lets you toggle a switch or relay. The only other thing you need is a module that lets you simulate pressing a key on a USB keyboard. There are numerous ways of doing both, and depending on how much you’re willing to spend and how much you’re willing to tinker you can spend as little as $0 on a solution. $80 or so may be more likely, but even that is a much better price to pay than the commercial products!

The DMX interface

If you have an old DMX device lying around you may be able to cannibalize it for its DMX decoder circuit. If not then you can buy a one channel DMX relay for as little as $40 from places like ApogeeKits or All Spectrum Electronics. For a bit more you can get 4 or 8 channel DMX relays from places like Northlight Systems or Blue Point Engineering. Depending on how fancy you want to get a single channel relay is likely enough for most needs. Do you only ever plan to control something like PowerPoint or Keynote? If so then you only need to remotely trigger a single keystroke. If you need more then how many individual keystrokes do you need? So 1 may be enough for most cases, but 2, 4, or even 8 may provide you with additional flexibility.

The Keyboard interface

If you have an old keyboard lying around then you already have all the remaining parts you need. With very little effort you can find many websites that discuss keyboard hacking, or taking apart a keyboard to make use of the guts so that you can make other devices send keystrokes to a PC.

If you don’t have an old keyboard lying around or don’t feel like cracking one open to cannibalize it then you can always buy a USB keyboard encoder, which is basically a device that emulates a keyboard. This is the approach I chose for a few different reasons. After hunting around for a while I came across the U-HID Nano, which at $35 fit both my budget and my needs perfectly. This tiny module (only about 1.5″ long) is fully programmable via a Windows app and lets you specify up to 8 individual keys to emulate.

The U-HID Nano

Things to be Aware of

Depending on what components you scrounge/hack/buy there are various issues you should be aware of. If you hack a keyboard to use as the PC interface then make sure you’re fully aware of how the keyboard behaves. By default, Windows, OS-X, linux, etc. all treat a prolonged key press as a signal to repeat that key over and over until you let go of the key. So if your DMX console sends a prolonged signal to your DMX relay you may find that it results in the computer you’re trying to control interpreting it as multiple key presses. If you are trying to control an application like PowerPoint this way then you could find yourself cycling rapidly through slides when you don’t mean to. You might be able to deal with this by doing some rather precise timing work with your lighting console or going into your PC’s settings to reduce the keyboard repeat rate, but neither of those are very “neat” solutions. If you’re fine with that approach then more power to you!

This is one of the reasons why I decided to go with the U-HID Nano device mentioned above. One of its nice features is that it supports a “pulse” mode for emulating keystrokes. When it receives a signal on one of it’s control pins it sends a momentary key press rather than latching the keystroke down until the signal is removed. In this way you can trigger a momentary key press by setting the DMX value of the appropriate channel to a non-zero value and you don’t have to worry about quickly setting the DMX channel back to zero or about the PC interpreting the key press as a repeated one.

If you go with a device like the U-HID Nano or hack a keyboard and decide to support more than one keystroke then the next question to ask is whether you want to use one DMX channel or more. Since a single DMX channel provides 8 bits of data you could apply one bit to each keystroke. (It sounds like the U-HID Nano is almost made for this!) Using a single DMX channel can save an otherwise scarce resource if you have a limited number of free/available DMX channels. The problem here is that you can easily find yourself in a situation where you send keystrokes that you don’t want to, and you may find it very difficult to work with your DMX/keyboard module. If you accidentally fade the DMX channel up/down in a lighting cue you’ll find it generating all sorts of unwanted keystrokes.

By mapping a single DMX channel to a single keystroke you make management of keystrokes much easier. If you trigger a keystroke by setting a channel to a non-zero value then you won’t accidentally trigger more keystrokes if that channel then fades to another level. An 8-channel DMX relay is more expensive, but if you only ever expect to need to send one or two keystrokes during a given show then a one or two channel relay should be plenty for your needs. Again, since the U-HID Nano is fully programmable, you can change the keystrokes it sends in just a few seconds. If all you need to do is send a single keystroke so you can automatically cycle through PowerPoint slides then a single channel DMX relay and a U-HID Nano would make an excellent combination for less than $100.

My Setup

I actually had an 8-channel DMX relay from Blue Point Engineering sitting idle from a previous project I needed it for. I simply wired all the common terminals of each relay together and then attached them to pin 1 of the U-HID Nano. Each of the remaining pins then went to the normally open pin of one of the relays.

I also picked 8 keystrokes that I’m most likely to use and programmed one for each of the 8 pins on the U-HID Nano. Using the configuration utility you can download from their website I set each pin to be a key switch with the down action set to “Pulse Primary” and the up action to “Clear”. The completed box works like a charm!

There are a number of good DMX-512 resources available on the internet, but many of the primers focus mostly on the technical aspects of the protocol and less on practical usage. What follows is information on DMX-512 from more of a practical users perspective. For more resources see my DMX-512 Resources page. If you have other questions you’d like to see addressed here please e-mail me (click on “About” at the top of the page) or post a comment.

What exactly is DMX?
DMX is actually shorthand. The full standard is DMX512-A, which is typically referred to as just DMX-512 or DMX. It was originally designed as a standard for lighting consoles to communicate with dimmers used in theatrical lighting. Up until the early 1990’s most lighting systems used proprietary protocols between consoles and dimmers, so it was difficult to have a console from one company communicate with dimmers from another. As DMX512 gained popularity it was quickly adapted by manufacturers of special effects, moving lights, etc. as a means to also control those devices.

DMX is a serial digital protocol. If you’ve used computers for a long time and are familiar with modems then the concept is very similar. Your lighting console will send one control signal down the DMX cable, followed by the second one, followed by the third one, and so on until all the data has been sent. Once all the data has been sent the console simply repeats itself and starts sending out the first control signal again. This happens quite rapidly – the default rate for DMX is 250 Kbaud or 250 thousand bits of data per second.

Why “512”?
The 512 in DMX512-A corresponds to the number of control signals the protocol supports. A single DMX cable can carry 512 individual signals, so if you have a lighting console connected to a dimmer pack via a DMX cable then that cable can control a maximum of 512 dimmers. It is possible to split a DMX cable (more on this below), but each split would carry the exact same 512 channels of data as the source cable.

So a single DMX cable (or a cable split to run to multiple devices) would be capable of controlling any one of the following:

512 individual lighting dimmers

32 intelligent lights that require 16 channels each

256 dimmers, each of which has a light plugged into it and an individually controlled color scroller attached to the light

Any combination of the above in which the total number of channels required is less than or equal to 512

What exactly is a DMX channel?
A channel is simply one of the 512 control signals in the DMX512-A protocol. As it is a digital protocol, each channel is represented by 8 bits. Those 8 bits represent a value between 0 and 2^8 or 256. Most lighting consoles will abstract those values to a range between 0 and 100%. Newer and more feature-rich consoles will provide an option to let you view and work with DMX channels in either decimal (0-100%) or hexidecimal (0-255) depending on your needs.

So to summarize everything from above, DMX-512 is a protocol running at 250 Kbaud that transmits up to 512 8-bit values repetitively. (If you only use 100 channels then only those 100 8-bit values are transmitted.)

What is a DMX universe?
A single DMX universe, at the most basic level, is just a single DMX cable that carries 512 channels of data. More specifically, a DMX universe is a single DMX network. If a single DMX cable is run out of a lighting console and then split (see below) into multiple other cables, then all those cables make up a single DMX universe. They all carry the exact same DMX data.

Many lighting consoles have the ability to control multiple DMX universes. If a lighting console supports two or more universes then you will find two or more DMX connectors on the back of the console. They will be labeled something like “DMX universe 1”, “DMX universe 2”, etc. or “DMX 1-512”, “DMX 513-1024”, etc.

So exactly how many devices can DMX control?This actually depends on the lighting console you have. If the console only supports a single DMX universe then it can control a maximum of 512 independent single channel devices. If you want to control 16 channel devices then a single universe can control only 32 devices (512/16 = 32). Obviously if your lighting console supports multiple universes then the number of devices you can control increases.

If you only have a single universe it still doesn’t mean you can control only 512 devices. Suppose you have a setup where you have ten different Red/Green/Blue LED lights. Each light takes 3 channels, one for the intensity of each color. If you want to control those 10 lights independently then you would need 30 channels. However suppose you wanted all ten of those devices to always work exactly the same (perhaps they’re all providing a uniform wash on a stage). If that’s the case then you can set all ten of those lights to the same DMX address, and they will all respond identically. In this setup you only end up using 3 channels instead of 30.

You can have a virtually unlimited number of devices that are all set to respond to the DMX channel if desired. This isn’t always desired, but in certain cases it can be very useful. It’s not uncommon to see multiple color scrollers set to the same DMX channel if they’re used for color washes. So between consoles that support multiple universes and setting multiple devices to the same DMX channel you can control a virtually unlimited number of devices.

The Data + and Data – are simply complements of each other, so if the Data + line has a voltage of +1 volt when compared to the common then the Data – line will have a voltage of -1 volt. If you look at the DMX512-A specification or other websites that discuss DMX you will find references to a second pair of Data + and Data – lines that are considered optional. These are considered optional as they are not actually used in typical DMX environments. Some devices may make use of them, but if they do then it’s not in any standardized way.

The specification for DMX is very specific with respects to the connectors and cables that should be used. Unfortunately many liberties have been taken over the years that has muddled the waters as far as both cables and connectors go. The DMX specification stipulates that 5-pin XLR connectors be used, and the vast majority of professional lighting consoles, dimmers, etc. all use 5-pin XLR connectors despite the fact that only 3 pins are used. Among other things, the use of 5-pin connectors helps to prevent you from accidentally plugging a lighting console or dimmer pack into a 3-pin audio XLR cable. If that audio cable is connected to an audio mixer that provides a phantom power supply of 48 volts (used by microphones) then you could burn out part of your console, dimmers, etc.

The DMX specification also stipulates that cable that adheres to the RS485 standard be used. Cable designed to this specification can carry digital signals over long distances in electrically noisy environments. Standard shielded microphone cable is not RS485 rated so it should not be used. Some examples of RS485 cable include Belden 9841, Belden 9842, and Alpha 5274 among others. A quick Google search for those will find plenty of sources for them.

Unfortunately (or fortunately depending on your perspective) some manufacturers of intelligent lighting effects realized early on that despite not being approved by the DMX512-A specification, that regular microphone cable can actually carry a DMX signal for short (50 feet or so) runs. They also realized that traveling disk jockeys already likely have lots of microphone cable so to cater to their needs they started developing and selling DMX controlled party lights using 3-pin XLR connections. Today you can find lots of 3-pin intelligent lights from a wide range of companies like American DJ, Chauvet Lighting, and even Martin and many others.

Because of the prevalence of lighting gear that require 3-pin XLR connections it’s a good idea for any lighting designer to have at least a few 3-pin to 5-pin adapters. You can make them yourselves – just connect pin 1 to pin 1, 2 to 2, and 3 to 3, leaving pins 4 and 5 on the 5-pin side unused.

Splitting DMX cables
Simply making a ‘Y’ connector out of three XLR connectors is a BIG no-no. Depending on the quality of the cable you use and the length of each leg of the “Y” you will likely have some of the DMX signal reflect back down to the junction and out the other leg, resulting in what can best be described as schizophrenia by your DMX devices. They will start behaving in extremely unpredictable ways due to the “leak” of the signal from one leg to the other.

If you need to split a DMX signal (and it’s a very common need) the right way to do it is with a device known as an optical splitter. This is a device that you plug a single DMX cable into and it may have 2, 4, or many more DMX outputs that each mirror the signal on the input line. Each of the outputs is electrically isolated from the others using optical isolators which prevent reflections from one leg impacting any of the other legs. Examples of DMX optical splitters can be found here, here, and here among others.

One nice feature of some DMX splitters is that they support both 3-pin and 5-pin XLR connectors, meaning that they can be used not only as splitters but converters as well.

Terminating DMX cable runs
The same signal reflections described above when splitting a DMX cable using a “Y” connector can happen on a single un-split run of DMX cable if it is long enough. To prevent this from happening it is good practice to always attach a DMX terminator to the end of each DMX run. A DMX terminator is simply just an XLR connector with a resistor attached between pins 2 and 3. You can make your own DMX terminators very easily or even add an LED or two in order to make a useful DMX tester.

You may quickly find that sometimes termination doesn’t seem to be important, especially with shorter cable runs. But if you see even the slightest odd behavior in your devices then it is strongly suggested that you add a terminator and also make sure your DMX cables are of the right type and not damaged in any way. Lots of problems can be traced to dirty DMX signaling caused by a lack of termination and/or faulty cables.

Some devices will have DMX termination built into them. Check the devices manual to see if it does, and if so how to enable or disable it as needed. Usually this is just a switch you can turn on or off as needed. If a device does provide built-in termination then make sure it’s disabled unless you need it (the device is the last one in a DMX chain).

DMX Addressing
Any device that uses DMX must have a way to specify the DMX channel(es) that it will respond to. This is typically referred to as the “starting address”, and for simpler devices like color scrollers it is usually set by a series of rocker switches or dial switches. Rocker switches are used to add together the binary values 1, 2, 4, 8, 16, etc. into the desired value. Dial switches let you pick the values 0-9 to specify a three digit value. More sophisticated devices like robotic lights will typically have a control panel with menu options that let you set the channel with a few button presses.

In all these cases what you are setting is just the first address that the device will respond to. If a device only uses one address then it’s easy enough to keep track of. If a device requires more than one address, such as a four channel portable dimmer pack, then the address you specify plus three more would be used by that device. So if you specify channel 132 for a four channel dimmer pack then 132 controls the first dimmer, 133 controls the second, 134 the third, and 135 the fourth. The “fancier” the device the more channels it is likely to use, and a different number of channels may be used depending on how you program the device. A robotic light may use 16 channels in one mode but 20 in another. It is critical that you keep track of how many DMX channels each device you have uses and make sure you don’t accidentally overlap channels. If you overlap channels across two devices you’ll likely get very unpredictable results.

It is possible, and perfectly reasonable, to assign the same DMX address to multiple devices. Suppose you have 6 fixtures that provide a wash across your stage and each of those fixtures has a color scroller attached to it. If you know for certain that you’ll always want those 6 fixtures to use the same colors at the same time then you can set all those scrollers to the same DMX address and they will all scroll in unison. However if you want to wash half of your stage in red and half in blue then you might need to assign three scrollers to one channel and three to another. If you need to independently control all of them then you’d need to assign them six different channels.

Working with color scrollers and other common devicesColor scrollers are one type of device that DMX is well suited for and fairly easily to understand. A typical color scroller uses a single DMX channel to adjust the positioning of a scroll of gels in front of a stage light. Depending on the type of scroller it may have 8, 16, or some other number of colors in the gel scroll. A DMX value of 0 will display the first color in the gel scroll, and a value of 100% or 255 (2^8) will display the last color in the gel scroll. By adjusting the DMX value you can “dial in” any color on the scroll.

[Note: There are vendors who sell different types of scrollers that use two scrolls of gel to create a wide mix of colors. If you are just getting started in working with scrollers make sure you know what you’re using.]

A DMX cable by itself is incapable of providing the power required to operate a color scroller. Some scrollers, mostly older ones, plug directly into an AC line, which means that you would need to run both power distribution and DMX to each scroller you use. This, needless to say, is a real pain. Most modern scrollers as well as many other devices (DMX irises, moving mirrors, etc.) now get their power from a standardized power supply. A Power Supply Unit, or PSU, takes both an AC line input and a DMX input, and combines them into a single output on a 4-pin XLR cable. Different sized PSU’s can power a different number of devices. Make sure you don’t overload a PSU with too many devices. Using 4-pin cable you can daisy-chain a number of devices like scrollers, mirrors, and irises together. On more than one occasion I have created a “poor mans” intelligent light by attaching a scroller, iris, and moving mirror to a Source 4 fixture, and having to daisy chain only a single cable among those devices makes it that much easier to manage.

The 4-pin cable that runs from a PSU to scrollers and other devices is a very special type of cable, so don’t go making your own unless you’re absolutely certain you know what you are doing. Two of the pins provide power and two provide the DMX signal, using the negative power lead as a common. The two power leads are 14 AWG and the DMX leads are 22 AWG, with slightly different characteristics to a standard DMX cable. So be very careful if you are going to make your own cables.

Important: As mentioned above, some vendors sell different types of scrollers that work in slightly different ways than conventional scrollers. These scrollers, and other devices, also make use of 4-pin XLR cables to connect power and data from a PSU to the device. However these PSU’s are incompatible with the PSU’s used by conventional scrollers despite appearing to function identically and using the same 4-pin cables. The Wybron CXI scroller is one example of a scroller that uses a custom power supply.

8-bit and 16-bit Addressing
If you ever work with devices like robotic lights or moving mirrors you will have to understand the difference between 8-bit and 16-bit addressing. As mentioned earlier, each DMX channel provides 8 bits of data, or a value between 0 and 255. But suppose you have a robotic light or a mirror that can pan around an entire 360 degree circle. Mapping the range of 0-255 to 360 degrees means that for each value you would have to move the fixture more than 1.4 degrees. For a very short throw that may not seem like very much, but if you want that light to have a 25 foot throw then each of the 255 steps would correspond to 8 inches of movement. Not many lighting designers would approve of that!

In order to provide better control over actions like panning and tilting intelligent lights, moving mirrors, etc. they typically combine two DMX addresses together for each parameter (pan and tilt). By combining two DMX addresses together you jump from 8-bit (0-255) to 16-bit (0-65,535) resolution, which gives you much more control over the positioning of the fixture.

Some devices like the Rosco I-Cue mirror let you specify if you want the pan and tilt parameters to use 1 channel (8-bit) or 2 channels (16-bit), so depending on how you configure the device it may use 2 or 4 channels.

A few months ago I was working on a show where I needed the ability to dowse a video projector. The problem with using video projectors in theater is that even when projecting a solid black image the projector is projecting light, so you can still see a big dark square when in a blackout. To work around this you use a dowser, which is essentially just a piece of black plastic that drops in front of the projectors lens when not in use. Companies like City Theatrical sell DMX dowsers that do precisely this. They are just a box that you attach to your projector that drops a plastic shield in front of the lens upon the appropriate DMX command. The problem with these dowsers is that they are EXPENSIVE! The City Theatrical dowser will set you back approx. $600, which is rather steep for what it does. If you hunt around you can find other DMX projector dowsers for sale, but they’re all over $200.

I had a servo from a radio controlled airplane lying around unused and with a little bit of hunting I came across a company that sells a DMX to servo controller. This lets you control up to 8 servos via 8 DMX channels, so it gives you a lot more flexibility than the commercial solutions. With a little bit of work, if you’re into tinkering, you can build your own custom DMX dowser with more features than the $600 City Theatrical one. I initially only needed a single dowser so I hacked together something quick using this DMX/servo controller and the spare servo, but at a recent show I needed to be able to dowse two projectors located 20 feet apart, so I decided to make more of a project out of my dowser. Here’s what I did:

First, you’ll need the DMX/servo controller board and one or more servos (if you don’t already have them). The DMX/servo controller operates at 12 volts, but servos typically run at 4.8 volts, so you need a way to address this difference. The answer is a relatively simple adjustable DC power supply. These are the guts of what I used for my dowser, just three components:

So for three components that cost approximately $82 you can build your own dowser rather than spend $200-$600 for a commercial one. Note that the power supply is a kit that you’ll need to solder together yourself. If you hunt around a little you can find for sale for around $5 less, but most websites I found are selling it for around $20. I actually purchased mine at a local DIY/hobby shop in MA called “You-Do-It” Electronics. Of course you’ll probably also want to buy a case to put everything into and some other hardware components, but your total cost will likely still be in the neighborhood of $100.

When I built my dowser Northlight Systems only offered one DMX/servo controller with the DMX addressing switches mounted directly on the board. I bit the bullet and used this, deciding to set it to the address 505 so that it would use the 8 channels 505-512. I figured this was the safest range to use as it’s less likely to be used except in really large venues or where lots of other DMX devices are used. Of course I can always open it up and change the addresses if I need to. But you now have the choice to buy a controller with the address switches mounted on the circuit board or on an external board that you can mount separately. It’s entirely up to you.

Depending on how fancy you want to get you’ll likely want to purchase a few more things like a plastic case in which to mount everything, XLR connectors for the DMX connections, etc. I’ll leave all of that up to you to decide how you want to do it. At the very least I would suggest you purchase a coupler to connect your servo to a shaft, a matching shaft, and a clamping collar. The collar gives you an easy way to attach a dowser or other items to the shaft.

I decided to splurge when I redesigned my dowser. I put everything in one case to make it easy to use, but I also built two remote servos that I could easily add to it if necessary. To support the remote servos I added two XLR connectors to the dowser that let me plug in the other servos. Each remote servo is just mounted in a smaller box with a long cable connecting to an XLR cable. The controller has no problem controlling servos 10 feet away or more.

Here’s what my device looks like:

The 12 volt input feeds to both the variable power supply and directly to the 12v into the DMX/servo controller. The variable power supply is tuned according to its instructions to provide the 4.8 volts needed for the servo power inputs on the DMX/servo controller. Everything should be very straightforward.

Once you’ve put all the components together just take a piece of cardboard or heavy plastic and cut an appropriately sized dowser out of it. I bought a black plastic report binder from a local office supply store which works quite well. Mount the device where you need it and measure the distance from the servo shaft to the farthest edge of the projectors lens. Add a couple inches to make sure it’s not too small. To mount the dowser to the servo shaft you can make use of the clamping collar and an ordinary paper clip. Just unbend the paper clip into a U shape then pass the U through the tightening nut of the clamping collar. Then bend the ends of the paperclip so that the entire thing is flush with the edge of the clamping collar. Use some gaff tape to tape the paperclip to the dowser and you’re all set. Here’s a photo showing how to do this:

That’s all there is to it. A fully functional DMX dowser for less than the cost of a commercially available one. And you can easily make use of other servo devices, multiple servos, etc. with his home-brew version. Before I built my dowser I worked on a show where I had to have rose petals flutter down onto the stage from overhead. If I had my dowser for that effect I would have just taped a small piece of cardboard horizontally to the servo shaft and put the petals on top of it. At the appropriate time just turn the servo and the petals would have dropped onto stage on cue.

A couple things to keep in mind if/when you’re building one of these:

Use a 12 volt power supply since that’s what the controller board requires. If you use servos that require 4.8 volts or some other voltage then use the variable power supply to convert the 12 volts to whatever you need. Make sure to measure the output of the power supply and adjust it as necessary before hooking it up to the controller board.

The servo shaft couplers are rather large. If you mount your servo in a case like I did then make sure the servo can turn through its entire range of motion without the shaft coupler hitting anything. You may need to turn the servo all the way in one direction to figure out the appropriate positioning of the coupler, then turn the servo all the way in the other direction to make sure the coupler swings freely.

Servo’s don’t have a ton of torque so make sure the hole that the servo shaft passes through is large enough so as to not introduce a lot of friction. Also be sure the servo is lined up properly so the shaft passes through the hole without rubbing against the sides.

If you’d like any more details on this or have any specific questions feel free to post a comment or e-mail me directly (click on “About” at the top).