Converting Piano Toy to MIDI Keyboard.

Dependencies:   mbed mbed-STM32F103C8T6 USBDevice_STM32F103

How to turn kids' old piano toy to a MIDI keyboard

Inspired by I did the same with a Blue Pill module using Mbed.

The old toy was capable to play only one tone at a time:
Zoom in

A bit of reverse-engineering was needed to re-use the original printed boards. The results are below.

Original PCBs with switches traced to the connector pins:

Zoom in Zoom in


Zoom in


Then I replaced the original chip with a Blue Pill module and added a USB connector:
Zoom in

Works great when connected over an USB cable to a Linux Ubuntu 18.04 machine

Installed software:

  • Yoshimi: An excellent MIDI software synthesizer for Linux.
    Zoom in
  • Patchage: Provides a graphical interface to connect jack and midi inputs and outputs.
    Zoom in

How to use it:

  • Connect the Keyboard to the PC over an USB cable.
  • Run Yoshimi.
  • Run Patchage and connect the Mbed USB Audio MIDI 1 output to Yoshimi's input (drag Mbed Audio MIDI 1 over yoshimi input and drop)

  • To apply the changes close the Patchage!
  • On Yoshimi's toolbar click on Instruments and select Show Stored ...
  • Select a bank and click on the instrument you'd like to play.

Have fun :-)