Overview This 4x4 Matrix Keypad Module is a compact 16-key input board built with tactile microswitches on a PCB, designed for microcontroller and SBC projects that need multiple buttons without consuming excessive GPIO.
1x 4x4 16-Key Matrix Keypad Module (PCB)
This 4x4 Matrix Keypad Module is a compact 16-key input board built with tactile microswitches on a PCB, designed for microcontroller and SBC projects that need multiple buttons without consuming excessive GPIO. Instead of dedicating one pin per key, the keypad uses a row/column matrix: pressing a key connects one row line to one column line. Your firmware scans the matrix to determine which key is pressed, making it a practical choice for Arduino-compatible boards, Raspberry Pi (via GPIO), ESP32, and other development platforms.
The keypad is wired as a 4-row by 4-column switch matrix. Each button is a momentary, normally-open tactile switch. When pressed, it electrically bridges a specific row and column trace. The module breaks out the matrix to an 8-pin header (4 row lines + 4 column lines). In typical scanning, the MCU sets one group (rows or columns) as outputs and the other group as inputs with pull-up or pull-down resistors enabled. The firmware then drives one output line active at a time and reads the input lines to detect closures. This approach reduces pin usage and keeps wiring clean.
Because mechanical switches can bounce, software debouncing is recommended (for example, 10–30 ms debounce time, varying by application). For multi-key detection, matrix keypads may exhibit “ghosting” when multiple keys are pressed simultaneously unless isolation diodes are used. This module is commonly used for single-key-at-a-time interfaces (menus, numeric entry, function selection). If your project requires reliable multi-key rollover, consider adding external diodes per key or limiting accepted combinations in firmware.
The board is suitable for 3.3V and 5V logic environments because it is a passive switch matrix (no active IC). Actual electrical behavior depends on how you configure GPIO direction and pull resistors. For Raspberry Pi and other 3.3V-only GPIO devices, ensure no external 5V is applied to input pins.
1) Wiring: Connect the 8-pin header to GPIO. Identify which pins are rows vs columns by the PCB traces/silkscreen (varies by revision).
2) GPIO setup: Configure rows as outputs and columns as inputs with internal pull-ups (or the reverse). Scan one output line at a time.
3) Debounce: Implement software debounce to avoid repeated triggers.
4) Multiple key presses: If your UI expects only one key press at a time, enforce it in code to avoid ghosting ambiguity.
5) Raspberry Pi: Use 3.3V GPIO only; do not inject 5V into GPIO. Use internal pulls or external resistors as needed.
1x 4x4 16-Key Matrix Keypad Module (PCB)
No reviews for this component yet.
In Stock