The board construction didn’t take long, only about 15 minutes. Piece of cake…
The four wires coming off of the board are for +5V, GND, Rx and Tx. Here it is connected to the Arduino Mega.
The bonus for me is that, by attaching the +5V and GND to the bus strips on the breadboard, it gives me some extra connections for those, which I will probably need before the end of this project. I kept my soldering temperature in the medium range (400 degrees) so I wouldn’t fry the 6N138. I’m not sure how tough that chip is when it comes to high temperatures, so better safe than sorry. I only have one in stock…
I have chosen to use Rx1/Tx1 on the Arduino. This is only because, if I use the Rx0/Tx0 pair, it screws up the communication with the USB to computer connection. I think this is due to the baud rate for the MIDI protocol being a very odd rate, and the Arduino seems to want to use the same rate for both the Rx0/Tx0 and USB connections. Regardless, I need the USB connection to work so I can monitor what the Arduino is doing from the computer. The serial ports are all the same anyway, and there is no drawback to using Rx1/Tx1.
For testing the MIDI Control Board, I hooked up the board to the Arduino, connected the Arduino to the computer via USB, plugged a USB to MIDI cable into another port on the same computer and connected the MIDI input and outputs to the control board. I then opened up a little program that would let me generate some MIDI from the computer, and opened up the serial monitor in the Arduino IDE. I wrote a little code to make the Arduino react to anything coming into the MIDI input port on the Control Board. All it does is take anything coming into Rx1, and send it out of Tx0 (so I can see it in the serial monitor on the computer.)
The board worked great, right out of the gate. I rigorously tested both the send and receive ports, and there was not a single issue with either the transmitting or receiving of MIDI data.
The next thing I will be doing is writing the MIDI interpreter code for the Arduino. I’m sure there are some stock libraries out there, but I prefer to do the code myself, so I can tailor it to my needs. That way, I can remove any extraneous crap and make it small and sleek. Stay tuned.