Arcade Button MIDI Controller

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

Picture of What You'll Need
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
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 
ALoGeNo made it!2 months ago

Hi! , I did it!, this is working with ARDUINO LEONARDO, to do works just add:

#define serial serial1

Also you must have the code clean of errors.

Cheers and thank you for this great project.

Mudo2 months ago

Any chance to implement midi without usb? I need it to talk with my old gear with my old 168/328 arduino board…

Good work!

nnugroho3 months ago

none of my buttons work... hmm... my potentiometers and sliders work just fine.. each time i checked the midi signal (using MidiPipe) the buttons only recognized as a random midi signal. Also as i open up the Arduino console, my computer pick up so many random noise. I'm happy already by just using the slider for the crossfader in my DJ software :D :D

eatyone1 year ago
Many thanks for this great tutorial. My question: Do you think we can mix your code with the HIDUINO project and using midi.h instead of serial com, to transform our Arduino uno and Mega as UsbMidi devices?
fraganator (author)  eatyone1 year ago
Quite possibly, but I haven't really looked at HIDUINO so I don't know the details. The main structure in the code for polling the digital and analogue reads would still work, provided the functions (digitalRead and analogRead) still work, but the comms would obviously need to change from serial to usb midi.
Will try and give result here :-)
I've just 'cleaned' code (take out the teensy and arduino mega part), no other change, just flashed the HIDUINO firmware and it work!!!!!!!!!!

Hi, i'm using a MEGA, every time i flash it Hiduino, the sketch ain't run anymore, any clue? thanks

In fact , it works natively with HIDUINO, Testing it on a Mega 2560.

Fraganator, this has to be the best patch i've seen, working with so much flexibility and without jitter or strange bounces, right from the zip to the "upload" button! Thanks!!
igneonumous3 months ago

someone tried to flash it hiduino?

a few pages back a guy said it worked perfectly! can't try my self because i have a seeeduino

sompie3 months ago

i've made a controller based on this tutorial which works perfect thanks for this. Now i'm trying to add a rotary encoder for track selection but have hard time to find how to start. Can you help me a bit on the way?

also i'm using Hairless midi which is a lot stabler than Serial-MIDI Converter u are using. just a tip
sagigi3 months ago
from where did you get the effects?
mdavisyates4 months ago
Hi I'm using an Uno and I'm not getting any response from buttons, except pin 13, also only a pot I had on A2 seemed to have effect. In my software's mapping page moving that pot changed its status between a few midi notes and cc values.

I've since changed the amount of analogue inputs on line 141 to 0 and removed them from the define statement on line 190. but still no tx light on the buttons.

If anything jumps out as a direction towards sorting this it'd be great.
igneonumous5 months ago
I have a lot of noise in the potentiometers and the serial TX stays on, the only solution is to delete the analogue #define line, but I need the pots, any solution? Thanks
there's a analogDiff, change it to 1 or more... months ago
Nice job! I have only one question:

Is it possible to communicate from midi to arduino, to make butttons light up, when i push them on the software side?
Greenfielt2 years ago
Hi there,

I'm using an Arduino Mega 2650, as a test i've connected pin 13 as the only button on the board. Before starting the Serial_Midi_Converter program all LEDs are off on the board. But after i started the program the TX LED stays on.

This means there is constantly data transferred? Does someone has an solution for this?

fraganator (author)  Greenfielt2 years ago
If the Tx LED is constantly on, then it's definitely transmitting data all the time. The most likely problem here is that all of the analogue inputs are floating.

This basically means that the analogue input pins don't have a reference input (ie ground or +5V). So they'll 'float', picking up any electrical noise. This doesn't happen on the digital inputs as they are internally pulled high to +5V.

There are two ways to fix the floating inputs.

1) The first way would be to 'tie' each input to ground. This means simply connecting each analogue input pin to the Arduino's ground (a breadboard makes this easy).

2) The second way would be to modify the sketch so no analogue inputs are read. There are a couple of #defines which specify how many analogue inputs there are, and what analogue input pins are used. If you look at line 120 of the sketch, you'll see a #define NUM_AI 16. Change this to #define NUM_AI 0. Then on line 181 change #define ANALOGUE_PIN_ORDER A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15 to #define ANALOGUE_PIN_ORDER (note there are no pins here).

Hope this helps!
It works like a charm! Thanks for helping me out...! It almost made me crazy haha!
Hi there' can you tell me (if you remember hehe) how did you fix it, The first option is not clear to me, this is how you fixed it? Thanks.
mikeywr1 year ago
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
look on ebay i found everything for around $50
yeah i foundem, builtit and rock out!!
puhsprie7 months ago

This mapping is awesome, but I'm having trouble digesting it for a specific function. I'd like to be able to push an arcade button once to have a midi note turn on, and then once more to have the midi note turn off. Like an on/off switch, using the momentary button. Any tips?
thefruitgnome8 months ago
Never mind ive got it to work now :) I just changed the kbps rate in the code to standard MIDI kbps. Thank you for this tutorial! I replaced 5 of the buttons with foot switches connected with phono cables to allow me to perform live looping sets on Ableton. Ill make sure I put it to good use
thefruitgnome8 months ago
Is the program compatible with the MIDI shield? Instead of the arduino spitting out data over the usb and having to covert to midi on board my computer I would like to have MIDI come straight out of the controller to save CPU power. I have made this controller and have the MIDI shield but cant get it to work. Any ideas anyone? Thanks
Dsdude9 months ago
Any chance of you making a second tutorial, but using the Teensy?
Bartuss9 months ago
Omg just what I needed! Great job :D
sam659 months ago

will an Arduino Mega work? or will the software need to be changed

im still new to the whole thing thanks
mixaluch8310 months ago
Hello! I have a question. How to increase number of buttons by means of the entrance shift register? Simply I need about 30 buttons. Forgive for my English hello from Russia)) Thanks in advance.
adrianw7710 months ago
how do you make this permanent?
MackeFeet10 months ago
Does anyone know if this controller would work with the program Mixxx?

visivopro11 months ago
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
dmusumeci11 months ago
Hi, i've got an Arduino Leonardo, but this program doesn't work with it. How can I resolve this problem?
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?
// 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:

if (i >= SKIP_ROW * 4)
digitalOffset = i + 4;

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.
rpinsenschaum11 months ago
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 :)
aholmes1411 months ago
Awesome and inspiring tutorial, many thanks!
TAGAPAW12 months ago
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

Get More Out of Instructables

Already have an Account?


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!