Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Copper Foil Tape with Conductive Adhesive not working once a
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Copper Foil Tape with Conductive Adhesive not working once a

by chadjensen57 on Sun Apr 05, 2020 1:28 am

Hello,

I have an MPR121 Capacitive Touch Sensor and it works great when I have it connect to the copper tape with the backing still attached. However, once I remove the backing to the tape and apply it to a surface it thinks it is always being "touched". How can I apply the tape to something and make it realize it isn't being touched until it actually is. I am using the example code with a little added in to light up some LEDs when touched.

Code: Select all | TOGGLE FULL SIZE
/*********************************************************
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"
#include <Adafruit_NeoPixel.h>
#ifndef _BV
#define _BV(bit) (1 << (bit))
#endif
#define PIN 9
#define LED_COUNT 74

Adafruit_NeoPixel strip = Adafruit_NeoPixel(LED_COUNT, PIN, NEO_GRB + NEO_KHZ800);
// You can have up to 4 on one i2c bus but one is enough for testing!
Adafruit_MPR121 cap = Adafruit_MPR121();

// Keeps track of the last pins touched
// so we know when buttons are 'released'
uint16_t lasttouched = 0;
uint16_t currtouched = 0;

void setup() {
  Serial.begin(9600);
  Wire.begin();
  strip.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip.show();            // Turn OFF all pixels ASAP
  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();
 
  for (uint8_t i=0; i<12; i++) {
    // it if *is* touched and *wasnt* touched before, alert!
    if ((currtouched & _BV(i)) && !(lasttouched & _BV(i)) ) {
      Serial.print(i); Serial.println(" touched");

    Serial.print("Finished");
    Serial.print("\n");
    strip.fill(strip.Color(0,255,0),0, 74);
    strip.show();
    delay(3000);
    strip.clear();
    strip.show();


     
    }
    // if it *was* touched and now *isnt*, alert!
    if (!(currtouched & _BV(i)) && (lasttouched & _BV(i)) ) {
      Serial.print(i); Serial.println(" released");
    }
  }

  // reset our state
  lasttouched = currtouched;

  // comment out this line for detailed data from the sensor!
  return;
 
  // debugging info, what
  Serial.print("\t\t\t\t\t\t\t\t\t\t\t\t\t 0x"); Serial.println(cap.touched(), HEX);
  Serial.print("Filt: ");
  for (uint8_t i=0; i<12; i++) {
    Serial.print(cap.filteredData(i)); Serial.print("\t");
  }
  Serial.println();
  Serial.print("Base: ");
  for (uint8_t i=0; i<12; i++) {
    Serial.print(cap.baselineData(i)); Serial.print("\t");
  }
  Serial.println();
 
  // put a delay so it isn't overwhelming
  delay(100);
}

chadjensen57
 
Posts: 20
Joined: Tue Feb 21, 2017 6:06 pm

Re: Copper Foil Tape with Conductive Adhesive not working on

by jps2000 on Sun Apr 05, 2020 1:53 am

Use self adhesive tape or kapton tape first, size a little bit larger, and then on top of that glue the copper foil. To reduce the capacity you may use multiple layers of non conductive tapes under the copper.
On top you can have another foil to prevent direct electrical contact.

jps2000
 
Posts: 559
Joined: Fri Jun 02, 2017 4:12 pm

Re: Copper Foil Tape with Conductive Adhesive not working on

by chadjensen57 on Sun Apr 05, 2020 11:00 am

Hello,

Thank you for the recommendation, but even after putting two layers of packing tape down before putting the copper tape down it still will not work. I am also taping this down to wood which is a non-conductive surface. Any other ideas? Why is this happening? What am I not understanding?

Thank you

chadjensen57
 
Posts: 20
Joined: Tue Feb 21, 2017 6:06 pm

Re: Copper Foil Tape with Conductive Adhesive not working on

by jps2000 on Sun Apr 05, 2020 12:37 pm

Is it still working in your previous setup?
Always revert to the point where it worked last time. Then do just one change after the other.

jps2000
 
Posts: 559
Joined: Fri Jun 02, 2017 4:12 pm

Re: Copper Foil Tape with Conductive Adhesive not working on

by chadjensen57 on Sun Apr 05, 2020 1:24 pm

It works with the backing on but as soon as I stick it to something it no longer works.

    Stuck is to wood
    packing tape
    and even with it just hanging from the alligator clip without the backing it thinks it is being touched.

chadjensen57
 
Posts: 20
Joined: Tue Feb 21, 2017 6:06 pm

Re: Copper Foil Tape with Conductive Adhesive not working on

by caitlinsdad on Sun Apr 05, 2020 2:13 pm

In simple terms, the capacitive touch sensor works something like an antenna. When you apply the copper tape to something, that something and stuff around it may add or decrease the sensitivity of the antenna. Capacitive touch is a little finicky to work with. If you have multiple sensors - touch points radiating out from your board, you have to make sure they are not close together or interfere. The code/drivers for the board usually calibrate a base reading at the start so you may need to adjust sensitivity trigger thresholds in code or give it a longer time to settle before placing your hand near for it to sense. Maybe cut the tape in half lengthwise to use so you have a thinner antenna, it might change the sensitivity so it works. Good luck.

caitlinsdad
 
Posts: 600
Joined: Fri Feb 24, 2012 4:23 pm

Re: Copper Foil Tape with Conductive Adhesive not working on

by caitlinsdad on Sun Apr 05, 2020 2:23 pm

Other thing is to keep the wires to your capacitive touch point as close as possible to the board. Long jumper wires will also become the "antenna".

caitlinsdad
 
Posts: 600
Joined: Fri Feb 24, 2012 4:23 pm

Please be positive and constructive with your questions and comments.