To start off, thanks to JLCPCB for sponsoring this project and providing the pcbs I designed. JLCPCB Prototype for $2 (Any Color): https://jlcpcb.com/DYE
First step in this project was to read up on some literature (links below and in video description) on designing custom touch sensitive pcbs and design a few prototypes to see how sensitive touch pads would be. I filmed a video where I test out two such boards I designed, one slider and one scroll wheel. I utilized the arduino "CapacitiveSensor" library (credit goes to the authors Paul Bagder and Paul Stoffregen) to do the touch detection. I've written similar touch routines in the past for pics (in fact one of the first videos on my channel was a demo of my software written in assembly for the pic16f84a), but in the interest in spending my time on pcb design I opted to use a tried and true library.
A main takeaway from my research and designs is that the clearance between two distinct button pads is fairly important to not getting false positives on an adjacent button when the other is pressed, literature suggested at least 30mil. In fact the clearance between a button or trace to any other copper (including ground) should keep this minimum distance in order to minimize noise and crosstalk. Additionally using a grid/mesh ground plane is suggested to help with those as well (literature all note to set the angle of the grid pattern to 45 degrees of pad/trace routing but in eagle this is not very easy to do so I just left it at 0 degrees and the boards still work fine). Sensitivity is mainly affected by button size as well as the choice of sense resistor. In my case I found 1M works reliably, but it can be increased for extra sensitivity (can detect proximity not just touch, but at the cost of longer polling periods) or decreased for direct touch detection (polling period is quicker).
References I used in the making of these prototypes:
https://www.arduino.cc/reference/en/libraries/capacitivesensor/
https://github.com/NicoHood/HID
https://datasheet.datasheetarchive.com/originals/library/Datasheet-071/DSA00359316.pdf
https://www.ti.com/lit/an/slaa877/slaa877.pdf?ts=1616682272626&ref_url=https%253A%252F%252Fwww.google.com%252F
https://www.nxp.com/files-static/training_pdf/WBNR_8BIT_TOUCHSENSING.pdf?&lang_cd=e
https://www.nxp.com/docs/en/application-note/AN4600.pdf
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.