What I'm looking to do, is take the following cheap keyboard number pad:
and 'intercept' the key presses. Basically, I want to hook up the buttons to an Arduino, and read the keypresses from the Arduino. Not necessarily every single one, mainly the 1-9 and the '-' and '+' buttons.
I was wondering if someone could point me in the right direction on how to read the buttons. There seems to be only 12 lines/connections coming from the membrane, but there's actually 19 buttons on the keypad.
Ideally I'd like to do away with the existing circuit board entirely, and put a tiny Arduino in it's place.
If it matters/helps, what I'm trying to do is make this number pad be a little portable 'hotkey' keyboard. For instance, I'd like to make it so that every time you press the '1' on the keypad, it sends [Ctrl + Shift + a] to the computer. I know I'm limited to the kinds of Arduinos that can act as a keyboard, and that's fine.
I know you can do this kind of stuff in software, but as I hinted in the previous paragraph, I want it to be 'hardcoded' into the keypad so that it doesn't require extra software/configuration on every computer I hook it up to. This would make it easily portable.
Hopefully that all makes sense and I'm not in over my head here.
The problem is that those buttons in the pictures of those other keypads look small and hard to push...I'm worried that may not work as I'm using my keypad for trying to day trade. The buttons on my keypad are nice and big like keys on a keyboard and are easy to press. I could see myself making all kinds of mistakes on those other keypads' little buttons.
You mentioned that it looks like my keypad is using serial output...I assume that makes things difficult?
(Just a reminder though - I don't want to use the existing circuitry of the keypad - I'd like to bypass it and solder on my own wires from the wiring connector to an Arduino (and I guess cut all the traces on the existing circuit board that are going to the black epoxy blob). So I'm not sure if that makes a difference or not. You probably got that the first time though.
I don't know...I don't really know connector types/names or anything. I did disconnect it though, and I discovered that the flex circuit/membrane is actually 2 layers folded, with a piece of thin, clear plastic separating the 2...here's a photo:
If you follow the traces from the membrane connector, you see 6 lines connected to one layer, organized as columns, and 6 to the other, organized as rows.
So basically this is a 6x6 matrix keypad (with 17 missing keys).
I would connect them to 12 pins on the Arduino. Then I would write a sketch, using the Keypad library, to identify the keys.
This code was used for testing a 3x3 matrix, and can easily be modified for 6x6.
It looks like the PCB has exposed copper pads in each trace just next to the connector. Maybe you can solder wires onto those pads, the cut off the left-hand side of the PCB to get rid of the built-in logic. Soldering to the thin plastic film will be a problem.
The layout indeed looks like a matrix type keypad. 6x6 matrix is probably correct. Some traces are a bit odd, you'll have to do some experimenting with the Keypad library to properly match keys with location.