Testing MIDI interfaces

The reference

My main soundcard is an external USB device, the RME Babyface (EUR 539). It has balanced analog inputs and outputs, ADAT and SPDIF, and MIDI in/out.

I wrote a small test program in Qt with RtMidi to send messages to the MIDI out device on a Windows 7, 64 bit installation. The MIDI specification defines a set of standard SysEx messages, for example the EOF message, which is sent as the last packet a file transfer SysEx sequence. Using 0x64 as the device ID of the receiver, results in this byte sequence: 0xf0, 0x7e, 0x64, 0x7b, 0x00, 0xf7. When I connect a 220 ohm resistor between pin 4 and 5 of the output and measure the signal at pin 5 (looks like the output driver uses an open collector circuit with a pullup, because without the resistor there is no output signal), I can see this signal:

USB info: VID: 0424 (Standard Microsystems Corp.), PID: 3fc7, rev: 0001

RtMidi getPortName: Babyface Midi Port 1

Teardown

The case is a very stable metal case. The screws are hidden under the rubber foots:

The knob is just clipped on and after pulling it, it can be opened.

I traced the MIDI-In signals to an opto-isolator with the label "631/046". Unfortunately the ground pin of both connectors are not connected, but the shield of both connectors is connected to the system ground, in violation to the MIDI specification, which says that only shield and ground of the output should be connected to ground.

Some more labels of interesting ICs on the board:

Spartan 6, XC6SLX16 (FPGA)

SMSC USB3250 (USB 2.0 PHY, probably connected to the FPGA)

PCM4104 (four channel, 24 bit, 216 kHz, DAC)

AKM/AK5385 (24 bit, 192 kHz, ADC)

PGA2505I (microphone preamplifier for balanced inputs)

The cheap eBay product

When I send the EOF SysEx sequence to this device (EUR 3.59):

only the first three bytes are sent, and there is some some noise on the signal as well:

Usually three bytes are sufficient, e.g. for a "Note On" message, which works:

But there is no limit for SysEx messages (the MIDI specification recommends 128 bytes for devices with limited resources). This means you can't use this adapter for any longer SysEx communication, like loading or saving presets, samples, files etc. But might be sufficient for just connecting a MIDI keyboard to your PC.

USB info: VID: 1a86 (QinHeng Electronics), PID: 752d (CH345 MIDI adapter), REV: 0254

RtMidi getPortName: there are two devices, both are working: "USB2.0-MIDI" and "MIDIOUT2 (USB2.0-MIDI)"

Teardown

The case is easy to open, it is just some kind of snap construction, without any screws or glue:

One side of the PCB:

The other side:

MIDI specification violatons:

- The MIDI-In has no opto-isolator and the IN- input of the MIDI connector is connector to the USB ground. The cable has a nice shield, but this is not connected.

- The MIDI-Out ground is not connected, and no shield is connected.

As you can see on the PCB, there is an unpopulated IC U1, probably for an opto-isolator. But the 0 ohm resistor R11 is used instead to bridge it.

The specialist dealer product

Just to verify if maybe there was a problem with the Windows driver (the eBay device don't need a special driver, unlike the RME Babyface), I bought another MIDI adapter from Music Store, this time with a brand name and more expensive: Bespeco BMUSB100 MIDI USB Interface (EUR 14.90).

No driver installation was required. The EOF message looks like this:

There is some noise, too, and there are longer pauses between the bytes compared to the Babyface, but all six bytes are sent.

USB info: VID: fc02, PID: 0101, rev: 0250

RtMidi getPortName: USB MIDI Interface

Teardown

The case is a bit more difficult to open, but the construction is very similar to the cheap eBay case, again without any screws or glue:

The PCB is a single side PCB, top side:

Bottom side:

Interestingly there is no crystal, and the microcontroller is not just a black blob. The label says it is a MEM0860, and the second row 1304, probably a date code for 2013/04. The opto-isolator label says R/2701/L234.

The wiring looks better, because there are three wires connected for MIDI-Out (red, black and white in the image above), but a test with the continuity checkers reveals the white cable is not connected, neither to shield, nor to the ground pin of the connector.

Conclusion

All devices needed the resistor between pin 4 and 5 for the oscilloscope test, because MIDI-Out was an open collector driver. Simple Note-On and Note-Off commands worked with all devices, on MIDI-Out and MIDI-In. If you need an opto-isolator to avoid ground loops, or if you want to send SysEx messages, don't buy the cheapest available adapters. But no device does the right ground/shield connection, even the high price RME Babyface has a wrong shield connection. But it can be fixed by cutting the shield on the MIDI-In cable.


31. Oktober 2013, Frank Buß