You are on page 1of 6

Rev 2. Rich Griffin, Avnet Silica richard.griffin@silica.

com

DMX 512 / Stage Lighting for Beginners


What is DMX512?
DMX512 is a USITT standard protocol used in the theatrical lighting and special effects marketplace. The standard was originally developed to allow stage lighting technicians to control a large number of lighting channels on the stage using a control desk that could be positioned away from the stage, without the need to run large lengths of mains electrical cable for each lighting channel. The DMX512 standard uses a low voltage control cable, linking the control desk and the dimmer packs, and is based on the RS485 serial standard of signalling. Each DMX512 link can control up to 512 different lighting channels over a single pair of wires, and the system is collectively known as a DMX universe. Stage lights

Control Desk

Mains supply

DMX 512

Dimmers

Dimmed Mains Power

DMX 512 Gobos and Gels


Like many standards, DMX512 has evolved from its initial intended use model. As described above, the DMX512 protocol was originally designed to simply adjust the brightness of stage lamps from 0% to 100% brightness. The data sent over the DMX512 link for each channel is a pair of bytes representing the brightness value, divided into 256 steps ranging from 00 hex to FF hex. The lighting dimmer receives the values, and adjusts the amount of power that is sent to each lamp. Over the years, stage lighting fixtures have become more and more advanced, and now include a variety of features such as coloured filters (known as gels) and patterned shutters (known as gobos). The gels and gobos are typically arranged on a motor controlled wheel, which rotates in front of the lamp causing the beam of light to change colour and shape. In this scenario, the dimmer pack is removed from the system and the stage lighting fixture is plugged directly into a constant mains supply. The DMX512 cable is then connected directly to the fixture, and a microcontroller within the lighting fixture locally controls not only the brightness level of the bulb, but also the rotation of the various gel and gobo wheels. Due to the increased complexity, a single lighting fixture will require several DMX channels rather than just one. In the above example, a three channel system would probably be used; channel 1 would be used to control the brightness of the lamp, channel 2 would be used to select the colour of the filter, and channel 3 would be used to select the desired gobo. DMX512 control desks have also become more sophisticated to allow the user to easily control multi-channel lighting fixtures on the stage. Given that lighting technicians

Page 1 of 6

Rev 2. Rich Griffin, Avnet Silica richard.griffin@silica.com

now connect the DMX512 control cable to each lighting fixture, it is normal for two DMX512 connections to be found on each fixture one input and one output. All lighting fixtures on the stage are daisy-chained together, and the control desk is connected to one end of the chain. Mains supply

Control Desk

DMX 512

Stage lights (with embedded microcontrollers)

DMX 512 Pan and Tilt Heads


Over the years, lighting manufacturers continued to add more features to their products, and many modern lighting fixtures now offer a facility to rotate the entire lamp head on a central spindle so that it can point in any direction that may be needed on stage. The lamp rotation (known as the pan setting) is adjusted with a stepper motor built into the lamp, and the position is controlled by the fixtures on-board microcontroller. Early lighting fixtures used a single DMX channel to select the angle of the lamp head, but sadly the DMX512 protocol only allows values of 00 hex to FF hex to be sent to a single channel. A full 360 of rotation was therefore divided into 256 steps, and each step resulted in a lamp head movement of 1.4 degrees. This degree of adjustment was considered too coarse for many stage lighting projects, so modern lighting fixtures now have two channels assigned to the pan control; one for coarse adjustment and the other for fine adjustment. Assigning two channels for each stepper motor results in a total of 65,536 individual steps (256 x 256), and adjustments of just 0.005 are possible if the stepper motor in the lamp can manage that level of precision. A second stepper motor can often be found in the lighting fixture, which controls the angle of tilt (up / down) of the lamp head. In the same way as before, the angle of tilt is usually adjusted by a stepper motor and it is normal for two DMX512 channels to be allocated for this feature. For a lighting fixture like the one shown here, it is likely that its DMX512 address map would appear as follows:
DMX Channel 0 1 2 3 4 5 6 Description Lamp Intensity Colour Selection Gobo Selection Rotation X Axis (Course) Rotation X Axis (Fine) Tilt Y Axis (Course) Tilt Y Axis (Fine)

Page 2 of 6

Rev 2. Rich Griffin, Avnet Silica richard.griffin@silica.com

Addressing
It is of course common to have more than one lighting fixture in a DMX Universe, and therefore a system is required to permit each lamp to be individually controlled. For this reason, all DMX512 lighting fixtures have a Start Address setting which is usually found on the fixture either in the form of a set of DIP switches or as an electronic menu system. Using a combination of the Start Address setting and the fixed number of channels recognised by each lighting fixture, the user is able to control every channel on each lamp individually. Taking the example of the start address shown on the electronic display here (Channel 43), and the seven channels allocated to the fixture in the previous example, we can deduce that the gobo wheel can be controlled by adjusting channel 45 from the control desk (Start Address 43 + Local address 2). The start addresses on a selection of DMX512 lighting fixtures must therefore be appropriately spaced out across the 512 channel range, to ensure that no overlaps occur. However, it can sometimes be desirable to have two or more lighting fixtures of the same make and model to behave in precisely the same way on stage. To achieve this functionality, their start addresses can be set to the same value and they will behave identically on stage.

DMX 512 Signalling The Nitty Gritty


If we look at the control signalling, we can see that the DMX512 protocol is in fact a never ending stream of data values which are sent from the controller to each lamp via an RS485 serial cable at 250 kbits/s. RS485 is a robust serial communication technology which is almost identical to standard RS232 (i.e. used in an ordinary UART / serial port), but instead uses a differential pair of wires to improve the noise immunity of the link. A DMX512 packet, if greatly simplified, looks something like the following:
Synch Pulse Protocol Code Channel 0 Data Channel 1 Data . Channel 510 Data Channel 511 Data

This packet is generated by the controller and repeats continuously, irrespective of whether the channel values are changing or remaining constant. There is no possibility for a reply to be sent from the lighting fixture back to the controller, so DMX 512 is a fire and forget type of communication. Due to the lack of error checking, it is possible that some corruption of data may be possible in very noisy environments or due to a loose connection in the cabling. For this reason DMX512 is never used in safety critical applications, and would therefore not be used to trigger potentially hazardous special effects such as pyrotechnic devices. DMX512 packets have to be transmitted continually, and this can be a heavy burden on microcontrollers used in DMX512 controller applications. We shall explore alternative control methods later in this guide.

Its getting hot in here!


The huge quantity of lighting equipment used in a modern theatre can result in some interesting challenges for stage designers. The power consumption of stage lighting fixtures can be anything between 500 watts to 2 kW, due to the use of very bright halogen bulbs. The often numerous lighting fixtures on the stage can collectively consume a huge quantity of electrical power. These power demands inevitably result in the generation of a huge amount

Page 3 of 6

Rev 2. Rich Griffin, Avnet Silica richard.griffin@silica.com

of heat, which can adversely affect the on-board microcontrollers of lighting fixtures. With the advent of higher-performance light emitting diodes (LEDs), many lighting manufacturers have begun to create lighting fixtures which do not use the traditional halogen bulbs but instead rely on an array of LEDs to provide the light. This new style of fixture has resulted in some interesting opportunities for silicon vendors due to the methods of lamp dimming that are employed. Dimming an LED based lamp is not voltage controlled, as would often be the case in a traditional halogen lamp fixture, but instead the LEDs are flashed on and off at high speed (a method of control known as PWM Pulse Width Modulation) to create different levels of light from the fixtures. The use of LEDs rather than halogen bulbs also generates interesting possibilities for the number of colour permutations that can be generated by the lamp. The colour selection on traditional halogen lighting fixtures was limited by the number of gels that could be included in the colour wheel, but LED fixtures can now mix any colour that the user requires, simply by adjusting the brightness of three different coloured banks of LEDs; Red, Green and Blue. It is also worth noting that LEDs can be switched on and off very quickly, enabling strobe effects to be created by the fixture. This was impossible with halogen lamps.

Where does Xilinx fit in?


The DMX512 protocol lends itself well to implementation in FPGAs. A large percentage of the processing power of traditional microcontrollers would typically be required to generate the constant stream of DMX512 data packets. Although the generation of DMX packets is not complicated, it is wasteful of the processors time due to the precise timing and quantity of delays that have to be generated. If the controller is expected to generate packets for more than one DMX universe, the situation is further compounded. Repetitive tasks such as packet generation are better implemented in custom hardware, removing the need for the processor to do the work. A small amount of FPGA logic can be easily used to implement a state machine to generate the DMX512 data packets, freeing up the processors time for the user interface and the processing of lighting patterns / sequences. The use of hardware-based DMX512 packet generation is also scalable, enabling designers to control as many DMX universes from the same FPGA as they wish, without any risk of incurring performance limitations as the capabilities of the design increase. A DMX512 Controller IP is available from Avnet Silica, allowing the user to quickly implement DMX512 designs in Xilinx FPGAs. A DMX512 slave IP is also available for those wishing to incorporate Xilinx FPGAs or CPLDs in lighting fixtures. The DMX512 controller IP can be implemented in any modern Xilinx FPGA architecture and is very efficient in terms of silicon area. For example, an implementation of the controller in a Spartan 3E device will require around 110 slices and 1 BRAM. The DMX512 slave IP is also a very silicon efficient core. Silicon area requirements vary depending on the number of DMX channels that the user needs to receive, but some examples are show in the table below. Number of DMX channels 1 16 256 512 FPGA slices used 57 66 61 62 BRAMs used 0 0 1 1

Xilinx FPGAs can also be used to implement the PWM blocks for the LED dimming, along with servo motor controllers for the pan and tilt functionality. This enables designers to deliver a one chip solution for DMX512 enabled lighting fixtures. CPLDs can also be used for the DMX512 Slave functionality, given the simpler structure of the IP core. The following block diagram shows an example DMX512 design for a lighting fixture. Note the absence of a processor in the system, which greatly simplifies the design and removes the need to write and test software on a functional and timing basis.

Page 4 of 6

Rev 2. Rich Griffin, Avnet Silica richard.griffin@silica.com

Red LEDs PWM Green LEDs PWM Blue LEDs PWM DMX Receiver Pan Motor Control Tilt Motor Control

DMX Data

The Xilinx Embedded solution also permits the implementation of microcontrollers / processors inside the FPGA. This enables the designer to create DMX512 designs containing dedicated DMX512 hardware, which offload the repetitive packet handling from the processor and allow it to be used to implement user interfaces and concentrate on system control. The DMX512 Controller and DMX512 Slave IPs are available in both standalone form and also as ready-made EDK microprocessor peripherals. A variety of system control possibilities exist including the PicoBlaze 8-bit uController, the MicroBlaze 32-bit RISC soft processor, and the PowerPC 405 & 440 hard IP processor cores.

Other devices in the system?


In addition to the usual power supply components for FPGA designs, Avnet is able to supply the other important components vital for DMX512 applications. DMX512 uses RS485 signalling, and therefore an RS485 line driver is required for both DMX controllers and DMX slaves. Example devices from Texas Instruments and Maxim are shown below: Part Number Maxim MAX3483 Maxim MAX3485 TI ISO35 TI ISO3080 Description 3.3v RS485 Line Driver 5v RS485 Line Driver 3.3v RS485 Line Driver 5v RS485 Line Driver

Page 5 of 6

Rev 2. Rich Griffin, Avnet Silica richard.griffin@silica.com

The DMX512 specification also mandates the use of 5 pin XLR connectors for DMX controllers and lighting fixtures. Although it is technically a violation of the USITT specification, it is accepted practice in the lighting industry to use 3 pin XLR connectors in some circumstances. All of these connectors can be sourced though Avnet EM from Amphenol Connectors (http://www.amphenol.co.uk/). Example part numbers are shown below. Part Number Amphenol AC3FB Amphenol AC3MMB Description 3 Pole XLR connector (Female) 3 Pole XLR connector (Male)

Example Products

Page 6 of 6

You might also like