I received my H11L1 opto isolators (yeah) to use for my MIDI input(s).

However, I cannot receive anything (and tried various circuits).

According to the H11L1 (see datasheet) an example circuit is:

Example The red box is the part I expect I made a mistake.

According to the MIDI spec an input should look like enter image description here

The red part is again the similar part I expect problems with.

The following is a screenshot of my circuit (note I replaced the ferrite beads by cables since I do not have them yet). enter image description here The two cables on the right go to pin 4 and 5 of the MIDI cable (I also switched them so that is not the problem).

I use 270 ohm and 220 ohm resistors as advised.

Does anybody have an idea what can be wrong?

Update: It's improved if I put an Hex inverter (74HC14) after Vo (open collector output). The test LED (not in circuit is now shining more whenever MIDI input is received, the Arduino still doesn't get correct data, probably the signal is too much disturbed somehow).

My sketch:

#include <MIDI.h>

#define LED 13


void setup() 
  pinMode (LED, OUTPUT);

void loop() 

void MyHandleNoteOn(byte channel, byte pitch, byte velocity) 
  digitalWrite(LED, HIGH);

void MyHandleNoteOff(byte channel, byte pitch, byte velocity) 
  digitalWrite(LED, LOW);


It seems the opto coupler is probably working correctly, but the Arduino does not pick up the signal correctly. I made a new question on that stack exchange:

Arduino question about H11L1

  • \$\begingroup\$ Comments are not for extended discussion; this conversation has been moved to chat. \$\endgroup\$
    – Dave Tweed
    Commented Jun 23, 2017 at 12:02

1 Answer 1

  1. Remove the opto-isolator from the breadboard. Replace it with an LED. That should blink when you transmit from the MIDI source device.
  2. If that's OK then put the opto-isolator back in. Put the LED in series with the pull-up resistor. Repeat the test and you should see the LED blink.


simulate this circuit – Schematic created using CircuitLab

  • 1
    \$\begingroup\$ See the update. Bedtime in Ireland. Good night. \$\endgroup\$
    – Transistor
    Commented Jun 19, 2017 at 22:26
  • 1
    \$\begingroup\$ @MichelKeijzers There is no relevant difference between the 6N137 and the H11L1. What test did you do with the inverter (it should not be needed)? \$\endgroup\$
    – CL.
    Commented Jun 20, 2017 at 6:46
  • 2
    \$\begingroup\$ @MichelKeijzers The MIDI output circuit also inverts the signal (it's designed this way so that an idle MIDI line does not use power). \$\endgroup\$
    – CL.
    Commented Jun 20, 2017 at 8:47
  • 1
    \$\begingroup\$ @MichelKeijzers Yes; a low voltage on the transmitter results in a current flowing through the MIDI cable, which results in a low voltage at the receiver. \$\endgroup\$
    – CL.
    Commented Jun 20, 2017 at 8:56
  • 1
    \$\begingroup\$ @MichelKeijzers Some digital optocouplers are specially designed to be non-inverting, but most optocouplers indeed are inverting. \$\endgroup\$
    – CL.
    Commented Jun 20, 2017 at 8:59

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.