How DMX512 works

If you're completely new to DMX, read our "What is DMX" page first. This explains some of the background.

What is it?

  • DMX512 is a digital system designed to transmit control infomation to entertainment lighting equipment from a control console.
  • It uses the electrical standard RS485. This is a two wire balanced system - a logical "1" has line A at 5V and line B at 0V, and a logical "0" has line A at 0V and line B at 5V. (Actually only 0.2V difference is required between A and B). This system is extremely robust and can survive various fault situations.
  • The DMX line should be terminated with a 120 ohm resistor across the A and B lines at the last fixture (in real life this is often not fitted and everything still works fine).
  • It is an asynchronous (unclocked) serial protocol with 8 data bits.
  • It runs at 250KBaud (bits per second).
  • Up to 512 control channels may be sent down the wire.
  • Each control channel can carry a value from 0 to 255.
  • The start of each "packet" of 512 channels is marked by a "break time" which is a logical "0" lasting for at least 88 microseconds.
  • If more than 512 channels are needed, a second DMX line (another physical wire) is used. Each 512 channel block is called a "DMX universe".

How do you transmit it?

  • Transmit a break time, which is a logical "0" lasting for 88 microseconds. On a microcontroller you can usually do this by temporarily setting the baud rate to 96KBaud, then transmit a "0" byte.
  • Then transmit a startcode of "0" (returning the baud rate to 250KBaud).
  • Then transmit up to 512 8-bit channel level bytes.

How do you receive it?

  • Wait for a break time. A quick and dirty way to do this is to set the UART to receive 9 bits at 250Kbaud, then check if the 9th bit is zero (and the other 8 bits are also zero). If so, it is probably a breaktime. (To be sure you aren't receiving rubbish, some other checks are advisable)
  • Receive the next byte - this is the start code and should be zero. If not, the data should be ignored until the next break time comes along.
  • Count each received channel level byte until you get to the start address you are looking for. (eg for channel 8, count 7 bytes then start receiving with the 8th)
  • Receive and store the next channel bytes until you have got as many as you are interested in.
  • Wait for another breaktime.

What problems need to be avoided?

DMX will often continue to work with one of the A or B legs disconnected, if the 120 ohm termination is not fitted. If you get a situation where the system works without a terminator but not with a terminator, chances are there's a break in one of the lines somewhere.

DMX devices are fairly resistant to "bad" things being connected. However, some DMX connectors are similar to audio - you can guess what happens next. Also if there is a mains fault to earth (the fault may not necessarily be in any of the DMX equipment), the fault current can flow down the DMX cabling damaging the fixtures.

DMX over ethernet

A lot of control systems can send out the DMX over ethernet. This allows multiple universes of DMX to be sent over one wire, which becomes necessary when controlling LED panels which can require thousands of control channels. The DMX-over-ethernet can be converted back to normal DMX512 near to the fixtures to be controlled, or many fixtures can connect to the ethernet directly. In effect the ethernet is used as a distribution system, going back to normal DMX at the destination.

There are several standards for DMX over ethernet, the main two are ArtNet and SACN (Streaming ACN). For controlling LED pixels there is also a system called KlingNet.

Further reading

We recommend the booklet "Recommended Practice for DMX512" by Adam Bennette, published by PLASA. It's available here.