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();
touchA.begin(0x5A);
uint16_t keysA = touchA.touched();
if(keysA & (1 << 4)) {
//Button Pressed
}
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
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
Yeah, I tried that but I didn't get it to work. If are successful, please let me know :)
Are you sure? yes | no
yeah, I was curious if this was going to be the case. Thanks for the info.
Are you sure? yes | no
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.
touchValue[i]=touchSensor.filteredData(i);
Are you sure? yes | no