Arduino MIDI Serial Interface – Part 1

MIDI (Musical Instrument Digital Interface) is a technical standard which describes the protocols and digital interface to control electronic music instruments, recording equipment, drum machines and lights. First published in 1981 the MIDI standard still remains the number 1 protocol possibly used by all manufacturers of music instruments today.

I have for some time been interested in seeing if I can use an Arduino to control MIDI instruments and after a short bit of research I found that MIDI is actually a very simple serial interface running at 5v and, although not advisable, you could simply transmit and receive MIDI by connecting directly to an Arduino’s RX and TX pins.

Reading some more, I found out that in order to correctly connect a MIDI cable to an Arduino for MIDI Out purposes it is advisable to add a 6N138 optocoupler in-line on the TX out. An optocoupler is an electronic component that transfers electrical signals between two isolated circuits by using light, the purpose of this in our case is to prevent ground loops which plague audio systems.

For my project I wanted to add a MIDI In and a MIDI Out interface to my Arduino and although there are a couple of different Arduino MIDI Shields available I wanted something a little simpler, for a couple if reasons:

Firstly, I simply wanted to have a go at building my own PCB circuit and this MIDI interface seemed like a good starter project to do this and in doing so would learn a bit more about how it is built.

Secondly, I wanted to build something which was a little more universal, in that I wanted to possibly connect it to a Raspberry Pi, Arduino Nano, Espruino etc, the Arduino shields available are quite big and are only meant for larger Arduino Uno etc.

With the help form someone on Fiverr I had the following schematic and PCB layouts drawn up for my prototype design.

MIDI Out (Top Left), MIDI In (Bottom Left), RX, TX to Arduino (Right).
With the help from a PCB designer on Fiverr.

Armed with the PCB Gerber files I then put an order into PCBWay:

Arrived from PCBWay

Then built them:

Built

And connected to my Aduino:

Connected to Arduino

In my next post I will talk about how to use.

For sale on eBay: https://www.ebay.co.uk/itm/373010724942

Add a Comment

Specify Facebook App ID and Secret in Super Socializer > Social Login section in admin panel for Facebook Login to work

Specify Google Client ID and Secret in Super Socializer > Social Login section in admin panel for Google Login to work

Your email address will not be published. Required fields are marked *