Instructables

Step 2: Design

Before leaping into the controller design, it pays to have a look around at what's out there in term of controllers. What appeals to you? If possible try and get your hands on some gear to get a feel for things, such as button layout and tactile feedback.

The inspiration for this article comes from DJ TechTools ' MIDI Fighter , specifically the grid layout of arcade buttons. The use of arcade buttons appeals to me as they are nice and large, and don't feel mushy unlike some rubberised buttons.

So with that in mind, let's begin the design. It helps to use some sort of diagramming software to aid in the design process such as Microsoft Visio or the open source Dia . This will help in terms of component dimensions and scale so you know everything will fit.

Design Considerations
When designing your MIDI controller, remember that an Arduino only has 6 analogue inputs for knobs/sliders and 12 digital inputs for buttons/switches (technically it has 14, but two of those will be used for serial communications to the computer). The analogue inputs can also double as digital inputs so you could have up to 18 buttons on your design, or 17 buttons and 1 slider, or 16 buttons and 2 sliders, etc down to 12 buttons and 6 sliders.

Also try to find the dimensions of all of the components you wish to use so you have a good idea of what will and won't fit, and the clearance you'll need to give each component. For example the sliding potentiometers I've chosen have a travel length of 60mm, but then there's the extra clearance required on either side of the slider for the slider knob.

More analogue and digital inputs could be used with the aid of shift registers, multiplexers, or extra microcontrollers, but that is beyond the scope of this article.

Design 1
I initially wanted to make a copy of the MIDI Fighter, so I drew up a basic 4 x 4 grid of arcade buttons based on the arcade button's dimensions (27mm total diameter, 24mm mounting hole). Although it looked kinda cool, I also wanted some analogue inputs such as knobs and faders. I also didn't want to go through the hassle of cutting my own acrylic to make the case. So I decided then I'd find a plastic enclosure to house the controls and base the design around those dimensions.

Design 2
After a bit of hunting around for different enclosures, I eventually settled on this keyboard enclosure . Its dimensions are 189mm x 134mm, with a sloping height from 32mm up to 54.7mm. When choosing your enclosure make sure that your components are going to fit inside it. The mounting depth for the arcade buttons is exactly 32mm, so they will fit in the enclosure I've chosen.

Given this enclosure isn't square, I went for a 5 x 3 button arrangement and squeezed in a couple of sliding potentiometers up the top. When working out how to place the sliders, make sure to leave enough room for movement of the slider knob so it doesn't hit any other components. You'll have to find out the dimensions of the slider knob you wish to use so you can accurately place the slider. As the enclosure is higher at the back it also provides room to mount the Arduino clone underneath the buttons and sliders.

At this stage I'd recommend printing out a 1:1 sized copy of the design to ensure the layout feels natural, and all of the components are easily reachable. My design felt good, but I felt like I was wasting the Arduino's six analogue inputs with only two sliders.

Final Design 1
For the final design I removed the left most column of buttons and replaced it with a column of four rotary potentiometers, so now all six analogue inputs will be used. I also packed the components a bit more tightly together so they'd fit within the recess on the front panel.

Once you're happy with your design, go ahead and order the necessary components. Remember to check the knobs you've chosen will actually fit the sliding/rotary potentiometers. Some rotary knobs are designed for a 'D' type shaft, while others are designed for shaft with 18 teeth, while others simply screw onto the shaft.

Final Design 2
After about a week all of the components arrived, but I immediately noticed the sliders were too long (the dimensions on the datasheet were incorrect so I thought they were shorter). So rather than going through the hassle of exchanging them, I tweaked the design and swapped the sliders and rotary potentiometers around. I also measured the dimensions of the enclosure recess to ensure everything fit correctly. 
 
Remove these adsRemove these ads by Signing Up
Rekon you could put LED's (just some small voltage ones with reisitors) inline with each switch so you get a light when each button is pressed?