Tony’s Touchpad Circuit

Previous incarnations of the ClariNot have used capacitive touch sensors in place of the keys or tone-holes on a traditional woodwind instrument. Initially I had used the CapSense library for Arduino with a self-made circuit, and later a dedicated breakout board to give me this functionality. Both of these choices, however, came with their own issues: the self-made circuit was fast but very prone to electrical interference, while the breakout board was reliable but increased the instrument’s latency (for more info, see this old post). I have since become aware of another cheap, fast and reliable option – resitive touch sensors. These were simple to make and implement, and have been incorporated into the latest version of the ClariNot as well as some other smaller experiments related to my music and research.

Test Circuit

I am deeply indebted to Tony Hardie-Bick for giving me a starter circuit diagram (shown above) for this work. Without his fantastic knowledge of all things electronic it would have taken me much longer to piece the following together. Thanks Tony!

The circuit shown here is a resistive circuit which reads a voltage drop when your skin makes a connection between the Touchpad 1 (+5v) and Touchpad2 (Gnd). The Schottky diodes and resistor protect the Arduino against any discharges of static electricity.

To try this circuit yourself, you will need:

 ●  1x Arduino
 ●  1x Breadboard & some wires
 ●  2x BAT42 Schottky Diodes
 ●  2x Tinfoil
 ●  1x 3MΩ Resistor (Orange, Black, Green, Gold)
 ●  1x 47kΩ Resistor (Yellow, Violet, Orange, Gold)
 ●  1x Speaker Driver (Optional)

Using THB’s circuit diagram, I made a simple test circuit using some tinfoil for touchpads, and a loudspeaker for audible feedback. I adapted examples from the Mozzi library to generate sine tones from the Arduino whenever the tinfoil plates were touched, the pitch changed based on the readings from the touch sensor.

As the video shows, the circuit is a little noisy, but good enough for capturing on/off values. There is a small controllable range in the values too, though some accuracy is required to work with it. One crucial point is that the user must remain in contact with the ground plate (tinfoil 2 in the diagram) for the readings to be stable. Without it, the output of the sketch is very chaotic. This proved quite interesting in the test: the circuit seemed quite good at picking up electrical noise from other devices. My desk lamp, for example made some difference to its behaviour when it was brought close to the foil plates. It was also fun to see how the output changed when I touched the sensor plate while disconnected from ground. Some change was perceptible, but amongst a more general disparate texture.

After this test I also built a six-touchpad instrument, to see how far I could stretch the use of these sensors with a standard Arduino Uno and the MOZZI library. The result was this glitchy little oddity:

Refurbishing The Clarinot

Using the above circuit, I made a new set of touch sensors to replace the eight keys on the ClariNot. These now function more reliably, and with far less latency than before. To construct the ground plate, I ran a thick strand of twisted copper wire around the frame of the instrument. This was placed at the natural points of contact on the sides of the instrument. As with the test circuit shown on this post, the chaotic behaviour that the touch pads exhibit when the user is not grounded has proved to be a useful and unexpected feature of the instrument.