Capsense modeling and real life observations.

User avatar
DMA

08 Apr 2023, 01:09

This post is here should anybody try to understand how capsense actually works and how sense card looks like, capacitance-wise (and that I'll be able to later find what I did and what results I've got). You're welcome to ask questions or ask me to measure something specific (if I still have the rig set up - which should be until at least June-July 2023)

So, after measuring the encased ESSK, looks like actual key inside the keyboard looks like this (CircuitJS model), electrically:
essk-key-real.png
essk-key-real.png (8.97 KiB) Viewed 2163 times
Row and column capacitances to ground seem to be directly proportional to the PCB trace length. Mutual capacitance between row and column seems to be DOMINATED by row-to-ground and column-to-ground capacitances (connected in series). There _might_ be electrically-long-line shenanigans involved, but their effect shouldn't be _that_ bad, unless you do something stupid like overdriving the line or placing current-limiting resistors way too far from the driver circuitry, in which case ringing might kill you.

However, CircuitJS shows 50mV released/380mV pressed (62/455mV with "scope" switch off) with these parameters, and the only thing that affects output voltage is that 84pF capacitance. To bring things to observable in reality 20/150mV, I had to increase the receiving end capacitance to 260pF.
It might be my capacitance meter - I've generated a 5.00V square wave by KitProg and fed it to DUT via 999 ohm resistor, scope in parallel to the DUT triggered at 3.16V (which is 63.2% of 5.00V) and measured offset between zero crossing and trigger - 1ns = 1pF that way. However, I've noticed couple interesting things: physically larger ground electrode gives larger capacitance reading, so reversing polarity from "normal" (i.e. connecting generator ground to row line and "+" to the sense card's ground results in larger capacitance, and I'm not sure which one to consider "true".) I have a Leader 745 LCR, but it's a bit broken (I've got it already broken, but hey, it was free :D). Once I'll fix it, I'll repeat some measurements and see if keyboard assembly is, indeed, a _polarized_ capacitor. BUT row-to-col capacitance is close enough to seem true (i.e. calculated capacitance of row-to-gnd + col-to-gnd in series contributes 90% of the measured capacitance), so the data is usable enough to be, well, _usable_.

So, the capacitor formed by larger pads of ESSK and a flipper over them is 10-ish pF (although it might be as low as 5 pF - R8C12 is an example. This hints at the presense of the transmission line effects, although this may be the fact that insulation under the board is somewhat flexible - CommonSense readouts float a bit depending on the strength of the keypress).
F122's pressed key only adds 2pF. That's because model F's key is essentially two capacitors in series - one is via flipper, another is between board sides. FSSK is an improvement, btw - about 4pF, because PCB is 33% thinner: 0.6mm vs F122's 0.9.
It seems like larger parasitic capacitances are actually beneficial (which is somehow contrary to what CircuitJS shows): FSSK key capacitance of bare PCB is 2pF (mutual R1C1 capacitance changes from 43pF to 45pF, 4.65%), while encased key capacitance is 4pF (68->72pF, 5.88%).

As usual, Skeletor will be back with more disturbing news - but not soon, because spring break, going to drive around The Great Plains and California with family for a week or so.
Attachments
Matrix capacitances.xlsx
(28.17 KiB) Downloaded 98 times

Post Reply

Return to “Workshop”