

The BUTTONPAD-2X2SINGLE is a 2x2 matrix button pad consisting of four individual buttons, designed for user input in electronic devices. Each button in the matrix can be pressed to send a signal to a microcontroller or other circuitry, making it ideal for applications requiring simple and intuitive user interaction.








The BUTTONPAD-2X2SINGLE is a passive component that requires external circuitry to detect button presses. Below are the key technical details:
| Parameter | Value |
|---|---|
| Number of Buttons | 4 (2x2 matrix) |
| Operating Voltage | 3.3V to 5V |
| Button Type | Momentary (push-to-make) |
| Contact Resistance | < 100 mΩ |
| Dimensions | 2x2 grid, ~1 inch spacing |
| Connector Type | Solder pads or pin headers |
The BUTTONPAD-2X2SINGLE has four rows and columns that form a matrix. The pins are typically labeled as R1, R2 (rows) and C1, C2 (columns). Below is the pin configuration:
| Pin Name | Description |
|---|---|
| R1 | Row 1 connection |
| R2 | Row 2 connection |
| C1 | Column 1 connection |
| C2 | Column 2 connection |
When a button is pressed, it connects the corresponding row and column, allowing a microcontroller to detect the press by scanning the matrix.
Below is an example of how to use the BUTTONPAD-2X2SINGLE with an Arduino UNO. This code scans the button matrix and prints the button state to the Serial Monitor.
// Define row and column pins
const int rowPins[2] = {2, 3}; // R1 -> Pin 2, R2 -> Pin 3
const int colPins[2] = {4, 5}; // C1 -> Pin 4, C2 -> Pin 5
void setup() {
// Initialize row pins as outputs
for (int i = 0; i < 2; i++) {
pinMode(rowPins[i], OUTPUT);
digitalWrite(rowPins[i], LOW); // Set rows LOW initially
}
// Initialize column pins as inputs with pull-up resistors
for (int i = 0; i < 2; i++) {
pinMode(colPins[i], INPUT_PULLUP);
}
Serial.begin(9600); // Start Serial communication
}
void loop() {
for (int row = 0; row < 2; row++) {
// Set the current row HIGH
digitalWrite(rowPins[row], HIGH);
for (int col = 0; col < 2; col++) {
// Check if the button at (row, col) is pressed
if (digitalRead(colPins[col]) == LOW) {
Serial.print("Button pressed at Row ");
Serial.print(row + 1);
Serial.print(", Column ");
Serial.println(col + 1);
}
}
// Set the current row LOW again
digitalWrite(rowPins[row], LOW);
}
delay(50); // Add a small delay for debouncing
}
INPUT_PULLUP mode is used for column pins to simplify the circuit by eliminating the need for external pull-up resistors.delay(50) in the loop helps debounce the button presses.No Button Press Detected
Multiple Buttons Detected Simultaneously
Button Presses Not Registered Consistently
Q: Can I use the BUTTONPAD-2X2SINGLE with a 3.3V microcontroller?
A: Yes, the BUTTONPAD-2X2SINGLE is compatible with both 3.3V and 5V systems.
Q: How do I debounce the buttons in software?
A: You can use a small delay (e.g., 50ms) after detecting a button press or implement a state machine to filter out noise.
Q: Can I expand this to a larger matrix?
A: Yes, you can combine multiple BUTTONPAD-2X2SINGLE modules to create larger button matrices, but you will need additional GPIO pins or a multiplexer.
By following this documentation, you can effectively integrate the BUTTONPAD-2X2SINGLE into your projects and troubleshoot any issues that arise.