Turning toy pianos into MIDI keyboards

Building a MIDI device is always a great microcontroller project, and nearly everyone has an old toy keyboard lying around in the back of a closet or in the basement. [JenShen] decided to take one of these toy keyboards and build a MIDI keyboard.

The keyboard [JenShen] used was a simple Casio keyboard with built-in voices. After tearing out the guts of the keyboard, the only thing that remained is the row of push buttons underneath the keys. These buttons were laid out in a row/column matrix, so [JenShen] needed to decode this matrix before sending the result to an Arduino for processing.

A 74HN595 shift register was used to read the 8 rows of buttons underneath the keys, while the rows were tied to different input pins on the ‘duino. This allowed [JenShen] to scan the keyboard matrix with an Arduino and generate MIDI notes and send them to other synths.

In the video after the break, you can check out [JenShen]‘s circuit and code that allowed him to turn a toy keyboard into a proper 32-note MIDI keyboard. It’s not velocity sensitive, but he says he’ll show everyone how to accomplish that in a future post.


  1. Bill Gander says:

    Love it :)

  2. AndroidCat says:

    Nice, but I was expecting one of the old classic mechanical toy pianos.

  3. John says:

    What’s the clock rate for the shift register and what’s the total response time (from keypress to MIDI signal) for the whole setup?

    • JenShen says:

      Hi John, I’ve left it default 16Mhz clock. so each of 8 columns scanned with about 2Mhz clock. I have not played much with this but I believe clock speed can be reduced to save some power. Response was not measured but it is by feel is instantaneous.

  4. James says:

    Great job would have liked to see the original functionality maintained with this setup also. with a midi in so that you could send midi in to the keyboard and get the Casio sounds. :) that’s a mod we did a long time ago http://www.illuminatedsounds.com/?p=10

  5. Barry Carter says:

    There is always this classic


  6. JenShen says:

    Hi All, I’ve prepared a follow up post on how to add Velocity sensitivity and Aftertouch effects to the project. Read more here: http://www.codetinkerhack.com/2013/01/how-to-add-velocity-aftertouch-midi.html

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 96,459 other followers