back to menue

Ethernet-MIDI-USB Converter with STM32F042 or STM32F070

This article describes the DIY construction of a triple port communication interface between wired Ethernet (WIZ850io module), USB (MIDI Class or CDC Class) and a combined legacy MIDI or serial COM port. This device may be regarded as an extension of the USB to serial converter presented at this website.

By means of two jumpers or switches different modes of operation are selectable:
Jumper or switch no.1 selects between general MIDI or serial COM port behaviour of the device
Jumper or switch no.2 configures the priority of data flow:

In contrast to the MIDI Merger, received data are merged byte by byte instead of message by message. So only one of the merged communication ports may receive during a complete message.

Ether-MIDI-USB in 'Euro-Box'
Converter built into a low-cost "Euro-Box" enclosure

To make DIY construction as easy as possible, an STM32F042 (20 pin TSSOP) microcontroller was chosen, which is mounted on a commonly available TSSOP to DIL adaptor PCB. An STM32F070 microcontroller may be used as well.

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.
If general MIDI behaviour is selected, it operates in UDP Multicast mode by default, 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.
If general serial COM Port behaviour is selected, by default it operates in TCP mode (Telnet), but may be set to UDP by configuration.

The additional circuitry for the conventional MIDI/serial interface, the WIZ850io, USB connector, jumpers and LED is located on a 8.5x7.5 cm single layer base PCB. Its design is less elegant, but held strictly in 2.54mm raster (except USB connector). So it is possible to rebuild the complete project without PCB etching on a Veroboard with round copper dots. Mounting holes are provided for a low-cost "Euro-Box" enclosure available from Reichelt and Conrad for example. When the PCB is cut 10x7.5cm wide, it fits into a rugged aluminium box ("Fischer Elektronik FRAME").

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 main communication interface (Jumper 2 not set).

More specific communication parameters, like LAN mode, IP Addresses and Ports, Baud Rates can be adjusted in User Setup Mode, which is available in COM port mode (Jumper no.1 NOT set) via the legacy COM port and additionally via the prioritized digital bus interface (Ethernet or USB, depending on Jumper no.2).

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

Downloads:
The subsequently downloadable material is copyrighted (c)2018 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. Use for dangerous, life-threatening and medical applications is forbidden.

PCB layout for the "base board" PCB
(1:1 TIF format, view "from component side", as needed for PCB production)

Firmware "ethermidiusb-13.hex" for the Ethernet-MIDI-USB converter
(Version 1.3 , 13 June 2018)

Source code "ethermidiusb-13.zip"
(status 13 June 2018) This source code is provided as complete "EmBitz1.11" project (ZIP file, 653 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.)

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 (love or hate?).


back to menue


* State of information June 2018.
* 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.