Capacitance Sensing with Conductive Silicone

I’ll start with the result for those who don’t have time to read. With 10mm of non-conductive silicone insulating the carbon-fibre conductive silicone, we still get a pretty good change in capacitance which can be detected.

This is great news! The 10mm of non conductive silicone can act as a physical barrier whilst the conductive silicone acts as the touchable surface.

How does it work?

The headers have been installed on the shield.
The headers have been installed on the shield.

I bought a MPR121 Capacitive touch shield for the Arduino. The first challenge I had, having never used an Arduino before, was to figure out how to assemble it. They come with little headers that you solder onto the shield, which is quite easy to do, especially if you use the Arduino as a guide (stick the long end of the headers into the Arduino’s connectors and then solder the shield onto that) just be careful not to overheat any components!

The MPR-121 shield snaps easily into place.
The MPR-121 shield snaps easily into place.

The Arduino and shield just snap together. It took me an embarrassingly long time to realise this because I was expecting some fancy wiring. It’s just “plug & go”.

I then downloaded the code for the MPR-121.

My initial tests were disappointing: the system failed to detect “touch” whenever I touched the non-conductive silicone, but recognised a touch when I touched the conductive stuff. This is not what I wanted because as I discovered before, the conductive silicone has these little carbon fibre hairs sticking up out of it that could cause itchiness in places you really don’t want it.

I then realised that the sensor provides both baseline and filtered data. My understanding is that the baseline data is something akin to a moving average that is able to take into account noise and ambient effects (like humidity I suppose).

I found that when the sensor is touched “properly”, on the conductive silicone, the “filtered” value drops momentarily below the baseline value, triggering a “touch”. When I touched the non-conductive side, both the baseline and the filtered values drop at the same rate. This tells me that the drop is probably so small and gradual that it’s not picked up by the

My initial modified code is below:

/*********************************************************
This is a library for the MPR121 12-channel Capacitive touch sensor

Designed specifically to work with the MPR121 Breakout in the Adafruit shop
—-> https://www.adafruit.com/products/

These sensors use I2C communicate, at least 2 pins are required
to interface

Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!

Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
**********************************************************/

#include <Wire.h>
#include “Adafruit_MPR121.h”

// You can have up to 4 on one i2c bus but one is enough for testing!
Adafruit_MPR121 cap = Adafruit_MPR121();
void setup() {
Serial.begin(9600);

while (!Serial) { // needed to keep leonardo/micro from starting too fast!
delay(10);
}

Serial.println(“Adafruit MPR121 Capacitive Touch sensor test”);

// Default address is 0x5A, if tied to 3.3V its 0x5B
// If tied to SDA its 0x5C and if SCL then 0x5D
if (!cap.begin(0x5A)) {
Serial.println(“MPR121 not found, check wiring?”);
while (1);
}
Serial.println(“MPR121 found!”);
}

void loop() {

// Get the currently touched pads
currtouched = cap.touched();
Serial.print(cap.baselineData(0));
Serial.print(“\t”);
Serial.print(cap.filteredData(0));
Serial.print(“\t”);

Serial.println();
delay(100);
return;

}

By changing the threshold values, we can change the threshold at which a “touch” and “release” are detected.

cap.setThreshholds(1, 1);

By changing the value of “Config1” we can increase the charge current of the capacitor, effectively increasing the range of values we can detect.

cap.writeRegister(MPR121_CONFIG1, 0x20); // 32uA charge current

My next test was to see what physical characteristics of my setup gave the best results. I came to the following conclusions:

  • Enameled magnet wire seemed like a good idea but when combined with many others of its kin, resulted in a higher overall capacitance, meaning it’s hard to detect touches.
  • The longer the wire is, the more capacitance it has and therefore the worse the ability to discern “touch”, the capacitance sensor will need to be as close to the conductive silicone as possible.
  • The more surface area of carbon fibre conductive silicone, the better the touch detection.
  • 10mm seems to be a nice thickness of non-conductive silicone, anything beyond 20mm is too thick.
Enameled winding wire is too narrow and not insulated enough so it has a very high capacitance.
Enameled magnet wire is too narrow and not insulated enough so it has a very high capacitance.

2 thoughts on “Capacitance Sensing with Conductive Silicone”

Leave a Reply

Your email address will not be published.