DMX-512 is a protocol for digital control of theatrical lighting equipment, including dimmers, color-changers, and moving lights.
The Lpr2Dmx is one of several DMX-512 output devices that interface to a standard PC parallel port. This particular one is is Free and Open Source hardware and software, licensed under the GPL.
On the software side, the Lpr2Dmx can be driven by the Dmx4Linux driver suite. Note that Dmx4Linux version 2.5 has a bug in its lpr2dmx driver, for which I have a patch.
Several years ago I was recruited to design lighting for a local company's production of a new play. Unlike most such projects, I had plenty of advance notice and was able to consider upgrading my tools before leaping into the show itself.
I decided to build my own implementation of the Lpr2Dmx project so that I could economicly have several copies as spares and a few to give to friends and local theatre companies. Unlike the original one, I'm publishing all of the cad files for my Lpr2Dmx under the GPL.
The schematic I redrew using gschem.
The schematic basicly follows the original, with these variations:
Board layout was done in PCB.
Notable features and bugs in the board layout are:
I fabricated several copies of the board at AP Circuits, which has a very affordable prototype service.
The Lpr2dmx assembly-language source code supplied by Lighting Solutions uses features of Microchip's MPASM that aren't supported by gpasm. So I simply use the hex file provided.
A word of caution: PIC16F84A devices have sightly different programming algorithm from the PIC16F84. Before I upgraded my device programmer's software, I was unable to program the '84A devices properly.
When bench-testing the board, any 5v power supply can be used. But when used in the theatre, the last thing one needs is another power cord or another wall-wart to come loose at the wrong time.
Fortunatly, there's plenty of +5v available for the taking from any standard PC.
Where I said "plenty of +5v" above, I really meant too much. A typical PC power supply can source 10 Amps or more at 5 volts, easily enough to melt insulation or even start a fire in the event of a short circuit in cabling or accessories. Many motherboards have fuses to keep faulty mice or joysticks from starting a fire, but the cheapest ones may not. And if the nonreplacable fuse blows, you're facing a delicate repair or motherboard replacement.
The solution is a "self-resetting fuse," also known as positive-temperature-coeficient thermistor. These devices have a very low resistance until the current rises above a threshold. Above that threshold, they begin to warm up, which causes their resistance to increase rapidly, limiting the current to a safe value. Once the overload or short is removed, the device cools and returns to a low resistance. In this project, I'm using the MF-R030 device from http://www.bourns.com.
If your system can use a USB mouse or keyboard, either "PS/2" connector can be used to supply power. In this cable, the PTC thermistor won't fit inside either connector. Instead the fuse is mounted as bulge in the cable, protected by heat shrink tubing.
The 15-pin "game" port commonly found on many sound cards also provides +5v power. The MF-030 PTC thermistor easily fits inside the DC15 hood.
For initial testing and its first show, I simply made up a cable and used the bare board. To protect it, I put a cardboard box around the bare board (not shown). The cable assembly includes a 6-pin minidin connector for stealing power from the PC's PS/2 mouse port.
|3||TD (B) +||3||.|
|8||TD (A) -||2||.|
With a little trimming, the board fits nicely into an aluminum minibox. Standard DB25 mounting hardware also secures the board.
For this one I used a common coaxial power jack for +5V input. This lets me choose between stealing power from a PS/2 mouse connector or a DC15 game port connector by changing cables.
The coaxial connector turned out to be causeing a very strange intermittent failure recently. I was working in a small theatre where I had installed an Lpr2Dmx on an old PC running SLight over a year ago. The theatre has four of their own NSI D4-DMX packs, but I needed a few more channels so I added my own Lightronics AS-40D to the DMX-512 chain.
When I fired up the PC, the NSI packs worked fine, but the Lightronics pack wouldn't come up nor even light its green DMX-present LED. After much fiddling, I discovered that the power connecter had come loose from the Lpr2dmx. What was probably happening was that the device was stealing enough voltage through the parallel port (and through the PIC16F84 internal protection diodes) to run the PIC and the MAX487 after a fashion. But the supply voltage through this sneak path was low enough that the DMX-512 signal was out of spec, and some dimmers could handle that while the others couldn't. In the future, I'll probably permanently attach the power cable.
For my most recent installation, I decided to do away with the aluminum box entirely. One motivation was to eliminate the power connector problem described above. Another was to avoid extra clutter; a PC, monitor, keyboard, and mouse are plenty enough clutter on their own.
Even this IBM Netvista "mini-tower" has plenty of bare sheet metal just waiting to be punched for the 5-pin female XLR connector. There already was a hole in that location: a serious-looking case-security key lock, just begging to have its keys lost forever in a dark corner of the theater. The lock came out easily, an a greenlee punch enlarged and rounded out the hole to fit the XLR.
This installation would be easier on an ancient PC-AT style motherboard, in which the parallel port is on the header on the motherboard and a ribbon cable runs to the back panel. On a modern ATX form factor motherboard and case, the parallel port is already pointing out the rear connector area. Here, I slipped a ribbon cable through a crack in the case to feed it back inside to the Lpr2Dmx.
The Lpr2Dmx itself is made to fit in a PC expansion slot by mounting it to a larger piece of perfboard. Since PCI prototype boards are rather expensive, it doesn't actually plug into the slot; instead the board is held in by a bracket salvaged from an old expansion card.
Also mounted to the same perfboard is another PCB, an opto-isolated DMX512 driver board. That project is described on another page.
Power is provided by an internal PC drive power connector.