STM32 Nucleo-l476 based MIDI-Merger


STM32 Nucleo-L476 based MIDI-Merger

This is a DIY construction manual for a MIDI Merger based on the STM32 Nucleo-L476 board which is plugged on a specific PCB.

The essential job of the MIDI Merger is to bundle the message streams from up to 4 conventional MIDI IN and transmit the combined stream via Ethernet or via USB to a PC or another capable host device. The MIDI bytes from each MIDI IN are stored intermediately until a complete MIDI message is received and then the complete message is sent as compact data block to the host. This way integrity and wholeness of the different inputs is preserved independent of their asynchroneous timing of MIDI byte reception.

Vice versa the MIDI message stream from the host is distributed to up to 4 conventional MIDI OUT: For each MIDI OUT a channel filter is provided, so that only messages with user configured MIDI channels are retransmitted to a specific MIDI OUT. Because the transfer speed of USB and Ethernet is much faster than that of a conventional MIDI OUT, the effective transfer speed of each MIDI OUT is significantly increased by the filter.

MIDI Merger in alu box
MIDI Merger built into a 10x10cm aluminium box

The USB interface is "full speed USB2.0" grade. During setup it operates in USB CDC Class, i.e. provides a virtual COM port at the host. During MIDI transfer it is configured as USB MIDI Class Audio device.

The wired Ethernet interface is realized with a compact Wiznet WIZ850io module. By default it operates in UDP Multicast mode, which provides a very good MIDI interface on the host together with the ipMIDI driver (available from www.nerds.de). As an alternative, standard UDP can be configured by setup.

The STM32 Nucleo-L476 was chosen for this project because it has several U(S)ARTs and does not need a hardware modification when the ST-LINK part is cut off.

The additional circuitry for the conventional MIDI interfaces, the WIZ850io, USB connector, DIP switch and LED is located on a 10x8.6 cm single layer PCB. Its design is less elegant, but held strictly in 2.54mm raster (except USB connector). So it is possible to rebuild it on a Veroboard with round copper dots, though this would be a heavy task. For reasons of better soldering of the single layer PCB and component placement as well as better "stand alone" usefulness, it is not designed as a "shield", but as a " base board" instead. It can be used with or without the ST-LINK part of the Nucleo board.

Different modes of operation may be selected by a DIP switch: configuration, Ethernet as merge collector/master, USB as merge collector/master or Ethernet and USB each as independent merge collector/master for 2 MIDI I/O. Filters are provided for distribution of specific MIDI channels to the different MIDI OUT.

5 Volt power is supplied through the USB connector, even possible by a USB power bank. USB connectivity is not necessary when Ethernet works as MIDI Merge collectors/masters.

A detailled construction- and operation manual is provided here (PDF file).

Downloads:
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 "base board" PCB (1:1 TIF format, view "from component side" (i.e. mirrored against view from solder side)

Firmware "midimerger-L476-12.hex" for the MIDI Merger with Nucleo-L476
(Version 1.2 , 15 October 2017)

Source code "midimerger-L476-12.zip" (status 15 October 2017)
This source code is provided as complete "EmBitz1.11" project (ZIP file, 1.193 kB. Parts published by EmBitz are under license of Embitz, parts published by STM are under license of STM, parts programmed by Atollic AB are under license of Atollic, parts programmed by me are provided under GNU GPL3 license.)
Because the STM32L476 processor is not yet directly supported by EmBitz, this download is quite well suitable as an Embitz project template for further own development, especially concerning USB and WIZ850io based Ethernet. It is programmed directly on register level, no external libraries or drivers are used.



* 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.