Capacitive touch controller
STM32-Experiments Free Updated Sep 21, 2026

Capacitive touch controller

capacitive touch controller

Modern touch-sensitive light switches and the volume sliders on some kitchen appliances work using exactly this technology, detecting a touch through a change in electrical capacitance rather than needing a physical button to be pressed down. In this experiment, the STM32F070RB communicates with an MPR121 capacitive touch controller over I2C, configures its twelve electrode channels, and continuously reports which electrode, if any, is currently being touched.

2. Scope

This experiment covers performing the MPR121's required multi-register setup sequence over I2C, including touch and release thresholds for each electrode, and then continuously reading its touch-status registers to determine which electrodes are currently touched. This is a more involved I2C device than a simple sensor that just returns a measurement, since it needs proper configuration before it produces any usable data, a pattern common among more sophisticated digital sensors.

3. Prerequisite

3.1 Hardware

  • STM32 Nucleo-F070RB development board

  • MPR121 capacitive touch sensor breakout module, twelve electrodes

  • Breadboard and jumper wires

  • Micro-USB cable

  • PC with PuTTY

3.2 Software

  • STM32CubeMX (standalone)

  • STM32CubeIDE

  • ST-LINK USB driver

  • PuTTY, or an equivalent serial terminal application

Community Q&A

0 questions

Ask questions and get answers from our community and staff moderators.

No questions yet — be the first to start the conversation!

Ask a Question

Please log in to ask a question or post a reply.

Login to Participate