Picture of 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 
1-40 of 341Next »

Hi thanks for your instructable! Everything is going well but I was just wondering if it was possible to setup the pushbuttons to be used as a piano keyboard? Like with a DAW or something?

Angier121226 days ago

Great project you have here, it's just perfect

I made my own with just 8 pots instead of all the sliders and buttons; they all work fine except one, which gives a "MIDI feedback shortcut" error, and says not to connect the in and out to the same port. Oddly this only seems to happen with the one port. Any ideas?

Actually it sometimes works, but I have to use LoopBe30 and route it through 2 different ports with HairlessMIDI (instead of MIDI Yoke since Windows 8)

IDK what's up with that

Do the push buttons need to be momentary or lock?
MangJ1 month ago

somebody help me please... i have arduino micro, can i use it as Midi controller??? i'm new on this community... please help me...

the circuit diagram also...

Hello such , I am Argentine and I'm doing the midi controller . USE sorry for translators .
My problem is this , I can not load the program to Arduino entiedo Not For Long . I hope your help. thousand thanks

error de arduino.PNG

I want to use only 16 buttons, as I do?


for arduino nano is necessary to modify the code ? that's ok?:

#if defined(__AVR_ATmega328__) || defined(__AVR_ATmega328__)


#elif defined(__AVR_ATmega328P__)

#if defined(ARDUINO_NANO)

// Number of digital inputs. Can be anywhere from 0 to 68.

#define NUM_DI 13

// Number of analogue inputs. Can be anywhere from 0 to 16.

#define NUM_AI 8

Help me ! when i run the code i get this error
'PIN_D6' was not declared in this scope

It's been a few months since this was asked so I doubt you still need help. For others like me who might also run into this issue, I was able fix this by making some changes to the code(just a heads up, very minimal programming experience). Basically, seems like the code was detecting my leonardo as a teensy or something so I commented out the teensy #defines at the top:

#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)


//#elif defined(__AVR_AT90USB646__)


//#elif defined(__AVR_ATmega32U4__)

//#define TEENSY_2

//#elif defined(__AVR_AT90USB1286__)

//#define TEENSY_PLUS_PLUS_2


#define ARDUINO


jmlynch2 years ago
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

yes, how do I do this? Apparently it is not possible through Ableton so it probably needs to be programmed in.

Hi, thanks for your instructable, it's great! Can you explain more about the LUFA library and how to make a true USB MIDI controller?

hey , is it possible to make a controller with two faders , 8 knobs?

keyblade43217 months ago

Great instructable. I'm having some trouble with the slide pot. It believe I wired everything correctly but when I map the controller manually in Ableton and test out the slider, it has a very jumpy rise. Like moving the knob a centimeter would make the volume jump from the bottom and red line. But when I test the same thing on the rotary pot, it has a very smooth rise and fall. Why is this? I can't figure it out and I don't think I burned the pots because I was very careful when soldering and testing the resistance every time. Help please!

I had this issue and that was because how we should wire it and how the resistors are labelled are different ( and sometimes wrong) so just swap where the wires are going on the slide pot until it works :)

Thats how I fixed it haha

One of your pots might be logarythmic, and the other is probably linear. They have different resistance curves. Otherwise, the slider might have dirty contacts.

The pot is linear so how do i fix a dirty contact? or should i replace?

AssAulterPT3 years ago
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?
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!!!

Hi everyone;

I have the same problem. The Tx doesn't flash green on the Serial_midi program. Only the Rx. However on my Arduino board The Tx is flashing but not the Rx. Thats very strange.

I didn't installed the Midi Yoke because i'm on Mac. So i'm using the IAC driver.

Also, i build my board with Arduino Uno. Could it be the reason why the code doesn't work?

Please help me guys!

Its been like 2 years since I've had a crack at this hahaha So I doubt I can help but I'll try

I occasionally encountered this problem and I fixed it by re flashing the software and making sure all of the connections work well"

Like literally re-flashing the software fixes alot of bugs for me from when I was using it; otherwise maybe look for an updated tutorial?

Good luck :)

Hey, i have the same TX problem !? Have you been able to fix it?

cadogan3027 months ago

Nice setup. Just wondering how would i go about making this with an arduino Mega 2560? Do i have to change a lot of the code? What digital inputs do i use?I want to be able to hook it up to my old organ instead of using the push buttons(each key has the 2 wires so i think that should work)This project comes closer than anything i have seen for what i need it for :)

yuriyabi7 months ago

I have built a similar midi controller with an atari joystick, pots and 5 toggle switches on Digital pin 3-7. The problem is that when using them to turn effects on in Ableton I flip up to turn the effect on, but have to flip down and up again to turn the effect off. What I want is to turn the toggle switch on/up to turn an effect on and turn the button off/down to turn the effect off. How can I change the code to work like this with my switches? Thanks for your help!

2014-11-20 20.53.43.jpg
swoephowx8 months ago

where is the code?

davelanda8 months ago

Good job !! could you share me your code please?

What program are you using? And do you have any videos with screenshots? While this instructable may not be the place for it, I was curious about what technique you're using between the controller and the program to create the demo video.

Leonardo Paiva10 months ago

what if we want use rotary encoders? i`m trying to change the code a little for make it capable of using some infinite scrolling, but didn't worked. Any clues?

Hey what if I wanted more sliders and knobs and less buttons? Thanks!

pj.jones.589511 months ago

I can't seem to be able to find the correct sized enclosure. If anyone has a working URL that would be helpful. Thank you.

ALoGeNo made it!1 year 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.

Taha99 ALoGeNo1 year ago

alegeno did you change the connections to or just the code , and did you add more inputs.

where do you buy the 10k linear sliding potentiometer?
Mudo1 year 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!

nnugroho1 year 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

eatyone3 years 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)  eatyone3 years 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 :-)
eatyone eatyone3 years ago
I've just 'cleaned' code (take out the teensy and arduino mega part), no other change, just flashed the HIDUINO firmware and it work!!!!!!!!!!
1-40 of 341Next »