2
\$\begingroup\$

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?

\$\endgroup\$
4
  • 1
    \$\begingroup\$ How about a normal diode in series with a Zener? \$\endgroup\$ – supercat May 8 '17 at 20:29
  • \$\begingroup\$ My guess is a single ESD-protection diode has a low enough capacitance and high enough recovery speed to act as a voltage protection. \$\endgroup\$ – Tim Walther May 8 '17 at 20:45
  • 1
    \$\begingroup\$ You can get special low capacitance TVS diodes. \$\endgroup\$ – pjc50 May 8 '17 at 21:01
  • \$\begingroup\$ Tip tangent: those MIDI DIN-to-3.5mm adapters don't appear to all be the same pinout.... \$\endgroup\$ – Daniel May 8 '17 at 21:45
2
\$\begingroup\$

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.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks, this seems like it should work. I'm not too good with analog stuff, but I can simulate this to find out what parts and values would work nicely. \$\endgroup\$ – Tim Walther May 9 '17 at 16:37
  • \$\begingroup\$ actually, coming back to this, I first simulated and then built the current source solution and it works like a charm! \$\endgroup\$ – Tim Walther Jul 4 '19 at 1:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.