MPR121 Capacitive Touch Sensor for Enviro+ & Raspberry Pi?

Published at : 23 Dec 2025

This video is about the MPR121 touch sensor controller which I am investigating as a possible solution to add a keypad interface to a project using Pimoroni's Enviro+ board on a Raspberry PI. It is quite interesting to play with capacitive sensors and investigate the performance of several button layouts. It turns out that making cheap capacititive button mock-ups with kitchen foil or copper tape is definitely a good idea. Some designs should work in theory but turn out to be problematic when tested.

The driver code and the program to create the squares and circle on the Enviro+ LCD can be downloaded here:
https://github.com/TheHWcave/MPR121-Touch-Controller

The mentioned presentation: https://www.nxp.com/docs/en/supporting-information/AMF_ENT_T1118_1.pdf

MPR121 Datasheet: https://www.nxp.com/docs/en/data-sheet/MPR121.pdf

Application notes (essential reading to understand and program the MPR121):

Baseline system: https://www.nxp.com/docs/en/application-note/AN3891.pdf
Proximity detection: https://www.nxp.com/docs/en/application-note/AN3893.pdf
Capacitive Sensing- Filtering and Timing: https://www.nxp.com/docs/en/application-note/AN3890.pdf
Jitter and False Touch Detection: https://www.nxp.com/docs/en/application-note/AN3892.pdf
GPIO and LED driver : https://www.nxp.com/docs/en/application-note/AN3894.pdf
Serial Communication: https://www.nxp.com/docs/en/application-note/AN3895.pdf
Capacitance Sensing Settings: https://www.nxp.com/docs/en/application-note/AN3889.pdf