Mini USB-DMX interface

I was following some links on the internet, googling a bit and then stumbled on a nice USB-to-serial-UART chip by FTDI Chip, the FT232RL. Perfect for some other electronics projects I was planning. In the documentation of the chip there was an example cirquit for a USB to RS-485 converter, which basically is a USB to DMX interface if linecoding is set to 250kbps 8N2. Having a friend who owns some stage lighting equipment I decided to design a cirquit board.

If you have no idea what DMX is, check wikipedia.

The cirquit presented below is not spectacular in any way, apart from the cirquit board size maybe. It allows a PC to transmit or receive DMX data (half duplex) through a USB port. When transmitting, the cirquit does not buffer the outgoing DMX frames, so each frame on the DMX line must be generated by the PC and sent down the USB port. This is however usually not a problem as modern PC's are fast enough. Any number of channels can be transmitted or received with the cirquit, although 512 channels is standard for DMX512. The cirquit is USB bus powered and don't need any external power supply or battery.

Schematic

Part   Description                      Elfa #
-------------------------------------------------
IC2    FT232RL, SSOP                    n/a
IC1    MAX481ECSA, SO8                  73-231-32
F1     BLM31P500S, RF choke, 1206       58-789-21
C1     0,010uF, plastic film cap, 2220  65-530-69
C2,C3  0,1uF, plastic film cap, 2220    65-531-27
C4     4,7uF, electrolytic cap          67-322-67
R1     27R, resistor, 1206              60-191-11

I ordered the FT232RL chip directly from FTDI Chip and the other parts from Elfa. Total cost for the partis in the above list was about 17 Euro, including 22% VAT (May 2006). In addition a USB cable, XLR connector and a (metal) enclosure is needed.

Note that the 120 Ohm termination resistor (to be connected between pads DMX2 and DMX3) is not shown in the schematics or in the parts list. There are different ways to make the termination, depending on how the board will be used. For a DMX transmitter the resistor could be soldered directly on the board. For a DMX receiver, the resistor could be in an external plug which can be added if we are at the end of the DMX chain.

Cirquit board

Here are the chematic and board layout made with Eagle 4.16 freeware edition: mini_usb_dmx.zip

Below is the cirquit board and a size comparision with a matchbox.

USB cable

As USB cable I bought a cheap 1.8 meter USB "printer cable" and cut away the plug at one end. A USB plug/cable has the following layout:

Pad   USB pin  Description   Wire color
---------------------------------------
USB1  1        Vbus (5 V)    Red
USB2  2        D-            White
USB3  3        D+            Green
USB4  4        GND           Black

DMX cable

On the DMX line side a XLR connector should be used. Either a 5 or 3 pin connector. The pins/holes in a XLR connector are usually numbered so no need for a picture. For the 5 pin connector, only pins 1-3 are used.

Pad   XLR pin  DMX function
---------------------------
DMX1  1        GND
DMX2  2        D-          
DMX3  3        D+          

Simple test software

I used the following code to do some initial tests on the cirquit: dmx_tx_test.zip (Microsoft VC7 project). The code configures the device as a DMX transmitter and repetedly sends out DMX frames until a key is pressed. By setting all channels to either 0 or 255 it was easy to verify that the cirquit was transmitting DMX data using an ordinary voltmeter.

Improvements

The cirquit is not fully USB compliant. The USB spec says that a USB bus powered device must not draw more than 500 uA in USB Suspend mode. FT232RL (IC2) will correctly go into low power mode but MAX481 (IC1) will not. To set MAX481 in low power mode, pins RE and DE on MAX481 must be set to RE="1", DE="0". FT232RL provides both PWREN and SLEEP signals so USB Suspend mode could be handled with some additional gates. However, all sorts of crazy equipment (which definitely don't comply with the USB spec) these days use the USB port as power source, so I don't consider the USB Suspend mode violation too serious. But, here is room for improvements.

Compatibility

There are some ready made (commercial) USB-DMX interfaces also using FTDI chips. While designing the cirquit I tried to make it comaptible with the Enttec Open DMX USB, which uses the older FTDI chip FT232BM. Practical tests shows that my cirquit is compatible with software supporting Enttec Open DMX USB, for example FreeStyler.

Warning!

When working with high power equipment like dimmers, be sure you know what you are doing! You are connecting your PC through the USB port to eqipment that switches kilowatts of power at several hundred volts. The above cirquit does not isolate the USB port from the DMX line. If everything works correctly and you don't make any mistakes there is nothing to worry about, but if the DMX port on your dimmer is somehow damaged, or you make a serious mistake somewhere, you might destroy the USB port or in worst case the whole PC.

Misc

I have a part-time job at the vocational school Yrkesskolan Optima where I have access to surface mounting equipment. Here are some pictures from the development process. Working (applying solder paste) under microscope is a must, at least with my eyes, when dealing with the FT232RL chip. The 28-pin SSOP chip is so small it fits well on my thumb nail.

The reflow oven is, well, small, but it does the job. Surface mounting is a lot of craftsmanship, maybe even more than normal soldering. I find it facinating working under microscope.

Below is a picture of the first test with some actual DMX hardware, a 6 channel dimmer. Using my laptop and FreeStyler version 2.87c configured for the "Enttec open DMX" controller. It works!





Mats Byggmastar
19.07.2006