# ±12V protection for MIDI input

TLDR; how to make a MIDI input withstand shorting to $$\\pm12V\$$?

This is a counterpart to this question, I'm asking this as I was inspired by the great answer I got there.

I'm designing a MIDI input in a eurorack modular synth module on a TRS jack (this is a semi-standard non-standard way to save space), where it's quite possible for the user to accidentally plug in anything between ±12𝑉 to the input. I obviously need to protect the input, while keeping the circuit maximally compatible with other MIDI devices.

The standard MIDI input circuit adapted to the TRS connector:

simulate this circuit – Schematic created using CircuitLab

where tip, ring and sleeve are of course the pins of the TRS input connector. The LED represents the opto-coupler, which is in this case a 6N137. The MIDI standard really just specifies a 5mA current loop as the signaling method, and gives an example circuit.

Now, assume that the user plugs in say $$\+12V\$$ on the tip and $$\0V\$$ on the ring. Then the current through the optocoupler and resistor is 46mA, which is just within absolute maximum for the 6N137, and gives a power dissipation of 500mW in the resistor, so a not-impossible-but-hefty 3/4W resistor will survive. The situation is the same in the reverse voltage case.

However, it is not impossible (although requires a stereo lead which is rare in the eurorack environment) that the tip could be at $$\+12V\$$ while the ring is at $$\-12V\$$ (or vice versa), giving a total voltage difference of $$\24V\$$, in which case the absolute maximums of basically all the components is exceeded.

The reason I'm having difficulty coming up with a nice protection circuit is that:

1. the circuit should be floating, to maintain the opto-isolation
2. Because of this, I can't clamp things to ground or the power rails etc
3. the usual driving circuit on the other end is just a simple two-resistor "current source", so the voltage drops introduced by diodes tend to throw things off.

Since the $$\\pm12V\$$ case is quite unlikely to happen by accident, I'm considering just keeping this circuit as is, with R1 a 3/4W resistor, but if there's any nice way to protect against $$\24V\$$ I'd be very interested in hearing that. Bonus points for staying a bit further clear of the absolute maximums of the components, and of course the circuit should be maximally compatible with the various MIDI output circuits out in the wild.

• MIDI over TRS is not a semi standard but an actual standard, and the pinout is, of course, different.
– CL.
Feb 20, 2019 at 11:37
• @CL. wow, that's news to me (although apparently almost a year old). Thanks for the link! Indeed, before that document there used to be "Arturia pinout" and "Korg pinout", the MMA seems to have gone with the Korg pinout.
– Timo
Feb 20, 2019 at 12:24
• There were two pinouts for 3.5 mm, so the MMA went with the only 2.5 mm pinout.
– CL.
Feb 20, 2019 at 12:29
• No, they just recommend the 2.5mm connector, but allow any size of connector. Feb 20, 2019 at 23:13

In the linked question, the 220 Ω resistors were replaced with current sources and reverse voltage protection diodes. The same can be done here:

R6 is smaller because there is less voltage in which to get enough base current for Q5 to (almost) saturate.

This circuit has no ESD protection (the antiparallel diode in the original circuit); it might be advisable to add a bidirectional TVS diode.

• Seems to work like a charm in LTSpice! In addition, replacing D3 with a full-wave rectifier (made out of Schottky's) allows this circuit to accept both polarities, which is perfect now that the standard is out, but nonetheless there's still plenty of devices in the wild with the opposite polarity!
– Timo
Feb 21, 2019 at 8:37

If the MIDI standard specify a 5mA current, why would you go with a 46mA ?

You should use 2.2 kohms for R1, which would only dissipate 50mW. Even with a 24V reverse it would not exceed what a 1/4W resistor can handle.

Good thing is, if you get 24V direct, you will still be in the recommended rating for your components, so no need for further protection.

• The MIDI receiver must drop somewhere between 2.1 V and 2.8 V, otherwise, the specified driver circuit would not work; with R1 = 2.2 kΩ, it would result in 1.3 mA.
– CL.
Feb 20, 2019 at 11:36
• I should have lookedfurther at the midi spec than what was in the question. Indeed, if normal signaling is down to 2.1V, then 2.2k will be too much. Feb 20, 2019 at 12:35