[sdiy] MIDI specifications round 2

Neil Johnson nej22 at hermes.cam.ac.uk
Fri Apr 18 12:05:44 CEST 2003


Scott Bernardi wrote:
> I may be wrong, but I though current loops used 4mA as the "zero" point,
> giving a range of 20mA-4mA = 16mA for full scale. 0mA would indicate a
> break in the line.

Well, I think you mean the current loop specified for industrial
instrumentation, which has the 20mA/4mA signalling as you rightly
describe.

MIDI is also current loop, but with different specs.  The basic
requirement is that you pass enough current to turn on an LED in the
receiver, and no current otherwise.

A loss of connection is dealt with at a higher level, usually by "Active
Sense" messages.

Here's the basic circuit in ASCII art:

                                   Opto-isolator                  +5V
         220R                  .....................               |
  o-----\/\/\/-------+--------(A)---+          +--(C)--+--\/\/\/---+
                     |         :    |          |   :   |
          Reverse  --+--       :  -----      |/    :   |
          Protect   / \        :  \   / ->   |     :   +----------> MIDI
          Diode    /   \       :   \ /  ->   |\    :
                   --+--       :  --+--        |   :
                     |         :    |          |   :
  o------------------+--------(K)---+          +--(E)----+
                               '''''''''''''''''''''     |
                                                       /////

As Magnus has already described, the usual output stage is some
open-collector-type driver (TTL inverter or transistor) with a 220R
resistor to the MIDI socket, and a 220R resistor between the other MIDI
pin and +5V.  Assuming 1.7V drop across the opto-LED, we will have about
5mA flowing when the LED is "on" (3.3V, 660R, negligible drop across the
saturated output transistor).

Neil

--
Neil Johnson :: Computer Laboratory :: University of Cambridge ::
http://www.njohnson.co.uk          http://www.cl.cam.ac.uk/~nej22
----  IEE Cambridge Branch: http://www.iee-cambridge.org.uk  ----



More information about the Synth-diy mailing list