Electronic – Midi input that doubles as gate voltage input

analogmidiopto-isolatorsynthesizer

I'm building something that would benefit from a midi-clock input, but also a analog clock input. In order to save space, i'd like to use a mini-jack with an adapter for the midi cable (as seen in the Arturia Beatstep pro for example) and have it double as a analog clock / gate input.

Seeing some synths have gate signals that go up to +15v, I'd need some protection in order not to fry the opto-coupler mandated by the midi input.
A simple resistor in front of the ir-led won't do the trick: the forward current will either be too low in midi-mode, or too high in +15v gate mode.

I guess the capacitance of a zener prevents me from using that as voltage protection, because it will be too slow for the midi signal. Maybe there is some other thing I overlooked?

Best Answer

There are special low-capacitance TVS diodes, but they are designed for transients, not for continuous current.

HP's Optoelectronics Application Manual suggests to limit the current with a constant-current source in front of the optocoupler (section 3.6.1.2):

optocoupler with constant-current source

However, with MIDI, there is not enough voltage for this to work. (The 220 Ω resistor in the standard circuit drops about 1.1 V.) So what you have to do instead is to shunt the surplus current:

optocoupler with active voltage clamp

This is the equivalent of a Zener; you still need another resistor to limit the overall current.