USB to WiFi + MIDI&RS-232 Interface with ATXmega128A4U
This device interconnects USB (MIDIStream Class as well as CDC/ACM class), WiFi Ethernet and a combined MIDI/RS-232 interface. The essential communication method is 1:1 data transfer from each communication path to any else. The concept is to create a communication "triangle".
The RN171XV WiFi module is pin- and data I/O compatible with wireless XBee transceivers, which have less features but are easier to handle. This simplifies the creation of wireless MIDI point-to-point communication.
Assembly of the USB to WiFi + MIDI&RS-232 Interface in "Unimas85" enclosure.
A detailled construction- and operation manual is provided here (PDF file).
The available modes of operation are selected by two jumpers (or 2 switches at the front panel):
- Jumper 1 selects the USB class which defines communication of the interface with a host PC.
Depending on the jumper setting, the transfer is organized in MIDI compatible packets (USB MIDIStream class) or as a RS-232 compatible byte stream (USB CDC/ACM class).
- When jumper 2 is placed, OSC (Open Sound Control) coded data packets, received via WiFi, are decoded and the binary "payload" content is retransmitted to MIDI OUT. Vice versa, every MIDI message or other byte received at MIDI IN is accumulated into appropriately timed OSC formatted packets and retransmitted via WiFi.
--- If USB working in MIDIStream class, the USB interface is working in parallel with the
--- If USB working as USB communication device (CDC/ACM class), USB is used instead for
text based device configuration.
Furthermore, a simple compiler for user defined OSC methods is acessible here.
- Because OSC is not designed around a well defined set of methods (i.e. commands) - like MIDI is, some predefined methods of the most popular, well designed and documented OSC implementations are implemented, as is "Touch OSC" and "Control".
Additionally a special set of MIDI oriented OSC methods is implemented. To provide additional flexibility, a simple compiler for user defined OSC methods is built in. This way, a big variety of OSC methods generated by 3rd party devices may be recoded to provide corresponding MIDI specific or general serial output. All OSC methods/commands are fully documented, no specific drivers are needed.
- The USB to WiFi + MIDI&RS-232 interface can be associated wireless to an existing infrastructure network. Alternatively - or more preferably - a "soft AP" mode is supported, where the interface creates a wireless network by itself and operates as its access point. This way direct wireless communication with mobile devices like smartphones and tablets is establised with minimal overhead and latency.
- At hardware level, the RN171XV is optional, the firmware adjusts itself correspondingly. Communication between USB and MIDI&RS-232 is possible anyway.
- The RN171XV is pin compatible with wireless XBee transceivers. These modules can be used instead of the RN171XV modules. No special firmware is needed.
With two of these XBee equiped modules you get a quite more simple "wireless USB to MIDI cable". But this is not compatible with actually known apps on smartphones and tablets.
- For MIDI and/or RS-232 I/O, two pinheads are provided at the PCB.
Classical 5 pin DIN connectors and/or a 9 pin SubD connector with metal flange should be mounted at the front panel of the housing. The subD connector may be male or female, depending on the intended use.
The MIDI/COM baud rate can be adjusted to standard rates between 9600 and 230400 baud, plus MIDI baud rate 31250.
The WiFi baud rate can be adjusted to standard baud rates too. Default is 9600 for easy setup of the RN171XV module, but for practical use 230400 is recommended (115200 for XBee modules).
Baud rate settings are stored permanently until they get changed.
- The heart of the circuit is a microcontroller ATXmega128A4U clocked at 24 MHz. The 44 pin TQFP socket demands a good solder iron and some skills. An Atmel compatible programming connector is provided on the PCB.
- The device is designed to be operated "USB bus powered" (max 250mA). If no USB communication is needed or possible, it can be powered through the USB connector with a regulated 5V supply.
In this case, only communication between WiFi and the combined MIDI/COM port is possible.
- The layout of the PCB is held simple with a single wire layer.
- The proposed PCB is designed to fit exactly into a "Unimas85" box or rather well into a low-cost "Eurobox" enclosure. Both available from Conrad or Reichelt for example.
Pure Data demonstration and test patcher
The most basic OSC commands for the USB / WiFi / MIDI&RS-232 interface may be sent from this patcher. It is designed slightly following the TouchOSC "Mix2" layout. It is not too complicated to rebuild a similar user specific TouchOSC structure on a tablet.
The subsequently downloadable material is copyrighted (c)2016 by Wolfgang Schemmert
Assembly and use of the interface is permitted for free by everybody for any purpose ("freeware")
All information is based on best knowledge, but without any warranty. Any responsibility is excluded.
single layer PCB layout (1:1 TIF format)
Firmware hex code for ATXmega128A4U incl .inf file for Windows virtual COM port (ZIP file - Ver.1.01, 26 FEB 2016)
(recommended Fuses programming: Fusebyte0:0xFF, Fusebyte1:0x77, Fusebyte2:0xFF, Fusebyte4:0xF1, Fusebyte5:0xEB)
Detailled construction- and operation manual (PDF file)
pd (Pure Data) demonstration and test patcher (ZIP file)
* State of information June 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.