Update 1 August 2019 – added the connectors to the list of components.
Update 4 July 2019 – You may also want to check out this instructable, which describes a more sophisticated ESP8266-based solution.
Update 6 April 2019 – I wrote a follow up post on the timing and jitter in DMX512 signals and fixed a bug in the firmware.
Update 26 May 2017 – added photo’s of second exemplar and screen shots of web interface for OTA.
Professional stage and theatre lighting fixtures are mainly controlled over DMX512. To allow a convenient interface between the EEGsynth and this type of professional lighting systems, I built an Artnet-to-DMX512 converter. It quite closely follows the design of my Artnet-to-Neopixel LED strip module.
Let me first show the finished product. It has a 5 pin XLR connector, a 2.1 mm power connector, and a multi-color status LED:
Here is the working prototype based on a NodeMCU board
It consists of the following components :
- NodeMCU Lua ESP8266 development board (replaced by a Wemos D1 mini in the final version)
- MAX485 Module TTL To RS-485
- common cathode RGB led
- 2x 220 Ohm and 1x 100 Ohm resistors
- 3 or 5 pin female panel-mount XLR connector
- 2-24V to 5V DC-DC Boost-Buck converter (not in the prototype)
- 2.1 mm dc panel-mount barrel jack connector (not in the prototype)
I was first planning to follow the design of Matthias Hertel, which includes an optical isolation between the MCU board and the DMX output. But I realised that the costs of the isolation transformer and optocoupler are more than the ESP8266, so I decided to keep it simple and not to add over-voltage protection. I would have added protection in case it had been directly coupled to the USB port of a computer, but in this case the computer connects over WiFi.
Another consideration is the voltage to drive the RS485 output. While testing, my Stairville LED flood panel seems quite happy with the 3.3V provided by the NodeMCU board. Driving the whole MAX485 module at 3.3V is therefore an option. But I figured that the MAX485 module can also be powered with 5V (causing a 5V differential signal on its output) while the TTL input to the module is at 3.3V.
In principle it would be possible to provide power on the micro-USB port of the NodeMCU. However, the wall of the enclosure in which I’ll put it is quite thick. This would result in the micro-USB being too deep for some cables/chargers. Furthermore, my experience is that it is not so easy to mount the ESP8266 board firmly enough to prevent it from moving when connecting/disconnecting the cable. Hence I opted for a 5.5 x 2.1 mm panel mount DC jack connector to provide 5V power. Since there are power adapters (wall warts) with 9 and 12 Volt, I included a 2-24V to 5V DC-DC power converter.
The source code is available from github. It is based on the code for my Artnet Neopixel controller. It was especially convenient to reuse the part for initially configuring the wifi, for configuring the settings, and for over-the-air updating.
The repository on github includes the details on how to wire the components.
Update 26 May 2017
Here you can see the web interface upon initial startup (while connected to the ARTNET access point). As access point it sends this “captive” configuration screen automatically, just like a login screen on a public wifi network. The wifi configuration is based on WiFiManager.
Following WiFi setup it resets and after some 10 seconds the led shoudl turn green. At that point you can connect to the web interface. If you are using OS X with bonjour or Linux with zeroconf, you can connect to http://artnet.local. If your computer does not support zeroconf (e.g. on windows) you will have to log in on your router to look up the IP address that your router has assigned to it.
In the settings you can configure the universe that is to be forwarded from Art-Net to DMX512 and the number of channels. Specifying fewer channels makes the DMX message shorter and hence allows for more frequent (and smoother) updates. The delay is the (approximate) time between DMX packets. The default is 25ms, i.e. 40 packets per second, which is approximately fastest that you can transmit with the full 512 channels.
The monitor window shows the firmware version, the uptime in seconds, the number of Art-Net packets received and the frame refresh. The frame refresh is actually not accurate, since reading from the web interface shuts down the refreshing. You can read more accurate numbers from http://artnet.local/json.