Frequency-to-Voltage Converter Calculator

Design LM331 and LM2907 frequency-to-voltage (F/V) converter circuits. Pick a chip, drag the component sliders, and see the resulting transfer function (Vout vs fin), output ripple, and linearity limits update live. Includes tachometer and flow-meter presets.

Components — LM331

Sets the plot's vertical ceiling. Real LM331 Vout swings up to roughly V+ − 2 V on the output pin.

Result — LM331

Gain
k = 2.09·Rl·Rt·Ct / Rs
Vout @ test fin
Vout = k · fin
One-shot Tt
Tt = 1.1·Rt·Ct
fmax (linearity limit)
fmax = 1 / Tt
Ripple (per-pulse step)
·
ΔV ≈ Qpulse / Cl    (worst case)
Working equation
Vout = fin · 2.09 V · Rl · Rt · Ct / Rs
Transfer function — Vout vs input frequency (LM331)
Output ripple — as a percentage of Vout (LM331)

Share or embed this tool

Free to use on your own website — WordPress, Wix, or any platform. Paste one line and it works instantly, resizing to fit.


How an F/V Converter Works

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. F/V converters also appear in motor-speed control loops, where the DC output feeds directly into an op-amp error amplifier to close a velocity feedback loop. This page functions as both an LM331 calculator and an LM2907 calculator — the two industry-standard chips do the same job with different internal tricks; if you want the inverse operation, the voltage-controlled oscillator (VCO) calculator designs circuits that go the other direction — voltage in, frequency out.

LM331 — precision current-source + one-shot

Every input pulse triggers a one-shot timer of duration Tt = 1.1·Rt·Ct. The one-shot timing window determines both the gain and the maximum linear input frequency. 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 reference) × 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. The LM331 can also work in voltage-to-frequency (V/F) mode with only minor component changes, making it useful for both sides of a telemetry link.

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. The LM2907's built-in Schmitt-trigger input comparator makes it the preferred choice for a tachometer circuit driven by Hall-effect sensors, magnetic pickups, and reluctance-type wheel-speed sensors without any external signal conditioning.

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 transfer-function 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 output ripple voltage. Raising the output cap reduces ripple but slows the response to changes in input frequency. The low-pass filter 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. For ADC interfacing, the residual ripple must stay below 1 LSB of the converter; you can check your design's ripple margin on the second plot above.

Frequently Asked Questions

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. If you need to verify the actual input frequency your circuit is receiving, the online frequency detector can measure it from a microphone in real time.
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.
Can I use an LM331 as a voltage-to-frequency converter instead?
Yes. The LM331 datasheet includes a standard V/F configuration where the input voltage controls the one-shot retrigger rate rather than an external pulse stream. In V/F mode the same three-pin network (Rt, Ct, Rs) sets the gain, and the full-scale frequency is still 1 / Tt. This makes the LM331 useful for both ends of a frequency-modulated telemetry link — transmit with V/F, receive with F/V — without changing chips.
How does temperature affect LM331 vs LM2907 accuracy?
The LM331's internal bandgap reference is tight — typically ±50 ppm/°C gain drift — so a well-built LM331 circuit holds accuracy across a wide industrial temperature range. The LM2907's gain depends directly on Vcc (via the charge-pump equation Vout = Vcc·f·C1·R1), so any supply variation becomes a gain error; its temperature coefficient is around ±0.3%/°C. For precision measurements above a few degrees of temperature swing, LM331 with 1% resistors is the safer choice.
What input signal types work with these chips — sine waves, square waves, magnetic pickups?
Both chips respond to zero-crossings or pulse edges, not signal amplitude. The LM2907 has an internal Schmitt-trigger comparator with a threshold near Vcc/2 and built-in hysteresis (~15 mV typ), so it can directly accept variable-reluctance speed-sensor outputs and Hall-effect square waves without external circuitry. The LM331 requires a cleaner digital input — for sine waves or slow-slew magnetic pickups, add a comparator (e.g., LM393) or Schmitt buffer before pin 6 to avoid multiple triggering on the same edge.