Log in
Register

  • The MIDI Messages Forum  Ask and you shall receive

    The MIDI Messages Forum
    Ask and you shall receive

  1. Jane
  2. MIDI Hardware
  3. Wednesday, 08 November 2017
  4.  Subscribe via email
In my current (Arduino) project I have (currently) 3 MIDI INs and 2 MIDI OUTs. However, it would be nice, if I can configure each of the MIDI connectors as IN or OUT by software (Arduino).

The circuits I am using are:

yC8rr.png
(My MIDI Input circuit has a 1N4001 diode(http://www.kynix.com/Detail/902216/1N4001.html) instead of 1N914, and between pin 6 to +5v, a 10 Kohm instead of 220 ohm)

sQIBu.png
(My MIDI Output circuit has a 10 Kohm resistor instead of a 220 ohm resistor)

What I would like is to use the connector show in the above picture as MIDI In OR MIDI out. I have not tried it yet, since I have too many doubts and I do not want to break a component. However, I thought about it (with my limited electronic knowledge), and I think:



  1. Pin 2 afaik for MIDI In, normally has +5V. In the MIDI Input circuit it is not connected, but in the MIDI Output circuit, it is connected to GND. I don't think this is good when being used as MIDI out, resulting in a short circuit (?). So I guess I have to make it +5V when used as MIDI Input and GND when used as MIDI Output (so putting HIGH or LOW 'digital' for Arduino).


  1. Pins 1 and 3 remain in both circuits untouched (so I assume I can do the same).


  1. Pin 4 and 5 is a bit tricky, since they are connected. I think I have to use one or two transistors to create two alternative paths for pins 4 and 5 for MIDI Input and Output. Or can I just setting a specific voltage on pins 4 and 5 when used as MIDI In or Out? (and what would those values be?).


  1. For the MIDI input, an optocoupler is used, while for MIDI output, directly the Arduino is used. I wonder if I have to use for both an optocoupler (since people might connect it 'accidentally' to a MIDI output from a MIDI device.


  1. And also I'm not sure how to handle the RX and TX pins ... for 5 MIDI devices, I would need to use 5 RX and TX pins, but the Arduino (Mega) only has 4 of each. But this is probably a question for the Arduino board.
Attachments (2)
Comment
There are no comments made yet.
Geoff Accepted Answer Pending Moderation
0
Votes
Undo
I have no idea why you would wish to do such a thing. There are a number of complications.

Just to mention a couple, the whole midi set-up is covered by a substantial midi specification, that all suppliers of any sort of midi equipment should follow, to maintain general interconnectability. I assume you still hope to connect to something?

The 'opto-couple' circuit on the midi in is there for a reason. Much midi equipment may be used in 'live' situations, with all sorts of cabling, and voltages, and signals. Much midi equipment is expensive, even VERY expensive. The opto-couple is there to protect the devices, it's not there for fun. I'm not sure an opto-couple would even work on the output. Therefore, the IN should have it, the OUT should not.

Various devices can work together if the OUT of one is connected to the IN of another, and vice versa. If you were to change the IN and OUT of one device, you would need to do the same change to any other devices so that they would be compatible. Any other devices not so changed may NOT now be compatible, or might need cables to be swapped all the time between IN and OUT sockets, which is not helpful.

The circuit diagrams you show hint at other problems, the OUT circuit is shown as being connected to the OUT line of the previous electronics on the unit. The IN circuit is shown as feeding the IN line of it's unit. It may NOT be wise to view the circuit immed adjacent to the connector in total isolation. These circuits may well be similar in various different systems, but they may not be identical, and may not be interchangeable.

You say your device has IN and OUT connectors. I assume that whatever you're connecting to also has IN and OUT. Why not just connect INs and OUTs in the normal way?

Geoff
Comment
There are no comments made yet.
  1. more than a month ago
  2. MIDI Hardware
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.