Go Down

Topic: Touch Key Arduino (Read 321 times) previous topic - next topic

Gilliard

Hi

I am studying the capacitive buttons with the Arduino Uno, but the examples I found on the internet uses 2 wires, but I know it is possible using a single wire connected to capacitive touch key, someone would have the wiring diagram and example code simple to use that key with a single wire?

Thank you

Paul__B

Do you mean two "wires", or two Arduino pins per sensor?

fungus


I am studying the capacitive buttons with the Arduino Uno, but the examples I found on the internet uses 2 wires, but I know it is possible using a single wire connected to capacitive touch key, someone would have the wiring diagram and example code simple to use that key with a single wire?


The "key" only needs one wire but a capacitive sensor needs two Arduino pins. It's not possible with one.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Paul__B


The "key" only needs one wire but a capacitive sensor needs two Arduino pins. It's not possible with one.


That puzzles me greatly.  Why do you need the second pin?


If each key requires 2 wires, if I make a keyboard with 12 keys, I need 24 I / O ports?


No, 13.

Paul__B


I was thinking of making an array of capacitive keys, someone would have a wiring diagram?


Hardly needs a diagram (and I am not so good at drawing them to my personal satisfaction at this point), but each of the "sense" pins has a capacitor of something like 10 nF ("103") from that pin to the touch point (the capacitor is to prevent DC voltages getting to the Arduino pin; if your sense electrodes are already adequately insulated; you do not need this) and a 4M7 (green-yellow-green-gold or green-yellow-black-yellow-gold) connected from that sense pin back to the single common "drive" pin.

It appears to be a common recommendation to put something like a 47pF capacitor from each touch point to ground on the basis that if the capacitance to be sensed is too low, it becomes difficult to write code that implements the timing loop to be fast enough to measure it at all.  The code should not use interrupts.


Go Up