5-Pin MIDI DIN Cable: Two Pins Do the Work
Quick answer / TL;DR: Short answer: a 5-pin MIDI DIN cable carries a 31.25 kbaud current loop on pins 4 and 5, with pin 2 as shield and pins 1 and 3 unused. Maximum reliable length is about 15 metres. All five pins are wired straight through, and a cable that swaps pins 4 and 5 will not work.
Four audio lines: balanced XLR, TRS, unbalanced RCA, and speaker cable.A 5-pin DIN connector has five pins and MIDI uses two of them. Pins 4 and 5 carry a 5 mA current loop, pin 2 is the shield, and pins 1 and 3 are unused. That is the entire electrical specification, and it has not changed since 1983.
The simplicity is why MIDI cables are cheap and reliable, and also why so many substitutes exist. A 3.5 mm TRS jack can carry the same signal, but the pin mapping is not standardised, so a TRS-to-DIN adapter from one vendor may not work with another vendor's device.
The Pinout
| Pin | Function | Notes |
|---|
| 1 | not connected | reserved |
| 2 | shield | connected at both ends in most cables |
| 3 | not connected | reserved |
| 4 | current source | 5 mA loop, positive |
| 5 | current sink | 5 mA loop, return |
The DIN connector's numbering is not sequential around the ring. Looking at the pins on the plug, they are arranged in a 180 degree arc with pin 1 at the left, pin 2 at the bottom centre, pin 3 at the right, and pins 4 and 5 at the top. Getting this wrong when repairing a cable is a common cause of a cable that fits but does not work.
Why the Current Loop
A current loop is immune to voltage drops along the cable, because the receiver detects current rather than voltage. That is why MIDI works over 15 metres of unshielded cable without difficulty, and why the receiver's optocoupler provides galvanic isolation between devices.
The isolation matters in a rack of synths on different power circuits. Without it, the shield would provide a ground path and the audio outputs would hum. The optocoupler breaks that path while still transferring the signal.
Cable Length and Quality
The specification assumes a cable with less than 15 metres of length and about 50 picofarads per metre of capacitance. Longer cables round off the current transitions and cause framing errors, which appear as stuck notes or dropped messages rather than as a clean failure.
- Under 5 m: no practical concerns
- 5 to 15 m: within specification, works reliably
- Over 15 m: framing errors likely, use a MIDI thru box instead
- Shielded cable: preferred for long runs near power cables
- Unshielded: acceptable for short patch runs
A MIDI thru box regenerates the signal rather than passing it through, so it resets the 15 metre budget. Chaining three devices with thru ports also regenerates at each stage, but each hop adds a small delay.
The TRS Adapter Trap
Several vendors use 3.5 mm TRS jacks for MIDI on small devices. Two competing pin mappings exist, usually called Type A and Type B, and they are not compatible. Type A puts pin 5 on the tip; Type B puts pin 4 on the tip. A Type A adapter on a Type B device produces silence or stuck notes.
The MIDI Manufacturers Association adopted Type A as the recommended mapping, but equipment built before that decision may use Type B. Check the device's documentation rather than assuming.
Real-World Applications
Keyboard to sound module
One cable from the keyboard's MIDI out to the module's MIDI in. Both ends are labelled from the device perspective, so out goes to in. Reversing them is the most common setup error.
Daisy chain through thru ports
Keyboard out to device one in, device one thru to device two in. Each thru regenerates the signal, so three devices on one chain is fine and five is pushing the timing.
Rack with a patch bay
Short 0.5 metre cables from the patch bay to each device, with longer runs from the controller. Label both ends, because a rack of identical black cables is impossible to trace.
Live stage run of 12 metres
Within specification, but route away from mains and dimmer cables. If the run must cross a power bundle, use a shielded cable and test for stuck notes under full lighting load.
Related reading: USB MIDI interface cables — blogs/news/usb-midi-interface-cable
Related reading: XLR connector types — blogs/news/xlr-connector-types
Related reading: 3.5 mm to XLR wiring — blogs/news/3-5mm-to-xlr-cable
Standards and Verification
MIDI 1.0 is published by the MIDI Manufacturers Association and adopted as RP-001. The electrical specification defines the 5 mA current loop, the 31.25 kbaud rate with 1 percent tolerance, and the opto-isolation requirement at the receiver.
The DIN connector itself is defined in IEC 60130-9, which covers the 180 degree five-pin variant used here. That is why a MIDI cable will physically fit some older audio equipment that used the same connector for other purposes.
Verification: send a note and confirm the receiving device responds. If nothing happens, swap the cable direction, since out must go to in. If messages arrive but notes stick, the cable is likely too long or the shield is broken, and a shorter cable confirms it.
Frequently Asked Questions
Which pins carry MIDI?
Pins 4 and 5, with pin 2 as shield. Pins 1 and 3 are unused.
What is the maximum length?
About 15 metres. Beyond that, use a thru box to regenerate the signal.
Will any 5-pin DIN cable work?
Only if all five pins are wired straight through. Some DIN cables are wired for other equipment and will not pass MIDI.
What is the difference between Type A and Type B TRS MIDI?
The pin mapping on the 3.5 mm jack. Type A puts pin 5 on the tip, Type B puts pin 4 there. They are incompatible.
Why do notes stick?
Usually a cable that is too long, a broken shield, or a device that is not sending note-off messages. Test with a short cable first.
Sourcing cables for a project, a store, or a private-label line? Contact our B2B sales team for specifications, certification evidence, and volume terms – FOB and CIF options available. Request a quote or sample.