Go Down

Topic: Replace chip (PCB) in usb midi keyboard with arduino (Read 8461 times) previous topic - next topic


Ok this is getting seriously weird. Let me just show you, cuz you need to see it to believe it:


I've got me an air piano!

Now seriously, what the heck!? Why so much induction?
CMOS inputs are usually extremely high impedance (10^10 ohms or greater), so they simply sniff the
surrounding electric fields like a sensitive electroscope (induction is magnetic, that's something else).

In a finished project you should avoid leaving any inputs floating (you can set pins to INPUT_PULLUP).
This is especially important for micro-power circuits as a single floating pin can draw many mA of
current from the supply, whereas a non-floating input pulls millions of times less power.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


Here you go. It's like this one, just 8x8 not 8x6.


Not quite sure cuz it was long time a go but induction can be electric, magnetic and electromagnetic. No? Doesn't really matter. The funny thing is that it happened on the output pins. Tbh I did butchered someones code so have no clue what actually happened.


Dec 04, 2017, 01:09 pm Last Edit: Dec 04, 2017, 01:10 pm by Grumpy_Mike
You are not getting this are you. I need a schematic of your system, not part of your system, not something like your system but what you actually have.

And posted here not off site.


This evening I will try to put a resistor just to figure out where.


D22 and D24 both need pull down resistors, otherwise they will float when the key is not made.


When I inspected original keyboard electronics I saw that 8 rows of output pins are connected to Vcc trough 10k resistors. That means that the keyboard is pull-up configured? I was, also, puzzled by columns being connected both to first IC and pass trough to second MC until I read an excellent article about using a latch IC: http://www.openmusiclabs.com/learning/digital/input-scanning-matrix/latch-mux/index.html . That made all much more clear.

I've got back to my arduino project and made small progress after connected pair of input pins to ground at the same time. There was an signal to midi yet random one. (bringing them from floating to zero?). Does that mean that the project code is meant for pull down configuration and must be changed?

Also, only way to get a response over keyboard is to reverse column/rows. I didn't noticed that before cuz the code is written for velocity only, meaning it must be both key switches pressed at short time to get an output. So how to reverse when "input" has single pin per key and "output" is in pairs? Well I used a trick. I connected to two different keys pressing them at the same time. That makes keyboard to finally give some signal, but same random data appears. Even when I put resistors to either pull-down or pull up configuration. Altho, the pull-up configuration gives much more stable result. Data is less random, I should say, but still not as should be.


So I must use reversed connection to keyboard with a two keys pressing trick. When I look at serial monitor (firmware enable switching between serial and USB-midi) I get this:

Which seems right.

But when I switch to USB-midi output I get this in MIDI-OX software:

When I debug over serial midi driver I get this:

As if serial driver and USB-midi driver are expecting long midi command and getting short 3 byte one?

Any thoughts?




And this is the schematic of the circuit that actually works:


Dec 09, 2017, 02:42 pm Last Edit: Dec 09, 2017, 02:45 pm by Grumpy_Mike
Only issue I need to resolve now is how to reverse keyboard matrix, as it only works the wrong way.
I have no idea what this means. Why is it the wrong way?

Even when I put resistors to either pull-down or pull up configuration.
How do you do that? The Arduino has no pull-down configuration.

I keep telling you we need to see a full schematic, you keep not posting one. Why should I bother to help if you will not cooperate?


Apparently my ability to express what am I doing is poor.

Also, apparently, my ability to resolve software and hardware problems is high. I never used C++ in my life, nevertheless managed to fully understand the code I was using and make necessary changes to it and to hardware configuration too, and make it fully work.

Due to poor interest for this topic I don't feel I should bother anyone with an explanation what I actually did to make it work.

Kind Regards


Hello to everyone!!

this is my very first post here. I know this could be a old Post but in my case is still usefull, because i am in the same path (Newbie in arduino and with a broken maudio keyboard). I think there is two possible solutions for this matter. The first is the Very-Hard-ware way that is to invert all diodes (122 i think). The second one is the software way that consist in changing the values on the  INPUT - OUTPUT array. Please forgive all misspelling. Me Tarzan. Best Regards.


Jun 03, 2018, 06:23 pm Last Edit: Jun 03, 2018, 06:23 pm by PieterP
Connect the columns with the anodes of the diodes to input pins of the Arduino, and enable the internal pull-up resistors.
Connect the rows with the cathodes of the diodes to output pins of the Arduino. Leave all but one on input mode, and switch the single output row to Lo-Z low.


Please don't reopen such old threads, start a new one.


Go Up