is it possible to have 40 separate capacitive sensors on arduino mega?

in theory it should be since there are more than 40 digital IO pins... but i am having trouble with the schematic in my head, and am also wondering if having that many sensors will slow down the whole process? The serial monitor seems to slow considerably after just adding a few sensors... and i just dont want to go to all the trouble to realize that its worthless when the viewer/user needs to hold on the sensor for 3 whole seconds for the device to react appropriately.

here is the library im using: Arduino Playground - HomePage

so with 40 sensors there will be 40 resistors, and 1 transmit pin/40 receive pins... (just thinking out loud here for anyone to correct me.)

id really appreciate any help as my project is due far too soon :frowning: thanks all

Isn't there perhaps a way to multiplex this problem so that you can use a 5x8 matrix (i.e. 13 pins) to allow 40 inputs? Or how about a dedicated chip to do all the heavy lifting for you?

For example, the QT60486 from Atmel offers up to 48 inputs (!!!), perhaps you can make it work with the existing Arduino libraries / code bases for similar Atmel chips (see here: Arduino Forum). The only downside to this approach (besides having to learn how to address, read, etc. the chip via SPI) is price, digikey is selling these in a TQFP-44 package for about $9...

From the looks of it, this chip uses a matrix to address its inputs (see http://media.digikey.com/pdf/Data%20Sheets/Quantum%20PDFs/QT60326,%20QT60486.pdf. Looking at the pin connections, I wonder if the thing isn't a standard-issue Atmel general-purpose processor that happens to be running a capacitative-touch firmware. The connection diagram in the datasheet shows how you could try to interface the Arduino with a matrix of capacitative-touch inputs. Worth a try, anyway.

Constantin:
Isn't there perhaps a way to multiplex this problem so that you can use a 5x8 matrix (i.e. 13 pins) to allow 40 inputs? Or how about a dedicated chip to do all the heavy lifting for you?

For example, the QT60486 from Atmel offers up to 48 inputs (!!!), perhaps you can make it work with the existing Arduino libraries / code bases for similar Atmel chips (see here: Arduino Forum). The only downside to this approach (besides having to learn how to address, read, etc. the chip via SPI) is price, digikey is selling these in a TQFP-44 package for about $9...

From the looks of it, this chip uses a matrix to address its inputs (see http://media.digikey.com/pdf/Data%20Sheets/Quantum%20PDFs/QT60326,%20QT60486.pdf. Looking at the pin connections, I wonder if the thing isn't a standard-issue Atmel general-purpose processor that happens to be running a capacitative-touch firmware. The connection diagram in the datasheet shows how you could try to interface the Arduino with a matrix of capacitative-touch inputs. Worth a try, anyway.

Were you able to use the QT60486 to work with Arduino?

I never tried (!!) I just looked up the resources that arduino.cc offers up. :grin: