DMX 512 Programmable Theater Lighting Controller Jeff Sand
DMX 512 Programmable Theater Lighting Controller Jeff Sand Kris Kopel Advisor: Dr. Don Schertz May 8, 2001
Outline • • • Objectives Digital Lighting Control Overview System Block Diagram (Hardware) Firmware Software Results
Objectives • Generate DMX 512 output to control lighting devices • Enable PC control to change dimmer levels • Develop USB platform for future use • Write commercial quality firmware, driver, and windows software • In short, Design a complete marketable system using a top down approach
Digital Theatrical Lighting Dimmers Console DMX 512 Dimmers Intelligent Luminaries Lights
DMX 512 Protocol • United States Institute for Theatre Technology (USITT) standard • Controls up to 512 dimmers/devices • Serial and asynchronous bitstream • 250 kbits/s • RS-485 physical implementation • 32 nodes on one chain
System Block Diagram Personal Computer USB Transceiver Philips PDIUSBD 12 Motorola 68376 m. Controller RS 485 Driver MAX 483 Input Blocks DMX 512 Output
Microcontroller Interfaces • Data bus, chip selects, and external IRQ used for USB transceiver • Queued Serial Module (QSM) – Serial Communication Interface (SCI) for DMX output – Queued Serial Peripheral Interface (QSPI) for input blocks • Internal RAM for data storage • EPROMs for program code • Background Debug Mode (BDM) for development without a monitor program
Input Block QSPI Control Lines Serial A/D MAX 148 Fader Inputs Serial Shift Register 74166 Momentary Push Buttons Out to m. Controller QSM Module Latch 74373
Firmware • • • Written in assembly language Interrupt driven DMX 512 output Fader/Button data acquisition USB Communication over data bus Main program loop for standalone mode only
DMX Output Stream
SCI Interrupt Routine DMX Output Status? break Start Break Set Timer DMX Output Status <- Mark mark data start End Break Output Start Code DMX Output Status <- Start DMX Output Status <- Data Exit ISR Last Channel? no yes DMX Output Status <- Break Output Data Byte
QSPI Interrupt Routine Read/Clear Status Register Faders or Buttons? Buttons Read all Buttons Faders Read 8 Faders Last Fader Block? yes Reprogram QSPI for Buttons no Increment Chip Selects Re-Enable QSPI Exit ISR Reprogram QSPI for Faders
USB Interrupt Routine Bus Reset Read interrupt register Suspend Change Handle Reset Handle Change no Data Endpoint In Data Endpoint Out Control Endpoint In Data left to send? Read Data into Buffer Data left to send? no yes Send it Control Endpoint Out Set Address Device Descriptor Get Descriptor Send it yes Configuration Descriptor String Descriptor Exit ISR
Windows Driver • Windows kernel mode USB driver • Recognizes and initializes device • Registers device with Windows to be accessed by user applications • Handles reads from/writes to device • Plug n Play and Windows power management compatible
Windows Device Detection
Windows Software • Three modes of operation – Direct fader control – Software dimmer “patching” – Programmed lighting queues • Uses Windows common controls • Uses Windows timers
Windows Software
Results • Completed DMX 512 Output (Hardware and Firmware) – Adjustable number of channels – Proper output frequency • Completed Input Blocks (Hardware and Firmware) – Buttons, Faders, and control circuitry wire wrapped onto panel – One master block and two 8 channel scenes – Firmware capacity for 128 faders and buttons
DMX Output Result
Results • Wrote a firmware routine for direct external fader control with master control, two scenes, and crossfade • Implemented USB firmware (all functions necessary for this device) • Interfaced USB peripheral chip with microcontroller on data bus • Master power switch
Results • Wrote functional Windows kernel mode driver • Wrote windows user application – Currently does not properly interface with driver • Tested complete unit with DMX light and it worked perfectly • We plan to test the device in the Bradley theater in the near future
- Slides: 21