

The Adafruit MPR121 (Part ID: 1982) is a capacitive touch sensor controller capable of detecting up to 12 touch inputs. This versatile component is ideal for creating touch-sensitive interfaces in a wide range of projects, from interactive art installations to custom control panels. It communicates via the I2C protocol, making it easy to integrate with microcontrollers like Arduino and Raspberry Pi.








The Adafruit MPR121 is based on the MPR121 IC from NXP Semiconductors and comes on a breakout board for easy integration. Below are the key technical details:
| Specification | Details |
|---|---|
| Operating Voltage | 3.3V to 5V |
| Communication Protocol | I2C |
| I2C Address (Default) | 0x5A (configurable to 0x5B, 0x5C, 0x5D) |
| Number of Touch Inputs | 12 |
| Maximum Current Consumption | ~1 mA |
| Operating Temperature Range | -40°C to +85°C |
| Dimensions | 25mm x 18mm x 2mm |
The Adafruit MPR121 breakout board has the following pin layout:
| Pin Name | Description |
|---|---|
| VIN | Power input (3.3V to 5V). Connect to the microcontroller's power supply. |
| GND | Ground. Connect to the microcontroller's ground. |
| SDA | I2C data line. Connect to the SDA pin of the microcontroller. |
| SCL | I2C clock line. Connect to the SCL pin of the microcontroller. |
| IRQ | Interrupt pin. Outputs a signal when a touch event is detected. Optional use. |
| ADDR | I2C address selection pin. Leave unconnected for default address (0x5A). |
| RST | Reset pin. Pull low to reset the MPR121. |
Below is an example of how to use the Adafruit MPR121 with an Arduino UNO. This code requires the Adafruit_MPR121 library, which can be installed via the Arduino Library Manager.
#include <Wire.h>
#include <Adafruit_MPR121.h>
// Create an instance of the MPR121 class
Adafruit_MPR121 cap = Adafruit_MPR121();
void setup() {
Serial.begin(9600);
while (!Serial) {
// Wait for the serial monitor to open (for boards like Leonardo)
delay(10);
}
Serial.println("Adafruit MPR121 Capacitive Touch Sensor Test");
// Initialize the MPR121
if (!cap.begin(0x5A)) {
Serial.println("MPR121 not found. Check wiring or I2C address!");
while (1);
}
Serial.println("MPR121 found!");
}
void loop() {
// Read touch status
uint16_t touched = cap.touched();
// Print which electrodes are being touched
for (uint8_t i = 0; i < 12; i++) {
if (touched & (1 << i)) {
Serial.print("Electrode ");
Serial.print(i);
Serial.println(" is being touched.");
}
}
delay(100); // Small delay to avoid flooding the serial monitor
}
MPR121 Not Detected:
False Touch Events:
No Touch Events Detected:
Q: Can I use more than one MPR121 on the same I2C bus?
A: Yes, you can use up to four MPR121 devices by configuring the ADDR pin to set unique I2C addresses (0x5A, 0x5B, 0x5C, 0x5D).
Q: What materials can I use for the touch electrodes?
A: You can use any conductive material, such as copper tape, aluminum foil, or conductive fabric.
Q: Can the MPR121 detect proximity without physical touch?
A: Yes, the MPR121 can detect proximity if the electrode is large enough and the sensitivity settings are adjusted.
Q: Is the MPR121 compatible with 3.3V microcontrollers?
A: Yes, the MPR121 works with both 3.3V and 5V logic levels, making it compatible with a wide range of microcontrollers.