loading

Today we're building the 400 key MIDI controller using an Arduino and computer keyboards!

For the budget conscious music producers out there, this project is a great way to build an inexpensive control board for your digital audio workstation.

Or if you're just a musician with an odd taste for instruments, this geeky looking device will surely give you some strange looks.

Step 1: Watch the Video!

Check out this quick video to see how this mega MIDI device translates to an instrument and for a run-through of all the steps below from start to finish.

Click here to watch on YouTube

Step 2: What We'll Need...

We're going to build a box that translates signals from multiple keyboards into standard MIDI out signals.

To do so, we'll need:

  • An Arduino (I'll be using the UNO, but any other variants will work fine)
  • 2 PS/2 ports (as many as you'd like, as long as there's enough digital pins on the Arduino for it)
  • MIDI female port
  • Cardboard
  • A 220Ω resistor
  • Perboard
  • Wires
  • Keyboards!

Where to buy

Soldering gear:

Testing gear:

Step 3: Prepare the PS/2 Ports

Push a piece of perfboard through the bottom pins of the PS/2 ports to make soldering easier.

Clamp the PS/2 ports in place and solder wires to the four pins of each of the PS/2 port that we need to access (they are the Vcc, Ground, Clock, and Data pins - see diagram).

Hot glue the PS/2 ports together.

Step 4: Prepare the MIDI Port

Push a piece of perfboard through the bottom pins of the MIDI port to make soldering easier.

Add a 220Ω resistor in series to the Vcc pin (see diagram).

Solder wires to the three pins we need to access (they are the Vcc, Ground and Serial pins - see diagram).

Step 5: Wire Up the Arduino

Wire the PS/2 and MIDI ports to the Arduino as follows:

For the PS/2 ports:

  • Vcc pins goes to 5V
  • Ground to GND
  • Clock and Data pins goes to digital pins 4 to 11

For the MIDI port:

  • Vcc pin goes to the 220Ω resistor, then to 5V
  • Ground to GND
  • Serial to TX

Step 6: Upload the Arduino Program

I've made the source code to this project open-source, so simply head over my GitHub to download the Arduino sketch:

https://github.com/evankale/ArduinoMidiPS2

Plug in the Arduino to the PC, open up the sketch in Arduino IDE, and upload the program to the Arduino.

Step 7: Make a Box

Cut out a cardboard box template that fits all the components.

I decided to expose the MIDI and PS/2 ports in the front of the box while the Arduino USB port through the back so that it can be USB powered or reprogrammed easily.

Hot glue the components into place.

Step 8: Close Up the Box

Close up the box with some PVA glue, and admire your work of art.

Step 9: Find Keyboards

Just for fun, I decided to attach three old keyboards together with some wood pieces and screws.

Attach two strap buttons, put on a strap, and we have a very unique "keytar" to go with our MIDI box.

Step 10: Plug It in and Give It a Test

Plug in as many keyboards as you'd like and give it a test!

Watch the video to see the MIDI controller in action.

---

That's all I have for you today!

If you liked this Instructable, then perhaps you'll like some of my other projects!

You can check them out over at my YouTube channel.

New projects every Thursday! See you next week!

the ps2 keyboards wont power up, I guess I messed up something with the code, cause I included the magicmusic library by selecting zip file, but when I copied the code from the link the magicmusic instructions are not colored i.e. the system is not detecting the instruction<br>those who sucessfully built this please help me out to figure out where i went wrong
<p>i was having trouble with that too but when i went up to the top menu bar under the sketch tab there is an option called add file that i added all the stuff in the zip file except the readme and it complied for me </p>
Roses are red,<br>Violets are blue<br>U are so funny,<br>And I like You????
<p>you are using a mega uno arduino, what if I have uno R3</p>
<p>the ps/2 keyboards wont power up, I am using a clone arduino ;could that<br> be a problem?<br> Also you have have messed up the connections, first of all your diagram<br> shows connections from a ps/2 plug instead of ps/2 socket that you <br>demonstrated, also your code mentions the clock pin &amp; data pin to be<br> different than that of your connection, <br>please clear out the confusion, I really need to build this</p>
<p>Great project and good instructables, thank you Evan! I've built it too, though not without a bit of stumble - your diagram needs to clarify that the PS2 connectors are shown looking from the back of the female connectors, where the wires are soldered... I'm using the TurtleBeach MIDI-to-USB converter and the Universal Keyboard apps on the Windows 10 tablet, and everything works perfectly. Just a question: do you or anyone out there knows of the apps for SurfaceRT tablet that can play form MIDI port?.. That would be a perfect use for this abandoned but otherwise great tablet!..</p>
<p>Sweet! :)</p>
<p>I like it.</p><p>One quenstion,</p><p>The connectors in circuit diagram are front view or back view?</p>
<p>Just wondering, is there any possibility to use Arduino's USB port to connect it as a MIDI device? It would be a great feature (obviously some more coding would be needed) as some of those cheap MIDI to USB adapters might have some unwanted latency. The one adapter I have (then connected to a MIDI keyboard) do have more latency compared to the USB MIDI keyboard (the one that is connected through USB and do not have MIDI port at all).</p><p>Why do I have this question? I've never had my hands on any of Arduino boards at all, therefore I don't know all of it's features.</p>
<p>Is there an MIDI to USB converter that i can use with this? I don't have midi port unfortunately</p>
<p>Probably those cheap MIDI to USB adapters found on ebay would do. I have one shipped from China and I've used it with an old Yamaha MIDI keyboard. Costed no more that &pound;2. It should work with this project too, but you probably have to map it on the DAW yourself (I mean to map certain keys to do certain commands). </p>
<p>I am very impressed with your &quot;Multi-Keybord&quot; instrument.</p><p>Do you know of any way to take a graphic equalizer and send each filter section to an amplifier that will drive a speaker for each frequency range?</p>
<p>Can you make a version that uses USB keyboards instead?</p>
<p>As Istarian wrote, there are USB to PS/2 adapters you can use if you have USB keyboards.</p>
<p>That's not as simple as it sounds. For one, you'd need a USB host controller to be able to talk to your USB keyboards. Also, at minimum you'd probably have to write a USBDevice class that provided/exposed the same read/write/etc functions as PS2Device. I have no idea what level of difficulty is involved, but a USB host shield usually only provides one keyboard so you'd need a usb hub too in that case and I have no idea if those shields are compatible with hubs.</p><p>Alternatively, you might be able to use several USB-&gt;PS/2 adapters to convert the USB into PS/2.</p>
<p>Controllermate for mac can make any usb keyboard into a midi controller. It's incredibly versatile, very straightforwards, and costs about $20.</p>
<p>Few comments on this:</p><p>First, that's $20. You can make this whole set up for a lot cheaper.</p><p>Second, usually with computers won't treat multiple keyboards as their own entities, meaning that you couldn't have the four-keyboard setup shown in this project. </p><p>Third, making things is fun, even if you're overcomplicating things</p>
Of course. I'm just putting this out there so people know about it. It certainly opened up a whole new world to me. Controllermate supports multiple keyboards, you just gotta be sure you connect them in the same order every time. It also has 60+ 'building blocks' to choose from, including logic gates, making it incredibly intuitive and versatile. I just don't like being the only person I know pursuing jamtronica with Ableton and Controllermate.
Because mac is soooooo much better than a pc is ridiculous.
<p>Tu as la grosse t&ecirc;te mon gars, je parle &eacute;videmment de ta pr&eacute;tention.</p><p>Sinon, &ccedil;&agrave; ne sert strictement &agrave; rien, si ce n'est qu'&agrave; craner. De plus, tu pourrais expliquer comment fonctionne le protocole PS2, ainsi que le MIDI, ce serait plus instructif. As-tu pr&eacute;vu quelque chose pour le pitch ?</p><p>EvanKale, le bidouilleur bancal.</p>
<p>great</p>
very nice instructable, But where Do i plug in the midi out? PC midi Port?
<p>You can find Midi to USB adapters online.</p>
<p>After the first en thousiasm i got a couple of questions</p><p>1.What software you run on your pc when you play the kbs</p><p>2. Where you connect the midi connector or you leave it to connect any extension midi keyb</p><p>thanks</p>
<p>AMAZING!!!!!!!!!!!!!!!! dude you gave me the subject to occupy myself for the next 3-4 weeks</p><p>Thankssssssss</p>
<p>AMAZING!!!!!!!!!!!!!!!! dude you gave me the subject to occupy myself for the next 3-4 weeks</p><p>Thankssssssss</p>
<p>Amazing!</p>
Excellent use of old keyboards! Any thought to using a PS/2 mouse sensor as an XY control?
<p>A keytar with 312 keys! Bonus points for a expressions ripped from a kung fu B-movie.</p>

About This Instructable

17,273views

213favorites

License:

Bio: www.youtube.com/EvanKale91 === www.facebook.com/EvanKale91 === www.twitter.com/EvanKale91 === www.evankale.blogspot.ca
More by EvanKale:Pokemon Card Door Guitar Cajon Mod (Internal Snare) Ratchet Knob (Unidirectional mechanism) 
Add instructable to: