Here is the product. I understand the idea: these 16 buttons use a 4×4 matrix. 4 lines for rows, 4 lines for columns, and we have 8 cables.
But:
-
How can this work without any multiplexer ?
-
Can this detect accurately presses of multiple buttons? Even if buttons use same row or same column? Example: buttons at position (2,2) (2,3), (3,2), and (3,3) pressed at the same time.
-
How does it work?
Best Answer
It doesn't. The keypad board seems to have just switches, with maybe some diodes we can't see. However, the left board looks like it has a processor on it. Almost certainly, multiplexing is being done in firmware.
The multiplexing algorithm works something like this:
The above process is repeated fast enough so that all the buttons are checked within a time that still feels instantaneous to a human observer. The human limit of "instantaneous" in this context is about 50 ms. Even a low end microcontroller can scan a 4x4 keypad in much less time than that.
Probably yes. One way is to put a diode in series with each button. Those could be on the bottom side of the board you show. With the diodes, the algorithm described above just works.
Another way is by putting resistors in series with lines and measuring their analog voltage. Even with multiple buttons shorting multiple row/column lines together, you can eventually figure out which buttons are pressed. This requires A/D inputs in the micro, not just digital inputs as when diodes are used.