Bruce's Blog Just another in the neverending world of blogs


Controlling PC/Mac software from a DMX console

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!