Jump to content

Help with optocouplers and MIDI


jjonas
 Share

Recommended Posts

Hi,

like in my previous post on this forum, I'm trying to make a MIDI thru box with this schematic:

MIDI-Thru-5x.png

However, I have had no success, even though the circuit seems straightforward. I'm wondering whether the optocoupler is working and whether there are ways to test whether it is. When I was building MBSID, there was an LED flicker test, which I've used on the input side, and that seems to be working (i.e. the LED flickers when there is input). Is there a similar kind of LED test for the output side as well? I kind of think the phototransistor on the optocoupler's output side should be replicating the input side's signal, so can you test that with a LED too, like on the input side..?

I'm using a 6N136 like in the schematic.

7351845688_7255772d74.jpg

http://www.datasheetcatalog.org/datasheet/fairchild/6N136.pdf

When everything is set up, an LED between 5-6 is lit, but I'm wondering whether it should be flickering when there is input. Now the voltage between 5-6 is a constant 5VDC, and the signal at the thru box's MIDI out pins is a constant 5VDC.

A broader question: why use the optocoupler here in the first place, why not just branch the input signal without it?

Link to comment
Share on other sites

My input: I would use a 6N138 and 1k/4.7k resistor values like in this schematic: http://www.ucapps.de/mbhp/mbhp_core_lpc17_midi3_midi4_extension.pdf

This combination is well proven.

I've no experiences with the 6N136, could be that the parameters are not matching with the electrical integrity (and baudrate) requirements.

Of course, you could also work without an optocoupler if the circuit is supplied by the same PSU as the MIDI device.

E.g. see the MBHP_LTC circuit (an expired module, but just have a look how MIDI Thru is realized): http://www.ucapps.de/mbhp_ltc.html

Best Regards, Thorsten.

Link to comment
Share on other sites

A broader question: why use the optocoupler here in the first place, why not just branch the input signal without it?

The simple answer is that Midi uses a 20mA current loop to send and receive data. You always need an opto coupler on a Midi in.

I am not sure that the 74ac14 is the best thing to use, it is a schmitt trigger type, midi really needs an open collector type. I have built quite a few thru boxes using a very similar schematic and usually use either a 7404 or 7407 (depending on the type of opto coupler). In your design, the 6n136 is an inverting type so I suggest you try a 74ac04.

Hope that helps.

Tim.

Ps here is a link to my design

Link to comment
Share on other sites

Once again thanks for your answers!

I tried TK's solution, and while I was trying it out I noticed what the original problem was:

http://www.interfacebus.com/PC_MIDI_Pinout.html

I had used this picture for the MIDI connector pins, and had taken it it was the MIDI socket pins as seen from the front, but apparently it was the plug pins seen from the front, i.e. I had pins 4 and 5 reversed.. in TK's schematic the pin order was clearer. Based on brief testing, it's working now. It has the 6N138 based optocoupler section from TK's schematic.

@ Tim: What kind of problems might occur with the design I now have in comparison to the one you suggest..?

Link to comment
Share on other sites

It is always the simple things that cause the most trouble, great that you found the problem.

@ Tim: What kind of problems might occur with the design I now have in comparison to the one you suggest..?

It was just an idea, I have built your circuit on a breadboard and it works fine. The only difference is that I used a 74LS14 as this was all I have to hand. The best thing is to use your circuit and see if problems occur. If it works fine then use it.

Tim..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...