Top Mount Flexible MIDI Shield
Top Mount Flexible MIDI Shield
Flexible MIDI Shield
A collection of Rugged Circuit Designs and popular past products that are available for special order. Please contact our sales department for ordering details. Please note that a minimum order applies.
The Flexible MIDI Shield for Arduino adds MIDI IN and MIDI OUT connections for working with musical equipment. Use it to control MIDI synthesizers, respond to MIDI keyboard events, or even as a USB-to-MIDI converter. The mechanical size and shape of the shield, along with included stacking headers, allows other shields to stack on top so you can add even more functionality.
Flexibility comes from being able to select which pins are used for MIDI IN (Rx) and MIDI OUT (Tx). You can use the built-in hardware serial port pins D0 and D1 or you can select from many other serial pins and use the SoftwareSerial (or NewSoftSerial) libraries, while keeping the D0/D1 pins free for USB communication. Additional flexibility comes from being able to upload sketches without flipping any switches, even if your sketch uses D0/D1 (USB serial pins).
This is not a “kit”, there is nothing to solder, and no extra connectors or components to buy. It is fully assembled and ready to work right out of the box. Compatible with the Arduino MIDI library software, and Arduino Uno, Duemilanove, Mega/Mega2560,Ruggeduino, or other Arduino-compatible boards. It also comes in two versions: MIDI connectors mounted on top or on the bottom.
The Flexible MIDI Shield includes the following features:
Optoisolated and protected MIDI IN and MIDI OUT connectors (standard 5-pin DIN female connectors)
Compatibility with Arduino Uno, Duemilanove, Mega/Mega2560, Ruggeduino, or other Arduino-compatible boards.
Compatible with Arduino MIDI library
Stacking headers so other shields can plug in on top
MIDI IN reception on any one of pins D0, D2, D4, D6, D8 or D10 (selectable with a jumper)
MIDI OUT transmission on any one of pins D1, D3, D5, D7, D9 or D11 (selectable with a jumper)
A separate MIDI enable signal can be used in your sketch to enable or disable MIDI IN/OUT hardware connections. See full description below. This signal can be on any one of pins D12 through D19 (selectable with a jumper) or jumpered to always be enabled.
Reset switch included to reset the Arduino
Operation at either 5V or 3.3V (jumper selectable)
2-pin terminal pads included (terminals not included) for easily providing external Vin power
There are three main signals on the Flexible MIDI Shield:
Using the included jumper, you can select which Arduino pin will see the MIDI IN signal: D0, D2, D4, D6, D8, or D10. Do not install a jumper on more than one of these pins at a time.
Using the included jumper, you can select which Arduino pin will transmit the MIDI OUT signal: D1, D3, D5, D7, D9 or D11. Do not install a jumper on more than one of these pins at a time.
Using the included jumper, you can select which Arduino pin will control the MIDI enable signal: D12 through D19 (note that D14 through D19 are also the analog inputs A0 through A5). Do not install a jumper on more than one of these pins at a time. In addition, you can install a jumper on the pins labelled “ON” (next to the pins labelled D12) and the MIDI connectors will always be enabled. This frees up all of your pins for other purposes.
Among other uses, this MIDI enable signal allows the Arduino to have sketches uploaded to it over the hardware serial port (using the bootloader) while seeing no interference from the MIDI IN connector. This is because the MIDI enable signal is pulled down LOW when the Arduino is in reset (as it is when it is being programmed).
The MIDI IN signal carries data to the Arduino from the MIDI IN connector. This is a 31250bps serial data stream that can either by received by the hardware serial port on the Arduino (D0) or on any other digital pin using the SoftwareSerial or NewSoftSerial Arduino library (see the USB-to-MIDI sample code above for an example).
The MIDI OUT signal carries data from the Arduino to the MIDI OUT connector. This is also a 31250bps serial data stream that can be transmitted by the hardware serial port on the Arduino (D1) or by using a software serial library (as for the MIDI IN signal).
A MIDI enable signal is used to completely disconnect the MIDI IN/OUT connectors from the Arduino. When this signal is HIGH, the MIDI connectors are connected to the Arduino, and disconnected when the signal is LOW.
Simple Sketch Uploading
The use of pins D0 and D1 (hardware serial port) for MIDI IN/OUT is a problem with other MIDI shields because these are the same pins used for uploading sketches to your Arduino. On the Flexible MIDI Shield this problem is solved by using the MIDI enable signal described above (jumper-selectable to be any pin from D12 through D19, or always enabled).
When the Arduino is being programmed, all I/O pins become inputs and a 10k pull-down resistor on the MIDI enable signal ensures this signal is LOW. This means the MIDI IN/OUT connectors are completely disconnected from the Arduino pins and sketch uploading works exactly as expected. This also means you won’t hear any strange sounds coming from whatever is connected to your MIDI OUT port!
In your sketch, you set the MIDI enable signal HIGH when you are ready to communicate with your MIDI devices.
Note that this is only a problem when you have also selected D0 and D1 to be the pins used for MIDI IN/OUT communication. If you have installed jumpers to select pins other than D0/D1 (and use SoftwareSerial library functions) then there is no conflict with sketch uploading and you can leave the MIDI enable signal jumpered to the ON position.
External Power Input
For standalone or battery-powered operation, the two-pin terminal pads (next to the reset switch on the shield) allow you to make a sturdy connection to a battery or other power source. These terminal pads can have bare wires soldered in, or you can solder in a 3.5mm two-pin terminal block (not included).
This power input is essentially the same as the DC power jack on the Arduino. Provide a DC power source of the same voltage and current that is required by your Arduino board (e.g., 7-12VDC for an Arduino Uno, at least 100mA is recommended). Power you apply to the two-pin terminal block is available at the Vin pin on the stacking headers.
The Flexible MIDI Shield is compatible with both 5V and 3.3V Arduino-compatible boards. By default jumper J2 is connected for 5V operation. For 3.3V operation, cut this jumper using a small hobby knife or other sharp tool and short jumper J1. Do not ever allow both jumpers to be connected!