Go Down

Topic: Midi input for toy keyboard using Arduino (Read 309 times) previous topic - next topic

falconfx9

Oct 07, 2018, 10:49 pm Last Edit: Oct 07, 2018, 11:01 pm by falconfx9
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! :) Cheers!

Grumpy_Mike

Quote
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

falconfx9

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! :)

Grumpy_Mike

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.

falconfx9

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 :) )

Again, thank you for the tips!

Grumpy_Mike

#5
Oct 08, 2018, 09:03 pm Last Edit: Oct 09, 2018, 06:35 pm by Grumpy_Mike
Quote
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 https://blog.arduino.cc/2018/10/08/casiokeybot-plays-electronic-keyboard-with-automated-fingers/

falconfx9

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! :D

Sure, it is a Casio SA-20, some details are found here: https://sonicstate.com/synth/casio_sa_20/

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

Go Up