MIDI: DIN & TRS

handeyeco

Member
Hello! I'm using a Teensy 4.1 and I'm going to add MIDI in/out (both DIN and TRS). I'm copying the schematic from MIDI Library page.

Couple of things:
1. The schematic shows pin 8 of the 6N138 being attached to Teensy's VIN and it's labeled as 5V. Just as a learning opportunity: that's because the 6N138 operates better at 5v?
2. And VIN is labeled as 5V because that's what USB provides?
3. And MIDI itself works for both 3.3V or 5V?
4. Are the two 3.3V pins on the Teensy 4.1 the same?
5. Is it less performant to use decoupled TX/RX pairs? Like I'm planning on using RX5, TX3, RX4, TX8 (just for the sake of using pins closer to the physical socket); will I take a hit compared to using something like RX2, TX2, RX3, TX3.

Does this schematic generally look right?
- DIN_MIDI_IN: pin 21 (RX5)
- TRS_MIDI_IN: pin 16 (RX4)
- DIN_MIDI_OUT: pin 14 (TX3)
- TRS_MIDI_OUT: pin 35 (TX8)
- +3.3V: 3.3V
- +5V: Vin
- GND: GND

Screen Shot 2023-12-24 at 4.13.14 PM.png
 
Last edited:
1. The schematic shows pin 8 of the 6N138 being attached to Teensy's VIN and it's labeled as 5V. Just as a learning opportunity: that's because the 6N138 operates better at 5v?
I checked 6N138 datasheets of 3 different vendors, and all specify the parameters at 4.5V/5V. No mentioning whether this part will run OK at 3V3.
2. And VIN is labeled as 5V because that's what USB provides?
Yes.
3. And MIDI itself works for both 3.3V or 5V?
MIDI uses current for signaling rather than voltage, you could say it's a 5mA current loop.
4. Are the two 3.3V pins on the Teensy 4.1 the same?
Yes.
5. Is it less performant to use decoupled TX/RX pairs? Like I'm planning on using RX5, TX3, RX4, TX8 (just for the sake of using pins closer to the physical socket); will I take a hit compared to using something like RX2, TX2, RX3, TX3.
I'm not sure whether the MIDI library accepts RX/TX pairs to be split over different Serial? channels.
Does this schematic generally look right?
Yes.

Hope this helps,
Paul
 
Thank you! I ended up using RX/TX pairs; I agree that the MIDI library didn't seem like it wanted them split. Everything else makes sense to me except the current loop thing; I'll have to research that further for my own understanding.

I appreciate you taking the time, thank you.
 
This schematic works for me, although adding a 4.7k-10k resistor to ground from pin 7 (based on this suggestion) seems to improve the rise time of the output signal.

without the resistor:
SDS00085.png

with the resistor:
SDS00086.png
 
Back
Top