Arduino MIDI-in Shield
This instructable shows how to build a shield to connect devices that send MIDI signals (e.g. a masterkeyboard) to an Arduino.
The basic schematic is derived from: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1187962258/
The basic schematic is derived from: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1187962258/
The Schematic
Basically the schematic is just an optocoupler with some resistors to decouple the MIDI device from the Arduino.
Note that the DIN connector on the left side is seen from the back (solder pin-side).
Note that the DIN connector on the left side is seen from the back (solder pin-side).
Board Layout, Parts List, Etc.
Part list:
Resistors (1 piece each): 220 Ohms, 100 kOhms, 3.3 kOhms
Diode: 1N4148
Optocoupler: 4N28
5 PIN DIN connector (MIDI connector)
2 pinheads 1x8
1 pinhead 1x4
1 pinhead 1x6
It will also work with other Optocouplers (e.g. a 4N35, I used a 4N29)
Attached are the necessary files for etching the board and the eagle-files if you want to make modifications.
Resistors (1 piece each): 220 Ohms, 100 kOhms, 3.3 kOhms
Diode: 1N4148
Optocoupler: 4N28
5 PIN DIN connector (MIDI connector)
2 pinheads 1x8
1 pinhead 1x4
1 pinhead 1x6
It will also work with other Optocouplers (e.g. a 4N35, I used a 4N29)
Attached are the necessary files for etching the board and the eagle-files if you want to make modifications.
Production
Just a few hints for making the shield:
A very good how-to (that actually worked form me unlike many others) for etching the board can be found here: http://hackaday.com/2008/07/28/how-to-etch-a-single-sided-pcb/
If you are a noob like me and want to modify the board in eagle then try these instructables:
https://www.instructables.com/id/Draw-Electronic-Schematics-with-CadSoft-EAGLE
https://www.instructables.com/id/Turn-your-EAGLE-schematic-into-a-PCB
https://www.instructables.com/id/Make-hobbyist-PCBs-with-professional-CAD-tools-by-
Soldering the pinheads upwards down on the board so you can directly put it on the arduino is a real pain in the ass. I rasped a head of my soldering iron so that it became small enough to do that job. let me know if you have a better solution.
For this board I used a DIN connector that can be soldered directly to it. If you want to use another one be sure to connect the pins with the numbers on the board to the according pins on the connector. In the pic here the pins are seen from the back (where you solder).
A very good how-to (that actually worked form me unlike many others) for etching the board can be found here: http://hackaday.com/2008/07/28/how-to-etch-a-single-sided-pcb/
If you are a noob like me and want to modify the board in eagle then try these instructables:
https://www.instructables.com/id/Draw-Electronic-Schematics-with-CadSoft-EAGLE
https://www.instructables.com/id/Turn-your-EAGLE-schematic-into-a-PCB
https://www.instructables.com/id/Make-hobbyist-PCBs-with-professional-CAD-tools-by-
Soldering the pinheads upwards down on the board so you can directly put it on the arduino is a real pain in the ass. I rasped a head of my soldering iron so that it became small enough to do that job. let me know if you have a better solution.
For this board I used a DIN connector that can be soldered directly to it. If you want to use another one be sure to connect the pins with the numbers on the board to the according pins on the connector. In the pic here the pins are seen from the back (where you solder).
Programming
The first thing I did was to erase the microcontroller on my Arduino by uploading a sketch without disconnecting the board before. SO BE CAREFUL NOT TO DO THAT!
Newer versions of the Arduino should be smart enough to avoid this by themselves, but it's not that much work to disconnect the shield before uploading....
To test your board I would recommend to use the sketch from here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1187962258/
Newer versions of the Arduino should be smart enough to avoid this by themselves, but it's not that much work to disconnect the shield before uploading....
To test your board I would recommend to use the sketch from here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1187962258/