XBEE / MPU-401 Interface

XBEE / MPU-401 Interface

Though it is almost possible today to buy a sound card with integrated MPU-401 MIDI interface, I still prefer it, because it is much more robust than an USB interface, especially when power is cycled and cables are re-patched oftenly.

This page describes the electronic circuit of an interface which provides wireless connectivity for the MPU-401 MIDI port of a sound card by means of an XBee module for 802.15.4 protocol. Data transfer is 1:1 bidirecionally transparent. Together with other appliances which support wireless transfer of MIDI data by means of XBee modules, a simple "wireless MIDI cable" becomes available.
The updated version described here (December 2016) is additionally provided with a local, non wireless MIDI I/O.

schematic of the XBee/MPU-401 interface

Circuit Description

The game port supplies 5 Vdc power, this is reduced to 3.3 Volt by IC1= LF33 (TO220 or DPAK case, no heat sink required).

The MIDI output from the game port is nominally 0 to 5 Volt. Many sound card boards offer only 3.3 Volt high level. Therefore in the updated version, the MIDI input from the sound card is transferred from 5 or 3.3 Volt up to 5 Volt with IC3 as voltage level converter. It is essential to use a HCT14, not HC14 for IC3!. At the output of the level converter, R2 and R3 divide the 5 Volt level down to 3.3 Volt again not to overload the 3.3 Volt supplied XBEE module. Direct MIDI OUT is split off from the first inverter.

For the opposite data direction IC2C/IC2D is inserted as noninverting level converter 3.3 Volt to 5 Volt. To get properly driven with 3.3 Volt level, it has to be a HCT type too. The output of the MIDI IN optocoupler wired-or here, the XBee output accepts it.
IC2A/IC2B and D1 solve a special problem which arises when the XBee interface is switched off while the PC is on. For this reason IC2 is powered permanently with 5 Volt, even while the interface is switched off. While IC1 supplies 3.3 Volt, IC2A/IC2B work as noninverting level converter, i.e the output of IC2A is at 5 V as long as 3.3 Volt is present - but 0 Volt when the interface is off. D1 pulls Din of the XBee module down and prevents IC3 from beeing latched up. The resistance of R1 is high enough to be driven permanently by the game port.
Furthermore, the output of IC2D is driven high while the interface is off. Otherwise the MIDI input of the game port would be permanently pulled low, which sometimes causes problems with the PC internal MIDI circuitry.

The remaining inverters of IC3 drive a dual color LED, which is a rather good tool for debugging communication problems. Instead of a red/green dual LED two separate LEDs can be used. In idle state both LEDs are on (a dual LED is yellow or amber). When a negative pulse arrives from the game port MIDI OUT, R6/C3 are charged high by D2, which causes the red LED going off for a fraction of a second. The time constant of R5/C3 is somewhat matter of taste, R6 = 2.2 Megohm works well, too. R7 is specified for a dual LED type V-L-115-WEGW (source Conrad part no 187496). For other LEDs R7 has to be adjusted - for low current single LEDs most times remarkably higher. IC3E/IC3F provide the same function for data received via XBee.

Photo of final XBee/MPU-401 interface

Usually a wireless MIDI connection between 2 PCs makes less sense. For realisation of wireless foot controllers or wireless control of mixers etc. a do-it-yourself construction manual for a standalone counterpart has been published at this website. This circuit is useful too as a wireless baud rate converter from standard PC baud rates to MIDI baud rate 31250.

The subsequently downloadable material is copyrighted (c)2016 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 and assembly drawing for the XBee-MPU interface (1:1 TIF format)

* State of information December 2016.
* Right of technical modifications reserved. Provided 'as is' - without any warranty. Any responsibility is excluded.
* This description is for information only, without any warranty. No product specifications are assured in juridical sense.
* Trademarks and product names cited in this text are property of their respective owners.