Capacitance, stripped down
Everything downstream is a consequence of two facts. Fix them and the rest is bookkeeping.
A capacitor is two conductors separated by a dielectric. Put a potential difference across them and charge accumulates on each, equal and opposite. Capacitance is just the exchange rate between charge and voltage:
Three levers move C: the overlap area A, the separation d, and the relative permittivity εr of whatever sits between. A finger changes all three at once — it adds a large conductor at some distance, and it displaces air (εr ≈ 1) with skin and tissue (εr in the tens). Water is a strong lever on its own: εr ≈ 80 at low frequency.
The second fact is the one that makes op-amp front ends work. Differentiate the first:
A capacitance only reveals itself through changing voltage. That is why every practical capacitive sensor is driven with an AC excitation rather than a DC bias — you need a dV/dt to produce a measurable current, and you want it at a frequency you chose, so you can reject everything else.
Stop thinking "measure a capacitance." Think charge bookkeeping. You inject a known packet of charge with a known voltage step, then you count where it ended up. Every topology below is a different choice of which account you count.
Self capacitance: one electrode against the world
The puzzle people hit first is that a single electrode is called a capacitor. It needs two conductors — so where is the second plate?
It is not missing. It is everything else: the ground plane under the sensor, the chassis, the PCB, the earth, and — when it shows up — your body. Field lines leave the electrode and terminate on all of that distant grounded material. That is a real capacitance; it is simply that one plate is diffuse rather than a neat rectangle you drew in the CAD file.
How it is measured
You excite that one electrode and watch how much charge it absorbs. There is no second driven electrode, because the return path is ground itself. In a charge-transfer implementation you repeatedly charge the electrode to Vex and dump it into a much larger sampling capacitor, counting cycles to reach a threshold; in a charge-amplifier implementation you drive it through the amplifier and read the output directly.
What self capacitance is good at
- Sensitivity and range. Field lines project further from the surface, so self-cap detects hover and approach at greater distance than mutual. It is the mode used for wake-on-approach and for proximity.
- Speed. On an M×N grid you scan M+N electrodes instead of M×N intersections. Cheap.
Where it fails
- Ghosting. Scanning rows and columns separately gives you two 1-D projections, not an image. Two real touches at (r1,c1) and (r2,c2) are indistinguishable from two phantom touches at (r1,c2) and (r2,c1). Self-cap alone cannot do reliable multi-touch.
- Water looks exactly like a finger. Both add capacitance to ground. Same sign, same story. This is the core weakness.
- Large-ground-mass (LGM) dependence. The measurement is electrode-to-ground, and "ground" includes the return path through your body and back to the device. A phone lying flat on a table, ungrounded, produces a substantially weaker self-cap signal than the same phone held in a hand. Firmware has to detect and compensate for this.
Mutual capacitance: electrode to electrode
Here you build both plates deliberately. Drive lines run one way, sense lines the other, and at each crossing there is a small fringing coupling between those two specific conductors — typically single-digit picofarads, with the touch signal a fraction of that.
The controller pulses a drive line and integrates the charge that arrives on each sense line. That number, per intersection, is the mutual capacitance Cm. Because every crossing is measured independently, you get a genuine 2-D image — which is what makes real multi-touch possible.
Why a finger makes it go DOWN
This is the sign flip that trips everyone, and the resolution is that "the finger steals charge" is exactly right — it just tells you which account lost.
Charge leaving the drive electrode has two routes. Route one is across the fringing field to the sense electrode; that is the quantity being measured. Your finger opens route two: a new capacitor from the electrodes to your grounded body. Charge diverted down route two never arrives at the sense line.
So "mutual capacitance" is not "total capacitance near the node." It is one narrow, deliberately chosen channel: drive plate to sense plate. Engineers picked that channel because a grounded finger produces a sharp, deep, local negative excursion in it — which is a far more distinctive signature than "something got bigger."
Side by side
| Property | Self capacitance | Mutual capacitance |
|---|---|---|
| Measured between | One electrode ↔ ground (everything else) | Drive electrode ↔ sense electrode |
| Excitation | The single sensing electrode itself | Drive line only; sense line is a virtual-ground receiver |
| Scan cost | M + N measurements | M × N measurements |
| Finger effect | Increase | Decrease |
| Floating water effect | Increase — same sign as finger | Small, diffuse, often increase |
| Multi-touch | Ambiguous (ghosting) | True 2-D image |
| Hover range | Longer | Shorter |
| Typical use | Wake, proximity, hover, single-button | Primary touch imaging, water rejection |
Finger vs. water: how discrimination actually works
Water is the hard case because in self-cap it is indistinguishable from a finger, and because it is often present at power-on and gets baked into the baseline.
The three discriminants
- Sign in mutual mode. A grounded finger drains charge to ground →
Cmdrops. A floating droplet does not sink charge; it adds dielectric and conductive bridges between electrodes → the coupling is redistributed and typically rises over the wetted area. Opposite signs on the same measurement. - Spatial signature. A fingertip is a compact cluster (roughly one to three nodes at a 4–5 mm pitch) with a steep gradient at the edges. A water film is a broad, low-amplitude smear with soft edges and no single sharp minimum. Firmware runs the delta image through shape metrics — peak-to-area ratio, edge gradient, blob eccentricity.
- Cross-mode agreement. Self says "something is there," mutual says "and it is grounded and local." Agreement in both modes is a finger; a self-cap rise with no corresponding mutual dip is water or an ungrounded object.
Water that is bridged to your hand — a droplet that your palm is also touching — becomes grounded water. It now sinks charge like a finger and drops Cm over a wide, irregular region. No single discriminant catches this, which is why controllers ship a "wet mode": raise thresholds, require larger contrast, weight mutual over self, sometimes drop to a coarser, more robust reporting mode until the panel reads dry again.
Standing mitigations
- Baseline from the dry regions of the panel, not from a global average.
- Spatial high-pass on the delta image — a broad DC-like offset across many nodes is rejected as environmental.
- Frequency hopping. Water's impedance is frequency-dependent in a different way than skin; multi-frequency scanning also dodges charger and display noise.
- Guard/shield electrodes driven at the same potential as the sense node, so field lines are steered toward the cover glass rather than sideways into wetted regions.
The charge amplifier, three ways
All three assume an ideal op amp: infinite gain, no input current, so V− is held at V+ = Vref and all charge injected at the summing node must land on the feedback element.
A · Sensor at the input, fixed feedback capacitor
Fig. 5A — Charge amplifier, sensor in the input branch
Derivation
The transfer function is linear in Cs and the sensitivity is set entirely by V_ex/C_f. Want more signal? Raise the excitation amplitude or shrink the feedback capacitor. Both have limits: V_ex is bounded by supply and EMI budget, and C_f cannot shrink indefinitely because of noise gain, discussed below.
The amplifier's own input-referred voltage noise and offset are multiplied by the capacitive noise gain 1 + (C_s + C_p)/C_f. On a touch panel C_p can be tens of pF while C_s is a few pF, so a 0.5 pF feedback capacitor can give a noise gain in the hundreds. Choose C_f to balance signal gain against amplified front-end noise, and shield aggressively to keep C_p down.
B · Feedback resistor across the feedback capacitor
Fig. 5B — Practical charge amplifier with DC feedback path
Derivation in the s-domain
Design rule: put the excitation at least a decade above f_c so you sit on the flat part of the response. Typical numbers — C_f = 1 pF with R_f = 100 MΩ gives τ = 100 µs and f_c ≈ 1.6 kHz, so a 100 kHz excitation is comfortably in band. The trade: a large R_f is good for noise and low corner but contributes its own thermal noise current √(4kT/R_f) and slows recovery from overload; too small an R_f pushes f_c up and starts attenuating your signal.
C · Sensor as the feedback element
Fig. 5C — Inverse configuration: the varying capacitance is in the feedback path
That last line is the real reason this topology exists. In topology A the output is linear in capacitance, which for a gap sensor means linear in 1/d — a hyperbola you must linearize. Putting the sensor in the feedback path makes the output directly proportional to displacement, with no correction at all. Capacitive micrometers, MEMS accelerometer readouts and precision gap gauges use this constantly.
For a touch sensor, where you care about ΔC around a fixed baseline rather than a gap, the same algebra gives you very high fractional sensitivity when C_sensor is small — because you are dividing by a small number — at the price of a nonlinear response you must calibrate out.
The cost
- Loop dynamics move with the measurand. Closed-loop bandwidth and noise gain both depend on
C_sensor, so stability margin varies over the measurement range. You size compensation for the worst-case (smallest) sensor capacitance. - Parasitic immunity is lost where it mattered. In topology A the sensor sits at a virtual ground and its cable capacitance is invisible. Here the sensor bridges the summing node and the output, so its parasitics land directly in the feedback network. Active guarding — driving the cable shield from the output — becomes mandatory rather than optional.
- Open-circuit failure is ugly. If the sensor connection opens, feedback disappears and the amplifier slams to a rail. Topology A degrades to zero output instead. Add a large parallel resistor and a range check.
Choosing between them
| A — sensor at input | B — A plus R_f | C — sensor in feedback | |
|---|---|---|---|
| V_out | −V_ex·C_s/C_f | −V_ex·C_s/C_f above f_c | −V_ex·C_in/C_sensor |
| Linear in | C_s | C_s | 1/C_sensor, i.e. gap d |
| DC behaviour | Integrates I_b → saturates | Stable, offset = I_b·R_f | Needs its own bias path |
| Parasitic immunity | Excellent (virtual gnd) | Excellent | Poor without active guard |
| Loop stability | Fixed | Fixed | Varies with measurand |
| Use it for | Touch panels, arrays | Anything real | Displacement metrology, single high-resolution gap |
In practice topology B is what ships: A is the idealisation, B is A made manufacturable, C is a different instrument for a different measurement.
What surrounds the amplifier
The charge amp is one block in a chain. The parts around it do most of the work of getting from femtofarads to a usable number.
Synchronous demodulation
The amplifier output is an AC signal at the excitation frequency whose amplitude carries the capacitance. Multiply it by a reference at the same frequency and phase, then low-pass filter:
This is what buys the noise immunity. Interference that is not at ω and in phase — 1/f noise, display switching, charger hash, 50/60 Hz — averages toward zero. The quadrature channel is useful too: a resistive (lossy) path such as a water film shows up largely in quadrature, while a clean capacitive change is in phase, which gives yet another water discriminant.
Practical front-end concerns
- Active guard. Drive the shield around the sensor trace with a buffered copy of the sense node potential. With no voltage across the trace-to-shield capacitance, no charge flows into it, and hundreds of pF of cable become invisible.
- Charge injection and kTC noise. Switched implementations inject charge from the switches themselves; use dummy switches, bottom-plate sampling, and correlated double sampling to subtract the reset-induced offset.
- Frequency hopping. Sweep or hop the excitation across several frequencies and pick the quietest, or combine results. Mandatory next to an LCD or a noisy charger.
- Multi-drive / code-division scanning. Instead of pulsing one drive line at a time, drive all of them simultaneously with orthogonal (Hadamard) codes and decorrelate the sense results. SNR improves roughly with √M for M drive lines at the same frame rate — this is how large panels stay fast and quiet.
- Ratiometric reference. Derive the ADC reference from the excitation amplitude so supply variation cancels in the ratio.
The detection algorithm, power-on to output
Fig. 7 — Sensing loop
Reference implementation
// ---- one-time, at power-on ---- init_afe(); // excitation, gain, ADC, guard buffer raw = acquire_average(N_CAL); // N_CAL ≈ 16–64 frames if (plausible_untouched(raw)) // absolute sanity window, not just self-consistency baseline = raw; else { baseline = factory_default; // NVM-stored, temperature-corrected fast_recal_pending = true; // converge once field looks clean } // ---- steady state, every frame ---- loop { raw[i] = sample_node(i); filt[i] = iir(filt[i], raw[i], alpha); // alpha ≈ 0.2–0.5 delta[i] = filt[i] - baseline[i]; // signed // hysteresis: different thresholds for entry and exit thr = active[i] ? TH_RELEASE : TH_TOUCH; // TH_RELEASE < TH_TOUCH hit = (mode == MUTUAL) ? (delta[i] < -thr) // finger lowers Cm : (delta[i] > thr); // finger raises Cself // debounce in both directions count[i] = hit ? min(count[i]+1, K) : max(count[i]-1, 0); active[i] = (count[i] >= K_ON) ? true : (count[i] <= K_OFF) ? false : active[i]; // baseline maintenance — only where nothing is happening if (!active[i] && !adjacent_active(i)) baseline[i] += clamp(delta[i], -DRIFT_STEP, +DRIFT_STEP); // slow } blobs = segment(delta); // connected components over active nodes for (b : blobs) { if (is_water_like(b)) { enter_wet_mode(); continue; } report(centroid_interpolated(b), track_id(b)); }
Why each guard exists
- Averaging / IIR filtering — the touch signal can be a fraction of a percent of the baseline. Averaging n samples buys √n on uncorrelated noise. Median filtering additionally kills impulse noise from switching supplies.
- Signed delta with mode-aware polarity — in mutual mode the touch is negative. Taking an absolute value here is a classic bug: it makes water (positive) and finger (negative) look identical again, throwing away your best discriminant.
- Hysteresis — one threshold gives chatter when the signal sits at the boundary. Release at, say, 70 % of the touch threshold.
- Debounce — require k consecutive frames both to assert and to release. Costs latency (k/frame-rate), so k is usually 2–4 at 120 Hz.
- Baseline tracking — temperature, humidity and mechanical creep all shift the baseline over minutes to hours. A slow tracker absorbs them. The rate must be slow enough that a real touch cannot be tracked out during the longest expected press; typical drift limits are single-digit counts per second against touch signals hundreds of counts high.
- Freeze on active and adjacent nodes — never track the baseline underneath or beside a finger, or the touch slowly erases itself and you get a phantom release on lift-off.
Calibration failure modes
These are the ones that bite in the field, and the reason "average a few frames at boot" is never the whole answer.
Finger already on the screen at power-on
If boot calibration blindly averages, your thumb is recorded as "normal." On lift-off the reading returns to the true untouched level, which in mutual mode is higher than the corrupted baseline — a positive delta where the algorithm expects a negative one, producing an inverted or stuck touch until something recalibrates.
Defences, in the order they fire:
- Absolute plausibility window. The controller knows from characterisation what an untouched node reads in absolute counts, corrected for temperature. A boot reading well outside that window is rejected as a target, not adopted as baseline.
- Spatial consistency. A thumb covers a small cluster; the rest of the panel is clean. Calibrate from the clean majority and interpolate the covered nodes from their neighbours, then flag them for re-calibration.
- Fast re-convergence on a whole-field step. If every previously suspect node jumps together to a new stable level, that is a lift-off, not a touch. Snap the baseline rather than creeping it.
- Fallback to NVM defaults. Ship a factory-calibrated baseline and use it whenever boot calibration is untrustworthy.
Single-electrode capacitive buttons on cheap appliances have none of the spatial defences, which is exactly why they are the products that end up permanently unresponsive if you power them up while leaning on the panel.
Water present at power-on
Same mechanism, worse signature — a film covers a large region, so the spatial-majority defence weakens. Additional handles: the in-phase/quadrature split (water is lossier, so it pushes energy into quadrature), the sign disagreement between self and mutual, and the fact that a wet region's response to a frequency sweep differs from skin's. If the panel cannot establish confidence, it enters wet mode with raised thresholds and re-attempts calibration when the field settles.
The other four
- Thermal drift. Cover-glass and adhesive permittivity, ITO resistance and the AFE itself all move with temperature. Handled by the slow tracker, plus an explicit temperature sensor and correction curve in higher-end parts.
- Long-press erosion. A finger resting for minutes gets slowly tracked out if the freeze logic is wrong. Freeze active and adjacent nodes, and cap the total drift correction allowed while any node is active.
- Ground coupling changes (LGM). Device on a table vs. in a hand changes self-cap signal amplitude substantially. Detect via the global signal level and switch threshold sets, or weight mutual mode more heavily.
- Mechanical creep. Adhesive relaxation and housing flex shift the baseline permanently over the product's life. The slow tracker absorbs it; the NVM default should be periodically re-written from a trusted converged baseline.
The ITO panel: construction and operation
Fig. 9 — Projected-capacitive stack-up and electrode pattern
Why ITO, and where it runs out
ITO is a degenerate wide-bandgap semiconductor: conductive enough to act as an electrode, transparent enough to sit over a display. But at 30–150 Ω/□ a long electrode is a distributed RC line. The drive-side settling time scales roughly with Rtrace·Cline, so as panels get bigger the line either settles too slowly for the frame rate or you must lower the excitation frequency, which costs SNR. That is the wall large panels hit, and why laptop-and-above sizes moved to metal-mesh electrodes — micron-scale copper or silver traces, visually negligible but two to three orders of magnitude lower resistance.
How a frame is taken
- The controller asserts an excitation waveform on one drive row (or on all rows simultaneously with orthogonal codes).
- Every sense column terminates in exactly the charge amplifier of §5B: the column is the input branch, held at virtual ground by the AFE, and its coupled charge is integrated onto Cf. Holding the column at a virtual ground is what makes the panel's large trace-to-shield capacitance harmless.
- The integrated result is synchronously demodulated and digitised, giving one number per intersection.
- Repeat across drive rows to build the full M×N delta image, then run §7 on it.
- Sub-node resolution comes from interpolating the centroid across the touched cluster — a 4 mm pitch routinely yields well under 1 mm reported resolution because the blob spans several nodes with a smooth profile.
A touchscreen is not a special technology. It is a two-dimensional array of the §5 charge amplifier, sharing one drive generator and one demodulator, scanned in time, with §7 running on the resulting image. The panel is geometry; the circuit is the same one you would build for a single sensor.
Contact and grip sensing on an end effector
The same physics, but the target is no longer conveniently grounded — and that changes which mode you trust.
A robot gripper wants to know three things before and during a grasp: is something about to be touched, has contact occurred, and is it slipping. Capacitive sensing owns the first two windows, because it responds before mechanical force exists to be measured.
Why capacitive earns its place
- Pre-touch. A guarded self-cap electrode on a finger pad detects approach at roughly 1–10 cm depending on electrode area and target. That gives the controller time to decelerate, which is the difference between a controlled contact and an impact transient the force loop can only respond to after the fact.
- Contact detection below the force-sensor floor. A wrist F/T sensor with a 100 N range has a noise floor of maybe 0.05–0.1 N, and the arm's own inertia and gravity residuals sit on top of that. Capacitive contact detection is independent of force entirely — the signal is already saturating as the surfaces meet, so you get contact confirmation at effectively zero force. Critical for deformable, fragile or lightweight objects.
- It sees through the gripper's own dynamics. Joint-torque-based contact detection has to be disambiguated from acceleration and payload. Capacitance does not care that the arm is moving.
Electrode topologies on a gripper
| Arrangement | Mode | Responds to | Notes |
|---|---|---|---|
| Pad electrode + guard behind | Self | Any approaching object, grounded or not | Longest range. Guard driven at pad potential to null backside sensitivity toward the gripper structure. |
| Opposing finger pads as Tx/Rx | Mutual, transmit-through | Object entering the jaw gap | The two fingers are a natural drive/sense pair. A dielectric object between the plates increases coupling — opposite to the touchscreen case, because it is in the field path rather than shunting to ground. |
| Interleaved Tx/Rx on one pad | Mutual, fringing | Surface proximity and contact area | Shallow field. Behaves like the touchscreen: a grounded object reduces coupling; a dielectric object near the surface increases it. |
| Array of small pads | Mutual | Contact patch shape, object pose | Gives a coarse image — useful for detecting edge-on vs. flat contact before committing to a grasp force. |
On a touchscreen the target is a grounded human, so mutual coupling drops. On a gripper the target is often an ungrounded dielectric — a plastic bin, a cardboard box, a fruit. Placed between two opposing electrodes it raises the coupling; placed above a co-planar interleaved pattern it also raises it. A grounded metal part on a grounded conveyor behaves like the finger and lowers it. So a gripper's firmware must handle both signs and use the magnitude, not the polarity, as the primary detection signal — with the polarity used as a material classifier.
Making it work in a real cell
- Recalibrate on jaw geometry. The baseline changes as the fingers open and close, because opposing electrode spacing is a direct term in Cm. The clean approach is a baseline lookup table indexed by gripper aperture from the gripper encoder, refreshed during free-space motion.
- Reject the robot itself. Nearby links, cables and the conveyor all couple in. Active guarding plus a baseline map indexed by arm configuration handles the slowly-varying part.
- Motor drive noise. Gripper and joint PWM is broadband and enormous compared to a femtofarad signal. Synchronous demodulation, excitation frequencies chosen away from PWM harmonics and their sidebands, and frequency hopping when the drive frequency shifts.
- Fuse, do not choose. Capacitive gives you pre-touch and zero-force contact; tactile/piezoresistive arrays give you pressure distribution once in contact; the wrist F/T gives you the net wrench for force control; and high-bandwidth vibration sensing (a MEMS accelerometer or a microphone in the fingertip) gives you incipient slip. Each covers a different part of the timeline.
Grasp state machine with capacitive sensing folded in
APPROACH // free space, cap baseline tracking active └─ |ΔC| > PRETOUCH_TH → SLOW_APPROACH // decelerate, ~1–10 cm out SLOW_APPROACH └─ |ΔC| > CONTACT_TH → CONTACT // ~zero force; F/T still reads noise CONTACT └─ close jaws under force control tactile array confirms contact patch └─ F_normal ≥ F_target → HOLD HOLD └─ slip detected (tactile vibration / shear) → increase F_normal └─ |ΔC| collapses on one pad → object lost → REGRASP RELEASE └─ open; re-baseline capacitive channel at known aperture
The whole arm: sensing map
Where the capacitive channel sits relative to everything else on a modern manipulator.
| Sensor | Location | Measures | Typical rate | Feeds |
|---|---|---|---|---|
| Motor-side encoder | Rotor, pre-gearbox | Motor angle, high resolution | 10–40 kHz | Field-oriented current control, velocity loop |
| Joint-side encoder | Output, post-gearbox | True link angle | 1–10 kHz | Position loop; difference vs. motor encoder gives backlash and gear deflection |
| Phase current sense | Inverter | Winding current → motor torque estimate | 10–40 kHz | Torque control, cheap collision detection via torque residual |
| Joint torque sensor | Strain-gauge or SEA spring at output | Actual transmitted torque | 1–4 kHz | Impedance/admittance control, contact detection independent of friction |
| Winding / driver temperature | Motor, inverter | Thermal state | 10–100 Hz | Duty derating, thermal model, torque-constant correction |
| Base and link IMUs | Base, distal links | Angular rate, acceleration | 1–4 kHz | Vibration suppression, base-motion compensation on mobile platforms |
| 6-axis F/T sensor | Wrist, before tool | Full force/torque wrench at the tool | 500 Hz–8 kHz | Force control, assembly (peg-in-hole), payload identification |
| Capacitive proximity skin | Links and gripper pads | Object approach, contact at zero force | 50–500 Hz | Pre-touch deceleration, collision avoidance, grasp triggering |
| Tactile array | Finger pads | Pressure distribution, contact patch | 100–1000 Hz | Grasp quality, object pose refinement, in-hand manipulation |
| Slip / vibration sensor | Fingertip | High-frequency micro-vibration | 1–10 kHz | Incipient slip detection, grip force minimisation |
| Gripper encoder | Jaw actuator | Aperture | 1 kHz | Object width estimate; indexes the capacitive baseline table |
| Wrist camera / depth | Tool flange | Object pose, scene geometry | 30–90 Hz | Visual servoing, grasp pose selection |
| Safety-rated position | Redundant channel per joint | Certified position/speed | Per standard | Safe-limited-speed, safe stop, protective separation monitoring |
| Brake state / limit switches | Each joint | Brake engagement, end of travel | Event | Startup checks, fault handling |
How they layer in time
Read the table as a timeline rather than a parts list. Vision plans the grasp seconds ahead. Capacitive proximity fires hundreds of milliseconds out and buys deceleration. Capacitive contact fires at the instant of touch, before any force exists. Joint torque and wrist F/T take over once real force develops and run the closed-loop force control. Tactile arrays and slip sensors dominate during the hold. Encoders and current sensing run underneath all of it at kilohertz rates keeping the joints where the planner asked.
The capacitive channel is valuable precisely because it fills the gap between "vision can no longer resolve the last centimetre" and "there is finally enough force to measure." Nothing else covers that window.