In the question Using a MIDI connector both as MIDI In and Out the advice was to use a CD4053 to make a SPDT switch (multiples). However, I was thinking how it could be done with transistors. Not that I want to 'implement' this, but just out of curiosity if I understand the principle behind it.


I made a schematic (sorry for my handwriting and no app used):


Actually only the upper part (above the orange/white line is of importance).


The idea is to have one single MIDI connector (pins 4 and 5 are used, 3 always to GND).


To select between MIDI In or Out:



  • Signal from Arduino for MIDI In (enabled, HIGH) or MIDI Out (Enabled, LOW)
  • When HIGH, the first and third resistor (from left to right) are getting voltage on their base, meaning a circuit is made from pin 4 and 5 from the MIDI connector, to the pin 4, MIDI In 'functionality' and pin 5, MIDI In 'functionality' (depicted as the round MIDI In circles)
  • Because of the inverter, the second and fourth (from left to right) the transistors will not have voltage on their base, so will not do anything.
  • When LOW, the first and third transistors will have no power on their base, while the second and third have.


Would this circuit work? I know a CD4053 will be much easier, but it's just for trying in the future where I might need only one SPDT and a CD4053 is too much.