Arduino Forum

Using Arduino => Audio => Topic started by: yan_g on Apr 03, 2012, 07:19 pm

Title: MIDI connection resistor
Post by: yan_g on Apr 03, 2012, 07:19 pm
Hello,

I have a few questions regarding MIDI out...

Can I replace the 220 ohm resistor in that circuit with a 240 ohm resistor? What is this resistor for?
http://arduino.cc/en/Tutorial/Midi

In this other tutorial, the 5V and ground connections on the MIDI socket are switched. Does this circuit work the same?
http://itp.nyu.edu/physcomp/Labs/MIDIOutput

These questions must sound stupid so please enlighten me! Thanks!
Title: Re: MIDI connection resistor
Post by: pumpy on Apr 03, 2012, 07:53 pm
You might be able to get away with a 240 ohm, but MIDI usually uses 220.
The reason for this is that MIDI is designed to drive Opto Isolators, which are basically an LED and LDR in a chip.
So when that output socket is plugged into some other MIDI equipment, and a signal is sent, the current flows through the circuit, is limited by the resistor and lights the LED inside the Opto Isolator.  Using a different value MAY either cause damage to the Opto or it just won't light and your signal won't pass.

HTH?

P
Title: Re: MIDI connection resistor
Post by: Grumpy_Mike on Apr 04, 2012, 10:09 pm
Quote
Can I replace the 220 ohm resistor in that circuit with a 240 ohm resistor?

Yes no problem.

Quote
In this other tutorial, the 5V and ground connections on the MIDI socket are switched

No they are not it is just that the resistor is in the other side, this does not matter.
Title: Re: MIDI connection resistor
Post by: nickgammon on Apr 07, 2012, 10:19 am

Can I replace the 220 ohm resistor in that circuit with a 240 ohm resistor? What is this resistor for?


Say you buy 5% resistors. The highest a 220 ohm resistor might actually be is 220 * 1.05 = 231 ohms.
The lowest a 240 ohms resistor might be is 240 * 0.95 = 228 ohms.

Therefore it can't be too critical which one you use.