I'm new to electronics, so forgive not using official terms.

I want to make a MIDI project with an Arduino (Mega) and want to have 3 MIDI input channels. Currently on my breadboard I use 6N137 optocouplers which seem to work.

However, I also see schematics using a 6N138 or 6N139 optocouplers... Since I'm not so good at reading datasheets, let alone comparing them (since they use somewhat different terminology).

Since I need to use 3, maybe I thought I can use a so called multiple-optocoupler like this 4 channel optocouper

Also I found LTV847

However, is it comparable to a 6N137? And would I still need to use a diode and resistors as in the schematic of e.g. the MIDI In of this?

Or should I use a 6N138 or 6N139 or another since the 6N137 has disadvantages?

Or are there even better/more suitable multiple channel optocouplers than the one I found?

(the reason is want to check if I can save some space by using a multi channel optocoupler instead of 3 separate ones, including resistors/diodes etc).

  • 2
    \$\begingroup\$ All opto couplers couple with galvanic isolation and some current transfer ratio. Work out what you need and then compare data sheets. Learn to compare data sheets. \$\endgroup\$
    – Andy aka
    Commented Apr 9, 2017 at 16:59
  • 1
    \$\begingroup\$ I could suggest you check the datasheets but that'd be an ignorant thing to say, you made it clear that you're out of your depth there. Instead, can I suggest looking at the Vishay SFH6916. That should suit your purposes and work with the circuits you linked to, at first glance anyway. The only downside is the SM package but you could get a cheap SMD-DIL breakout board for it if it's a home soldering thing. Good luck with it. \$\endgroup\$
    – TonyM
    Commented Apr 9, 2017 at 17:17

2 Answers 2


I'd suggest the best device selections are the 6n137 or in a slightly smaller physical form the H11L1 where you can save two pins worth of board space.
The reason these are ideal is that they are digital devices (they have a Schmidt level gate driver) rather than the analog devices such as the 6N138/139 or even the SFH6916 suggested in the comments.

The speed of your MIDI command is very low (31k baud) so this is not a concern. However you need to ensure you have what's called hysteresis built into the signal path so you get clean replication of the signals passing through your MIDI devices. The digital parts give you this built in, whereas with the analog parts you have to design this in which typically requires more components for through signals.

Here's the relationship between input current and the digital output for the H11L1:

enter image description here

You can see here that the current requirement to switch state of the digital output is just under 1 mA (you don't have to deal with current transfer ratios with digital devices) and the hysteresis is built in.

You MIDI interface will switch between 0 mA and about 5.5 mA (if you use the 3 220 Ohm resistors recommended) for it's low/high state. The reverse protection diode shown in many schematics is a good idea, just for safety.

  • \$\begingroup\$ The SFH6916 would be too slow for MIDI. The 6N137 has no hysteresis; why would it be needed? \$\endgroup\$
    – CL.
    Commented Apr 9, 2017 at 17:44
  • \$\begingroup\$ Thank you very much for this answer, and mostly because of the background ... I now have 6N137s and while the H11L1 are a bit smaller it's not enough for my protoshield with the datalogger I use, so I will need a bigger protoshield anyway. However, the information about the transfer characteristics and hysteresis is really useful (now I know the relation with MIDI). I use the 220 resistors indeed and the diode. \$\endgroup\$ Commented Apr 9, 2017 at 18:10
  • \$\begingroup\$ @CL: Please can you show me in the datasheet how I know if it is too slow for MIDI? I read the Collector emitter capacitance and the Coupling capacitance both are 1 MHz which is more than enough for MIDI ... but I just searched for 'Hz'... \$\endgroup\$ Commented Apr 9, 2017 at 18:12
  • \$\begingroup\$ @CL: My question in the remark above is already answered by your answer below (thanks) \$\endgroup\$ Commented Apr 9, 2017 at 18:15
  • 1
    \$\begingroup\$ @CL I believe it used to be on the older TI datasheets, but I can't find any copies now ......so you may be right. However the H11L1 is IMO the best devices for the job, though your suggestion of the TLP2361 and other with hysteresis are also great choices. \$\endgroup\$ Commented Apr 9, 2017 at 22:33

The TLP521-4, LTV-847, and SFH6916 are simple transistor optocouplers, which means that they are too slow to reliably work for MIDI.

In any case, such a quad DIP optocoupler does not save space because four PC817s would occupy exactly the same space.

It is not possible to omit the 220 Ω resistor because it is needed to limit the current to 5 mA. Similarly, it is not possible to omit the protection diode because all optocoupler LEDs are sensitive to reverse voltages. (Only the HCPL-2602 has the protection diode built in, but it's overkill, and does not save space.)

The HCPL-2630 would be a two-channel 6N137. But you can do better: to really save space, go to SMD. And to avoid the pull-up resistor at the output, use an optocoupler with a CMOS output, such as the TLP2361, ACPL-M61L, FODM8071, or PS9151.

  • \$\begingroup\$ Thank you very much for this answer, the HCPL also sounds interesting ... I know SMD is much smaller, but I also don't have any (real) experience with soldering, let alone soldering SMD. \$\endgroup\$ Commented Apr 9, 2017 at 18:20

Your Answer

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

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