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.
  • 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 88 microseconds.
  • If more than 512 channels are needed, a second DMX line (another physical wire) is used. Each 512 channels 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 bigger control consoles can send out the DMX over ethernet. This allows multiple universes of DMX to be sent over one wire. The DMX-over-ethernet will usually be converted back to normal DMX near to the fixtures to be controlled (though a number of fixtures can now connect to the ethernet directly). In effect the ethernet is used as a distribution system, going back to normal DMX at the destination.

Unfortunately there is not yet a common standard for DMX over ethernet so you have to stick with one manufacturer. Artistic Licence have published their standard "Art Net" in the hopes that it might help establish a common standard.

Further reading

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

electronic design, dmx, audio, pcb, prototype, abstract, vr, vrx, dmx-512, microprocessor, 8051, flash, avr, atmel