I made a MIDI in/out circuit, which works, however, I see I have some changes compared to some other circuits I see.

  1. In the official documentation Midi Org I see two resistors on the MIDI out circuit, both 220 ohm. I'm sure I only use one (but I'm not at home, so I cannot check which one I might miss). But so far I didn't get any problems (but never tested in a 'noisy' environment.

  2. In the same scheme, there are 2 inverters (I think), the triangle, one without an A and one with. I also don't use that. I think it's for keeping a steady 0 or 5 V signal, so I think it's good to add. Now I see in some other circuits (randomly from google search with pics), a 74LS04, or 74LS14 or others. At home I have some 74LS14's (Schmitt Trigger hex inverter), but I also read those are for processing signals (like MIDI I guess), but can be slow. So I am not sure what to use, 7404 or 7414? I see also a lot of schemes with 7414's so I guess these are ok.

  3. For the thru I see the same ... does one triangle without and one with A means, I need 2 inverters after each other? Probably it is. Since I want to use 3 MIDI In/Out/Thru's, would that mean 2 (per out or thru) * 2 (out + thru) * 3 (# 3 in/out/thrus) = 12 hex inverters (meaning 2 ICs?); see also item 6

  4. In this circuit, DSS306 are used. I cannot find them on aliexpress, but also they are not in the official MIDI org circuit. Are they needed ... or better (and why)?

  5. In this circuit, transistors are used (2N2222) ... yet another solution (?) What is the advantage? (btw, I plan using BC337's since I have those and are similar, at least if there is a clear advantage).

  6. Also it mentions about the hex inverter, which I probably do not need for the MIDI Out (since it comes from the Arduino, not sure if the Arduino handles this), but for the MIDI Thru I want to connect it directly from the MIDI In. Is that assumption correct? (better use it for both MIDI Out and Thru?)

Thanks if you can help me with one or more of the above questions.

  • \$\begingroup\$ And without knowing what you actually made (because you haven't supplied a circuit diagram of it) you're asking us to then compare it (an unknown circuit) with several others which we would have to spend a lot of time looking up and once the links die the question becomes useless. Good questions attract good answers, poor questions attract scorn. Consider revising and reducing - you can always ask more than one question (you have 5 or 6 questions here). Give all the information needed in the question, don't rely on volatile references. \$\endgroup\$ Jun 14, 2017 at 13:44
  • \$\begingroup\$ Thank you ... And you are right ... the reason I did not provide my own circuit, is that I mostly wonder why others did it, but I will put the pictures of the links ... and even better, split the questions (it's a bit too overwhelming for others probably). The problem with what I actually made is photographable, but it looks a bit ' messy', in the sense of that I don't have it sketched in a software program ... maybe I should start on that. \$\endgroup\$ Jun 14, 2017 at 13:47

1 Answer 1

  1. The official circuit uses three 220 Ω resistors (two in the transmitter and one in the receiver) to limit the current to about 5 mA.

    Dropping one resistor will increase the current to about 8 mA. This is unlikely to damage the receiver, but it might increase the time the optocoupler needs to switch off, and thus foul up the timing of the UART signal (for really cheap and non-compliant receivers that are already on the edge of not working). Anyway, there's no reason to waste power.

  2. The "A" is just a label used in the remark below:

    Gates "A" are IC or transistor.

    When the MIDI specification was written, typical microcontrollers (e.g., 8051) were not able to sink 5 mA of current, so it was necessary to add some buffer. Nowadays, you would be able to use the output pin of most microcontrollers directly, or just use a single non-inverting 74LVC1G07 gate, but thirty years ago, the most easy way to construct a buffer would be to use two gates of a hex inverter. (Whether a Schmitt-trigger input is needed depends on the input signal of the inverter.)

    What exact chip or buffer circuit you use does not really matter, as long as it is capable of 5 mA. (Many older MIDI devices indeed used transistors.)

  3. A Thru circuit is just a normal output circuit connected to a normal input circuit.

  4. The DSS306 are EMI filters. Some kind of filtering is likely to be necessary nowadays; this is one of the reasons that the MIDI schematic you mentioned is outdated and was replaced with the Electrical Specification Update (2014).

    If you are not going to sell the device, or if you are a cheap bastard, don't bother about EMI. Otherwise, use something that filters out high frequencies (MIDI is slow, so you don't need more bandwidth than a few MHz). In practice, many devices use ferrite beads, but RC filters or even common-mode chokes are also used sometimes.

  5. Transistors can handle larger currents and voltages than a logic gate, but that does not matter for MIDI.

    A transistor is just cheaper …

  6. … but if you're using a hex inverter, you might just as well use all of its gates.

  • \$\begingroup\$ Thanks for answering all questions. If I understand you right you advice to keep one resistor out (from item 1)? I see the inverters are not anymore in the new spec. About 4, I'm not going to sell it, but I'm going to use it in 'live' situations, so I think it's good to add ferrite beads (never heard from before). 5/6 ... it seems I don't have to use hex inverters anyway (using an Arduino). So if I understand correctly, I can better keep one resistor removed, do not use transistors/inverters, but add the ferrite beads? \$\endgroup\$ Jun 14, 2017 at 19:01
  • 1
    \$\begingroup\$ Even if you disregarded the possible timing problems and the wasted power, what possible reason is there for removing one resistor? \$\endgroup\$
    – CL.
    Jun 14, 2017 at 19:03
  • 1
    \$\begingroup\$ What kind of EMI filter to use depends on the expected noise. In theory, you should do measurements of your circuit to determine what frequencies you need to filter out. In practice, it probably doesn't matter much; ferrite beads will be fine. But common mode chokes (see for example the Roland E-600 schematic) affect the actual signal less; use them (e.g., TLF9UB203WK1) if you can afford the price and space. \$\endgroup\$
    – CL.
    Jun 14, 2017 at 19:18
  • \$\begingroup\$ Ok so I should add the resistor again :) ... that's also in line with the official specs. \$\endgroup\$ Jun 14, 2017 at 20:46
  • 1
    \$\begingroup\$ 31.25 kbaud is extremely slow, and the shielded twisted-pair cable ensures that the MIDI data itself is harmless. The EMI filters are intended to protect from digital switching noise from/to other devices (e.g., the microcontroller). Don't sweat it, just use ferrite beads. \$\endgroup\$
    – CL.
    Jun 14, 2017 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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