A frequency-to-voltage (F/V) converter turns a stream of input pulses into a DC voltage that's proportional to their rate. They're the back end of every analog tachometer, turbine flow meter, and PLL-free speed sensor. The two industry-standard chips do the same job with different internal tricks.
LM331 — precision current-source + one-shot
Every input pulse triggers a one-shot timer of duration Tt = 1.1·Rt·Ct. During that pulse, the chip sources a precise current Iref = 1.9 V / Rs into the output load. The average current is therefore Iavg = Iref · Tt · fin, and the DC voltage across Rl is Vout = fin · 2.09 V · Rl · Rt · Ct / Rs. The constant 2.09 V is 1.9 V (bandgap) × 1.1 (one-shot multiplier). With Rs = 14 kΩ, Rl = 100 kΩ, Rt = 6.81 kΩ, Ct = 10 nF you get exactly 10.2 V at 10 kHz — the datasheet typical.
LM2907 — charge pump + filter
LM2907 uses an internal switched-capacitor charge pump. Each input edge transfers a packet of charge Q = C1 · Vcc/2 onto the output capacitor C2; both edges together transfer C1 · Vcc per input cycle. The average current is fin · C1 · Vcc, and the DC across R1 settles at Vout = Vcc · fin · C1 · R1 (with the internal gain constant K ≈ 1). Because the gain is supply-dependent, raising Vcc raises both the full-scale frequency and the volts-per-Hz simultaneously.
Linearity limits
Both chips are linear until Vout hits the supply rail. For LM331 that happens when the one-shot duty cycle reaches 100%: fmax = 1 / Tt. Above this frequency the one-shot can't retrigger fast enough and the output flat-lines. For LM2907, Vout reaches Vcc at fmax = 1 / (C1·R1). For best linearity, keep fin below about 70% of fmax.
Ripple vs response time — the design trade
F/V converters reconstruct DC from current pulses, so there's always some ripple. Raising the output cap reduces ripple but slows the response to changes in input frequency. The time constant is roughly τ = Rl·Cl (LM331) or τ = R1·C2 (LM2907). A tachometer that needs to swing across 1 V in 100 ms can't use a 100 µF output cap — but a flow-meter averaging over seconds can.
Which chip should I pick — LM331 or LM2907?
Pick LM331 when you care about precision and need to set the volts-per-Hz independently of supply voltage. Its gain depends only on Rs, Rl, Rt, Ct — components you can spec to 1% — so it's the default for instrumentation. Pick LM2907 when you want a compact tachometer: it has a Schmitt-trigger input, can drive a meter directly, and only needs three external components. Its gain scales with Vcc, which is a feature for ratiometric automotive use, and a drawback if your supply isn't stable.
Why is the gain formula 2.09 and not 2.0 in the LM331?
The constant 2.09 V comes from two specs in the LM331 datasheet: an internal bandgap reference of 1.9 V (used as the current-set reference) and the one-shot pulse multiplier of 1.1 (the one-shot's actual width is 1.1·Rt·Ct, not exactly Rt·Ct). Multiplying them gives 2.09 V — the gain constant that converts your component values into volts per Hertz.
How do I size the output filter cap?
Start from the response time you need. If you need Vout to settle within 1% in time t, pick C such that the RC time constant satisfies R·C ≈ t / ln(100) ≈ t / 4.6. So for 100 ms settling with Rl = 100 kΩ, you want Cl ≈ 100 ms / 4.6 / 100 kΩ ≈ 220 nF. Then check the resulting ripple on the second plot — if it's too high, increase C and either accept slower response or raise the lowest expected fin.
My ripple % blows up at low frequencies — is that a tool bug?
No — that's real. The ripple voltage step ΔV per pulse is fixed by component values; the DC Vout shrinks linearly with fin; so the ratio ΔV / Vout goes to infinity as fin → 0. In practice you size the converter so the minimum expected input frequency still leaves Vout >> ΔV. The dashed 1% line on the ripple plot is the conventional "low ripple" target.
How do I convert a 4-pulse-per-rev engine to RPM?
A typical 4-cylinder distributor or crankshaft sensor fires 4 pulses per revolution. So fin [Hz] = RPM × 4 / 60 = RPM / 15. 3000 RPM → 200 Hz; 8000 RPM → 533 Hz. Pick your LM2907 components so Vout reaches a full-scale value (say 5 V on a 12 V supply) at the redline frequency, and the readout is linear all the way down to idle. The two tachometer presets pre-fill these values.
Can I cascade this with a meter or microcontroller ADC?
Yes — that's the whole point. Output is a DC voltage in the 0 – Vcc range, fully buffered by the LM2907's internal op-amp (or by adding an external follower on the LM331's pin 1). Feed it straight into a panel meter, ADC, or comparator. For best ADC noise immunity, pick Cl / C2 large enough that ripple is below 1 LSB of your converter.
What's the working frequency range for each chip?
LM331: spec'd from 1 Hz to 100 kHz; in practice 1 Hz – 10 kHz gives the best linearity (typ. ±0.03% at 10 kHz). LM2907: spec'd to about 10 kHz with the typical 12 V supply and 1 nF / 100 kΩ external network. Both work down to fractional-Hz inputs if Cl/C2 is sized for the resulting ripple.
Does this tool simulate the actual chip or just the equations?
Just the equations from the datasheets — the ideal first-order behaviour. Real chips add temperature drift (±50 ppm/°C for LM331, ±0.3%/°C for LM2907's gain constant), input-comparator hysteresis, output-saturation headroom (Vcc − 2 V on LM331), and noise. Treat the results as a design starting point, not a SPICE model.