Arduino Uno Dual Merge MIDI “Shield” – Part 3

Having been sitting and waiting for my Seeedstudio Fusion order from the board designed in part 2, three weeks later – it’s here!

So this is by way of an assembly guide and review of the design and production.

IMG_6314

Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

These are the key tutorials for the main concepts used in this project:

If you are new to Microcontrollers, see the Getting Started pages.

Note: I’m not affiliated with Seeedstudio or was offered anything to use their services for this first go (although I’ve been contacted since with a discount on my next order :)).  As I said last time, I went with them as I’ve used their own modules and boards myself in the past.

Bill of Materials

  • MIDI merge PCB (GitHub link below).
  • Arduino Uno.
  • 2x 6N138 optoisolators.
  • 6x 220Ω resistors.
  • 2x 4K7Ω resistors.
  • 2x 1N914 diodes.
  • 2x 100nF ceramic capacitors.
  • 3x 5-pin DIN – pcb mounted (see PCB and photos for footprint).
  • 2x 8-pin DIP chip sockets.
  • Optional: 1x DPDT PCB mounted switch (see PCB and photos for footprint).
  • OR: 2x 3-way header pins and two jumpers.
  • Arduino headers: 1x 10-way; 2x 8-way; 1x 6-way “extended” or “stacked” headers (required for their extra height – see photos).

Where can you find the PCB?

Well I don’t have them for sale myself, but I’ll publish the files somewhere or provide a means to allow you to buy one from a PCB manufacturer – I need to look into how best to do that and probably should fix the issues first.  Watch this space!

Update: The files are now on GitHub here: https://github.com/diyelectromusic/sdemp_pcbs/tree/main/ArduinoUnoMIDIMergeShield

In the mean time, I have a few spares of the prototype that I might be persuaded to part with if you’re happy to pay for the postage costs.  Of course, these are for DIY use and totally unsupported by me – use at your own risk!  And no, I’m not able to build you one – you’ll have to source the components and do that yourself.

I suggest you DM me on Twitter or Facebook if you might be interested. I’ll just keep a couple for myself…

IMG_6309

Errata – Workarounds!

There is one mistake in this first version of the board (that I’ve found so far!).  The 8-pin DIP socket footprint has the pins too far apart.  I suspect I say the 10.6mm measurement in the part number in KiCad and thought  that was the full width of the socket, when it was the pin distance… Oh well.

Here is the fix (unless you happen to have wider sockets than I do!):

IMG_6311

Assembly

I suggest the following order of assembly:

  1. Resistors
  2. Diodes
  3. Switch (if used – if not, leave the headers for a while).
  4. 8-pin DIP sockets.
  5. 3-way pin headers in place of switch if switch is not used.
  6. Arduino headers.
  7. 5-pin DIN Sockets.

IMG_6313

Things to be wary of:

  • As already mentioned the 8-pin DIP sockets need the legs bending outwards to fit!
  • MIDI is enabled when the switch is in the “near to the headers” side.  So in the photo above, MIDI is enabled.
  • I used stacking headers, not so that a board can be used on top, but to allow access to the other IO pins via jumper wires if required.
  • If you just use pin-headers, rather than extending/stacking headers then the underside of the board will almost certainly touch the USB connector on the Arduino and possibly the ICSP connector too.  Or course if you are using a variant with micro or mini USB and with no ICSP header pins connected then you’d probably be fine.

IMG_6317

Testing

I recommend performing the general tests described here: PCBs.

Software and In Use

The interface to the Arduino is as follows:

  • D0 (RX) to MIDI IN 2 via the switch
  • D1 (TX) to MIDI OUT via the switch
  • D2 to MIDI IN 1

The shield uses 5V and GND.

The code on GitHub from here can be used with the following configuration:

#define MIDI_HW_SERIAL 1
//#define MIDI_HW_SERIAL2 2
//#define MIDI_HW_SERIAL3 3
//#define MIDI_HW_SERIAL4 4
#define MIDI_SW_SERIAL 5
//#define MIDI_SW_SERIAL2 6
//#define MIDI_USB_HOST 7
//#define MIDI_USB_DEVICE 8

#define MIDI_OUT MIDI_HW_SERIAL

Optionally, the built-in LED can be enabled as an IN indicator by changing the ledPins definition to the following:

int ledPins[MIDI_LEDS] = { LED_BUILTIN, NOPIN, NOPIN, NOPIN, LED_BUILTIN, NOPIN, NOPIN, NOPIN };

Closing Thoughts

Despite the error in the socket footprint, I’m pretty pleased with this as a first effort.

I don’t have anything to compare it with, but as far as I can see the manufacturing was relatively cheap, appears flawless and in the end pretty quick. I’ll definitely be happy to use Seeedstudio Fusion again although I’d like to see how others would do too.

If I end up re-spinning the board to fix it, then here are some other things to consider:

  • Fix the 8-pin DIP footprint of course.
  • Add a label to the switch to indicate MIDI ON/OFF!
  • Possibly label the D0,1,2 pins used

There are a few enhancements that could be considered with a proper “version 2”:

  • Some activity LEDs might be nice, especially if they can be done without involving the microcontroller IO.
  • I could probably add some jumpers to allow D2 to be swapped for any of D3-D7.
  • It might be worth considering allowing the use of headers instead of MIDI sockets as an option to allow chassis mounted sockets to be used instead.
  • It might also be worth considering the perimeter footprint too – it might be nice to allow all the connectors on the shield and Uno to line up with a case of some sort if required.

But this is very usable as it is for me.

Kevin

Leave a comment