Component Selection - Capacitive Touch

A project log for The Open Woodwind Project

An Electronic Aerophone with focus on usability as an instrument.

J. M. HopkinsJ. M. Hopkins 05/12/2018 at 08:354 Comments

Previous Design
In my previous prototype I accomplished touch sensitive keys via a pulsed AC signal being amplified by Darlington paired NPN transistors, clocked by a shift register one at a time into a single digital pin on a microcontroller. While this worked, it required quite a bit of soldering, testing of components, and programming.

Planned Design

In this next prototype I will be utilizing a true capacitive touch controller to provide key values. The MPR121 from Freescale was chosen for its 12 channels of capacitive touch and I2C communications. Two of these will be used on the same bus and will provide the microcontroller with 24 channels of touch feedback.

Easily accessible libraries allow for easy programming with the touch data. 

Example Programming

MPR121 touchA = MPR121();

uint16_t keysA = touchA.touched();
if(keysA & (1 << 4)) {
    //Button Pressed


J. M. Hopkins wrote 05/16/2018 at 10:15 point

Looks like there is a lock bit on the elctrode configuration register which can be used to lock the basline and prevent the MPR121 from drifting. I'll take a whack at that and see if that is a good alternative as well

  Are you sure? yes | no

Johan Berglund wrote 05/17/2018 at 18:00 point

Yeah, I tried that but I didn't get it to work. If are successful, please let me know :)

  Are you sure? yes | no

J. M. Hopkins wrote 05/15/2018 at 12:17 point

yeah, I was curious if this was going to be the case. Thanks for the info.

  Are you sure? yes | no

Johan Berglund wrote 05/15/2018 at 06:33 point

In the beginning using the the MPR121, I had problems with my octave rollers, as the keys were hold for longer periods of time and the basline was automatically altered, messing with the touch sensitivity. I had to ditch the .touched and go with .filteredData and compare to a fixed threshold value instead. Just a suggestion if you should encounter the same issue. 


  Are you sure? yes | no