Project tutorial

USB-BLE Wireless MIDI Adapters © MIT

Convert your USB MIDI instruments to wireless using one of these Bluetooth MIDI adapters.

  • 166 views
  • 0 comments
  • 0 respects

Components and supplies

Ardgen 101
Arduino 101 & Genuino 101
OPTION 1: Combine with Hobbytronics USB MIDI Host breakout
×1
Hobbytronics USB MIDI Host Breakout
×1
Rgdgrrzsvgslnl8hlyxx
Arduino ADK Rev. 3
OPTION 2: Combine with nRF52 breakout or Bean+
×1
13990 01
SparkFun nRF52832 Breakout
×1
Front whitened
Punch Through LightBlue Bean+
×1
Arduino Uno Rev3
OPTION 3: Combine with USB Host Shield and either nRF52 breakout or Bean+
×1
M4ycgso0gf3umjvgingt
Arduino USB Host Shield
×1
12009 06
SparkFun Logic Level Converter - Bi-Directional
To interface 5V logic with nRF52 breakout (3V3).
×1

Apps and online services

About this project

Wirelessly connect your USB MIDI instruments to your iOS device using low-energy Bluetooth.

An Apple Camera Connection Kit is generally required to connect a USB MIDI instrument such as a K-Board, BopPad or Artiphon to an iOS music app such as GarageBand, DrumJam, or GeoShred. However, with the help of some Arduino components and sketches, it is easy to make an adapter that reads MIDI messages from a USB instrument and sends them to an iOS device using Bluetooth LE (BLE).

I've investigated three different approaches and provide instructions for each of them in this project.

Arduino 101 / Hobbytronics USB HOST-MIDI

The first design is the simplest in terms of parts and connections. It combines the BLE support provided by the Arduino 101 with the USB Host support provided by the Hobbytronics USB HOST-MIDI breakout.

The Arduino 101 and Hobbytronics breakout communicate using Serial I/O. The sketch running on the Arduino 101 reads MIDI messages from the USB Host breakout and then writes them to its integrated BLE service.

The adapter currently operates in one direction only, receiving messages from USB but not transmitting to USB. This is true for all adapters in this project, by the way. For this reason, the Hobbytronics breakout only needs three connections: 5V, GND, and TX. Connect its TX pin to the RX pin (D0) on the Arduino 101.

To program the adapter, upload the CurieUsbMidiBridge sketch to the Arduino 101. Now you're ready to plug-in your instrument, connect your iOS app to the adapter (scan for "CurieBLE"), and start playing.

Many iOS apps support BLE MIDI connections directly. For apps that do not, the midimittr app can act as the intermediary.

For stability reasons, this implementation of the adapter only handles Note On and Note Off messages. Support for the other channel messages such as Control Change, After Touch, and Pitch Bend may be enabled in a future version, but for now they are commented-out in the sketch.

Arduino Mega ADK / SparkFun nRF52832

The second design leverages the BLE support provided by the SparkFun nRF52832 Breakout and the USB Host support provided by the Arduino Mega ADK.

The SparkFun nRF52 breakout and Arduino Mega communicate using I2C. The nRF52 is the I2C master, requesting MIDI messages from the Arduino Mega. The messages received from the Arduino Mega are sent out through the nRF52's BLE service. The sketch running on the Arduino Mega responds to I2C requests, reading MIDI messages from its integrated USB Host controller and writing them to the nRF52.

The SparkFun breakout needs five connections:

  • 3V3
  • GND
  • RST
  • SDA (24)
  • SCL (25)

Because the SparkFun nRF52 breakout operates at 3V3 and the Arduino Mega operates at 5V, the three logic pins are connected through a bi-directional level shifter.

NOTE: The SDA and SCL assignments must be redefined in the SparkFun variants.h file. For more details see this hookup guide discussion.

Upload sketch nRF52MidiWireMaster to the SparkFun breakout and UsbMidiWireSlave to the Arduino Mega. Then plug your instrument into the USB Host connector, connect your iOS app to the adapter (scan for "nRFMIDI"), and start playing!

Arduino Uno / USB Host Shield / Bean+

The final design employs the BLE capability of the LightBlue Bean+, pairing it with a USB Host Shield attached to an Arduino Uno, as shown in the photo below. An Arduino Mega ADK can substitute for the USB Host Shield and Arduino Uno combination. The Fritzing diagram shows the Arduino Mega ADK version.

As in the previous design, the two MCUs communicate using I2C. The Bean+ is the I2C master, requesting MIDI messages from the Arduino Uno. The messages received from the Uno are sent out through the Bean's BLE service. The sketch running on the Uno responds to I2C requests, reading MIDI messages from the attached USB Host Shield and writing them to the Bean+.

The Bean+ needs four connections:

  • GND
  • 5V
  • SDA (A4)
  • SCL (A5)

NOTE: Switch the Bean+ to 5V operation.

Upload sketch BeanMidiWireMaster to the Bean+ and upload UsbMidiWireSlave to the Arduino Uno. Then plug your instrument into the USB Host Shield, connect your iOS app to the adapter (scan for "Bean+"), and start playing.

For performance reasons, support for Control Change and After Touch channel messages has been commented-out in the sketch, but may be enabled in a future version.

Schematics

CurieUsbMidiBridge.fzz
Connecting Arduino 101 with Hobbytronics USB HOST-MIDI
nRF52UsbMidiBridge.fzz
Connecting Arduino ADK with Sparkfun nRF52 Breakout
BeanUsbMidiBridge.fzz
Connecting Arduino ADK with LightBlue Bean+

Code

CurieUsbMidiBridge.ino
Use with Arduino 101 + Hobbytronics USB HOST-MIDI
nRF52MidiWireMaster.ino
Upload to nRF52 breakout, and upload UsbMidiWireSlave.ino (see below) to the Arduino that is connected to the USB MIDI instrument.
BeanMidiWireMaster.ino
Upload to Bean+ and upload UsbMidiWireSlave.ino (below) to the Arduino that is connected to the USB MIDI instrument.
UsbMidiWireSlave.ino
Upload to Arduino ADK (or Arduino Uno + USB Host Shield). Reads MIDI messages from the USB MIDI instrument and writes them to the Wire (I2C) master.

Comments

Similar projects you might like

Development Board for AtTiny MCU

by Vincenzo G.

  • 89 views
  • 0 comments
  • 4 respects

The Magnetic Field and RGB Tester

Project tutorial by Kutluhan Aktar

  • 56 views
  • 0 comments
  • 1 respect

How To Use DS18B20 Water Proof Temperature Sensor

Project showcase by IoTBoys

  • 121 views
  • 0 comments
  • 3 respects

Version 2.0 Advanced Attendance System (Without Ethernet)

Project tutorial by GadgetProgrammers

  • 2,773 views
  • 5 comments
  • 44 respects

Ultrasonic Security System

Project tutorial by Krepak

  • 264 views
  • 0 comments
  • 4 respects
Add projectSign up / Login