Skip to content

Latest commit

 

History

History
110 lines (73 loc) · 3.27 KB

File metadata and controls

110 lines (73 loc) · 3.27 KB

16-Key Capacitive Touch Keypad Module

1. Introduction

The 16-Key Capacitive Touch Keypad Module is a high-performance touch sensing solution driven by the VK36N16I induction chip. Operating on capacitive sensing principles, it accurately detects human touch through overlays, replacing traditional mechanical buttons with a sleek, wear-resistant interface.

Keypad

With high integration and minimal external component requirements, the module provides a stable and sensitive user experience. It communicates via the I2C protocol, making it easy to integrate with popular microcontrollers like Arduino, ESP32, Raspberry Pi and Micro:bit.

2. Technical Specifications

Parameter Details
Driver Chip VK36N16I (Capacitive Touch)
Number of Keys 16 Channels
Operating Voltage 3.3V ~ 5.5V
Communication Interface I2C
I2C Address 0x65 (Decimal: 101)
Connector Type PH2.0 4-Pin
Dimensions 56mm * 40mm
Mounting M4 holes, compatible with LEGO building blocks

Pinout Definition

  1. G: GND (Ground)
  2. V: VCC (3.3V - 5.5V)
  3. SCL: I2C Clock Line
  4. SDA: I2C Data Line

3. Platform Support

The module supports a wide range of ecosystems, making it versatile for both beginners and advanced developers:

  • Arduino (C/C++): UNO R3, Nano, Mega 2560, ESP32, ESP32-S3.
  • MicroPython: ESP32, ESP32-S3.
  • MakeCode: Micro:bit V2 (via dedicated extension).

4. Quick Start & Programming

Arduino (C/C++)

To use this module with Arduino, you need to read 2 bytes of data from I2C address 0x65. Each bit in the returned bytes represents the status of one touch key.

Click here to view Arduino lib

#include "matrix_keyboard.h"
 
MatrixKeyboard key_board(0x65);
 
void setup() {
  Serial.begin(115200);
  key_board.Setup(); 
  Serial.println("setup done");
}
 
void loop() {
  const char key = key_board.GetTouchedKey();  // 获取当前按下的按键值
 
  // 如果当前按键值不为'\0'则打印出按键值
  if (key != '\0') {
    Serial.println(key);
}

MicroPython

Download and upload the MicroPython libs onto your ESP32 or ESP32 S3 board.

click here view micropython lib

from matrix_keyboard import MatrixKeyboard
import machine
import time

print("setup")

i2c = machine.I2C(0, scl=22, sda=21, freq=400000)

matrix_keyboard = MatrixKeyboard(i2c, i2c_address=MatrixKeyboard.DEFAULT_I2C_ADDRESS)

print("loop")

while True:
    matrix_keyboard.update()
    current_key = matrix_keyboard.get_pressed_key()
    if current_key:
        print("Current pressed key: ", current_key)  # print current key 
    time.sleep_ms(20)

MakeCode (Micro:bit)

For graphical programming, use the following extension URL:

Extension: https://github.com/emakefun-makecode-extensions/emakefun_matrix_keyboard_v3

  1. Open MakeCode, go to Extensions.
  2. Paste the URL and add the package.
  3. Use the "On Key Pressed" blocks to trigger actions.

4. Resources

Schematic:

keypboard_v3.0_sch