STM32 based USB (+ Art-Net) to DMX512 Interface
DIY construction information is provided for a set of two different hardware versions providing a variety of command sets for DMX512 lighting control.
Apart from the different hardware, both versions essentially share the same features:
The STM32 Nucleo-L776 based version can be built on a Veroboard, no need to produce a PCB. The ST-LINK part may be cut off without loss of function. Then programming is possible through a 3 pin socket at the lower edge of the picture:
- DMX by the Art-Net protocol is handled with a compact WIZ850io Ethernet module.
- While Art-Net DMX packets are transmitted via wired Ethernet, ASCII and MIDI style commands are exchanged via USB. The interface is seen by a host PC as a standard USB / MIDI interface or as a virtual COM port.
- As a special case, the MiniDMX protocol is implemented, which is supported by a number of DMX control software, for example "DMXControl3".
- Both boards are 5V USB powered. While Art-Net to DMX is active, no USB data connection is needed. So power can be supplied by any 5V DC source then.
Assembly of the STM32 Nucleo-L476 to DMX interface. The DMX connector is below the Nucleo board.
Veroboard size 100x90mm.
The STM32-F042 (20 pin TSSOP) version is quite compact, but needs more technical skills and tools for reproduction:
Assembly of the STM32F042 to DMX interface (built into aluminium case). Board area used by electronics 65x37mm.
The microcontroller, voltage regulator and other SMD components are located at the PCB bottom side.
A more compact USB to DMX interface with the same command set except Art-Net is described at this website.
The USB interface is "full speed USB2.0" grade. The host sided USB class selection between MIDI and virtual COM port is made by a jumper on the SWD connector (may be extended to a switch). The 5V supply (max 200 mA) is scaled down by a linear low drop regulator to 3.3V, which supplies the microcontroller and the WIZ850io module.
In MIDI as well as in ASCII mode,
Both, Art-Net as well as the MiniDMX protocol, are well compatible with a number special lighting software packets which are able to control complex lighting operations.
- The commands are designed in a way that manual DMX control is possible with ASCII terminal software or with a MIDI sequencer.
- Art-Net can be allowed or blocked by ASCII or MIDI command to intervene manually via USB at any time.
- commands are provided to set any of the 512 DMX channels to any level 0..255
- perform soft fade transitions with fade time up to 12.7 seconds, adjustable in steps of 1/10 seconds
- limit the number of transmitted DMX channels between 24 and 512
- Read the actual levels of specific DMX channels back to the control software.
- Up to 127 (Nucleo) respectively 6 (F042) lighting scenes may be stored nonvolatile in the microcontroller flash and reloaded by command (scene no. 0 is automatically loaded after power up)
When USB works as virtual COM port, a special setup mode is available to configure the basic MIDI channel, user specific USB Vid/Pid and Ethernet settings for Art-Net operation. The user setup is stored nonvolatile in the microcontroller flash.
Because no RS-232 interface is installed on these boards, they are programmed via SWD ("Serial-Wire Debug") interface. Preferably with ST-LINK, which is part of the STM Nucleo board or connected to the 3 pin socket installed on both boards.
The firmware was developed with EmBitz 1.11. This source code is quite well suitable as a template for further own development, especially concerning DMX, USB and WIZ850io based Ethernet. It is programmed directly on register level, no external libraries or drivers are used.
A detailled construction- and operation manual is provided here (PDF file).
The subsequently downloadable material is copyrighted (c)2017 by Wolfgang Schemmert.
Assembly and use of the device is permitted for free by everybody for any purpose ("freeware").
All information is based on best knowledge, but "as is" and without any warranty. Any responsibility is excluded.
PCB layout for the STM32 Nucleo-L476 based USB to DMX+Art-Net board
(1:1 TIF format. Especially prepared for wiring on a veroboard or to etch a PCB)
PCB layout for the STM32F042 based USB to DMX+Art-Net board
(1:1 TIF format, view "from component side")
Firmware "usbdmxartnet-l476-11.hex" for the STM32 Nucleo-L476 based USB to DMX+Art-Net version
(Version 1.1 , 13 October 2017)
Source code "usbdmxartnet-l476-11.zip" for the STM32 Nucleo-L476 based USB to DMX+Art-Net version
(status 13 October 2017)
This source code is provided as complete "EmBitz1.11" project (ZIP file, 1166 kB). Parts published by EmBitz are under license of Embitz, parts published by STM are under license of STM, parts programmed by me are provided under GNU GPL3 license.
Firmware "usbdmxartnet-f042-11.hex" for the STM32F042 based USB to DMX+Art-Net version
(Version 1.1, 13 October 2017)
Source code "usbdmxartnet-f042-11.zip" for the STM32F042 based USB to DMX+Art-Net version
(status 13 October 2017)
This source code is provided as complete "EmBitz1.11" project (ZIP file, 704 kB). Parts published by EmBitz are under license of Embitz, parts published by STM are under license of STM, parts programmed by me are provided under GNU GPL3 license.
* State of information October 2017.
* 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.