elkayem / midi2cv

Arduino-based MIDI to CV converter
GNU General Public License v3.0
396 stars 67 forks source link

Don't wire MIDI pin 2 to ground #18

Open allisonkarlitskaya opened 1 year ago

allisonkarlitskaya commented 1 year ago

The current version of the schematic shows pin 2 of the MIDI input wired to ground. This violates the intended principle of galvanic isolation and can cause ground loops, since the "MIDI out" port of the connected device will connect this pin through to ground on its side. If both devices are connected to mains ground, the loop results.

See https://en.wikipedia.org/wiki/MIDI#Electrical_specifications (with included schematic):

The MIDI specification provides for a ground "wire" and a braid or foil shield, connected on pin 2, protecting the two signal-carrying conductors on pins 4 and 5. Although the MIDI cable is supposed to connect pin 2 and the braid or foil shield to chassis ground, it should do so only at the MIDI out port; the MIDI in port should leave pin 2 unconnected and isolated. Some large manufacturers of MIDI devices use modified MIDI in-only DIN 5-pin sockets with the metallic conductors intentionally omitted at pin positions 1, 2, and 3 so that the maximum voltage isolation is obtained.

The original MIDI specification itself does offer an "optional" 0.1µF capacitor on the receiving side "to improve RF grounding", but otherwise also specifies no connection:

https://web.archive.org/web/20151222120442/http://www.midi.org/techspecs/ca33.pdf

In any case, a direct connection to ground is definitely problematic.

bespokecomp commented 7 months ago

Hi. I built a circuit very closely based on this. I tried with ground connection on the midi input and can't get my device to convert midi to CV. I disconnected ground on the midi input and still I can't get it to work. any ideas or tips that could help? Many thanks

htor commented 2 months ago

Good information, thanks! I left the MIDI GND disconnected on my unit. Works fine.