it's the $8.49 question, boys and gals.
my latest hypothesis is that arduino puts out too much current through the digital pins for the QT300 to deal with. the QT300 spec sheet says that the max current is 1500 micro amps (uA), minimum 60. is it possible that this has been exceeded?? does anyone know where to get technical info about arduino's electrical specs? and if it has fryed the QT300 in this way, could anyone suggest, to a relative beginner, how to limit the current going through the sensor to a non-dangerous level (ie, below 1500uA)?
Wow-- you have documented this really well.
the Arduino did not fry your QTPROX.
The 60 to 1500uA that you refer to above is the supply current for the QTProx. That means it will consumet hat much current. Long story cut short: that's what the chip needs, and in this case it isn't possible that the Arduino is 'force feeding' it more current than it needs. Think of the QTprox as a consistent load that only needs that much current.
Not sure what the problem with your circuit is, but bear in mind that capacitance-based sensors like that are notoriously fussy in terms of the layout. You would do well to order the evaluation kit for the chip, as it wil have a properly engineered layout. That might be the place to begin-- i.e. with eliminating some of the many variables.
PS: remember also that those serial println commands at 9600 baud take a long time (10ms? more?) to execute, and if they're in between the spi commands they will completely screw things up. Moral of the story: do all the SPI work, and then echo it back to the serial port of necessary.