1
\$\begingroup\$

I'm looking to create low latency capacitive touch buttons for a musical instrument. The response time (from physical touch to touch registered in microcontroller) needs to be around ~2ms or less.

From what I've read it seems like this is possible (and there have even been touchscreens developed with sub 1ms latency - see here!). Given that I merely want to implement a single button, it seems like it should be achievable. However, I've been shopping around for ICs and everything I can find seems to have 10-16ms response time.

So given the lack of an appropriate IC, how could I create such a sensor myself? Is it merely a matter of doing very fast AC voltage measurements on the sensor pad? - In which case, what is the limiting factor here? Why are all the products on the market so slow?

\$\endgroup\$

4 Answers 4

1
\$\begingroup\$

It seems that you have found low power products that do not need to be so fast as they have not been designed to be used on high performance musical instrument needing fast response time, but as simple user interface buttons that need to be reliable (think of stoves and ovens that need to be robust and extremely sure not to trigger easily by accident or house can burn down).

What you can do is to find a reasonably powerful microcontroller with hardware support for capacitive sensing, and fine tune the accompanying sensing software library to fast response time. Most likely your device would have a microcontroller anyway, or at least it would benefit from it.

\$\endgroup\$
0
\$\begingroup\$

Any clock detecting a signal coupled by touch screens does not need more than 10 cycles and thus is sub-1ms with a suitable sensitive threshold. Rectifying 10% of f with a low pass filter @ f-3dB =fc/10 will reach 90% of input V in Tau after 10 cycles. Using a known capacitive touch pF threshold and a reference cap of similar value, all you is a comparator set to 50% to rectify the signal and detect an input with RC< 1ms.

It seems those who down voted do not understand how to. Help. Or they do not understand how to comment or detect a capacitance switch by detecting impedance of C by an RC time constant of 10 cycles at the pixel MUX rate using the load of a finger and fast refresh scans. Better question How to design a “switch” with on off impedance specs and hysteresis using the HBM of 100pf for finger with a threshold of 50pF and 30% hysteresis in <1ms?. Hint Zc=1/(2Pi f C) I”m not designing this for you, just telling you the principle.

\$\endgroup\$
0
\$\begingroup\$

Building upon Justme's answer, it seems that the reason most capacitive touch ICs have around 10ms or higher latency is because they are catering for a market that prioritises reliability over speed.

It is not difficult to design a faster sensor by using a microcontroller rather than a pre-built package.

I tried this with the CapacitiveSensor library with an Arduino Uno and I was able to achieve very low sensor latency. This library uses a simple digital-delay method and so the latency is primarily determined by the RC time constant of the circuit and the number of samples taken per reading. Operating at 5V, with a 1M resistor, assumed finger capacitance of 20pF, and taking 10 samples per reading I was able to get latencies as low as 0.3ms.

\$\endgroup\$
0
\$\begingroup\$

To clarify things even further. The input voltage has a resistor between it and the metal sensor surface. The size of the resistor has a tradeoff between sensitivity and speed. A tutorial written by the makers of Teensy recommend 100K to 50M. https://www.pjrc.com/teensy/td_libs_CapacitiveSensor.html So the 1m resistor recommended by Jeremiah Rose is probably a good value.

Speed is important for a musical instrument but equally important is not missing a note.

A few more design considerations that could mitigate the loss of sensitivity. I think if other aspects of the sensor are designed better then you can probably more reliably use those lower/faster resistor values.

1.) sensitivity goes up when you increase the size of the sensor. I don't know how far that scales but it works within reason.

2.) If this is a pcb touch sensor. The sensor should be solid but for copper ground plane it is recommended to have grid fill pattern instead of solid. Ideally at 45 degree angle to the sensor surface. If sensor goes up and down use 45 fill. This is probably something to do with emf.

3.) Sensitivity goes down when there is no good channel to earth. So basically if you can connect ground to metal that the user even occasionally touches that will help. The problem builds up over time. 10-15 seconds in one user's case. If using usb power to a large object like a laptop then it is not an issue, even when the laptop is not plugged in.

4.) When putting any cover on the sensor you hope it to be stuck to the sensor. An air gap causes inconsistency. https://touchinternational.com/touchscreen-adhesive/ They say use 3M 4956 mm. 3M 467MP seems similar and cheaper.

5.) If the user has very dry hands the sensor might not work well. Something to consider when testing. Lotion is an option.

6.) Teensy recommends a 1k resistor on the return signal pin to help avoid static electricity damage.

7.) Other metal too close to the sensor could be an issue. I think .2mm was the minimum. Think about mounting holes. Screws.

8.) Capacitive sensors need calibration. Wires moving around inside is an issue and after opening it up and closing it you may need to re-calibrate.

Hopefully this will help any future musicians looking to blend creativity and technology. It has become a relatively approachable project to beginners.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.