Hackster is hosting Impact Spotlights highlighting smart energy storage. Start streaming on Thursday!Stream Impact Spotlights on Thursday!

Arduino MIDI Input Cooked Three Ways

Use MIDI input via custom adapters for the Arduino UNO and Opta, or implement an off-the-shelf shield.

Jeremy Cook
2 months ago

A big part of my experimentation and learning at the Cooked Audio YouTube channel involves MIDI (Musical Instrument Device Interface). This protocol is essentially a specialization of UART, and while it was first implemented in the early 1980s, it is still very much in use today. The spec is just six pages long, making it relatively easy to understand.

At the same time, MIDI’s isolation circuitry means that you can’t (shouldn’t) just plug one UART into another and call it a day. The proper receiver circuit includes an opto-isolator, two resistors, and a diode – easy enough to breadboard, but not something you really want to do over and over.

To facilitate my continued experimentation, I designed a MIDI input adapter using KiCad. While ensuring the connector pins were properly placed took some careful consideration, once the correct components were soldered on the adapter worked well.

My original goal on the project was to use MIDI input with the Arduino Opta, possibly via its dedicated input pins. Although I think this may be possible via firmware hacking, I instead made a second general-purpose adapter for the AUX input. This custom adapter allowed me to use not just UART/MIDI with the Opta, but also I2C communications, as explained in more detail here.

Along with these two custom boards, I tried out an off-the-shelf Arduino UNO MIDI shield. This board includes input, output, and even pass-through functionality.

With this shield, I linked two UNOs together via MIDI control. One lights up based on the note played, while the other takes care of the actual audio. I also tried this pass-through setup with the Opta adapter/MIDI input board, but this did not function properly. Perhaps a resistor needs to be swapped out, which would be a fairly simple operation, given the adapter board’s through-hole design.

The build process is outlined in the video below. Further info, as well as purchase links for the adapters, are found in the description.

Jeremy Cook
Engineer, maker of random contraptions, love learning about tech. Write for various publications, including Hackster!
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles