3
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ Welcome to EE.SE! Please draw a schematic of what you are proposing. \$\endgroup\$ – winny Mar 12 at 23:01
  • \$\begingroup\$ defne I/O specs for signal acceptance critieria and issue. \$\endgroup\$ – Sunnyskyguy EE75 Mar 12 at 23:04
  • \$\begingroup\$ It's just overkill. As for your rise and fall times, you can actually search by rise and fall time on digi-key, so you can get an optoisolator that's overkill in that regard too, with nanosecond response times. \$\endgroup\$ – Hearth Mar 13 at 1:14
  • \$\begingroup\$ normally one defines a bit rate needed not the peak voltage margin for bit rate. Darlingtons are higher V but slow. and there are TTL or CMOS outputs that are faster than what you specify, which is TBD at the moment \$\endgroup\$ – Sunnyskyguy EE75 Mar 13 at 6:21
4
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ My first attempt with the PC705V didn't work, nothing happening when playing notes from keyboard (I tried to make a led blink and to Serial.write in console). Thanks for your answer, I will try that. Although I don't have a BC547 (I should have bought a real starter kit) so I'll check what I can unsolder that looks similar. \$\endgroup\$ – mikmikmik Mar 13 at 11:33
  • \$\begingroup\$ You can use any random small-signal transistor for this. \$\endgroup\$ – CL. Mar 13 at 12:56
  • \$\begingroup\$ I didn't find any transistor for now, it looked like it but it was actually diodes and a MC79L05ACP (Negative Voltage Regulator). Also I realized the soldering I did on the diode was not good because it didn't pass the LED test. \$\endgroup\$ – mikmikmik Mar 14 at 16:26
  • \$\begingroup\$ Now (without the extra transistor you advised) the first LED test is working but the second doesn't. Is that normal? Even if it's too slow, shouldn't it at least light a LED? I use the same resistors as in the first schematics, maybe the 10K is too much, why on yours it's 1K on VCC and Ground? I need to understand that a bit better, I'll do my research. \$\endgroup\$ – mikmikmik Mar 14 at 16:34
  • \$\begingroup\$ The schematic in the question is designed for the 6N138; this one is designed for a phototransistor optocoupler with a CTR of at least 50%. \$\endgroup\$ – CL. Mar 14 at 17:51
2
\$\begingroup\$

The MIDI DIN electrical standard is available for free at https://www.midi.org/specifications-old/item/midi-din-electrical-specification

With respect to the isolater, the standard says:

Sharp PC-900V and HP 6N138 opto-isolators have been found acceptable. Other high-speed opto-isolators may be satisfactory. The receiver must require less than 5 mA to turn on. Rise and fall times should be less than 2 microseconds.

So long as you meet this requirement, you're good to go. Every other electronic aspect of the hardware is in this document.

\$\endgroup\$

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.