Math Bridge: Capacitive Gap to Timer Count

← Back to Sensor Classification
Math BridgeSensorsStruggle-friendly runway

How does a gap become a timer count?

One thread through electrostatics and RC timing for the chapter's 1 cm² proximity electrode.

Phoebe, the physics guidePhoebe guides
The one targetFollow a two-equation sensor chain.
The chapter case1 cm², 1–5 mm, and 100 kΩ.
What it buys youName what a digital output hides.

See the relationship before changing it

Set the input, apply the rule, then read the result with its unit.

The retained audit below checks several chapter fixtures. This model keeps those stated values fixed and changes only capacitive sensor gap, so the numeric fixture does not switch without explanation.

Derive the baseline in four named moves

  1. 1

    Name the input. The chapter baseline is 5 mm.

  2. 2

    Name the relationship. delay = 0.061356 us mm / gap

  3. 3

    Substitute with units. 0.061356 / 5 = 0.012 us

  4. 4

    Read the result. Keep the unit beside the value. Use it only inside the technical boundary on this page.

Predict, then change capacitive sensor gap

Try Predict the direction of delay = 0.061356 us mm / gap. Test another capacitive sensor gap, then compare rc timer delay.

5 mm
Chapter baseline
RC timer delay

Observe A wider plate gap lowers capacitance and shortens the resistor timer delay. Reset capacitive sensor gap to 5 and compare rc timer delay.

Explain A wider electrode gap lowers capacitance, leaving less charge for the resistor to move, so the modeled timing delay decreases inversely with gap.

Check yourself

What should you do before trusting a moved-control result?
Answer: Predict its direction, apply the shown relationship, keep the units, and reset to the worked baseline.
What does this small model leave out?
Answer: Only capacitive sensor gap moves here. Field effects named in the technical boundary stay fixed.

1. Separate quantity from signal

The wanted quantity is gap d. The electrode changes capacitance C. Firmware still needs a circuit that turns C into a measurable time.

Phoebe: “Digital proximity” can hide two analogue laws. Classification becomes useful when you name both.

2. Derive capacitance

1

GeometryTwo facing conductors store opposite charge.

2

Field lawC=ε0εrA/d.

3

Inverse linkHalve the gap and ideal capacitance doubles.

3. Turn capacitance into time

A resistor charges the electrode toward VDD. A half-supply comparator trips when the exponential has covered half the gap.

V(t)=VDD(1−e^(−t/RC)); V=VDD/2 ⇒ t=RC ln2

Measure t, invert for C, then invert again for d.

4. Try the object gap

C=ε0εrA/d; t=RC ln2

TryMove an ideal object toward the chapter's 1 cm² air-gap electrode.

Ideal capacitance
Half-supply time
Change versus 5 mm

ObserveAt 5 mm, C is 0.177 pF and the ideal half-supply time is 12.3 ns. At 1 mm, both become five times larger: 0.885 pF and 61.4 ns.

ExplainThe RC timer preserves the inverse-gap ratio because time is directly proportional to capacitance when R and the comparator threshold stay fixed.

Technical boundaries.

The delay estimate fixes plate area and resistance and assumes parallel plates with air between them and a half-supply timing threshold. Fringing, object shape, shielding, humidity, nearby conductors, cable and stray capacitance, leakage, comparator delay, and timer resolution are excluded; real touch controllers may use a different measurement method.

fringe fields
Needs separate evidence
object shape
Needs separate evidence
shielding
Needs separate evidence
humidity
Needs separate evidence
nearby conductors
Needs separate evidence
cable capacitance
Needs separate evidence
parasitic capacitance
Needs separate evidence
input leakage
Needs separate evidence
comparator delay
Needs separate evidence
timer resolution
Needs separate evidence
Real touch controllers often measure charge transfer or oscillation frequency instead of this one-shot half-supply time
Needs separate evidence

Use field evidence or a deeper model before release.

5. Work the 5 mm case

C=(8.854×10⁻¹²)(1)(10⁻⁴)/(5×10⁻³)=0.177 pF
t=(100 kΩ)(0.177 pF)ln2=12.3 ns

6. Move five times closer

d=1 mm ⇒ C=0.885 pF ⇒ t=61.4 ns

The comparator output may look digital, but the count still encodes electrostatic geometry and an analogue RC threshold.

7. Check yourself

What doubles when the ideal gap halves?
Answer: Capacitance and the fixed-R half-supply time both double.
Why can a GPIO not read farads directly?
Answer: Capacitance is a stored-charge relationship; a circuit must translate it into voltage, time, frequency, or transferred charge.
What two laws does the firmware invert?
Answer: It uses t=RC ln2 to recover C, then C=ε0εrA/d to recover the ideal gap.
Honesty boundary.

The delay estimate fixes plate area and resistance and assumes parallel plates with air between them and a half-supply timing threshold. Fringing, object shape, shielding, humidity, nearby conductors, cable and stray capacitance, leakage, comparator delay, and timer resolution are excluded; real touch controllers may use a different measurement method.

1 cm² electrode
Capacitive sensing electrode area
air gap
Dielectric between electrode and target
100 kΩ resistor
Timing-circuit charging resistance
1–5 mm examples as catalog-typical teaching values
Illustrative electrode-to-target gaps

They reproduce 0.177/0.885 pF and 12.3/61.4 ns under an ideal parallel-plate model; they are not a calibration curve for a real proximity product.