CASIO TB-1 Inspired MIDI THRU
by baritonomarchetto in Circuits > Audio
976 Views, 6 Favorites, 0 Comments
CASIO TB-1 Inspired MIDI THRU
The CASIO TB-1 is a 2 MIDI-IN to 8 MIDI-THRU box from 1985. The Company was working seriously in the musical devices sector in that period (the CZ series of synths with their Phase Distortion Technology, the RZ-1 drum machine, just to cite a few) and, needless to say, they came out with a "white fly" in the category.
In this instructable I will show you my reinterpretation of this device :)
I will also share with you my first experience in the SMT board design and commissioned assembly service :)
MIDI THRU: What and Why
First thing first: What a MIDI THRU Box is? A MIDI THRU box is a device capable of receiveing MIDI data streams and duplicate them by "n", with "n" the number of outputs. If you try to send a MIDI OUT data to more than one device directly, the signal will degrade and soon will loose it's information. A MIDI THRU box keeps the signal "alive" and "the same" for all connected MIDI devices.
How can a THRU Box be used? Consider you have more than one MIDI instrument (synthesizer, drum machine, rack effect...), that you want to syncronize and automate: how could you send them MIDI messages from your single DAW's MIDI OUT at the same time? The answer is simple: with a MIDI THRU box! See attached picture for a basic MIDI setup.
MIDI THRU boxes are produced since the advent of MIDI, and features-full devices are available today. These features range from the "mere" MIDI message duplication, to the filtering of incoming MIDI messages, input/output programming (patchbaying), merging, and so on.
The more the feature list, the best the device! Or not... This is not always the case. In my opinion it is not with a MIDI THRU Box, at least. Why? Because in music timing is essential and advanced features such as filtering, merging, programming etc. call for microcontrollers... and these inevitably add latency to a serial message.
So, are these microcontroller-based, feature-rich boxes trash? Absolutely they are not! They could be good enought for your application and you could not even sense the latency they introduce.
CASIO TB-1 Features
Here is a brief, random, list of the main CASIO's THRU Box features:
- Number of ports: 2 INs, 8 THRUs
- Inputs, outputs and power jack are on the same side
- MIDI THRUs can be freely assigned to any of the two inputs via dedicated switches
- Runs on batteries (6 x AA) or 9 volt AC adaptor
The first most important feature I wanted to reproduce was the relatively high number of THRU ports. Actually, there are THRU boxes with a number of outputs from 4 to 24 (as far as I know) and 8 sounds wise for a little studio.
The possibility to freely route MIDI messages from one of the two inputs to any of the THRU ports via individual switches is probably the most distinctive feature of the device. There have never been (in my knowledge) other THRU boxes with such a feature. This makes it similar to a MIDI patchbay, but without the aforementioned limits of microcontroller-based devices.
Notice MIDI messages entering the two inputs are not merged together! CASIO TB-1 is not a midi merger but a (one of a kind*) type of MIDI THRU.
*Yamaha made something similar to the CASIO TB-1: the YME8 MIDI EXPANDER. That product had only two switches tough, so routing capabilities were limited to 1 IN - 8 OUT (the other one being disabled) or 2 IN - 4 OUT each.
Design Choices and Features
As said, I wanted to keep the number of THRUs at a minimum level of "eight" (ended up with ten!). Such an extended number of MIDI THRU ports calls for a larger number of boundary components. This made me think that the best approach would be to rely on Surface Mount Devices (SMDs). This was the first time for me (I am used to THT - Through Hole Technology - parts, easier to handle and socket mountable) but given the fact that it's nowadays possibile to have PCBs not only manufactured but also assembled at low cost, made me feel more confident.
My intention was to develop a THRU box for studio use, not for gigging. This made me left out the possibility to run on batteries. Also, being that such circuit can be layed down with logic circuits only, I preferred to rely on a regulated +5V dc power adapter instead of the +9V dc the original TB-1 had. This averall made the box more efficient from a power consumption point of view (remember: those 4(V) * current(A) would be dissipated as heat) and left more PCB space free because of the lack of the onboard power regulation circuit.
One geometrical feature the TB-1 had was having all the MIDI connectors on the same side. Ten MIDI DIN connectors (twelve in the final design, see later) on the same side would call for a very long PCB. Considering that I wanted to realize a stand alone PCB (no box), such an elongated aspect ratio would lead to an unstable device that could topple over. I then preferred to place MIDI connectors on both sides, similarly to what Yamaha did with the YME8 MIDI THRU box.
I also wanted to add a feature not seen in any other MIDI THRU: the possibility to route both MIDI IN messages to all outputs at the same time. Sort of merging, but without the use of a microcontroller (remember the lag issue I pointed out before?).
Why no-one has made it before? Well likely because it's a feature you must use with a grain of salt. This "merging" would work with non-simultaneous MIDI messages only. In the case of simultaneous transmission, the resulting output would be corrupted and not interpretable by the receiving device. This could not be a big trouble if only trigger-in-nature MIDI messages are sent (i.e. MIDI note-on and MIDI note-off), but what if a continuous and high frequency MIDI message like clock enters the MIDI THRU circuit with the merge feature engaged? Any MIDI data stream would be corrupted... MIDI clock included!
Why did you include this feature then? I can see some use for it. In example, if you have two MIDI devices you frequently use to record MIDI events in your DAW (master clock) and you want to be able to record with both of them (alternatively) without connecting and disconnecting MIDI cables or sliding the TB-10 MIDI input select switch every time you move from one to the other, this would definitely come handy. These MIDI devices could be, but are not limited to, a master keyboard and a drum pad, or two master keyboards with different action.
This is why I called this mode of operation "Raw Merge" and must be used with a grain of salt when engaged via the dedicated switch :)
Please notice that when this feature is engaged, "merged" MIDI messages will be sent to all MIDI connectors despite the position of the source selector switch.
TB-10 Circuit
Attached is a simplified (but very representative!) schematization of the project circuit. The circuit is based on digital logic components only (no microcontrollers).
The design is very simple and often adopted in DIY projects. Also "serious" manufacturers used such a circuit, as suggested by the MIDI association in their "MIDI 1.0 Detailed Specification" paper.
Incoming MIDI messages are isolated via an opto isolator to avoid ground loops between instruments. Commonly 6N137 or 6N138 optocouplers are used. For this particular project I opted for a dual channel high-speed logic gate output optocoupler (HCPL2630) because I had two MIDI inputs to handle and this IC hosts two optos in the same package.
By connecting the MIDI signal that comes out of the optocouplers directly to your THRUs would reasult in a loss of signal after a few connections, so it's necessary to add a buffer IC to the circuit. I used two 74HCT14D Hex Inverting Schmitt Trigger in SOIC-14 pakage. This made possible to have a total of 10 (ten!), clean, MIDI THRUs.
The circuit, in a nutshell, can be reassumed this way:
- MIDI signals from the two optocouplers are routed to two trigger inputs of the first 74HCT14 for buffering
- Trigger outs are then sent to a SPDT (Single Pole Double Throw) switch
- The switch has the common pin connected to a further (final) trigger input
- Final trigger out is sent to a MIDI socket
- Repeat from point #2 for another 9 switches!
By sliding the switch you can set which incoming MIDI message (from input A or from input B) is sent to the specific THRU connector.
Notice that it was possible to limit the number of THRUs to eight and add two LEDs to give a feedback about MIDI activity, still avoiding interferences on THRU lines. I preferred to have two more THRUs and no MIDI activity feedback.
About the "Raw Merge" feature: integrated circuit's outputs (analog or digital) cannot be shorted otherwise the IC will be damaged. Choosing an open drain (OD) IC would be a solution, but this is not the case with 74HCT14 (push-pull). MIDI data streams from the two inputs are mixed with an SMD OR gate in a (very convenient) single package.
Assembly: SMDs, Here We Come!
This project uses mostly surface mount devices, with the exception of MIDI DIN-5 connectors. This was my first experience with an SMD design and I have to admit that, because of my lack of confidence, I revisited this decision more than once before "pulling the trigger".
I gave JLCPCB SMT assembly service a try and I must say that having everything ready was easier than I thought. It's inevitably more articulated than dealing with THT parts only (you have to upload not only your zipped Gerber files, but also BOM and CPL files, select the components between those available and make some accurate visual checking before being done), but with the help of THESE instructions and the online submission form everything went smooth and well.
I took some notes about the "criticalities" I found during this first experience with SMD assembly. I also noted solutions, for my (and your) future use:
- If you are running on an old PCB design software version, use the correct exporter file. I had to use "jlcpcb_smta_exporter_v7.ulp" instead of "jlcpcb_smta_exporter.ulp" for the CPL and BOM files generation.
- Parts without a value could be left out by the ULP, depending on your choice. Be sure to uncheck "skip parts with missing values" if present.
- Components selection is kept in memory and next time your choices will be used automatically. This speeds up the whole process, especially when a board's layout last-second update forces you to re-upload all the files.
- After the Gerber, BOM and CPL files are uploaded, a representation of the board will be displayed for a first components positions check. It is possible that some IC has the wrong orientation and is a little misplaced at this time (see attached picture, left board). No problem! JLCPCB engineers review and take care of components positions and orientations for you before the assembly! Continue with your order: they will contact you before assembly if criticalities in components placement and orientation are present.
- The board representation screen is a good place to check for missing components (see also point #2 of this list). Carefully go though all the board, be sure that all components are there (no matter their exact position and orientation, as said) and go back if something is missing.
- Components selection is the most important (and funniest, in my opinion) phase. If the automatic selected part is not available or in inventory shortage, do not desperate! Use a more generic term in the part research field. In example: use 74HC14 instead of CD74HC14M and more options will be at your disposal.
Throughout the entire assembly planning process of your device, you never have the feeling of being left alone... a very nice sensation!
Acknowledgments
PCB manufacturing and SMT assembly of this project was sponsored by JLCPB, a high-tech manufacturer specialized in the production of high-reliable and cost-effective PCBs.
Their customer service is very good and PCBs a great value for your money!
In this very specific order I made a mistake (a wrong placed silkscreen word on top place layer, nothing critical). I wrote in the online chat and the support agent immediately cancelled my order and gave me a full refound. This took more or less 5 minutes overall. The order was already appoved, the board revised and corrected, but they cancelled the order for me in no time anyway. This is an example of what I call a good customer service!
By registering at JLCPCB via THIS LINK (affiliated link) you will receive a set of coupons for your orders.
Registering costs nothing, so it could be a nice way to give their service a due try ;)