Arcade Button MIDI Controller by fraganator
Featured
Having a hardware interface to your favourite music / DJ / VJ software can really open up doors in your creativity. The most widespread form of hardware control to your PC for such applications is a MIDI based controller.

A MIDI controller can send and receive MIDI messages to your PC, allowing direct control of your software. Not only that, but the controls can generally be mapped to anything your like. So what might be a volume fader for one person can be an effect filter for another.

This article will describe how to build and program a custom arcade button MIDI controller, while trying to keep the price below $100. It is aimed at electronics and programming novices.


 
Remove these adsRemove these ads by Signing Up

Step 1: What You'll Need

components.jpg
tools.jpg
Below is a list of components used to create the MIDI controller. The cost for this project is based on the components needed for the MIDI controller. Other tools such as a soldering iron or a power drill, or common components such as solder and wire aren't included in the final cost. Tools which I did have to purchase are marking with italics , and their price is shown. All prices are in AUD except where indicated.

Required Components
1 x DFRduino (cheaper Arduino clone) $28.80
1 x USB cable (A to B connector, like that on a printer) $3.95
1 x Plastic enclosure $15.75
12 x Sanwa 24mm arcade buttons $26.28 (USD)
4 x 10k linear potentiometer $4.88
4 x Pot knobs $3.80
2 x 10k linear sliding potentiometer $7.54
2 x Slider knobs $2.04
5 x 10mm M3 nylon threaded spacers $2.00 (I got a bag of 25 for $9.95)
4 x 16mm countersunk M3 screws $1.00
3 x 4mm M2 self tapping screws $0.75
1 x 4.7 kΩ resistor $0.10
4 x stick on rubber feet $2.00

Total $98.89

All of the above can be found at most online electronics stores (I use the excellent Little Bird Electronics ), except for the Sanwa arcade buttons which can be found at arcade replacement parts stores, or from DJ TechTools . It pays to purchase one or two spare buttons and perhaps a spare potentiometer in the event that the part is faulty or you accidentally make it faulty.

Required Tools
Soldering iron
Solder
Wire stripper
Small gauge stranded wire (22 AWG), preferably in three or more different colours
About 1m of 2.5mm heat shrink
Power drill or drill press
Drill bits (2mm, 3mm, 7mm, and 11mm)
Spade bit (24mm) $12.49
Countersinking bit
10mm hexagonal wrench or spanner
Needle-nose pliers
Small riffler files $15 for pack of 10
Regular file
Phillips-head screwdriver 
1-40 of 291Next »
visivopro says: May 18, 2013. 2:21 PM
Any chance you could update your parts list? Nearly every link is broken or down.

I would very very much appreciate it

Thank you in advance
dmusumeci says: May 4, 2013. 9:47 AM
Hi, i've got an Arduino Leonardo, but this program doesn't work with it. How can I resolve this problem?
mikemorana says: May 10, 2013. 9:03 PM
Could be a number of different problems. i.e. if youre trying to send MIDI through the hardware serial connections (pin0 and pin1) instead of USB, then you need to use a different protocol for Leo. Serial1 instead of Serial.

Main difference between the Leonardo and Uno are the way it handles Serial. But to troubleshoot it we'd have to know more about the setup. is it exactly as in the tutorial?
cesar.dario.garcia says: May 4, 2013. 8:18 PM
// When mapping to a MIDI Fighter we need to skip a row of buttons. Set this from 0-3 to define which row to skip.
// Rows are ordered from bottom to top (same as the MIDI Fighter's button layout).

sorry to bother but can someone explain me why we skip a ropw of buttons, because, im doing an arduino midi but i only have 6 buttons, so i change the size in the arrays but, when the reading of digital imputs come i found this:

#ifdef MIDI_FIGHTER
if (i >= SKIP_ROW * 4)
{
digitalOffset = i + 4;
}
else
{
#endif


so, i am using the "midi fighter" even if it doesnt do all the things it should because of the 6 buttons only, but how should i change this logic to make sense with my program-?? can someone help me, i really thank you all for the help.
rpinsenschaum says: May 4, 2013. 8:00 AM
Hi Fraganator...thanks for this amazing tutorial. I built one myself for my Final Year Project and it went down a treat. Tested it with Serato by assigning the buttons to que point and the pots to the filter banks. I aslo use it in Ableton Live to launch clips. Great little piece of kit to have!!! Please design another soon :)
aholmes14 says: May 3, 2013. 4:19 AM
Awesome and inspiring tutorial, many thanks!
TAGAPAW says: Apr 20, 2013. 11:55 PM
Hi Fragnator , it's really nice & detail instruction. Thanks a lot for the instructables. I just wanna ask about you say about "2. Utilise the LUFA library to make the controller a true USB MIDI controller, and not rely on extra PC software." How to ? Thanks a lot
estemarito says: Apr 1, 2013. 4:24 PM
Hi Fragnator, it is possible to use ONLY 6 linear sliding potentiometer in my project? (without buttons). And if i buy Arduino Mega R3, could connect 8 sliding potentiometer and 8 linear potentiometer?
timmm94 says: Apr 1, 2013. 6:24 AM
Hi Fragnator.

First off al many thanks for this great tutorial.

I am about to make my order for all of the components, and want to make a 16 arcade button controller.

Wil this buttons send midi note massages. So like C3 ? And could this easily be changed to other notes?


Best regards.
Tim
mickartcan says: Mar 26, 2013. 7:59 AM
Hello everyone.
I have a problem to setup this awesomeness machine controller on a mac that work perfectly on my PC but for some reason on my mac book i missed something only the RX flashing any idea?
i need it for mixing live ;)
Joeldc510 says: Mar 3, 2013. 8:43 AM
I hope u haven't forgotten about me. =( I know u must be very busy. I'm just reminding you that I wrote to u a while back about adding a shift register to the project to add more digital inputs to the arduino. Hope all is well!
jmlynch says: Feb 25, 2013. 11:00 PM
if i wanted to change the code so that the digital buttons sent a simple on/off signal instead of playing a note how could i do that
troy_4o says: Feb 9, 2013. 2:33 PM
Hello to all. Great respect to the author of this project. I made ​​12 buttons and 6 potentiometer arduino uno rev.3 it work the first time (in my mind little experience with soldering). Searching the net I found MOCO for LUFA http://morecatlab.akiba.coocan.jp/morecat_lab/MocoLUFA.html
It is interesting HACK for Arduino This is a native MIDI firmware for atmega8u2 on Arduino Uno. My question is whether it is possible through this HACK code to work without Serial to MIDI convertor?
PS:Let me be excused for my bad english.
Best Regards from Bulgaria
z4rReg says: Feb 9, 2013. 9:33 AM
Hello !
First of, thank you for publishing : ) it looks awesome.

I have a question referring to the number of buttons.
I intend to build a button matrix of around 20 buttons (5 * 4. I am a beginner but have colleagues that would aid me. The question is, will the script work with a button matrix at all?
I will be usind the DRFduino Uno v3.

I hope you can help : )
Nunxa says: Jan 24, 2013. 2:19 AM
fraganator, first of all i want to congratulate you for your work, it's incredible.

I've been reading some questions, but no one have asked about this.
What's about latency? I want to build one, but i would like to know if the latency is very big or simply as any midi device.

Thanks you and greetings from Spain.
fraganator (author) says: Dec 13, 2011. 3:58 AM
Sorry for the lack of responses everyone! I recently got married and have been on honeymoon for the past few weeks :) I'll aim to get through all the unanswered questions in the coming days.
TURTLE001 says: Jan 14, 2013. 12:53 AM
Dude!!!
Congratulations!!!
Hope you had a nice honeymoon :)
apefive says: Dec 14, 2011. 2:23 AM
Congratulations! :)
fraganator (author) says: Dec 14, 2011. 9:38 PM
Thanks very much :)
caducotavio says: Apr 4, 2012. 12:48 PM
Greetings!
I'm a newbie, so please, be patient.
I've been trying to make my midi controller work, but I've come across two question: the first is about the incoming and outcoming ports to be used when under mac os 10.7?

About the sketch, I noticed there are conditions written specifically the arduino mega and others; mine, is uno. Do I have to change anything in order for the sketch to work correctly with my equipment?

Thanks in advance!
fraganator (author) says: Apr 7, 2012. 12:29 AM
I don't have access to OSX at the moment, so I can't comment on what the exact incoming and outgoing ports should be.

In terms of the sketch, it should run fine on the Uno without any modification. The conditions only come into effect when compiling for the Mega or Teensy.
TURTLE001 says: Jan 14, 2013. 12:50 AM
I used a uno, and my freinds used a mega
They both work fine :)
(in regards to both the origional question, and your answer)
AssAulterPT says: Apr 9, 2012. 8:27 AM
Hi, i'm using only 12 buttons. Do I need to change the code or can i still use the same?

And, on Serial MIDI Converter, the TX doesn't flash green. What's happening
Do you have any idea?
TURTLE001 says: Jan 14, 2013. 12:48 AM
Hey dude/Dudette
No you dont need to change the code in any way!!
Thats whats so awesome about his code, it is fluid.. meaning you can have as many or as little as you feel you want!! with in reason :)

As for the midi problem, do you have midi yoke installed??
If not, look up "MIDI Yoke" on google, download and install
That is most likely your problem!!!

Get back to me if it works or not!!
Cheers, hope it helps!!!
:)
LanerD15 says: Jun 6, 2012. 5:27 PM
PLEASE HELP ME!!!!!

I have an arduino uno and whenever i connect the 5V it shorts out and turns off
Any suggestions?
(I am an amateur so be gentile)

Thanks
TURTLE001 says: Jan 14, 2013. 12:42 AM
Hey bro,
same thing happened to me at one point!! to fix that check this:
1) every wire is connected. So signal, GND and 5V
if something isnt connected by those three things it shorts out!!
2)Make sure you dont touch the 5V and GND wires
It shouldnt damage your arduino but that is a very common cause to the problem for beginners!! Im one as well so i know from experience :)

Hope this helps!!!
fraganator (author) says: Jun 6, 2012. 7:19 PM
The shorting out is most likely caused by the ground and 5V signals being directly connected. You can verify this with a multimeter - switch it to the continuity setting, or if it doesn't have one, the resistance setting. Disconnect the ground and 5V wires from your Arduino, then connect one probe of the multimeter to the ground wire and the other probe to the 5V wire. If you hear a beep or have a low resistance reading (less than about 5 Ohms), it confirms the ground and 5V signals are somehow connected.

In order to find the short, follow the 5V wire that connects to the Arduino back into your circuit. Make sure it is not connected to any ground wires. The 4.7KOhm resistor on one of the buttons is a bit tricky and is where'd I'd check first. Make sure the 5V wire goes into one side of the button, and the resistor connected to ground / signal wire are connected to the other side of the button.

The other place to check is the pots. Double check the wiring there and make sure 5V and ground aren't accidentally soldered together. How many pins do your sliding pots have? If they're the same sliding pots as I've used, they'll have 3 pins. The datasheet (http://www.sparkfun.com/datasheets/Components/General/TW-700133.pdf) indicates there's 4 pins, so yours may have 4. If that's the case, two of these pins are internally connected (pin 2). If one pin 2 is connected to ground, while the other pin 2 is connected to 5V, it'll short out.

Hope that helps!
rsrivas1987 says: Jan 3, 2013. 6:38 PM
Ok. So would these be appropriate?

http://www.ebay.com/itm/5-x-B10K-10K-OHM-Linear-Taper-Rotary-Potentiometers-10KB-POT-USA-SELLER-/221166204177?pt=LH_DefaultDomain_0&hash=item337e887511

Also, what could I type besides "slider potentiometer" into ebay to find the most results. "slider potentiometer" does not seem to bring out a lot of results.

Lastly, would 22 AWG "stranded" wire suffice?

I've never worked with anything besides wood, so I'm really in the dark with all this electrical stuff...I don't even know what ground, amps, etc. mean. But I like to DJ, so this seems like a great project.
rsrivas1987 says: Jan 3, 2013. 6:41 PM
Nevermind the last question, I see that you already wrote about it in the post.
rsrivas1987 says: Jan 2, 2013. 10:21 PM
I am new to electronics building, so my questions are going to be very stupid to some people.

1. I have potentiometer's that are 500K. Will these work?
2. I am purchasing my slliding potentiometers from ebay and there are a range of "K" values. Does it really matter what the "K" is?
fraganator (author) says: Jan 3, 2013. 4:55 PM
There's no such thing as a stupid question!

1. They should, but I'd recommend using 10K pots. The datasheet for the ATmega mentions 10k as the upper limit for analog inputs to ensure an accurate reading is performed. Also make sure they are linear, and not logarithmic or "audio".

2. The K simply means thousand. So a 500K pot means it has a range of zero to 500,000 ohms. As I mentioned above, try go for linear 10K pots.
daveycrocket808 says: Dec 27, 2012. 12:35 PM
Whats the max buttons you can hook to the board ?
and do you have to use any other software programs or is it just plug and play?
fraganator (author) says: Jan 3, 2013. 4:50 PM
The analogue inputs can be used as either a button input, or a pot input. So the maximum is 18 buttons, but that leaves you with no pots.

For the Arduino board, you do need an extra bit of software (a serial to MIDI converter), along software for a virtual MIDI port. If you use a Teensy board, it can be set to act as a true USB-MIDI device, so no extra software is necessary.
Joeldc510 says: Dec 26, 2012. 3:48 PM
Everything is working except the buttons connected to the IC... Buttons 1-5, 13-16, and the 4 rotating pots and 2 sliding pots are all working flawlessly! =)
fraganator (author) says: Dec 26, 2012. 7:24 PM
Good to hear. Sorry I've not had a chance to look at the code for this, what with Christmas etc going on. Hopefully in the next week or so!
daveycrocket808 says: Dec 26, 2012. 11:56 AM
How do you get this to work inside DAWs like Ableton Live an FruityLoops ?
fraganator (author) says: Dec 26, 2012. 7:15 PM
You'd have to setup the necessary MIDI mappings within the software. I know Ableton Live has a 'hot' MIDI mapping mode, so you select a parameter to map (say channel pan), and then twist the knob on the controller for it to map the two together. Check Ableton Live's manual for more info.
bluebull87 says: Dec 26, 2012. 2:36 AM
Hello again, fraganator,
I have just one question: will it work with Arduino Nano w/ATmega328?

Thank you very much and best regards.
fraganator (author) says: Dec 26, 2012. 7:11 PM
It should do! It has the FTDI USB-serial chip on board which is necessary for the serial-MIDI comms.
mikeywr says: Dec 22, 2012. 10:03 AM
dear fraganator, would u like to make 100 or so bucks to make me one of these? id like to make one myself but dont have the resources. Thanks
1-40 of 291Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!