Capacitive Touch Buttons on the QuickStart
lonesock
Posts: 917
Hi, All.
I was trying to get the little touch buttons on the QuickStart to work when reliably covered with a thin sheet of plastic. However the PCB seems to be set up as resistive touch sensors, not capacitive. So, what I did was just pair them up and connect a 1 MOhm resistor between adjacent pairs (so one resistor for 2 pads) by jumpering P0 and P1 with a resistor using the little header up top (P2 & P3, etc.). The resulting schematic looks like this:
[Sense0]--P0--/\/\/\/--P1--[Sense1]
If I want to read [Sense0], I force P0 high, P1 low, then tristate P0 and time how long it takes to go low bleeding the cap through the resistor. Then I switch pin functions to read [Sense1]. If the capacitance of the pad is ~15pF, and the capacitance of my finger is ~0.5pF, I expect about a 3% change in counts. Note, I just start a PASM cog to do the timing for me, then it exits. Code attached.
Jonathan
I was trying to get the little touch buttons on the QuickStart to work when reliably covered with a thin sheet of plastic. However the PCB seems to be set up as resistive touch sensors, not capacitive. So, what I did was just pair them up and connect a 1 MOhm resistor between adjacent pairs (so one resistor for 2 pads) by jumpering P0 and P1 with a resistor using the little header up top (P2 & P3, etc.). The resulting schematic looks like this:
[Sense0]--P0--/\/\/\/--P1--[Sense1]
If I want to read [Sense0], I force P0 high, P1 low, then tristate P0 and time how long it takes to go low bleeding the cap through the resistor. Then I switch pin functions to read [Sense1]. If the capacitance of the pad is ~15pF, and the capacitance of my finger is ~0.5pF, I expect about a 3% change in counts. Note, I just start a PASM cog to do the timing for me, then it exits. Code attached.
Jonathan
Comments
Jonathan