Are you looking for a custom MIDI controller that any manufacturer haven’t created yet? Well you might as well do it yourself then. Follow our guide and create a simple yet efficient custom DIY MIDI controller using Teensy++ and Arduino.
DIY MIDI Controller – Teensy++ and Arduino
Some of you may be wondering, what the hell is Teensy or Arduino? Well don’t worry if you are not familiar with these. They are just the small, programmable computers (microcontrollers) that are the brains of your DIY MIDI controller. They are easy to use – just edit the code on your computer and upload it! If you are installing the Arduino environment on your computer for the first time I would recommend not installing the latest version. The Teensy is a complete USB-based microcontroller development system, while Teensyduino – which is what we are using – is an addon for Arduino that enables Teensy to be used in the Arduino programming environment. If you’re not familiar with it follow the tutorial, it contains all the step-by-step guide to get your Teensyduino up and running.
Here’s a full pin configuration of the Teensy++.
All numbered pins on the Teensy++ board can be used as digital inputs/outputs. A digital pin is simply an on/off pin. It can be on (HIGH) or off (LOW). We use digital pins as input to read pushbuttons, or as outputs to turn LEDs on.
The pins 14,15,16,24,25,26 have pulse width modulation (PWM), meaning that we can send a variable voltage out of that pin between 0 volts and 5 volts. PWM pins are ideal for LEDs as they allow us to vary the brightness of the LED.
Each pin with ‘INT’ is an interrupt pin. Interrupt pins are important cause we need them to read encoders. They are simply digital pins which have special functions attached to them and will notify the Teensy when their value has changed. The Teensy++ board has 8 interrupt pins, allowing you to read four encoders.
Analog pins allow you to read variable voltages between 0 volts and 5 volts. We use analog pins to read potentiometers. These pins can also be used as digital inputs if specified.
In the top right corner we have power (+5V) and in the top left we have ground (GND). All Components will need to use ground, and all analog components will need to use both ground and power.
DIY MIDI Controller – The Hardware
The hardware part that you’ll need consists in pushbuttons, faders, potentiometers, potentiometer knobs, encoders, wires and connectors, a multiplexer, header pins, LEDs and a PCB. There are many other components you may want to include in your interface such as LCDs, touchscreens, trackballs, pressure pads, proximity sensors, etc. But, if this is your first experience with this kind of stuff we suggest to keep things simple. As you can probably tell there is going to be some soldering necessary to build your controller. So you must have a flux pen and a lot of patience, because it usually takes quite a lot of time and not always works the first time. So be ready to correct the soldering work if your tests reveal something wrong.
The pre-crimped wires can be cut in half to make two wires. The cut ends can then be soldered directly to your components and the crimped ends plugged into the crimp housings. It is helpful if you make the wires long enough so that your top panel can plug into the bottom PCB while the top panel remains standing next to it. If you are building a medium/large controller it would be wise to purchase 24″ crimped wires, as opposed to 12″. It is also important to know approximately where your PCB will be positioned on the bottom panel so you can cut your wire to the appropriate length. Some components (like arcade buttons) have large heights and will interfere with the components on your PCB. If you cut your wire too long it may stick out the side, so take care when cutting.
The first and most important thing to understand is which holes on your bare PCB are connected to one another. Notice how there are white lines/boxes outlining some of the holes. These outlines identify which holes are connected together. Although none of the holes look connected from the outside, the ones which are outlined by a white box are connected together internally. So if you solder any two connections within a box, think of this as soldering those connections directly together. Follow the +5V/ground connections from the Teensy++ board and notice how both the power/ground become connected around the entire perimeter of the board. The orange wires at the bottom of the board send power/ground from one side of the board to the other. You will notice eight headers and two wires coming out of the Teensy++ board. This is because some of the pins on the Teensy++ board are located internally. We have to add these headers/wires so we can access these pins.
First fasten your PCB to your bottom layer with some hardware. You need to connect you crimp wire ends into the crimp housings. There is a specific orientation that causes the crimp connection to ‘click’ into the housing. Once the wire is connected properly to the housing you will notice that you cannot pull it out, and that’s the sign of a job well done. In the case you have made a mistake and need to remove the crimp connection from the housing just tilt the tiny plastic flap in the front backwards and gently remove.
Now it is important you plug all ground/power/reading connections into different housings. Note the orientation of the ground/power/reading header pins on the PCB. Using zip-ties or tape to group wires for certain types of components is highly recommended. Do not mix up the power/input/ground potentiometer connections when plugging them into your board. If you have many components you may just want to hookup and test a few at a time.
DIY MIDI Controller – The design
Do not overcrowd your board! Leave lots of space between components. Think minimalist. Although your Teensy++ has many inputs available it is foolish to try and make use of all of them. Hookup will be a nightmare if your overcrowd the board. You can add a shift button to your DIY MIDI controller to reduce the number of pushbuttons. When you hold your shift button, all the pushbuttons on your board will send a different message, doubling the total number of pushbutton messages available on your controller. Keep your modules a reasonable size and pay close attention to the height of your components. Ones which are too tall will cause your controller to look bulky and odd. When creating your layout you need to reference the datasheet constantly to ensure your cutouts match the components. If the specific components cutout dimensions are not given, it is best to increase the size by 0.1mm. For example, the rotary potentiometers that I used have a bore diameter of 9mm, so the cutout should be 9.1mm.
DIY MIDI Controller – Final Steps
Your DIY MIDI controller is now ready to send MIDI messages, and your computer should recognize it as a native MIDI device. Now I would not recommend jumping directly to hookup with your software, rather, download a free MIDI sniffer (there are many of them out there) and test your MIDI messages in that first. The sniffer, as well as your software, should recognize the device as ‘Teensy MIDI’.
Once you are happy with the MIDI output then proceed to mapping your controller with your desired software. You can connect these controllers to Ableton, Max/Msp, Traktor or a custom software, but we recommend Traktor since it has included many amazing features that make custom mapping a breeze. The custom mapping options are available online for most of the DAWs.