Electronic – capacitive sensor and wire length

buttoncapacitivesensorwiring

I'm a newbie and I've been playing with the awesome Adafruit CAP1188 capacitive touch gizmo.

As long as I keep the length of the wires from the CAP1188 to my copper sticky pads to a couple of feet, everything works perfectly. But as soon as I go beyond say 4 feet it stops working.

I spent a few hours experimenting with different length of wires and tweaking the CAP1188 sensitivity, but nothing works.

What I really like about the capacitive sensor approach is that it's fairly inexpensive. The CAP1188 is $8, it self-calibrates and can drive (on paper) 40 capacitive touch pads which can be made out of sticky copper tape, and the whole thing only uses 2 or 3 pins on my Arduino. I need 32 sensors for my project. You can think of my project as the equivalent of a giant/3D https://en.wikipedia.org/wiki/Simon_(game).
Using some kind of mechanical switch is not out of the question either as long as it's sturdy, cheap and/or easy to make.

What am I doing wrong? Is it something inherent to the capacity touch technology that renders the use of wires with a length beyond a few feet inoperable?
Should I be using some other technology such as Pressure-Sensitive Conductive Sheet?

Any suggestions will be greatly appreciated!

Best Answer

Disclosure - I work for Bare Conductive.

A lot of this will depend on the exact self-calibration algorithm being implemented within the IC, its maximum range of drive current / integration time values and the physical layout of your wiring.

You should bear in mind that most capacitive sensing solutions are optimised for relatively close proximity layout and sensing - generally a few hundred millimetres of track between the sensing IC and the electrode would be considered "quite far". That is because these ICs are generally intended for control panel / display applications, hence the onboard LED driver option on the pins.

The Freescale MPR121 (which is available on various breakout boards as well as on the Bare Conductive Touch Board) is optimised for passenger detection in automative applications - it's basically intended to implement a system to decide which airbags to deploy in the event of an accident. As a result, it is very robust and I have had it working over much longer wire lengths than you mention. There are lots of examples of projects doing this on the Bare Conductive Make Page. However, you should be aware that if you do this, the whole of the wire will become sensitive - since capacitive sensing will still work through the wire insulation. Additionally, the longer the wire the more noise you will pick up and the more it will interact with other wiring around it.

My advice for this particular project would be to use microswitches. Not sure what country you are in, but this would probably do nicely and not cost much. By sticking with mechanical switches you minimise the amount of effort you will have to go to in optimising / debugging the setup, and you can focus on making the experience great. You also get the advantage of getting some tactile feedback for the user - a tangible "click" which you do not get with capacitive sensing. You're not really doing anything where capacitive sensing would shine through or add magic - it seems like you're trying to emulate a switch - so use a switch!

If I was doing this for a client who was absolutely stuck on doing this with capacitive sensing, I would create a custom board with one MPR121 (or MPR03X, which is a lower electrode count version of the same chip) for each panel and then use I2C multiplexers (such as the PCA9546A) to allow for accessing 32 of these boards. However this is quite a big task if you're not used to creating you own PCBs.