Maker Pro
Maker Pro

Next/previous switching a multiplexer

Yes, that's the important factor.

I'm sorry, I don't understand the question. Can you post schematics of the circuits involved?

Sorry, these are ready-built devices which plug into the Atari ST such as this device which plugs into the serial (modem) port, and this device which plugs into the cartridge port (left side of the computer). They both supply additional MIDI IN and OUT ports.I don't have the schematics for them, but I have opened them up as I'm curious to see what's inside. I meant that by accessing the circuitry I could possibly tap into the MIDI ports and get a signal which could be fed to the (standalone) LED pulse stretcher circuit, but assuming there's no built-in MIDI THRU (as with the original ATARI ST circuit we've already looked into) I guess I need to use the THRU version of the pulse stretcher, correct?



You don't need optocouplers unless you need isolation between the 0V rails of the two circuits. Here's how to use the pulse stretchers without isolation, assuming they are powered from the Atari's +5V rail. I've shown the mod for the bottom one; repeat it for the top one.

Ah, yes, I was a bit unsure about that one. So the rule is that you only need an optoisolator whenever a signal is received from another device, and this isn't the case here of course?
Let's see if I've got the schematic right (I've also added the trimpot as in the "THRU version", hoping that's right too, by replacing the RT1/RT11 resistors with the trimmer and 1K protection resistor in series. I've also changed the value of CT1/CT11 from 0.1uF to 330nF as in the THRU version).
And yes, I'll be using the Atari ST power supply to power the LED pulse stretcher circuit.
Atari_MIDI LED v4.png

And here's the standalone circuit on its own, with the trimpot replacement as above:
led_standalone_v12.png



And the trimpot/portection added to the THRU version of the pulse stretcher:
led_v11.png



That looks right to me. There's one change I should at least suggest to you. With the present circuit, if you turn the RT1 trimpot fully anticlockwise, i.e. shortest possible LED blink, it is possible that Q1 could be damaged because there is no resistance to limit the current flowing through it. To avoid this potential problem you can add a small resistance, e.g. 1k, in series with RT1. Drag RT1 down closer to the 0V rail and break the wire from the top end (it's marked "3") of RT1 to the rest of the circuit (Q1 drain, CT1, and the 4070 input) and insert a 1k resistor in the break. That will protect Q1 if the trimpot is ever turned fully anticlockwise.
Good idea!
Here it is again with those modifications:
MIDI input selector v10.png



Are you going to prototype the circuit on a breadboard first? Just wondering.

Actually I recently did buy a couple of breadboards which I haven't used or figured out yet, so that might be a good idea. I've been away from this hobby for years, so time to start again and relearn a lot of things. I also haven't quite figured out the etching stuff, and with limited time on my hands I see this is going to take time, but I'm getting there. The Eagle software is of great help, but with the free version it's limited to small boards and with the 17 MIDI connectors I'll likely exceed that limit. My suggestion is then to build the MUX/LED circuitry on one board, then have the MIDI ports on another board, and since the same circuit is repeated 16 times I could just print out a few pairs to a high resolution image file, then join them together in Photoshop to actually build the entire 16 IN + 1 OUT board. Will there be a problem with signal loss/degrading if I attach the two boards together with connectors/thin wires as opposed to just having one huge board with everything attached using circuit traces? Obviously the wire lengths won't be more than a few cm.
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Sorry, these are ready-built devices which plug into the Atari ST such as this device which plugs into the serial (modem) port, and this device which plugs into the cartridge port (left side of the computer). They both supply additional MIDI IN and OUT ports.I don't have the schematics for them, but I have opened them up as I'm curious to see what's inside. I meant that by accessing the circuitry I could possibly tap into the MIDI ports and get a signal which could be fed to the (standalone) LED pulse stretcher circuit, but assuming there's no built-in MIDI THRU (as with the original ATARI ST circuit we've already looked into) I guess I need to use the THRU version of the pulse stretcher, correct?
You should be able to drive a pulse stretcher from the output of the receive optocoupler in the MIDI IN circuit. Power the pulse stretcher from the 5V rail in the accessory.
Ah, yes, I was a bit unsure about that one. So the rule is that you only need an optoisolator whenever a signal is received from another device, and this isn't the case here of course?
You only need an optocoupler if you need to maintain isolation between the circuitry in the MIDI transmitter and the circuitry in the MIDI receiver. When MIDI data is transferred through the standard 5-pin DIN sockets, this is a general assumption, because the sender and receiver are normally completely separate units, and connecting them together electrically will cause a "ground loop" which can cause hum to be superimposed on the audio signal, in cases where audio is used (e.g. the output of a synthesizer with a keyboard, or a MIDI synthesizer without a keyboard).
Let's see if I've got the schematic right (I've also added the trimpot as in the "THRU version", hoping that's right too, by replacing the RT1/RT11 resistors with the trimmer and 1K protection resistor in series. I've also changed the value of CT1/CT11 from 0.1uF to 330nF as in the THRU version).
Yes! All those schematics look exactly right.
Actually I recently did buy a couple of breadboards which I haven't used or figured out yet, so that might be a good idea.
Yes, I think it would be worthwhile. I don't foresee any problems with that design... but then, problems are generally unforeseen, right? :)
I also haven't quite figured out the etching stuff, and with limited time on my hands I see this is going to take time, but I'm getting there. The Eagle software is of great help, but with the free version it's limited to small boards and with the 17 MIDI connectors I'll likely exceed that limit. My suggestion is then to build the MUX/LED circuitry on one board, then have the MIDI ports on another board, and since the same circuit is repeated 16 times I could just print out a few pairs to a high resolution image file, then join them together in Photoshop to actually build the entire 16 IN + 1 OUT board.
Good idea.
Will there be a problem with signal loss/degrading if I attach the two boards together with connectors/thin wires as opposed to just having one huge board with everything attached using circuit traces? Obviously the wire lengths won't be more than a few cm.
No, that shouldn't be a problem. But I like the idea of breaking the layout into blocks, designing each block as a separate PCB, then merging them all using an image editor.
 
Excellent! :D
With the aid of all your help (and patience!) it looks like I'm done. All that's left is the actual building of the device which is the easy part compared to this :)
Yes, I think I'll use the breadboard for this, in case of unforeseen problems ;)

You should be able to drive a pulse stretcher from the output of the receive optocoupler in the MIDI IN circuit. Power the pulse stretcher from the 5V rail in the accessory.
But only for IN ports, right? To conclude: I can attach the "standalone" LED pulse-stretcher (the topmost schematic in post #41 entitled "Atari MIDI LED v4") to any MIDI IN port (those computer add-on devices as well as its native IN port) because any IN port has an opto-isolator which generates the digital signal an LED can be driven from but not to MIDI OUT ports because there's no opto-isolator in place, hence no suitable signal available to feed the LED circuit. So for any OUT port I need to use the opto-isolator LED pulse-stretcher circuit instead. Have I finally got it? :confused:
 

KrisBlueNZ

Sadly passed away in 2015
The pulse stretcher circuit takes its input from a logic-level signal that is referenced to the 0V and +5V rail from which the pulse stretcher is powered. This signal can come from (a) the output of an optocoupler in a MIDI IN circuit, or (b) a logic-level signal elsewhere on the board, such as the output of a gate that drives a MIDI OUT or MIDI THRU connector (as long as you can get the signal before it goes through the 220 ohm resistor). This signal must be active low; in other words, it must be normally high (at +5V) and must go low (0V) during the start bits and 0-bits in the MIDI data stream. This is true in cases (a) and (b).

A MIDI IN circuit uses an optocoupler to provide electrical isolation between the circuitry in the MIDI transmitter device and the circuitry in the MIDI receiver device. This is needed to avoid "earth loops" (which can cause hum in situations where audio signals are being passed between separate pieces of equipment) and possible problems due to voltage differences between those circuits. Every standard MIDI input on a 5-pin DIN socket is optoisolated using an optocoupler. MIDI transmitters are not isolated. Isolation is only needed at one end of the MIDI cable.

A MIDI OUT circuit is non-isolated. A logic gate (or sometimes a transistor) drives pin 5 of the DIN socket through a 220 ohm resistor, and there is another 220 ohm resistor from pin 4 of the DIN socket to the +5V rail of the logic circuitry. This produces a voltage between pins 4 and 5 during the time that the logic gate output is low or the transistor is ON (which corresponds to start bits and 0-bits in the MIDI data stream), which causes current to flow through the LED in the optocoupler in the MIDI receiver, which causes the optocoupler's output to go low, duplicating the MIDI data stream while providing the required electrical isolation. A single MIDI OUT connector can be connected to only one MIDI IN receiver according to the MIDI standard and for reliable operation.

Once a MIDI data stream is a logic-level signal, it can be fed to two or more different circuits. For example in your multiplexer circuit, the output of the optocoupler in each MIDI IN circuit feeds a pulse stretcher for visual indication, and also feeds the multiplexer, where it may be disconnected (if that input is not selected) or may feed to some gates that drive the MIDI OUT connector of the multiplexer.
 
Thanks for explaining. I'm guessing a logic analyser would be the right tool to actually detect those high/low digital pulses. When I get the time I'll look into those expansion devices. I assume they're pretty standard MIDI ports though.
 
Top