Frequency counter

Clip it on any net and read the frequency, the period, the duty, how long each cycle spends high, and how many pulses have gone by.

Pins

Pin What it does
IN The probe. 1 Mohm to the ground clip, the same as a scope probe.
GND The ground clip, which is what the probe's voltage is measured above.

It drives nothing and changes nothing: clipping it on costs the circuit one megohm and no more. It joins an analog island that reaches it and never creates one.

Properties

gate: 0.01 to 10 seconds, one second by default. How long the counter counts for before it shows you. A longer gate is a steadier reading and a slower one; a shorter gate follows a frequency that is moving.

threshold: volts, or zero for automatic. Zero (the default) puts the comparator in the middle of the swing the last gate saw, with a hysteresis band of a tenth of it, which is what lets the same part read a 3.3 V logic output, a 12 V square and a 1 V sine without being told which it is. It costs one gate to find the signal, so the first reading after power-on is taken at half of five volts.

RST on the face puts the running pulse total back to zero.

What the model gets right

It counts edges rather than sampling. A part that sampled at some rate and looked for crossings would be measuring its own sample rate as much as the signal, and its answer would step in units of it; this one is told the voltage the instant the net changes, which on a digital net is the exact moment of the edge and on an analog island is within the island's crossing resolution, because the solver is asked to land on the threshold rather than step over it.

The frequency is measured from the first rising edge inside the gate to the last, over the whole cycles between them, which is what a reciprocal counter does: it does not depend on where the gate happened to open, and one gate of a 480 Hz square is good to better than a tenth of a percent rather than to one count in 120. The duty and the high time are taken over exactly those same whole cycles, so a gate that opened in the middle of one does not bias them.

On the gallery's 555 astable (two 10 k resistors and 100 nF) it reads 481 Hz at 66.7%, against the 1 / (0.693 × (R1 + 2 R2) × C) the datasheet gives, inside one percent. A Rust test holds that number.

A level that never crosses the threshold has no frequency, and the face says HIGH or LOW rather than printing a zero. A probe clipped to nothing says no signal, which is a third thing again.

What it does not model

No noise anywhere, so there is no minimum signal, no trigger sensitivity specification and no false counting on a slow edge, all three of which are what a real counter's front end is for. No input bandwidth: a megahertz is counted as exactly as a hertz, where a real instrument would have given up. No time base error, so the gate is exactly as long as it says; on a real counter the crystal is the largest term in the accuracy specification and here it is not a term at all. No 50 ohm input, no attenuator, no trigger level knob, and no prescaler.

See it in action

Counting a 555 has the counter and a multimeter on its Hz position reading the same signal, with the arithmetic in the sketch beside them. See also the bench instruments.