STM32 based USB (+ Art-Net) to DMX512 Interfaces
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-L476 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, in parallel ASCII and MIDI style commands may be exchanged via USB. Both interfaces are seen by a host PC as a standard USB / MIDI interface or as a virtual COM port. Temporary blocking of Artnet is possible to change DMX levels via USB.
- 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 14 (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 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-20 by Wolfgang Schemmert.
Assembly of the devices, programming and use of the software is permitted for free by everybody for any purpose ("freeware"). For commercial use, restrictions of third-party software contributors must be respected.
All information is based on best knowledge, but "as is" and without any warranty. Any responsibility is excluded. Use for dangerous, life-threatening and medical applications is forbidden.
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-l476v14.hex" for the STM32 Nucleo-L476 based USB to DMX+Art-Net interface
(Version 1.4 , 31 July 2020. Bugfixes: set DMX level by MIDI CC, all DMX channels to zero. Migrated from Embitz to Segger Embedded Studio.
Source code "usbdmxartnet-l476.zip" for the STM32 Nucleo-L476 based USB to DMX+Art-Net interface
(state 31 July 2020)
This source code is provided as complete "Segger Embedded Studio" project (ZIP file, 287 kB. Parts published by Segger are under license of Segger&|Rowley, parts published by STM are under license of STM, parts programmed by me are provided under GNU GPL3 license.)
Firmware "usbdmxartnet-f042v14.hex" for the STM32F042 based USB to DMX+Art-Net interface with 8 MHz quartz oscillator
(Version 1.4, 31 July 2020. Bugfixes: set DMX level by MIDI CC, all DMX channels to zero. Number of lighting scenes in Flash increased. Migrated from Embitz to Segger Embedded Studio.
Source code "usbdmxartnet-f042.zip" for the STM32F042 based USB to DMX+Art-Net interface
(state 31 July 2020)
This source code is provided as complete "Segger Embedded Studio" project (ZIP file, 224 kB. Parts published by Segger are under license of Segger&|Rowley, parts published by STM are under license of STM, parts programmed by me are provided under GNU GPL3 license.)
* State of information July 2020.
* 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.