RS-232 / DMX512 Interface
This is a do-it-yourself construction manual for an interface to control an DMX512 lighting bus by RS-232. A similar project operating with MIDI channel messages is described on this website too.
Essentially 3 different versions are presented, based on 2 different PCB layouts and 2 different firmware versions:
The ASCII and binary command set is nearly 100% compatible with the discontinued RS-232 / DMX products made by Cinetix. For backward compatibility, particularly it supports the "Cinetix Output Plugin" for "DMXControl version 2". For new development, however, use of MiniDMX is recommended:
- RS-232 to DMX OUT transmitter, optoisolated or not ("DMX Generator")
- RS-232 to DMX OUT transmitter and DMX IN receiver to RS-232 simultaneously ("DMX Control Box"),
optionally one signal path optoisolated
New as of January 2016: The widely known and implemented MiniDMX protocol developed by Mathias Dzionsko is implemented now.
A detailled construction- and operation manual is provided here (PDF file).
Basic assembly of the RS-232 / DMX Generator in "Eurobox" enclosure. Not optoisolated
The most essential features of control:
- In contrast to proprietary control equipment the RS-232 / DMX512 Generator||Control Box can be operated with any kind of software which is capable to transmit and receive via a serial COM port.
--- Primarily all commands are sent and all feedback is received in ASCII text format.
--- The MiniDMX protocol is formally implemented as ASCII command 'Z'. The header byte of each MiniDMX data packet is hex5A='Z', so seamless integration without mode switch or special configuration is possible.
--- As an alternative to ASCII syntax, the most essential features of the box can be operated with a compact binary data format, which provides a higher throughput and easier handling together with some kind of control application.
- The RS-232 / DMX Generator as well as the Control Box (DMX OUT only) is compatible with the software "DMXControl 2.12 and 3.0" and "Freestyler". The output plugin "Cinetix DMX512 interfaces" still works with DMXControl 2.12, but the "MiniDMX" plugin is somewhat faster.
- Any DMX channel 1 to 512 can be set to any level by sending a short sequence of ASCII text to the box (8 bit of resolution). Binary commands are implemented as a more compact alternative.
- For any DMX channel a fade transition can be executed automatically, duration programmable up to 31.9 seconds. This diminuishes the expense for design of complex lighting sequences considerably. Any number of fade processes can be active simultaneously on all DMX channels.
- The flexibly configurable chaser feature loads sequences of presets (=lighting scenes) automatically in a cyclic manner to DMX OUT. Softly faded transitions are possible. The flash feature pushes all DMX channels to a defined level for a short period of time.
- The actual state of the RS-232 / DMX Generator||Control Box (indluding transmit buffer, merge profile, thresholds for automatic messages, mode of operation, system configuration) can be saved permanently as a preset (=lighting scene). Up to 227 presets can be stored and be reloaded at any time.
The transition from the previous lighting scene is performed with the actual fade time.
During power-on preset no.0 is loaded automatically.
- One ASCII command can poll the levels of 1 to 128 DMX channels of the recently received or transmitted DMX packet via RS-232 interface. An alternative polling method transfers bigger blocks of bytes in a more compact binary format.
- The RS-232 / DMX Control Box is able to simultaneously receive a signal at DMX IN and transmit a different signal via DMX OUT. The signal transmitted at DMX OUT may be composed (merged) of the internally generated lighting scene and the scene actually received at DMX IN:
The merge method can be set individually for each DMX channel. Following options are available:
--- user settings loaded via RS-232 are transmitted at DMX OUT,
--- the sigal received at DMX IN is retransmitted at DMX OUT,
--- the less one , the greater one
--- or the last changed one of both is transmitted.
Please note that "merge" means channel-by-channel switching between both signal sources, not linear superposition.
- Automatic state messages can be programmed individually for each DMX channel (Control Box only). If the received DMX signal on a sensitized channel has changed more than a programmable threshold, the present DMX level is reported automatically via RS-232.
These messages are sent in the same format which is used by level setting commands. I.e. this feature is useable as a simple DMX recorder (but the capacity of the RS-232 line sets a limit to the number of channels which may be recorded simultaneously).
- Messages of freely defineable strings (Control Box only): If the DMX channels 500 to 506 receive specific levels at DMX IN, strings preformatted by the user (ASCII text, binary or both mixed) are transmitted automatically via RS-232. Up to 56 different strings, each max. 63 bytes, may be stored permanently and held available.
These can be used for control or configuration of external devices with RS-232 interface like video beamers or professional DVD players. The feature can be used for more sophisticated command input to PC-based user software, too.
RS-232 / DMX Control Box with optoisolated DMX IN in DIN rail enclosure.
The 5V power of the Ethernet/RS-232 converter is supplied through the DMX Control Box
The layout of the PCB is held simple with a single wire layer and is strictly arranged in a 2.54 mm grid. The printed "wires" are put in a way which is reproducable for manual construction on a hole matrix veroboard (german: Lochrasterplatine) with round copper pads (not stripes).
- The PCB design fits into 3 easily available cabinet models: DIN rail compatible ("Camdenboss CNMB/4 PCB size 86.5*68mm"), low cost plastic standalone ("Eurobox" from Reichelt and Conrad 52 31 32) and rugged aluminium ("Fischer Elektronik FRAME" PCB size 100x75mm).
- The heart of the circuit is a microcontroller ATmega1284P clocked at 12 MHz, which is the only clock rate for this processor type to provide DMX control and 115200 baud simultaneously. The 40pin DIL case demands no special skills for manual assembly.
- An Atmel compatible programming connector is provided on the PCB. After programming 1 or 2 jumpers may be placed here to select different baud rates: 115200 (recommended default), 38400, 19200 and 9600.
- The RS-232 interface is designed as a transistor circuit, which looks simple but works reliably up to 115200 Baud.
- The actual lighting scene is buffered internally. It is permanently transmitted at the DMX bus until it is modified by another command. Interruption of the RS-232 connection has no influence on the DMX bus pattern. After power cycling automatically preset no.0 is loaded.
Pure Data demonstration and test patcher
The most essential ASCII commands for the RS-232 / DMX Generator (works for DMX transmission of the DMX Control Box too) may be sent from this Pure Data patcher (download see below). For smooth execution, input of short numeric parameters is terminated by a semicolon character (ASCII code 59), which works as a dummy command with no effect else (new as of firmware Rev.Num 1.6).
By the way, input of any ASCII command with PC keyboard is possible. Because "carriage return" is not supported by Pure Data in this case, short numbers have to be terminated by a semicolon for immediate execution too.
For some commands, direct command transfer - while the slider is moved - would cause unpleasant side effects. In these cases, command execution has to be triggered explicitly after the parameter value is adjusted by slider. The patcher is built with PD 0.43.4-extended, but works with older versions when the "comport" Extra is included there. It is not too complicated to redesign your own arrangement, even with dynamic elements. If doing so, please take notice of the difference between the "print object" and the "print message" (with outlet, seems to be provided by the comport extra) !
The subsequently downloadable material is copyrighted (c)2015-16 by Wolfgang Schemmert.
Assembly and use of the interface is permitted for free by everybody for any purpose ("freeware")
The MiniDMX firmware is provided under "Creative Commons 3.0 DE License"
All information is based on best knowledge, but without any warranty. Any responsibility is excluded.
PCB layout "DMX OUT optoisolated" (1:1 TIF format), may be assembled not isolated too
PCB layout "DMX IN optoisolated" (1:1 TIF format)
Firmware hex code "DMX Generator" = DMX OUT only for ATmega1284P (Version 1.8, 25JAN'16)
(recommended Fuses configuration: extended 0xFC, high 0xCD, low 0xF7)
Firmware hex code "DMX Control Box" = DMX IN and DMX OUT for ATmega1284P (Version 1.8, 25JAN'16)
(recommended Fuses configuration: extended 0xFC, high 0xCD, low 0xF7)
Detailled construction- and operation manual (PDF file).
PD (Pure Data) demonstration and test patcher (ZIP file).
* State of information January 2016.
* Right of technical modifications reserved. Provided 'as is' - without any warranty. Any responsibility is excluded.
* This description is for information only. No product specifications are assured in juridical sense.
* Trademarks and product names cited in this text are property of their respective owners.