Programming Arduino to decode midi from raw signal not DIN

I have a 20 year old digital piano. It is the last one Yamaha made before introducing a midi in/out box. I am trying to add midi but it is different than most of the examples I have found online. The keyboard has an 8 pin connector to the main pcb and the pedals have a 4 pin connector to the main pcb. I have the electronics diagram and figured out that there are 2 signals from the keyboard (possibly signal and clock?) and then 3 signals from the pedals (plus ground). I really only need the sustain pedal for midi so potentially I have 1 or 2 signals from the keyboard and 1 from the pedal coming into the Arduino. Using a breadboard, I cut the pin connectors, re-wired some back together and some through the breadboard so that I could then take the necessary signals off the breadboard (row) and into the Arduino. Now I’m stuck.

First, I am assuming that the signal is already ready to go straight into the Arduino without any resistors etc. but I’m not sure.

Second, once I go digital in with the signals, because they didn’t come from a 5 pin midi DIN I’m not sure how to get the Arduino to recognize and process the signal.

Finally, I’d like to go usb out for the midi but don’t know if the little micro/nano can do that.

Any help nudging this newby down the path would be appreciated.

Regards,

James

Do you know exactly what signal(s) are on the 8 or 4 pin connectors? It's unlikely that there is anything even remotely like a MIDI signal. So the first thing to find out is what information you have available and what format it's in.

We don't have your circuit diagram or even the model number/name of your keyboard so it's not easy to help.

Steve

If you have an oscilloscope you can look at the signals and figure-out what happens when you press each key. Even then it won't be easy... OR, maybe someone else has already done it...

First, I am assuming that the signal is already ready to go straight into the Arduino without any resistors etc. but I'm not sure.

If everything in the piano is running off of 5V you should be OK (assuming a "regular" 5V Arduino). Again a 'scope would be helpful.

Overall, it might not be practical a practical project. :frowning: If the piano was broken it might be worthwhile get rid of the existing electronics and build something new around the keyboard & pedals, but a MIDI keyboard can be relatively inexpensive (depending on how many keys you want and if you want audio or just a MIDI controller). And, what you build might not be as good as what you can buy.