Electronic – arduino – Building a midi project with Arduino + scrap components (optocoupler and diode)

arduinomidiopto-isolatoroutputvoltage

Original title: 300V output Optocoupler in a 5V circuit

I'm (new to this) trying to build a midi controller (in and out) with arduino and scrap. I guess I had several questions in one so I changed the title.


Schematic of the first tutorial I found
enter image description here


The few tutorials I found use the 6N138, I don't have it but found a PC725V. It didn't work but I realize I didn't wire it correctly. I found here that it was too slow anyway (and even the 6N138 should be replaced with the H11L1). So I have a PC705V also which seems faster (not under the 2µs range but 3-4 is close enough for testing I guess) so I'm going to try it.

Also I didn't have the 1N4148 diode so I use a V1040.

Arduino and midi are 5V and these opto are respectively made to handle 300V and 70V Collector-emitter and Collector-base output

My initial question was: Is it just overkill (so ok for scrap) or can it be an issue? And if there is, is it manageable?

Now it is: What specs should I look in components for midi usage and what is critical/manageable for components with different characteristics?

edits: (1) added schematics, (2) new title and informations.

Best Answer

The PC705V's response time is specified for a load resistor of 100 Ω, i.e., when the transistor is not saturated.

To output digital signals (VCC and ground), you need to saturate the transistor, and then it is just as slow as any other phototransistor optocoupler (see figure 10 in the datasheet).

300 V is overkill for a 5 V circuit, but it does not matter. (Similarly, all optocouplers have thousands of volts of isolation voltage, which is not needed to break grounds loops between MIDI devices.)

If you really want to use the PC705V, add another transistor so that the phototransistor does not need to saturate:

PC817 MIDI


The diode protects against ESD. You can use any fast switching diode (Si or Schottky), or leave it out if you want to live dangerously.