MPR121 Hookup Guide
This Tutorial is Retired!
This tutorial covers concepts or technologies that are no longer current. It's still here for you to read and enjoy, but may not be as useful as our newest tutorials.
If you are interested in adding the ‘magic’ of touch to control your electronics project, a capacitive touch sensor might be the way to go. This hookup guide will show you how to use the MPR121QR2 sensor.
The MPR121QR2 is a capacitive touch sensor controller that makes it very easy to integrate capacitive touch sensing into your project. It communicates via I2C, and works by measuring the capacitance of twelve electrode points. When an object comes close to the electrode connector, the measured capacitance changes. This signals the MPR121 that something has touched a ‘button’. The IC is also capable of driving LEDs or basic GPIO functionality on electrode pins 4 through 11, giving you a lot of freedom for setting up your project. The sensor works from 1.6V to 3.3V. The sensor isn’t very current-hungry, drawing only around 29 µA when sampling every 16 milliseconds.
To work through this tutorial, you are going to need one of the three versions of the MPR121 sensor:
You will also want a soldering iron, some hookup wires and a microcontroller capable of I2C communication. For our examples, we will be using an Arduino Uno. You will also need some kind of material to act as a capacitive sensing surface (also known as an electrode, which is not to be confused with the character Electrode). Generally, aluminum foil works well. However, you could also use coins, conductive paint, or copper tape.
The MPR121 is very easy to get started using, especially with the example code. However, if you haven’t worked with Arduino previously or aren’t familiar with I2C communication, you should check out the tutorials below.