0

Capacitive touchpad switch
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Capacitive touchpad switch

by rmutt on Sat Feb 09, 2019 1:35 pm

I would like to use the AT42QT1010 capacitive touchpad to trigger a sound on a Adafruit Audio FX Sound Board. Would I connect the out from the touchpad to the input point on the soundboard? Thanks in advance.

rmutt
 
Posts: 27
Joined: Mon Oct 07, 2013 8:01 pm

Re: Capacitive touchpad switch

by adafruit_support_mike on Mon Feb 11, 2019 2:22 am

You'll need to add something like a PN2222 transistor between them:

https://www.adafruit.com/product/756

The AT42QT1010's output pins are low by default, and go high when the sensor detects a touch. The FX Board's trigger pins are high by default, and pulling them low triggers a sound.

The PN2222 can sit between them like an electrically-operated switch. The connection between the collector and emitter pins has high resistance when the base and emitter are at the same voltage, but the connection's resistance drops to a few Ohms when the voltage at the base rises about 0.6V higher than the emitter voltage.

Connect the FX Board's trigger pin to the PN2222's collector pin, the PN2222's emitter to a GND shared between the FX Board and the AT42QT1010, and put a 100k resistor between the AT42QT1010's output pin and the PN2222's base.

adafruit_support_mike
 
Posts: 58335
Joined: Thu Feb 11, 2010 2:51 pm

Re: Capacitive touchpad switch

by rmutt on Mon Feb 11, 2019 1:41 pm

I can use the AT42QT1070 without modification since it switches from high to low, and is momentary as well, correct? Thanks for getting back so fast.

rmutt
 
Posts: 27
Joined: Mon Oct 07, 2013 8:01 pm

Re: Capacitive touchpad switch

by adafruit_support_mike on Tue Feb 12, 2019 2:54 am

Yes, the AT42QT1070 can trigger an FX Board's pins directly.

adafruit_support_mike
 
Posts: 58335
Joined: Thu Feb 11, 2010 2:51 pm

Re: Capacitive touchpad switch

by rmutt on Thu Apr 11, 2019 1:02 pm

I have installed the AT42QT1070 board in a museum exhibit. What I would like to to is trigger a sound on the Audio FX Sound Board when someone touches a rotary handle which also controls a mechanical linkage. I have found that the sensors are too sensitive when hooked up directly. I can't change the pre-existing linkage. Is there a way I can install a capacitor or something else to tone down the sensitivity?

rmutt
 
Posts: 27
Joined: Mon Oct 07, 2013 8:01 pm

Re: Capacitive touchpad switch

by rmutt on Thu Apr 11, 2019 3:15 pm

Here's a pic of the installation.
Attachments
IMG_0216 (1).JPG
IMG_0216 (1).JPG (116.07 KiB) Viewed 108 times

rmutt
 
Posts: 27
Joined: Mon Oct 07, 2013 8:01 pm

Re: Capacitive touchpad switch

by rmutt on Thu Apr 11, 2019 3:46 pm

This is the handle that is turned and triggers the soundcard.
Attachments
IMG_0225.JPG
IMG_0225.JPG (96.02 KiB) Viewed 105 times

rmutt
 
Posts: 27
Joined: Mon Oct 07, 2013 8:01 pm

Re: Capacitive touchpad switch

by adafruit_support_mike on Fri Apr 12, 2019 1:16 am

I don't think there's any reliable way to work around that.

The hand-wheel, bearing, and linkage all form a large, complex-shaped touchpad. It's probably big enough to have antenna effects as well. The area a person will touch is a relatively small fraction of the total surface area, and anything that reduces the general noise will also reduce the small change you want to detect.

adafruit_support_mike
 
Posts: 58335
Joined: Thu Feb 11, 2010 2:51 pm

Re: Capacitive touchpad switch

by rmutt on Fri Apr 12, 2019 9:45 am

Would it be possible to tell me either a cap or resistor value that I could use to trim it slightly? I realize you are not guaranteeing success, but I would like to try.
Thanks for your help.

rmutt
 
Posts: 27
Joined: Mon Oct 07, 2013 8:01 pm

Re: Capacitive touchpad switch

by adafruit_support_mike on Sat Apr 13, 2019 2:27 am

You can decrease the sensitivity, but by the time you get it low enough, the sensor probably won't detect touches any more.

Every signal is accompanied by some amount of noise. There's a limit called the 'noise floor' where the noise is as strong as the signal you want to measure, beyond which it's impossible to recover the signal of interest. Anything you do to reduce the noise will reduce the signal just as much, and anything you do to boost the signal will boost the noise just as much.

The touch sensor is designed to work with touchpads that are roughly the size and shape of a postage stamp. The linkage you want to use is more like a TV antenna. It's a different size and a different shape, and those factors have an overwhelming effect on the way the sensor will behave.


In terms of basic impedance transformation, capacitance makes sudden changes in current produce slow and small changes in voltage. Inductance makes sudden changes in current produce large, short-lived changes in voltage. Resistance responds to changes in current immediately.

With some math to shuffle things around, we can represent that as a plane where the X axis is pure resistance and the Y axis measures inductance or capacitance. Positive Y-values are inductive, and negative Y values are capacitive. A circuit's total impedance is the vector sum of its resistive, inductive, and capacitive components. We draw the resulting diagrams using what are known as 'phasors':

https://en.wikipedia.org/wiki/Phasor

The part of all that relevant to your sensor is that inductance cancels capacitance. If you put a small inductor in series with a capacitor, it makes the capacitor look smaller.

In theory, you can put an inductor in series between the touch sensor and the linkage to cancel some of the excess capacitance. Give it a try if you want, but I wouldn't be too hopeful.

adafruit_support_mike
 
Posts: 58335
Joined: Thu Feb 11, 2010 2:51 pm

Re: Capacitive touchpad switch

by rmutt on Tue Apr 23, 2019 11:24 am

A couple of final questions: This exhibit is going to be outdoors, so the rotary handle will get wet from rain periodically, and the climate will vary temperature wise from 30 degrees to 90 (Fahrenheit) will this have any affect on the capacitance? I plan to enclose all electronics in a waterproof case. Also, can I use this transistor:
TRANSISTOR,NPN,BJT,GP,TO-92, GEN PURPOSE,40V,600mA,NPN(10) NPN General Purp
and will a 1K resistor work?
Thanks for all your help.

rmutt
 
Posts: 27
Joined: Mon Oct 07, 2013 8:01 pm

Re: Capacitive touchpad switch

by adafruit_support_mike on Wed Apr 24, 2019 12:29 am

rmutt wrote:This exhibit is going to be outdoors, so the rotary handle will get wet from rain periodically, and the climate will vary temperature wise from 30 degrees to 90 (Fahrenheit) will this have any affect on the capacitance?

Yes. Water is about 80x stronger than air as a dielectric.. the touch sensor basically detects the water in your finger as it gets near the touch plate. Drops of water hitting the touchplate could be recognized as touches.

General humidity will have some effect on the overall capacitance of the air, but the touch sensor's auto-calibration should be able to adjust to that.
rmutt wrote:can I use this transistor: [ . . . ] and will a 1K resistor work?

Yes, those will work with the sensor's output.

adafruit_support_mike
 
Posts: 58335
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.