Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use MPR 121 Breakout Board: Examples, Pinouts, and Specs

Image of MPR 121 Breakout BoardDesign with MPR 121 Breakout Board in Cirkit Designer

Introduction

The MPR121 Breakout Board by Adafruit is a compact and versatile module designed to simplify the integration of capacitive touch sensing into your projects. It is based on the MPR121 capacitive touch sensor IC, which supports up to 12 touch-sensitive electrodes. This breakout board provides easy access to the MPR121's pins and features, making it ideal for prototyping and development.

Explore Projects Built with MPR 121 Breakout Board

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Adafruit Feather 32u4 Bluefruit with MPR121 Capacitive Touch Sensor Interface: A project utilizing MPR 121 Breakout Board in a practical application
Adafruit Feather 32u4 Bluefruit with MPR121 Capacitive Touch Sensor Interface

This circuit integrates an Adafruit MPR121 capacitive touch sensor with an Adafruit Feather 32u4 Bluefruit microcontroller. The MPR121 is powered by the 3.3V supply from the Feather and communicates with the microcontroller via I2C, with SCL connected to pin 3 and SDA connected to pin 2 of the Feather. This setup allows the Feather to detect touch inputs from the MPR121 for further processing or wireless communication.

Open Project in Cirkit Designer
Image of Arduino Mega 2560 Smart Home Automation System with LCD Display and Sensor Integration: A project utilizing MPR 121 Breakout Board in a practical application
Arduino Mega 2560 Smart Home Automation System with LCD Display and Sensor Integration

This circuit is a multi-functional system controlled by an Arduino Mega 2560, featuring an LCD display, various LEDs, a stepper motor, a DC motor, and multiple sensors including a DHT11 humidity and temperature sensor and a water level sensor. The system also includes a real-time clock module for timekeeping and several pushbuttons for user interaction. The ULN2003A breakout board is used to drive the stepper motor, while the L293D motor driver controls the DC motor.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Below are the key technical details and pin configuration for the MPR121 Breakout Board:

Key Technical Details

Parameter Value
Operating Voltage 1.8V to 3.6V (logic level)
Input Voltage (VCC pin) 3.3V to 5V
Communication Interface I2C
Number of Touch Electrodes 12
I2C Address (Default) 0x5A (configurable to 0x5B, 0x5C, or 0x5D)
Maximum Current Consumption ~29 µA (in normal operation)
Dimensions 25mm x 18mm

Pin Configuration and Descriptions

The MPR121 Breakout Board has the following pin layout:

Pin Name Description
GND Ground connection
VCC Power supply input (3.3V to 5V)
SDA I2C data line
SCL I2C clock line
IRQ Interrupt pin (active low, signals touch events)
ADDR Address selection pin (used to configure I2C address)
ELE0-ELE11 Touch electrode pins (connect to conductive materials for touch detection)

Usage Instructions

How to Use the MPR121 Breakout Board in a Circuit

  1. Power the Board: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to ground.
  2. Connect to I2C: Connect the SDA and SCL pins to the corresponding I2C pins on your microcontroller (e.g., Arduino UNO).
  3. Configure the I2C Address: If using multiple MPR121 boards, configure the I2C address by connecting the ADDR pin to GND, VCC, SDA, or SCL to set the address to 0x5A, 0x5B, 0x5C, or 0x5D, respectively.
  4. Attach Electrodes: Connect conductive materials (e.g., copper tape, wires) to the ELE0 to ELE11 pins for touch sensing.
  5. Interrupt Pin (Optional): Use the IRQ pin to detect touch events without continuously polling the sensor.

Important Considerations and Best Practices

Example Code for Arduino UNO

Below is an example of how to use the MPR121 Breakout Board with an Arduino UNO:

#include <Wire.h>
#include "Adafruit_MPR121.h"

// Create an MPR121 object
Adafruit_MPR121 cap = Adafruit_MPR121();

// Check if the MPR121 is connected
void setup() {
  Serial.begin(9600);
  while (!Serial); // Wait for Serial Monitor to open

  Serial.println("MPR121 Capacitive Touch Sensor Test");

  if (!cap.begin(0x5A)) { // Default I2C address is 0x5A
    Serial.println("MPR121 not found. Check wiring!");
    while (1);
  }
  Serial.println("MPR121 found!");
}

void loop() {
  // Read touch status
  uint16_t touched = cap.touched();

  for (uint8_t i = 0; i < 12; i++) {
    // Check if electrode i is touched
    if (touched & (1 << i)) {
      Serial.print("Electrode ");
      Serial.print(i);
      Serial.println(" is touched.");
    }
  }
  delay(100); // Small delay for stability
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. MPR121 Not Detected

    • Cause: Incorrect wiring or I2C address mismatch.
    • Solution: Double-check the connections for SDA, SCL, VCC, and GND. Ensure the I2C address in the code matches the hardware configuration.
  2. Touch Events Not Detected

    • Cause: Poor electrode connections or excessive noise.
    • Solution: Ensure electrodes are securely connected to the ELE pins. Minimize the length of electrode wires and avoid noisy environments.
  3. Unstable or False Touch Events

    • Cause: Environmental interference or improper grounding.
    • Solution: Use a proper ground plane and shield the electrodes if necessary. Adjust the sensitivity settings in the MPR121 library.

FAQs

This concludes the documentation for the MPR121 Breakout Board.