Capacitive Touch Sensor

12-channel capacitive touch sensor. Detect touches on conductive pads, fruit, water, foil, or any conductive material.

Not yet testedLow confidence

From $7.95

Say it to PAL

“Make a touch piano: each pad plays a different note.”

The code PAL writes

const TOUCH = 'qwiic-mpr121';
const BUZZER = 'modulino-buzzer';
const notes = [262,294,330,349,392,440,494,523,587,659,698,784]; // C4-G5
const names = ['C4','D4','E4','F4','G4','A4','B4','C5','D5','E5','F5','G5'];
let prevState = 0;

p.onSensorChange(TOUCH, 'touch_state', (state: number) => {
  const pressed = state & ~prevState;
  const released = ~state & prevState & 0xFFF;
  prevState = state;

  // New electrode pressed — play its note (most recently pressed wins)
  if (pressed) {
    for (let i = 11; i >= 0; i--) {
      if ((pressed >> i) & 1) {
        p.write(BUZZER, 'tone', { frequency: notes[i], duration_ms: 2000 });
        p.setVariable('note', names[i]);
        break;
      }
    }
  }

  // All electrodes released — stop buzzer
  if (released && state === 0) {
    p.write(BUZZER, 'stop');
    p.setVariable('note', '—');
  }
});

p.setVariable('note', '—');
await p.waitUntilStopped();

“Tell me when I touch or let go of a pad.”

The code PAL writes

const TOUCH = 'qwiic-mpr121';
let prevState = 0;

p.onSensorChange(TOUCH, 'touch_state', (state: number) => {
  const pressed = state & ~prevState;
  const released = ~state & prevState & 0xFFF;
  prevState = state;

  for (let i = 0; i < 12; i++) {
    if ((pressed >> i) & 1) p.log('Electrode ' + i + ' pressed');
    if ((released >> i) & 1) p.log('Electrode ' + i + ' released');
  }
});
await p.waitUntilStopped();

When to pick it

Use for custom touch interfaces, fruit pianos, water level sensing, or any project needing capacitive touch input on arbitrary conductive surfaces.

Good to know

  • Electrodes need a connection wire to the conductive surface. Longer wires increase sensitivity to noise.

About it

The MPR121 is a 12-channel capacitive touch sensor controller. Each electrode can detect proximity and touch events on conductive surfaces. Connect to copper pads, conductive fabric, fruit, or any conductive object to create custom touch interfaces. Supports up to 4 sensors on one I2C bus via address selection. Features auto-calibration and configurable sensitivity thresholds.

Facts

Tested

Not yet testedLow confidence

It is in our catalog, but nobody has checked it on a real board. It may not work yet. Its driver is written, but it has not been tested on hardware yet.

I2C address

0x5A, 0x5B, 0x5C, 0x5D

The Capacitive Touch Sensor answers at I2C address 0x5A. A jumper or pin moves it to 0x5B or 0x5C or 0x5D.

Current

29 µA

The catalog lists a typical draw of 29 µA for the Capacitive Touch, copied from the maker’s description and not measured by Palpable.

Board size

33.02 × 19.18 mm

The Capacitive Touch board measures 33.02 × 19.18 mm and stands 4.6 mm tall with its parts. It has 2 mounting holes. These dimensions are from the maker’s mechanical drawing.

Chip

MPR121

Its touch controller is the NXP MPR121.

Free to reuse

Every fact here is open data under CC BY 4.0. Copy it into your own docs or code, and credit Palpable. Download it

This record was last changed on October 6, 2026.

See every part

Tested on a real boardHigh confidencethree things to press, and they light back3 Buttonsfrom $7.63Tested on a real boardHigh confidencelean it, and something movesJoystickfrom $8.00Tested on a real boardHigh confidencea thing to turn — it remembers where you left itRotary Knobfrom $8.00