I am modifying an old 90s keyboard (CTK-450 by CASIO) to make it a MIDI controller. I'm going for an Arduino that goes over the matrix layout of the keyboard.
The issue I have is with debouncing. Now I know the best idea would be to add some small capacitors in there to make sure there are no issues with bouncing switches, but I'm wondering whether I could just ignore the problem. My reasoning is as follows:
- I don't really care if I get bogus input, as it's a MIDI controller. It isn't some button that deals with menu scrolling or what not.
- The RC circuit on the original PCB for the keyboard is R = 1kOhm, C = 1nF or 0.1 nF depending on the exact circuit, which gives me a time constant t <= 1µs. I'm going to be polling the keystates at a much slower rate to start with (Arduino digitalRead() takes 1-4 µs, and I have to go over around 60 keys plus some overhead), and it's extremely unlikely that the reading will happen exactly at the time the key is in a bouncing state.
- Even if I manage to sometimes read the key while the signal is bouncing, it shouldn't really matter. If I read logical low when I just pressed the key, by the time I go through all the keys again, the bouncing will have stopped and I will have a solid digital high to read, and vice versa.
I think the key to this is the fact that the time constant for the RC debouncing filter is so small. Is it really believable that the switches in the keys will have such a short bouncing time? I understand the bouncing time doesn't necessarily have to be the exact same as the time constant, but even if it happened to be a bit bigger, assuming it's around that order of magnitude, arguments 1 and 3 still hold, I would assume.
Thus, can I completely avoid putting those debouncing caps into the circuit, even if in principle, it isn't a good idea for every situation?