Connect with us

MIDI question

Discussion in 'Electronic Design' started by [email protected], Jan 5, 2005.

Scroll to continue with content
  1. Guest

    Hello. I'm building a MIDI interface...

    ....and I'm planning on using off-the-shelf Radio Shack components to
    build my own opto-isolator. Does anyone know of any reason why I
    should not?
  2. You will certainly learn more by creating your own parts.
    But what you learn may be that you should have bought the specified
    to start with. ;-)

    What Radio Shack components do you intend to try as substitutes?
    You can make a pretty fair opto isolator with the emitter and detector
    pair from an old mouse. Getting them well coupled is half the battle.
  3. Ken Taylor

    Ken Taylor Guest

    Why would you do that? Radioshack sell a perfectly adequate TLP620, which
    will at least have known characteristics. Unless of course the object of
    your exercise is to learn about making optocouplers rather than MIDI


  4. Bob Eldred

    Bob Eldred Guest

    An opto-isolator costs about a buck. How much time and effort are you going
    to expend to save a buck? For midi you need to pay attention to a couple of
    things: First, the isolator has to operate on 5mA, many are not reliable
    with that low current. Secondly you have to insure an adequate rise and fall
    time for the 31Kb/s signal. Many are too slow and will round the waveform
    especially at low current. A part often used for midi is the 6N138. It has
    the right parameters and is cheap.
  5. It's been years since I've seen any MIDI construction articles, but
    back then they all tended to specify a specific opto-isolator, with
    comments about how it needed certain specs to match the MIDI specs.

    I have no idea how critical it was, and indeed there were construction
    articles that used average opto-isolators.

    But in reading the original post, I just assumed he was talking not
    of building an opto-isolator, but in using whatever Radio Shack still
    stocked rather than tracking down the one that was commonly specified.

  6. See

    I built that MIDI pipe organ about 15 years ago. I used 6N137s for the
    isolators. I guarantee you'll have your hands full sorting out all the
    MIDI stuff without having to putz around with possible faults from a
    poor opto-isolator
  7. Ken Taylor

    Ken Taylor Guest

    That makes more sense. Sorry, a dim day. Still in New Year's mode (usually
    only lasts till October......)

  8. But in reading the original post, I just assumed he was talking not
    The reason the 6N138 was commonly preferred was that the
    cheaper alternatives were too slow to do MIDI. If you make
    your own, make sure it's fast enough.
  9. Guest

    Hello again, fellows.

    John, the specified parts are no longer available. Radio Shack sells a
    "Matched Infrared Emitter and Phototransistor Detector" pair for $3.29,
    Catalog #: 276-142, and this is what I will be using. I found out
    firsthand about the IR pairs in my mouse about a year ago, when I
    dropped my mouse one too many times, and it finally broke. When I
    opened it up, to see if I could fix it, and I found two IR pairs, one
    for each axis. I never did fix that mouse, so I still have those
    components, and the main advantage I see in using them would be that
    the LED's are so tiny that there seems to be little doubt that I could
    drive them from my computer's JOYSTICK/MIDI port, which is where my box
    will be hooked up. The reason why I have decided to work with the
    larger components is simply because they will be easier to handle. :)
  10. Guest

    Hello, Ken.

    Radio Shack no longer sells the TLP620
  11. Guest

    Hello, Michael.

    Ken was right in the sense that I am planning on building my own
    opto-isolator. Forrest Mims shows how to do this in his "Engineer's
    Mini-Notebook" entitled "Optoelectronics Circuits", which is no longer
    available. Mims suggests using heat shrink tubing, though I myself
    prefer several layers of electrical tape. I've made dozens of them
    before, and they always worked just fine.
  12. Guest

    Hello, Glenn.

    I confess to being awestruck by your organ project. I have thought
    about doing something similar myself, though I don't yet have the
    resources. I've had my music keyboard hooked up to my computer for
    about two weeks now, which is nice, because now when I play midi files,
    I use my computer as a music keyboard controller, and since my music
    keyboard is also hooked up to a little ten watt amplifier, I get a
    better sound than I used to when using my computer speakers. Even so,
    there is nothing like the sound of a genuine acoustical instrument, and
    your organ is really beautiful.
  13. You can get a 6N138 from Mouser or Digikey for < $1.00 one-off.

    Best regards,
    Spehro Pefhany
  14. Rich Grise

    Rich Grise Guest

    If you have a budget of $25.00 or more, you can get practically anything
    you need from Mouser, . If you have a DBA, you can
    go request information from and a salesman will
    call, and open a credit account for you. ;-)

    Good Luck!
  15. Hello, Clifford.

    Though there is little doubt in my mind that I could probably drive my
    homebrewed opto-isolator to more than twenty times the bits-per-second
    speed which is required by the MIDI specification, an opto-isolator is,
    of course, an analog device, and so it will be necessary for me to
    convert its analog output into a digital signal before that signal will
    then be "fast enough" for me to be able use it. Evidently, the Sharp
    PC-900 opto-isolator which is in the MIDI specification had its own
    on-chip Schmitt trigger to accomplish this purpose. The Schmitt
    trigger is a simple circuit which I will be able to build from locally
    purchased discrete components, and so there is no reason why my
    homebrewed opto-isolator should not be just as good as the one which is
    shown in the specification.
  16. Digikey still has them for $0.72.

    There are also many other units they sell that are equal or better.
  17. Hello, Bob.

    The main reason why I will be building my own opto-isolator, rather
    than sending away for one, is because I would rather not wait for
    shipping. You have said that the isolator has to operate on five
    milliamps. Can you give me a reference for this? I will build a
    driver, if I need to. I still don't see any problem. The Sharp 6N138
    doesn't seem to have the right parameters. According to Digikey, it is
    supposed to operate on one-and-one-half volts. And none of the 6N138's
    that I have seen have a Schmitt trigger. Mine should be faster.
  18. If I was building one, I'd use whatever opto-isolator I could easily get
    before I'd start messing with making one. That scrap computer power supply
    lying on the sidewalk should offer up an opto-isolator, as would that scrap
    modem that nobody wants because it's 1200baud. They may not be the best
    choice for the fast rate of MIDI, but I suspect they'd work better than
    someone making an opto-isolator.

  19. Well, after doing a little searching on the internet, I discovered that
    a two-lead phototransistor is not as fast as I thought it was.
    Evidently, it takes about ten microseconds to turn off. This still
    gives me plenty of margin. Just not as much as I thought I had.
  20. Ten microseconds is one-third of a bit time. I'd hardly call that
    plenty. Just go and buy a 6N138 and stop bugging us with your crazy
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day