Introduction: Custom Built MIDI Controller

About: I also make music. Get my album here http://triptikmusic.bandcamp.com/album/bain-mr-many-enemies

Im entering this jnstructable into the musical instruments contest, if you like it please vote for me cos I'd love a new synth! As an electronic music producer/performer, I have gathered quite a few different MIDI controllers over the years but always found that the controllers I have don't always suit my playing style, or have enough controls in the right places so I decided I would have a go at building my own. I have a very basic knowledge of electronics and a small amount of experience with a soldering iron so I wanted a simple way to achieve this that was both affordable and adaptable. 

I came across a company based in Texas by the name of Livid Instruments. As well as manufacturing their own brand of MIDI controllers, they also make a MIDI enabled microcontroller board which allows you to add various controls such as potentiometers, buttons and LED's in as many configurations as you can think of. It's a relatively simple process and their technical support is incredibly good should you get stuck or have any questions, of which I had many.

Step 1: Choose Your Controls

I use Ableton Live almost exclusively for any performance/production so I firstly considered how to somehow recreate some of the programs interface into my own controller. Ableton's drum rack is one of the devices I use the most play in samples and drum loops so I started here. The Brain can support up to 179 digital inputs, digital here basically meaning switches, in this case, normally open, momentary contacts. I did look into velocity sensitive pads, similar to those of the Akai MPC series, but I soon realised that it would be way out of my budget to use force sensitive resistors in the same way on my controller so I opted to use some simple arcade style buttons. I found some illuminated buttons on eBay which were perfect. I bought 16 which cost around £20 including the button, LED housing and microswitch. 
Next came the analog controls. Analog in this sense means anything that will output a specific value/voltage such as a slider, rotary potentiometer or force sensitive resistor. It's important to note here that potentiometers with values between 10k and 100k work best with the BrainWith all my shop bought controllers I've always found that they were lacking even just an extra 2 or 3 sliders so I decided to play it safe and go for 11, one of them being a dedicated crossfader. I wanted to recreate the look of the effects racks I use the most in Ableton on my controller so for rotary potentiometers I chose to include two lots of 8 in a 4x2 configuration, two lots of 3 for channel EQ's and 4 extra just in case. I made a crude design in Sketchbook express which you can see in the images to get a rough idea of how to layout the controls and to figure out whether I had enough controls for its purpose. 

Step 2: Important Considerations When Choosing Your Controls

There are a few things you should consider when buying your controls parts. Potentiometers come in all different shapes and sizes. If you know what you're gonna house your controller in, then make sure your potentiometers are tall enough to fit through the material. I found out the hard way that the potentiometers I bought were a tad too short compared to the depth of my enclosure, meaning the shafts didn't come far enough out of the enclosure to fit the knobs onto so I had to get all new potentiometers and re-do a lot of my work. 

Secondly, if you have a certain type of knob fitting you want to use, make sure it fits the type of potentiometer you are using. Check the diameter and fitting type on both the knob and the potentiometer shaft. For example, a d shaped knob fitting will not fit on a splined shaft potentiometer. It seems obvious but it's worth remembering, especially if you have a certain preference for the look/ feel of your controller. Also make sure that on your layout, you space the potentiometers far enough apart to accomodate the size of the knobs so that you can control them easily. Slide potentiometers are pretty thin but the control knobs are usually about 2cm and you don't want to be knocking knobs against each other when your playing with them.

Step 3: IGNORE ALL OF THE INNUENDOS IN THE PREVIOUS STEP

It's really hard to talk about knob size and shaft type without it sounding a bit rude. Try and concentrate.

Step 4: Spend Ages Trying to Figure Out How to Solder It All Together

To start with I'll go through the process of connecting the buttons. Connecting controls to the board is fairly simple. Each control element is connected to a series of pins with either 10, 14 or 16 way flat ribbon cable and connectors. You should always use ribbon cable as opposed to soldering directly to the pin as this can damage the board itself. If you're not sure how to connect ribbon cables, this instructable will show you how.

Firstly, one side of each button needs to be wired to what's called the 'external header' (labelled C on the Brain board diagram), specifically the VDD pin which is the 13th pin on the header (check the pin header image to see the pin number order). The other side of the button needs to be wired to one of the 'button matrix' pins (labelled A on the Brain board diagram), one button per pin, allowing up to 16 buttons to be added. In order to prevent two signals being sent to the brain when a button is pressed (ON and OFF) you need to add pull down resistors, a normal resistor which pulls an input to ground to allow current to escape when a button is turned off. When I first tested the buttons I'd wired, I was using them to control the on/off of an effect but I hadn't used pull down resistors. It meant that when I pressed a button, the effect turned on fine but as soon as I released the button, the effect would go off again. It was really annoying and took me ages to figure out.

To add pull down resistors, you need to connect a resistor between 30k and 39k to a 'button matrix' pin. The other side should then be connected to the external headers ground pin, the first pin on the 'external header' indicated by an arrow. Each button matrix pin used needs a pull down resistor.

To make the wiring easier and less messy I decided to create a mini circuit board to connect it all together to save connecting 16 different wires to one pin. Using DIY Layout Creator to plan my perfboard circuit I came up with the image above. It should also help show how everything is wired up.  

Step 5: Wiring the Pots

As I mentioned before, you should be using potentiometers with values between 10k and 100k. Rotary potentiometers have lugs to solder to, called ground, voltage and wiper. With the lugs facing you, the leftmost lug is ground, the middle lug is wiper and the rightmost lug is voltage as labelled in the picture above. Although it's not necessary, I like to solder a piece of 3x2 perfboard to the lugs as seen in the picture. It takes a bit more time but it makes things easier in the long run as sometimes it can be tricky soldering directly to the lugs and the board also acts as a heatsink, preventing damage to the internal parts of the potentiometer due to prolonged heat from the soldering iron.

When it comes to slide potentiometers, they connect in the same way through ground, voltage and wiper solder lugs although they look slightly more complicated. The sliders I got had 4 lugs on one side and 2 on the other. Check the picture to see which lug is which. I wasn't feeling very convinced that the connections to the lugs would be strong enough so I stuck some heat shrink on each connection for peace of mind. Again, this isn't totally necessary but it's preferable to going through each connection one by one testing with a multimeter when something comes loose.

To connect analog controls/potentiometer to the Brain you need some 10 way ribbon cable. Using ribbon cable connectors, the ribbon cable is attached to one of the analog jumpers on the board named JP7 through to JP14 (labelled D on the Brain board diagram). The first pin on each jumper is ground, indicated by an arrow. The second pin is voltage and the remaining 8 pins are the wipers for each potentiometer. This allows for 8 separate controls per pin header, resulting in a total of 64 available analog controls. It's important to note that the Brain scans the potentiometer inputs sequentially, starting at JP7, so your first set of potentiometers should connect to JP7, the second set to JP8 and so on. The red wire on the 10 way ribbon cable connects to ground (the first pin on the header) so each potentiometers ground lug should connect to this. The next wire on the ribbon cable (pin number 2 on the header) is voltage so each potentiometers voltage lug connects to this. The remaining 8 wires on the ribbon cable are wiper inputs which obviously connect to the wiper lugs on each potentiometer.

All the potentiometers need a low pass filter to improve their overall response. The low pass filters come in the form of capacitors. Larger potentiometer resistances requires smaller capacitance so as I was using 100k potentiometer I used 0.01uF ceramic capacitors. If I was to have less potentiometers on my controller I could use smaller value capacitors but I won't go into that now.

The capacitors need to be wired between the ground and wiper of each potentiometer. To make things easier to manage I made another perfboard circuit to do this for each potentiometer based on the above layout created in DIY Layout Creator. 

Step 6: Adding LED's

The Brain supports up 14 direct wire LED's or 48 LEDs in a matrix. My plan was to use the LEDs that came with the arcade buttons I got to turn on/off whenever the buttons were pressed to provide some feedback so I wouldn't be screen watching as much. Unfortunately, the Brain only outputs 5 volts and the LEDs I got with the button need 12 volts. I tried changing the LEDs to lower powered ones but they weren't bright enough and looked awful through the translucent buttons. I tried wiring the LEDs to an external 12V power source, routing each LED through the microswitch on the button so which worked but meant that I was getting seperate MIDI signals going into the analog connections causing the brain to function badly and act confused.

I ended up biting the bullet and making the only function of the LEDs aesthetic, providing no MIDI feedback whatsoever.

I grouped the 16 LEDs into 8 groups of 2, connecting the anode (positive/long leg) to a 270 ohm resistor, then the other end of the resistor to the positive lug of a 12v power supply input.  The cathode (negative/short leg) of the LED was then connected to the anode of another LED with it's cathode running to the negative lug of the power supply input. I repeated this process for each of the remaining LEDs. Once again I made things easier by making a perfboard circuit for everything as shown in the above picture.

Step 7: Boxing It All Up

For my enclosure I found an old cutlery case from a local market which was the perfect size. I made some paper cut outs of each control element to plan the layout and to get the sizing and spacing set. Then it was a case of drilling and cutting once I had my layout set. The top panel was quite thin and when I play pads I usually hit them pretty hard so I had to reinforce the button section from underneath. I bought an aluminium project box from maplins as pictures and measured out each of the holes to correspond to the top wood panel. I cut some small pilot holes in the centre of each button marker with a dremel then used a hole saw bit and a power drill to open the holes up fully, using a file to get rid of any fragments of aluminium and ensure the buttons fit through the holes snugly. I measured the space between the top panel and the base of the box then bent the walls of the aluminium enclosure to size using a vice and brute force. For extra strength I made the aluminium enclosure slightly taller so that it could sag a little instead of being completely rigid. Then I used the paper template I made for the aluminium to mark and cut the holes out of the top panel of wood. For the slider holes I marked out their positions and made some pilot holes in each end of the slots to get a jigsaw in and cut straight through. The set square I used to mark out the spacing of the sliders was the same width as the slider shafts so to make sure the slots were straight and wide enough to prevent any resistance against the wood I slotted the long end of the square through the slots and used a dremel to open up the slots as needed. To attach the sliders from underneath I found some brackets in my dads garage and wrapped them in self amalgamating tape to ensure a snug fit to the sliders. Then it was a case of getting all the sliders squared up and screwing in the brackets from the top panel with the sliders sandwiched in between. The rotary potentiometers were fairly straight forward. I used an Archimedean drill to cut the pilot holes out then used a power drill to open them out fully. The thickness of the top panel meant that the knobs kept catching the fastening nuts so I had to carefully chisel out slices if the bottom if the panel to allow the potentiometers pop out a little further.

I cut a notch out of the box where the lid opened so that I could feed the power supply and usb cable through to the brain and screwed the brain to the base to secure it in the enclosure, making sure there was plenty of room between the circuitry and the component in order to prevent any short circuits.  A few final tests on the components and it was ready to program.

Step 8: Program the Brain and You're Done.

I won't bother going through the procedure for programming the brain as each controller will differ in how many controls it has. It's a really simple and intuitive process. Just go here http://lividinstruments.com/support_downloads.php and get the brain editor software then follow the programming instructions from here http://wiki.lividinstruments.com/wiki/Brain_Configure . It's incredibly easy to use and intuitive if you follow the instructions, by far the simplest part of the whole build.

And that's it!


Musical Instruments Contest

Participated in the
Musical Instruments Contest