Midi input for toy keyboard using Arduino

Hi all,

After seeing a lot of exaples of people turning their cheap toy keyboards into midi controllers, essentially adding a midi port to the keyboard using arduino and figuring out the scan matrix of the keyboard, something came to my mind:

would it be possible to wire up an arduino to these keyboards, but instead of using it as a midi out device, getting the pc (and the daw software) to send signals to the keyboard, and playing them on the keyboard itself?

To put it simply: Make a MIDI IN port for the arduino, so when it receives MIDI data, it sends the notes to the scan matrix, making the keyboard play the sound.

The reason for it: I think a lot of old toy keyboards have interesting sounds on them, and it would make creating music with them easier and more modern.

Is it possible, or is it a bad idea alltogether?

I would love to hear what you think! :slight_smile: Cheers!

Is it possible

Yes, but it depends on the exact circuit of the keyboard as to how easy it would be.

In principle you do something like this project only instead of firing a solenoid you arrange for the key switch on the board to be triggered.
http://www.thebox.myzen.co.uk/Hardware/Glockenspiel.html

Grumpy_Mike:
Yes, but it depends on the exact circuit of the keyboard as to how easy it would be.

In principle you do something like this project only instead of firing a solenoid you arrange for the key switch on the board to be triggered.
http://www.thebox.myzen.co.uk/Hardware/Glockenspiel.html

Yes, basically that is my plan. I have yet to figure anything out on the circuit of my keyboard, but I wanted to know if it's worth looking into or not, thanks for the reply! :slight_smile:

The keyboard could work in several ways.
The simplest is if each key when pressed connects to either the supply voltage or ground. This is easily interfaced by having a transistor across the switch.

A more complex design might have the keys as part of a matrix which is being scanned. In which case an optical isolated FET might have to be placed across each key.

I figured out the matrix, it's 8 x 4, giving 32 keys and 12 pins in total.

The arduino has enough pins for all of them to fit.

Is it possible to just tell the arduino, according to the midi data received, which pins to connect to the other, or do I need to use transistors? If so, how would that work? (Sorry, I'm not that experienced when it comes to transistors :slight_smile: )

Again, thank you for the tips!

Is it possible to just tell the arduino, according to the midi data received, which pins to connect to the other,

Sadly no. It is not just a matter of connecting pins together, it is connecting pins together at exactly the right time. This has to be controlled by the keyboard because then it knows what switches have been pressed.

The simplest system is, as I said to put an optically isolated FET ( these are rare ) across each switch.

The more complex but cheaper way would be to monitor the scanning of the matrix and ground or pull high the other axis of the matrix at the right time given by the active axis of the matrix. I have not done this but I believe it would be possible to do. However it is not a beginners project and you will need an oscilloscope to design and check your interface.

Have you a link to this keyboard? Or a photo, I might try it if I can get hold of one.

There is always this approach CasioKeyBot plays electronic keyboard with automated fingers | Arduino Blog

Oh, I see... Then it might not be a project for me right now.

I love the automated robot hands playing the little casio btw! :smiley:

Sure, it is a Casio SA-20, some details are found here: Casio SA-20 - Specifications, pictures, prices, links, reviews and ratings

Here are some photos of the keyboard itself, I will take it apart & put some pictures of the internals here as well.