# Bluetooth LE MIDI Controller

## Overview

https://youtu.be/X1cI5xkjVC8

![](https://cdn-learn.adafruit.com/assets/assets/000/039/159/medium800/3d_printing_hero-2.jpg?1486845912)

## A _Different_ Looking MIDI Controller

In this guide, I'll show you how I built this strange looking MIDI controller. It doesn't look like your typical drumpad or keyboard, but it does have similar functionality just like any standard MIDI controller. It features&nbsp;six capacitive touch pads that trigger MIDI notes. Tap one of the pads, and it plays a note. It also features a step sequencer so you can record and playback a pattern. The 16 NeoPixel ring displays a glowing dot&nbsp;for each step which also follows the beat of a given&nbsp;tempo. It can also change settings, such as pitch, tempo, shuffle, length, velocity and even MIDI channel.

## BLE MIDI Drum Machine

This project is based off of [Todd Treece's Capacitive Touch Drum Machine](../../../../capacitive-touch-drum-machine/). Todd's project uses an Arduino, MPR121 touch capacitive sensor and a strip of 16 NeoPixel LEDs to make a simple drum machine that you can use to control MIDI devices and virtual instruments. This project is built on top of that sketch and adds BLE connectivity. The future is here!

![](https://cdn-learn.adafruit.com/assets/assets/000/039/288/medium800/3d_printing_hero-1.jpg?1487038809)

## How Does It Work?

The Feather 32u4 Bluefruit LE features the NRF51 chipset which supports Bluetooth low-energy. This means it can act like a HID keyboard, or in our case, send and receive MIDI notes over BLE. The MPR121 capacitive touch sensor features touch detection, so we can connect conductive materials to it. The Feather listens for any touches from the capacitive touch sensor and sends MIDI notes whenever a pin is pulled low or high.&nbsp;

## Capacitive Touch Pads

3D Printed or CNC Milled? If you want to build this project, you have the option of 3D printing the capacitive touch pads using conductive PLA or CNC mill them out of conductive material like 6061 aluminum. The choice is yours! I tried both, and I really like the look and feel of aluminum capative touch pads.

![](https://cdn-learn.adafruit.com/assets/assets/000/039/160/medium800/3d_printing_hero-3.jpg?1486845940)

## DIY: Make It Your Own

If you don't like the look of this project, but you still like the idea of building your own MIDI controller, you can re-use the code, components and circuit diagram to base&nbsp;your own MIDI controller from. Instead of using a NeoPixel ring, go for a strip. Or fabricate your own. &nbsp;Don't like the shape or material of the pads? Make your own! Use copper foil tape, bare conductive paint or any electrically conductive material (how about fruits?).

## Prerequisite&nbsp;Guides

If you want to build this project, I suggest you walk through the following guides below to get a better understanding of the components and libraries.

- [Adafruit Feather 32u4 Bluefruit LE](../../../adafruit-feather-32u4-bluefruit-le)
- [MPR121 Capacitive Touch Sensor](../../../adafruit-mpr121-12-key-capacitive-touch-sensor-breakout-tutorial/downloads?view=all)
- [Capacitive Touch Drum Machine](../../../capacitive-touch-drum-machine/user-interface)
- [Adding Custom Boards to Arduino IDE](../../../../adding-custom-boards-to-the-arduino-v1-6-board-manager)

![](https://cdn-learn.adafruit.com/assets/assets/000/039/068/medium800/3d_printing_parts.jpg?1486760132)

## Parts

I used the following parts to build this project.&nbsp;

- [Adafruit Feather 32u4 Bluefruit LE](https://www.adafruit.com/products/2829)
- [16 x NeoPixel Ring](https://www.adafruit.com/products/1463)
- [MPR121 Capacitive Touch Sensor](https://www.adafruit.com/products/1982)
- [2500mAh Lipo Battery](https://www.adafruit.com/products/328)
- [Slide Switch](https://www.adafruit.com/products/805)
- [Flex Perma-Proto](https://www.adafruit.com/products/1518)

## Tools &&nbsp;Supplies

You'll need the following tools and supplise to build this project.

- [Soldering Iron & Solder](https://www.adafruit.com/products/180)
- [Tweezers](https://www.adafruit.com/products/3096)
- [Panavise Jr.](https://www.adafruit.com/products/151)
- [Third Helping Hands](https://www.adafruit.com/products/291)
- [Copper Foil Tape](https://www.adafruit.com/products/1128)
- [Heat Shrink Pack](https://www.adafruit.com/products/1649)
- [30AWG silicone cover wire](https://www.adafruit.com/products/2051)
- [Wire Strippers](https://www.adafruit.com/products/527)
- [Diagonal Flush Snips](https://www.adafruit.com/product/152)
- [Conductive PLA](https://www.adafruit.com/products/2703) (for 3D printing touch pads)
- 4x 4-40 3/8 (or M3 - .5)&nbsp;machine screws

# Bluetooth LE MIDI Controller

## Circuit Diagram

![](https://cdn-learn.adafruit.com/assets/assets/000/033/924/medium800/3d_printing_circuit-diagram_bb.png?1468594280)

## Connections

The circuit diagram above shows how the components will be wired together. This won't be 100%&nbsp;exact in the actual circuit but it's a very close approximation. Please note the buttons connected to the capacitive touch sensor do not have to be buttons. They can be any piece of electrically conductive material.

- Slide Switch to **GND** and **EN** pins on Adafruit Feather 32u4 Bluefruit LE
- **VCC** from NeoPixel to **3V** on&nbsp;Adafruit Feather 32u4 Bluefruit LE
- **GND** from NeoPixel to **GND** on&nbsp;Adafruit Feather 32u4 Bluefruit LE
- **Data In** from NeoPixel to **#6** on&nbsp;Adafruit Feather 32u4 Bluefruit LE
- **SCL** from MPR121 to **SCL** on&nbsp;Adafruit Feather 32u4 Bluefruit LE
- **SDA** from MPR121 to **SDA** on&nbsp;Adafruit Feather 32u4 Bluefruit LE
- **IRQ** from MPR121 to **A4** on&nbsp;Adafruit Feather 32u4 Bluefruit LE
- **GND** from MPR121 to **GND** on&nbsp;Adafruit Feather 32u4 Bluefruit LE
- **VIN** from MPR121 to **3V** on Adafruit Feather 32u4 Bluefruit LE
- **0-5** on MPR121 to Touch Pads

## Battery Power

The circuit will be powered by a 3.7V 2500mAh&nbsp;Lithium ion battery via JST connection. The battery plugs directly into the Adafruit Feather 32u4 Bluefruit LE, which allows had a built-in&nbsp;charging circuit so you can recharge the lipo battery&nbsp;over the microUSB port.

# Bluetooth LE MIDI Controller

## Software

## Get Arduino IDE

For this project you will need version **1.6.X of the Arduino IDE** with the Adafruit Arduino Board Manager proxy added to your Arduino preferences. If you haven't configured the proxy yet, [check out our guide](../../../../adding-custom-boards-to-the-arduino-v1-6-board-manager)&nbsp;on setting up your Arduino IDE to use the proxy.

![3d_printing_arduino-ide.png](https://cdn-learn.adafruit.com/assets/assets/000/039/175/medium640/3d_printing_arduino-ide.png?1486858963)

[Arduino IDE Download](http://www.arduino.cc/en/Main/Software)
## Install Libraries

You will need to install a few things using the new Arduino Library and Board Managers. First, open up the Arduino Library Manager under the **Sketch-\>Include Library** menu. Select the **Manage Libraries...** item from the menu.

&nbsp;

You will need to use the search box to find and install these three libraries:

- **FifteenStep**
- **Adafruit NeoPixel**
- **Adafruit MPR121**
- **Adafruit BluefruitLE nRF51**

![3d_printing_arduino-libs.png](https://cdn-learn.adafruit.com/assets/assets/000/039/176/medium640/3d_printing_arduino-libs.png?1486859190)

## Install Adafruit AVR Boards

You'll need to installthe Adafruit AVR boards to add support for the Adafruit Feather 32u4 Bluefruit LE. Open the Arduino Boards Manager under the **Tools-\>Board-\>Boards Manager**... menu item.&nbsp;

Use the search box to find and install the Adafruit AVR boards.

![3d_printing_arduino-boards.png](https://cdn-learn.adafruit.com/assets/assets/000/039/177/medium640/3d_printing_arduino-boards.png?1486859356)

## Select Feather Board

Next, select the **Adafruit Feather 32u4 board** in the **Tools\>Board** menu. Then, under the **Tools-\>Port-\>Serial ports** &nbsp;menu, select **/dev/cu.usbmodem (Adafruit Feather 32u4)**.

![3d_printing_arduino-feather.png](https://cdn-learn.adafruit.com/assets/assets/000/039/178/medium640/3d_printing_arduino-feather.png?1486859741)

## Run Example Sketch

OK, now it's time to open the example sketch and upload the code to the Adafruit Feather board. Select **nble\_neopixel\_mpr121** under the **File-\>Examples-\>FifteenStep** menu. Then, click the upload button&nbsp;

![3d_printing_arduino-upload-icon.png](https://cdn-learn.adafruit.com/assets/assets/000/039/180/medium640/3d_printing_arduino-upload-icon.png?1486860546)

![3d_printing_arduino-ble-sketch.png](https://cdn-learn.adafruit.com/assets/assets/000/039/289/medium640/3d_printing_arduino-ble-sketch.png?1487039030)

![](https://cdn-learn.adafruit.com/assets/assets/000/039/181/medium800/3d_printing_done-uploading.png?1486860610)

If everything goes as expected, you will see a _Done Uploading_ message at the bottom of the window.

# Bluetooth LE MIDI Controller

## 3D Printing

![](https://cdn-learn.adafruit.com/assets/assets/000/039/183/medium800/3d_printing_3d-parts.jpg?1486865240)

## 3D Printing Enclosures

I drew up an enclosure in Autodesk Fusion 360 and designed each component so that I could design friction fit mounting points. I 3D printed the enclosure on several 3D printers to test tolerances (Printrbot Play, Flashforge Creator Pro, and Micro M3D).

If you don’t have access to a 3D printer, you could use a service like [3D Hubs](https://www.3dhubs.com) to make it for you. I used PLA material to 3D print the parts, and they didn’t require any support material.

The&nbsp;enclosure was 3D printed with [Proto-Pasta Aromatic CoffeePLA filament](https://www.adafruit.com/products/3225).

[Download STLs from Thingvierse](http://www.thingiverse.com/thing:2110595)
[Download STLs from YouMagine](https://www.youmagine.com/designs/ble-midi-controller-with-capacitive-touch-pads)
[Download STLs from Pinshape](https://pinshape.com/items/32189-3d-printed-ble-midi-controller-with-capacitive-touch-pads)
[Download CAD source](https://cdn-learn.adafruit.com/assets/assets/000/126/787/original/CAD.zip?1703104508)
## Slice Settings

Depending on your 3D printer, you may need to&nbsp;adjust the slice settings. I sliced the parts using Simplify 3D. They do not require any support material and are oriented to print "as is".

- Nozzle: 0.4mm
- Extrusion Multiplier: 1.0
- Extrusion Width: 0.48mm
- Layer Height: 0.2mm
- Nozzle Temperature: 220c

## 3D Printing with Conductive Filament!?

Yes, you can 3D print the pads using&nbsp;conductivePLA, which is a special blend of PLA with conductive particles. [Proto-Pasta Conductive PLA](https://www.adafruit.com/products/2703) filament is relatively easy to print with, and it's electrically conductive :-)

![3d_printing_2703-01.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/161/medium640/3d_printing_2703-01.jpg?1486847154)

## 3D Printed Capacitive Touch Pads

If you're 3D printing the touch pads, I suggest you use a 100% infill to increase the conductivity.

![](https://cdn-learn.adafruit.com/assets/assets/000/039/185/medium800/3d_printing_3d-pads-cropped.jpg?1486865703)

# Bluetooth LE MIDI Controller

## CNC Milling

## Pick Your Tool & Materials

In this project, I used the [Othermill Pro](https://www.adafruit.com/products/2323) desktop CNC from Othermachine to mill the pads out of [6061 1/8" (3.17mm) thick aluminum bar](https://othermachine.co/store/materials/aluminum-6061-bar/).

If you have&nbsp;access to a different CNC machine, you'll need to generate your own GCODE for milling the touch pads. You can download the Fusion 360 source file and program your own tool paths via the CAM workspace.

If you do have access to an Othermill, you can use my&nbsp;GCODE file in Otherplan and cut them out as is. As long as you have aluminum stock that's about 3.1mm thick, you should be able to cut them out without any issues.

## Othermill & Otherplan

I'm going to assume you know how to use the Othermill and Otherplan. So I won't cover that in this tutorial. I will&nbsp;however show you how to setup multiple jobs in Otherplan so you can cut all six pads on a 4" x 4" piece of aluminum.&nbsp;

## Set Material

First, choose "Generic" from the materials dropdown and set your material size. Click on the "Open Files" button to browse for the **pad-1-8-alum.nc&nbsp;** GCODE file and select it. Click on the dropdown near the file and choose the 1/8in Flat End Mill. Then, click the dropdown near "Placement" and set the Z to "-3.1mm" so the gcode gets positioned on the spoilboard. You can leave the X and Y at zero.

![3d_printing_otherplan-1.png](https://cdn-learn.adafruit.com/assets/assets/000/039/163/medium640/3d_printing_otherplan-1.png?1486853145)

## Duplicate Copies

You can add additional jobs to Otherplan to make duplicate copies. It's more efficent to mill several copies instead of milling one at a time. Click open file and&nbsp;select the same **pad-1-8-alum.nc** gcode. Then, click the dropdown and select the 1/8in Flat End Mill. Click the "Placement" dropdown and make Z "-3.1mm" and X "46mm". Leave Y Zero.&nbsp;

&nbsp;

You can repeat this process for the rest of the pads.&nbsp;Make sure to change the position for each gcode file. You can use the screenshot to&nbsp;reference the positions for the other pads.

![3d_printing_otherplan-2.png](https://cdn-learn.adafruit.com/assets/assets/000/039/164/medium640/3d_printing_otherplan-2.png?1486853666)

[Download CNC GCode Files](https://cdn-learn.adafruit.com/assets/assets/000/126/788/original/CNC.zip?1703104545)
## Secure Material&nbsp;to Spoilboard

I used pieces of Nitto (Permacel) P-02 Double-Coated Kraft Paper Tape to secure the material to the spoilboard. The material should be position&nbsp;square with the lower bottom of the left side of the spoilboard.

![3d_printing_alumin-tape.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/166/medium640thumb/3d_printing_alumin-tape.jpg?1486854825)

![3d_printing_aluminum-secure.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/167/medium640thumb/3d_printing_aluminum-secure.jpg?1486855038)

## Start Milling!

Once&nbsp;the 1/8th aluminum bar stock is secured to the spoilerbed, you can start milling!

![3d_printing_milling.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/168/medium640thumb/3d_printing_milling.jpg?1486855293)

## Vacuum Swarf!

When the milling is complete, you'll be left with a lot of swarf (material dust). &nbsp;Use a vacuum to clean up the workarea.

![3d_printing_mill-vacuum.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/169/medium640thumb/3d_printing_mill-vacuum.jpg?1486855546)

## Remove Stock

You can use alcohol to soften the adhesive from the tape. Then, pry the material off of the spoilboard using a spatula.&nbsp;

![3d_printing_aluminum-remove.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/171/medium640thumb/3d_printing_aluminum-remove.jpg?1486857674)

## Remove Parts from Stock

You'll need to break the parts away from the stock. If there's any burrs or scratchs on the parts, you can buff them out using a polishing wheel and&nbsp;rotary tool.

![3d_printing_aluminum-parts.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/172/medium640thumb/3d_printing_aluminum-parts.jpg?1486857870)

## Milled Parts

And here are the parts!

![3d_printing_pads.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/173/medium640/3d_printing_pads.jpg?1486858099)

## Test Fit Touch Pads

It's a good idea to do a test fit before wiring anything.&nbsp;If the tolerances are too tight, you can use a filing tool to loosen up those edges on the 3D printed cover. If the tolerances are loose, you can use adhesive, tape or mounting tack to keep the pads in place.&nbsp;

![3d_printing_pad-test-fit.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/174/medium640thumb/3d_printing_pad-test-fit.jpg?1486858303)

# Bluetooth LE MIDI Controller

## Wiring

## Parts & Tools

In this portion of the guide, we'll connect the components together. Before we start, be sure to get our workspace cleaned up. Gather up&nbsp;ours&nbsp;tools and heat up the soldering iron. Are you ready? Let's GO!!

![3d_printing_parts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/165/medium640/3d_printing_parts.jpg?1486854405)

## Slide Switch

I like to start every project by wiring up the slide switch. We'll need two pieces of wire to connect it to the Adafruit Feather. The length of them should be about the same length of the enclosure (3in or 10cm). It's OK if they're longer because you can trim them short later.

![3d_printing_switch-wires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/069/medium640/3d_printing_switch-wires.jpg?1486760526)

## Switch Wired

Before we connect the wires to the switch, it's a good idea to "tin" them. First, remove a bit of insulation from the tips of each wire using wire strippers. To tin a wire, apply the tip of your soldering iron to the wire for a second or two, then apply the solder to the wire. The solder should flow freely onto the wire and coat it. This helps prevent the strands of wire from fraying.&nbsp; **Pro Tip** : Secure the wires to the grabber of a pair of&nbsp;helping third hands to tin the four tip, one after the other.

![3d_printing_switch-wire-tinned.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/070/medium640/3d_printing_switch-wire-tinned.jpg?1486760555)

## Connect Wires to Switch

Now we need to solder the wires to the pins&nbsp;on the slide switch. We only need two of the three pins, so&nbsp;remove either the far left or far right pin (but not the middle pin). Then, tin the remaining two pins with solder. Next, attach the wires to the pins. Apply the tip of your soldering iron to the pin for a second or two, then touch&nbsp;the tip of the wire to the pin. Hold it in place for a second or two to allow the solder to solidify. Repeat this process for the second wire.

![3d_printing_switch-wiring.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/134/medium640thumb/3d_printing_switch-wiring.jpg?1486823572)

![3d_printing_switch-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/135/medium640/3d_printing_switch-wired.jpg?1486823667)

## Switch for Feather

We'll be&nbsp;connecting the slide switch to the&nbsp;Feather board, but first we need to expand the voltage&nbsp;and ground pins. If we were to connect it now, we'd use up the only ground pin on the Feather. We have several components that need to connect to the voltage and ground pins, so we'll "expand" them by attaching some pieces of Flex PCB.

![3d_printing_switch-feather.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/072/medium640/3d_printing_switch-feather.jpg?1486760619)

## Flex PCB

This Flex PCB is great for expanding pins. It's basically a thin half-sized breadboard. You can easily cut pieces using a pair of scissors. We'll only need two pieces,&nbsp;each with four available pins. Save the rest for future projects.&nbsp;

![3d_printing_feather-flexPCB.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/073/medium640/3d_printing_feather-flexPCB.jpg?1486760660)

![3d_printing_flex-pcb-cutting.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/138/medium640thumb/3d_printing_flex-pcb-cutting.jpg?1486824664)

## Tin&nbsp;Flex PCB

Tinning the pins on the flex PCB make it a bit easier to attach wires. Handling the flex PCB can be&nbsp;a bit of a hassle.&nbsp;I found using tweezers to hold it and then securing the tweezers to a set of third helping hands works nicely. This way the flex PCB is secured in place while you can solder up the pins.&nbsp;

![3d_printing_flex-pcb-secure.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/136/medium640thumb/3d_printing_flex-pcb-secure.jpg?1486824488)

![3d_printing_flexPCB-tinned.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/137/medium640/3d_printing_flexPCB-tinned.jpg?1486824529)

## Expand Power and Ground

Next, we can attach the pieces of flex PCB to the voltage and ground pins on the Feather. First, cut the pieces in two so they're separated. Tin the **3V** and **GND** labled pins on the Feather. Then, set a piece of PCB over the pin. I recommend handling it with the tweezers. Now apply the tip of your soldering iron to the pin. Once it&nbsp;melts the solder, move the tip away and hold the flex PCB in place until the solder solidifies. Repeat this process for the second pin.

![3d_printing_feather-flexpcb-soldered.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/075/medium640/3d_printing_feather-flexpcb-soldered.jpg?1486760743)

## Connect Switch to Feather

Now we can connect the slide switch to the Feather. Solder one wire from the switch to the flex PCB connected to the&nbsp; **GND** labeled pin the Faether. The second wire from the switch needs to connect to the **EN** (enable) labeled pin. Once they're connect, we should be able to power the board on and off.

![3d_printing_feather-next-switch.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/076/medium640/3d_printing_feather-next-switch.jpg?1486760794)

![3d_printing_feather-switch.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/077/medium640/3d_printing_feather-switch.jpg?1486760822)

## Test Switch & Battery

How about we test out the switch. Grab the battery and plug it into the Feather board. If the board&nbsp;turns on (red LED turns on), try flipping the switch to turn it off and vice versa. If the board stays off or on, the slide switch might be damanged or&nbsp;there's not enough&nbsp;solder. Once we're done testing the&nbsp;switch, disconnect the battery from the Feather board.

![3d_printing_switch-test.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/078/medium640/3d_printing_switch-test.jpg?1486760887)

## Wires for Cap Sensor

Next up, we'll make some wires for connecting the capacitive sensor to the Feather. These wires can be the same length of the enclosure (or same length as the switch wires). We'll need five wires in total. I used&nbsp;different colored wires to help tell them apart, but you don't have too. &nbsp;

![3d_printing_wire-measuring-box.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/079/medium640/3d_printing_wire-measuring-box.jpg?1486761318)

![3d_printing_cap-wires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/080/medium640/3d_printing_cap-wires.jpg?1486761350)

## Tin Wires

Once our five wires are cut, it's time to strip and tin them! I managed to secure all five to a&nbsp;grabber on the third helping hands. This saves time from having to secure each wire to the grabber, one by one. Careful not to solder the wires together, though!&nbsp;

![3d_printing_cap-wires-tinned.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/081/medium640/3d_printing_cap-wires-tinned.jpg?1486761398)

## Heat Shrink Tubing

Managing a bunch of wires can be messy. I like to use heat shrink tubing to keep them bundled together. When heat is applied to it, it actually shrinks.&nbsp;Cut a piece of tubing and slip the wires through. Then, use the heating element (NOT THE TIP!!) from your soldering iron to apply heat. The tubing shrinks and tightly holds the wires together. Pretty neat, huh? You can do this for most of the wires in this project.

![3d_printing_heat-shrink.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/143/medium640thumb/3d_printing_heat-shrink.jpg?1486829528)

## Wire Cap Sensor

Now we can connect the wires to the capacitive touch breakout board. I secured the PCB to a Panavise Jr to keep it sturdy while soldering in the wires. It's a good idea to tin the pins first. We'll need to connect the wires to **VIN** , **GND** , **SDA** , **SCL** , and **IRQ** labeled pins on the board. Doesn't matter which color goes where but I tend to keep them consistent&nbsp;(red for voltage/power and blue for ground).

![3d_printing_cap-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/096/medium640/3d_printing_cap-wired.jpg?1486761517)

## Connect Cap Sensor To Feather

Next, we'll need to connect the wires from the cap sensor to the Feather board. I kept the cap sensor secured to the panavise and secured the feather to the third helping hands. You can follow the circuit diagram for reference. We'll connect the following things together.

&nbsp;

- **SCL** from MPR121 to **SCL** on Feather
- **SDA** from MPR121 to **SDA** on Feather
- **IRQ** from MPR121 to **A4** on&nbsp;Feather
- **GND** from MPR121 to **GND** on Feather
- **VIN** from MPR121 to **3V** on Feather

![3d_printing_cap-wired-to-feather.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/097/medium640/3d_printing_cap-wired-to-feather.jpg?1486761576)

![3d_printing_cap-feather-connected.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/099/medium640/3d_printing_cap-feather-connected.jpg?1486761644)

## NeoPixel to Feather

OK, now we have the cap sensor connected to the Feather. Awesome! Next, let's get that NeoPixel ring connected to the Feather.

![3d_printing_neopixel-next.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/100/medium640/3d_printing_neopixel-next.jpg?1486761684)

## NeoPixel Wires

We'll need three wires to connect the NeoPixel ring to the Feather board. They can be the same length as the before (length of the enclosure). Repeat the same process as before, measure, cut, strip and tin all three wires.

![3d_printing_neopixel-wires.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/144/medium640thumb/3d_printing_neopixel-wires.jpg?1486830549)

## Solder Wires to NeoPixel

Next, tin the data-in, 5v power and ground pins on the NeoPixel ring. Then, solder in the three wires.

![3d_printing_neopixel-wiring.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/139/medium640thumb/3d_printing_neopixel-wiring.jpg?1486826653)

## Connect NeoPixel to Feather

With our NeoPixel wired up, we can now connect it to&nbsp;the Feather board.&nbsp;Make the following connections.

&nbsp;

- **Data-In** from NeoPixel to **Pin #6** on Feather
- **5V Power** from NeoPixel to **3V** on Feather
- **Ground** from NeoPixel to **Ground** on Feather

![3d_printing_neopixel-to-feather.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/101/medium640/3d_printing_neopixel-to-feather.jpg?1486761743)

![3d_printing_neopixel-wired-to-feather.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/102/medium640/3d_printing_neopixel-wired-to-feather.jpg?1486761767)

## Copper Tape

In order to connect the capacitive touch sensor to our "touch pads", we need a way to connect wires to them. I found using copper tape was&nbsp;the most reliable way to do&nbsp;this. This copper tape has a sticky adhesive backing that is conductive, so we can stick it to our touch pads. Cut five short pieces using scissors.

![3d_printing_copper-tape-cutting.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/140/medium640thumb/3d_printing_copper-tape-cutting.jpg?1486827286)

## Stick Copper Tape to Touch Pads&nbsp;(CNC Milled Only!)

OK, this next part is specifically for CNC milled touch pads. Since I milled my pads out of aluminum, I can stick the pieces of copper foil to them right away. If you've 3D printed the pads using&nbsp;conductive PLA, **DO NOT DO THIS YET**! You'll need to connect wires to the&nbsp;copper foil tape first, and then stick them to the plastic pads. I haven't tried, but I'm sure they'd melt if one were to tin the copper with them attached to the plastic pads. Either way, take note of which side the copper tape sticks too. It's the side with the noticeable lip.

![3d_printing_copper-tape-to-pads.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/141/medium640thumb/3d_printing_copper-tape-to-pads.jpg?1486827555)

## Touch Pad Wires

Now it's time to make some wires for connecting the touch pads to the capacitive touch sensor. We have six pads, so we'll need six wires. Again, they can be the same length as before (length of the enclosure). Measure, cut, strip and tin the wires.

![3d_printing_copper-tape-wires.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/142/medium640thumb/3d_printing_copper-tape-wires.jpg?1486828039)

## Connect Wires to Copper Tape

With our wires made, we can now solder them to the pieces of copper foil tape. I recommend tinning the copper foil first, and then solder&nbsp;the wires to them. If you've 3D printed the touch pads, you'll need to solder the wires to the stand-alone pieces of copper foil tape.

![3d_printing_pad-wires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/103/medium640/3d_printing_pad-wires.jpg?1486761810)

![3d_printing_pad-wire-solder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/104/medium640/3d_printing_pad-wire-solder.jpg?1486761828)

## Wired Touch Pads

And now we have wires connected to the pieces of copper tape, yay! If you've 3D printed the pads, now's a good time to stick the pieces of copper foil tape to them. Remember to stick them to the side with the visable lip. Not the side with a flush surface!

![3d_printing_pads-wires-soldered.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/105/medium640/3d_printing_pads-wires-soldered.jpg?1486761875)

## Connect Pads to Cap Sensor

Now it's time to connect the wires from the touch pads to the capacitive touch sensor. It doesn't matter which pad goes where, as long as they connect&nbsp;from pins 0-5. If we get them mixed up, we can use a multimeter to&nbsp;determine which pad is connected to pin number 0, 1, 2 and so on.

![3d_printing_cap-wired-to-pads.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/106/medium640/3d_printing_cap-wired-to-pads.jpg?1486761912)

## Final Circuit

And now we have completed our circuit! You can plug in the battery again to see if everything turns on. Though, I wouldn't test out the MIDI functionality yet because the touch pads might be touching (randomly triggering MIDI notes). So let's work on mounting the components to the encosure. On to the next page!

![3d_printing_final-circuit.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/107/medium640/3d_printing_final-circuit.jpg?1486761940)

# Bluetooth LE MIDI Controller

## Assembly

## Machine Screws

We'll use machine screws to secure the Feather and capactive touch sensor to the 3D printed enclosure. They can be 4-40 3/8 or M3 sized machine screws.&nbsp;

![3d_printing_machine-screws.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/108/medium640/3d_printing_machine-screws.jpg?1486761999)

## Mount Cap Sensor

Let's mount&nbsp;the capacitive touch sensor to the enclosure. First, I suggest tapping the holes on the enclosure using the machine screws. That way we can create threads in the standoffs. This will make it easier to fasten the screws through the enclosure and PCBs.

&nbsp;

Fasten two&nbsp;screws into the enclosure about half way, until the tip pokes through the standoffs. Then, grab the cap sensor PCB and lay it over the standoffs so the screws are lined up with the mounting holes. Hold the PCB in place while fastening the two screws until their flush with the surface of the enclosure.

![3d_printing_mount-cap.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/145/medium640thumb/3d_printing_mount-cap.jpg?1486831803)

## Mount Feather

Now we can mount the Feather board to the enclosure. We're basically going to repeat that process for the Feather. The microUSB port from the Feather should be pointing towards the cutout on the enclosure.

![3d_printing_mount-feather.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/146/medium640thumb/3d_printing_mount-feather.jpg?1486833530)

## Mount Switch

Next up, let's mount the switch to the enclosure. No screws necessary. There's a little spot dedicated for the slide switch. Insert the switch in between the walls at an angle and press in to snap into place. The body of the switch should have a friction fit in between&nbsp;the walls. There's also a third&nbsp;"wall" that keeps&nbsp;the body of the switch&nbsp;in place. The actuator from the switch will protrude from the cutout.&nbsp;

![3d_printing_mount-switch.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/147/medium640thumb/3d_printing_mount-switch.jpg?1486833781)

## Connect Battery

Now is a good time to&nbsp;plug in the battery to the Feather board.

![3d_printing_connect-battery.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/148/medium640thumb/3d_printing_connect-battery.jpg?1486834064)

## Install NeoPixel to Cover

The NeoPixel ring will be mounted to the cover of the enclosure. Two circular rings will hold the PCB. Place&nbsp;the NeoPixel ring into the circular holder and press it in. The PCB will have a semi-snug fit. We can secure it in place using a number of methods. Glue or tape is probably fine but I ended up using mounting tack.&nbsp;

![3d_printing_install-neopixel-cover.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/149/medium640thumb/3d_printing_install-neopixel-cover.jpg?1486834208)

## Install Touch Pads to Cover

OK, now we can work on installing the touch pads into the cover. To do this, start by inserting one&nbsp;pad through the cutout on the cover from the bottom. Then, orient the pad so the lip (or the side with the flush surface) rests on top of the cover. This way, when you press down on the pad, it doesn't&nbsp;pop out of the cover. It may or may not have a tight fit. Some of the tolerances differ due to the nature of 3D printing. Repeat this process for all six pads.&nbsp;

![3d_printing_install-pads-cover.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/150/medium640thumb/3d_printing_install-pads-cover.jpg?1486834474)

## Matching Pads with Pin Numbers

It's a good idea to match the pad with the pin numbers on the capacitive touch sensor. Pad 1 should be with Pin #0, pad 2 with pin #1, and so on and so fourth. The goal here is to order the pads so they're chronological with the pin numbers on the capacitive touch sensor.

If we can't determin which pad is connected to which wire, we can use a multimeter to find out. Use the continuity mode on the multimeter. Then, stick one probe to a pin number, and the other to one of the pads – you'll hear an audible&nbsp;"beep" when there's an electrical connection.

## Installed Touch Pads

OK, now we should have all six touch pads installed into the cover. Now is a good time to double check the order of the pads. Make sure they're consistent, chronological, all that jazz.

![3d_printing_installed-pads-cover.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/151/medium640thumb/3d_printing_installed-pads-cover.jpg?1486835014)

## Secure Pads and NeoPixel

Now that we have our NeoPixel ring and six touch pads installed into the cover, it's a good idea to secure them in place. Again, theres more than one way to skin a... never mind! So you could do this with hot glue, E6000 or tape. Whatever you have on hand. I personally used mounting tack. I like it because I can always remove it later without leaving&nbsp;behind a mess. But the goal here is to keep the components from coming out of their spots. Since 3D printing tends to have variable tolerances, the parts might pop out of place unless there's something holding it in place. &nbsp;

![3d_printing_pads-all-installed-cover.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/152/medium640/3d_printing_pads-all-installed-cover.jpg?1486835114)

## Install Battery

Let's go ahead and place the battery into the enclosure. It can rest on top of the components. You might think this might damage the components or wiring but, honestly I haven't experienced any issues. As long as you don't shake the enclosure ferociously, I think it'll be OK. There's also plent of room in the enclosure for some sort of cushioning, like papper or cotton? If you're worried about puncturing the lipo battery, you can wrap it in gaffers tape for extra protection. Or maybe use a AAA battery pack? Not sure that would fit. Options!

![3d_printing_install-cover.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/153/medium640thumb/3d_printing_install-cover.jpg?1486835517)

## Install Cover

OK now for the last step. Let's fit the cover over the enclosure. The indentations on the lip of the cover snap fit into the nubs on the inside edge of the enclosure. You'll need to apply some press to get them to snap together. Fitting the cover at an angle might be helpful. Once you get all six edges shut, you should have a really tight fitting. That cover is never coming out now! JK, you should be able to pry it open with your finger nails or spatula if you ever need to open it back up.

![3d_printing_installed-cover.gif](https://cdn-learn.adafruit.com/assets/assets/000/039/154/medium640thumb/3d_printing_installed-cover.jpg?1486835871)

## Finished Build!

Welp, thats all folks! Our assembly is complete. We can try it out now. Turn it on and connect your new MIDI controller to your preferred DAW. Check out the next page for connectivity options.

![3d_printing_cover-instaleld.jpg](https://cdn-learn.adafruit.com/assets/assets/000/039/155/medium640/3d_printing_cover-instaleld.jpg?1486836050)

# Bluetooth LE MIDI Controller

## Usage 

## User Interface

So how does this thing work? You'll definitely want to read Todd's guide on how the interface works.&nbsp;There's several commands and settings you can adjust by tapping on multiple pads. Change the tempo, pitch, velocity or even&nbsp;MIDI channel. Click the green button below to automatically teleport to Todd's guide.&nbsp;

![3d_printing_cheat-sheet.png](https://cdn-learn.adafruit.com/assets/assets/000/039/158/medium640/3d_printing_cheat-sheet.png?1486842242)

[Todd's Guide: MIDI User Interface](https://learn.adafruit.com/capacitive-touch-drum-machine/user-interface)
## Connecting&nbsp;BLE MIDI Devices

OK, so how do we connect BLE MIDI devices to our computer (or mobile device)? On a mac, you can use the **Audio MIDI Setup** utility. Open the MIDI studio window. Then, double click on the Bluetooth icon to open the Bluetooth Configuration window. From here, you'll see the MIDI device, "Adafruit Bluefruit LE". Click on the **connect** button to connect your computer to the device. Then, you should be able to use audio software like Ableton, Logic, GarageBand, etc. This guide won't cover how to connect MIDI devices to a particular piece of&nbsp;software. There's tons of other great resources for that!&nbsp;

![3d_printing_Screen_Shot_2017-02-11_at_1.03.58_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/039/156/medium640/3d_printing_Screen_Shot_2017-02-11_at_1.03.58_PM.png?1486836277)

![3d_printing_Screen_Shot_2017-02-11_at_1.03.55_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/039/157/medium640/3d_printing_Screen_Shot_2017-02-11_at_1.03.55_PM.png?1486836384)

![](https://cdn-learn.adafruit.com/assets/assets/000/039/292/medium800thumb/3d_printing_hero-drum-loop.jpg?1487040359)


## Featured Products

### Adafruit Feather 32u4 Bluefruit LE

[Adafruit Feather 32u4 Bluefruit LE](https://www.adafruit.com/product/2829)
Feather is the new development board from Adafruit, and like its namesake it is thin, light, and lets you fly! We designed Feather to be a new standard for portable microcontroller cores.

This is the&nbsp; **Adafruit Feather 32u4 Bluefruit** &nbsp;- our take on an...

In Stock
[Buy Now](https://www.adafruit.com/product/2829)
[Related Guides to the Product](https://learn.adafruit.com/products/2829/guides)
### NeoPixel Ring - 16 x 5050 RGB LED with Integrated Drivers

[NeoPixel Ring - 16 x 5050 RGB LED with Integrated Drivers](https://www.adafruit.com/product/1463)
Round and round and round they go! 16 ultra bright smart LED NeoPixels are arranged in a circle with 1.75" (44.5mm) outer diameter. The rings are 'chainable' - connect the output pin of one to the input pin of another. Use only one microcontroller pin to control as many as you can...

In Stock
[Buy Now](https://www.adafruit.com/product/1463)
[Related Guides to the Product](https://learn.adafruit.com/products/1463/guides)
### Adafruit 12-Key Capacitive Touch Sensor Breakout - MPR121

[Adafruit 12-Key Capacitive Touch Sensor Breakout - MPR121](https://www.adafruit.com/product/1982)
Add lots of touch sensors to your next microcontroller project with this easy-to-use 12-channel capacitive touch sensor breakout board, starring the MPR121. This chip can handle up to 12 individual touchpads.  
  
The MPR121 has support for only I2C, which can be implemented with nearly...

In Stock
[Buy Now](https://www.adafruit.com/product/1982)
[Related Guides to the Product](https://learn.adafruit.com/products/1982/guides)
### Breadboard-friendly SPDT Slide Switch

[Breadboard-friendly SPDT Slide Switch](https://www.adafruit.com/product/805)
These nice switches are perfect for use with breadboard and perfboard projects. They have 0.1" spacing and snap in nicely into a solderless breadboard. They're easy to switch no matter what size fingers you have, but not so easy that they'll get flipped by accident. Work great as...

In Stock
[Buy Now](https://www.adafruit.com/product/805)
[Related Guides to the Product](https://learn.adafruit.com/products/805/guides)
### Lithium Ion Polymer Battery - 3.7v 2500mAh

[Lithium Ion Polymer Battery - 3.7v 2500mAh](https://www.adafruit.com/product/328)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of **2500mAh** for a total of about 10 Wh. If you need a smaller battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/328)
[Related Guides to the Product](https://learn.adafruit.com/products/328/guides)
### Silicone Cover Stranded-Core Wire - 30AWG in Various Colors

[Silicone Cover Stranded-Core Wire - 30AWG in Various Colors](https://www.adafruit.com/product/2051)
Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness has to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2051)
[Related Guides to the Product](https://learn.adafruit.com/products/2051/guides)
### Adafruit Flex Perma-Proto - Half-sized Breadboard Flex-PCB

[Adafruit Flex Perma-Proto - Half-sized Breadboard Flex-PCB](https://www.adafruit.com/product/1518)
Make your next project super-flexy with a prototyping board that can twist and bend. We took our lovely classic perma-proto design and had it made from incredibly thin polyamide film. It's extremely bendable, and you can cut it easily with scissors. It has a bend radius of 1cm or better...

In Stock
[Buy Now](https://www.adafruit.com/product/1518)
[Related Guides to the Product](https://learn.adafruit.com/products/1518/guides)
### Copper Foil Tape with Conductive Adhesive - 6mm x 15 meter roll

[Copper Foil Tape with Conductive Adhesive - 6mm x 15 meter roll](https://www.adafruit.com/product/1128)
Copper tape can be an interesting addition to your toolbox. The tape itself is made of thin pure copper so its extremely flexible and can take on nearly any shape. You can easily solder to it, and the tape itself can carry current just like a wire. On the back is an electrically conductive...

In Stock
[Buy Now](https://www.adafruit.com/product/1128)
[Related Guides to the Product](https://learn.adafruit.com/products/1128/guides)

## Related Guides

- [Wireless UNTZtrument Using BLE MIDI ](https://learn.adafruit.com/wireless-untztrument-using-ble-midi.md)
- [Mindfulness Clock OF DOOM](https://learn.adafruit.com/mindfulness-clock-of-doom.md)
- [Trinket NeoPixel LED Longboard](https://learn.adafruit.com/trinket-neopixel-led-longboard.md)
- [Introducing Adafruit Feather](https://learn.adafruit.com/adafruit-feather.md)
- [Zelda Guardian Robot Terrako Companion](https://learn.adafruit.com/terrako.md)
- [2014 Halloween 3D Printed Projects Roundup](https://learn.adafruit.com/2014-halloween-3d-printed-projects-roundup.md)
- [NeoPixel Ring Lamp](https://learn.adafruit.com/neopixel-ring-lamp.md)
- [Glowing LED Chair](https://learn.adafruit.com/glowing-led-chair.md)
- [Sipping Power With NeoPixels](https://learn.adafruit.com/sipping-power-with-neopixels.md)
- [NeoPixel Ring Bangle Bracelet](https://learn.adafruit.com/neopixel-ring-bangle-bracelet.md)
- [CircuitPython Media Dial](https://learn.adafruit.com/media-dial.md)
- [Adafruit Capacitive Touch Sensor Breakouts](https://learn.adafruit.com/adafruit-capacitive-touch-sensor-breakouts.md)
- [NeoPixel Matrix Snowflake Sweater](https://learn.adafruit.com/neopixel-matrix-snowflake-sweater.md)
- [Overwatch Prop Gun: Lucio's Blaster Pt. 3](https://learn.adafruit.com/overwatch-prop-gun-lucios-blaster-pt-3.md)
- [Halo Energy Sword by Mattel NeoPixel Upgrade](https://learn.adafruit.com/halo-energy-sword-by-mattel-neopixel-upgrade.md)
