This is a repeat of the Simple MIDI Monitor but using a home made MIDI receive circuit on breadboard and then stripboard.
Warning! I strongly recommend using an old or second hand keyboard for your MIDI experiments. I am not responsible for any damage to expensive instruments!
These are the key Arduino tutorials for the main concepts used in this project:
- Simple MIDI Monitor
- Mike Cook’s DIY MIDI Shield
- MIDI Receiver Circuit from Arduino for Musicians (Brent Edstrom)
- MIDI for the Arduino: Build a MIDI Input Circuit (notesandvolts.com)
If you are new to Arduino, see the Getting Started pages.
Parts list
- 6N138 optoisolator
- 1N914 diode
- 2x 220Ω resistor
- 4.7k resistor
- 5 pin din socket
- Breadboard or stripboard and jumper cables
Some versions of this circuit use a 6N139 optoisolator and a 1N1418 diode, and I’ve seen a variety of resistor values too. I went with the notesandvolts circuit, which I’ve used before.
The Circuit


This is a simple version built on breadboard. It is easy to get the MIDI connector the wrong way round. It needs to be connected as follows:
- Pin 5 (negative) goes to the cathode pin of the 6n138 (pin 3).
- Pin 4 (positive) goes to the anode pin of the 6n138 (pin 2) via the 220Ω resistor.

I wanted to have a re-usable module, so I made a simple stripboard version with a MIDI plug at one and a three pin connection to the Arduino at the other.

You may notice that the diode appears to be the wrong way round – the cathode of the diode is actually in the “pin 4 (positive) to pin 2 anode” link. This is correct as the diode kicks in if anything is plugged in with the connections wired up backwards – it is there for protection. See the MIDI.org electrical specification for details.
The Code
This uses the same code as the Simple MIDI Monitor part 1.
Closing Thoughts
A pre-built MIDI Shield is more reliable, but even though the one I’m using has I/O pins included, they are routed through to the end of the board. Having a MIDI receive as an independent module is much more flexible for me.
Here is the finished module (minus the MIDI socket, which I added later).


Kevin