3
\$\begingroup\$

enter image description here enter image description here

All the schematics above use a diode before the receiving pin on the optocouplers. The problem was, I never able to find the exact same diode as the schematics.

Before, I'm using H11L1, but it never worked. Now I have plan to move to 6N138, but I'm afraid I'll meet another problem with this.

The end goal was receiving MIDI with either Arduino or ESP8266. Or is there any easier way?

\$\endgroup\$
  • 1
    \$\begingroup\$ A 1N4148 is a very common part. You could use DigiKey Part # 1N4148FS-ND. \$\endgroup\$ – Charles H Apr 30 at 18:01
  • 1
    \$\begingroup\$ Looks like a protection diode. If the input polarity is reversed then it prevents the opto-coupler LED from reverse breakdown \$\endgroup\$ – Charles H Apr 30 at 18:05
  • 3
    \$\begingroup\$ @RinaldoJonathan Any standard silicon signal diode or rectifier diode ought to work. A 1N400x, 1N4148, whatever. It shouldn't matter unless you use something really strange. \$\endgroup\$ – Hearth Apr 30 at 18:05
  • 1
    \$\begingroup\$ @RinaldoJonathan If you don't have local sellers who can offer you the part you need, you might just have to give up on getting it locally. Transistor has a point, though; you could just use an LED. Or the base-emitter junction of a BJT, for that matter. Or base-collector, it doesn't matter for this purpose. PN junctions are everywhere. \$\endgroup\$ – Hearth Apr 30 at 18:19
  • 1
    \$\begingroup\$ You may need the diode to protect against ESD and surges, as this is an external connection. \$\endgroup\$ – scorpdaddy Apr 30 at 18:27
12
\$\begingroup\$

The diode is there to protect the opto-LED in the event of a reverse polarity connection.

The HF11L datasheet states that the absolute maximum reverse voltage for the emitter (meaning the IR emitter, the LED) is 6 V. Typically a 5 V supply would be used for the MIDI driver but it's worth being careful.

In your case pretty well any diode - including an LED would suffice. A red LED would limit the reverse voltage to < 2 V and would serve as an indication for reverse connection.

For further reading have a look at Failure modes for LEDs and Opto-isolators - intro where I have written a little on the topic.


@CL raises a point that I rarely have to think about as it's not generally a problem in Ireland due to the damp climate: static. A static discharge of the wrong polarity can exceed the maximum reverse voltage by a factor of many thousand. The reverse diode protects the LED from this.

More reading:

\$\endgroup\$
  • \$\begingroup\$ Is that means I could replace that diode with just standard red LED? \$\endgroup\$ – Rinaldo Jonathan Apr 30 at 18:14
  • \$\begingroup\$ Yes, that's what I said. \$\endgroup\$ – Transistor Apr 30 at 18:23
  • \$\begingroup\$ Nice. I will accept your answer after trying it. Thanks a lot! \$\endgroup\$ – Rinaldo Jonathan Apr 30 at 18:24
  • \$\begingroup\$ How would it be possible to connect a reverse signal? The diode protects against ESD. \$\endgroup\$ – CL. Apr 30 at 20:16
  • 5
    \$\begingroup\$ @CL When you're talking about musicians, anything is possible, \$\endgroup\$ – stark Apr 30 at 20:40

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.