6n138 Before and After
For my MIDI projects I've use been using 6n138 optocouplers. So far they have all been 5 Volt designs, and the standard schematic with a 270 ohm pullup from the output (pin 6) to Vcc works fine.
However my FPGA synth is 3.3V, and I noticed that I've been losing MIDI data and getting UART framing errors. I looked at in the scope and YIKES it looks terrible (top picture) .
I saw this link:
and tried a 4.7K from VB (pin 7) to ground and it looks so much better (bottom picture).
For this test I modified one of my MIDI-IR's to be a signal generator.