Hardware lab 06 · Analog timing input

A paddle becomes a time interval.

Turn the potentiometer, discharge the capacitor, and count clock ticks until an analog voltage crosses a comparator threshold.

VC(t) = VS × (1 − e−t/RC)potentiometer position → resistance → RC time constant → threshold time → timer count → angle
LIVE INSTRUMENT

RC timing bench

IDLE
CAPACITOR
0.000 V
TIMER COUNT
0
IDEAL CROSSING
15.915 ms
QUANTIZED
15915 ticks
DERIVED ANGLE
135.00°

Keyboard: ←/→ turn one degree · Space trigger · P pause · N step · C instant capture

Physical circuit

Nominal values are what the schematic promises. Error sliders represent the actual component landing somewhere inside its tolerance band.

ACTUAL R
519.70 kΩ
ACTUAL C
44.18 nF
TIME CONSTANT τ
22.960 ms
TOLERANCE SHIFT
-3.21%

Timer and discharge path

The comparator is analog, but the recorded result is discrete: the first timer edge after the crossing.

TIMER TICK
1.00 µs
COUNT RANGE
0–65535
QUANTIZATION ERROR
0.10 µs
DISCHARGE
113.2 τ
READY

Timing fits the counter, discharge is complete, and useful count resolution remains.

TWO-POINT CALIBRATION

Teach software what 0° and 270° count like.

1

Turn fully counterclockwise, capture, then store the minimum.

2

Turn fully clockwise, capture, then store the maximum.

3

Counts between the endpoints interpolate to a calibrated angle.

MINIMUM
MAXIMUM
STATUS
EMPTY
ANGLE METHOD
COMPONENT MODEL

Calibration check

Select a target, turn the paddle, then capture. Try to land within ±2° using only the timer-derived angle.

CAPTURE REQUIRED

Recent captures

#ShaftActual RIdeal timeCountQuantizationDerived angle
No measurements yet. Trigger the discharge cycle.

What the hardware is really doing