The sensors are each about 1" by .5" and are connected to the arduino by a 3-pin header. The components on the board are very simple -- two 1M resistors. With a combination of software running on the microcontroller and in the PC, the sensor is made into a virtual slider.
The principle of operation is simple: placing a fingertip near the copper pad -- and the far side of the circuit board is close enough -- changes the capacitance enough to measure. The measurement procedure is as follows:
In my setup, this gives a value typically from 16 iterations (no nearby finger) to 24 iterations (finger pressing on top side of sensor board). A 200-item window of past samples is taken, and that furnishes the minimum and maximum touch values. When a sensor value higher than the minimum value is seen on at least one sensor, a touch is registered. If the touch is only on one sensor, then the slider is 0% or 100%. Otherwise, it is an intermediate position indicated by the ratio between the two sensor values.
One interesting thing about the board is that I milled the holes only part way through, and just stuck the "through hole" components into the blind holes before soldering them. This way the touch surface is completely uninterrupted.
This approach can be expanded to more pads, taking (N+1) I/O pins. I'm presently toying with making an 8-pad board run by a dedicated avr.
Files currently attached to this page:
cap.pde | 515 bytes |
cap.py | 1.7kB |