Cosmo said:
... I have these square
wave pulses of all positive DC values, constant width whose frequency
is proportional to the speed of the system and need to get an analog DC
value.
Use a charge pump; series limiting capacitor from the
square-wave-generator
into (1) diode clamp to ground and (2) pass diode to output. Connect
an
op amp to the output in current-to-voltage converter configuration.
Add capacitors
to the feedback resistor if you want some low-pass filtering in this
stage.
The limiting capacitor discharges to GND (through clamp diode) on the
negative
slope of the square wave, puts Q = (V-2*Vf)*C charge through the second
(pass)
diode into the current-voltage converter on the positive slope of the
square wave.
The output voltage is then proportional to F*Q. Your Vf (forward
voltage drop of
a conducting diode) can be made small by use of various tricks, or
compensated for.
And frequency-voltage converters of other sorts (like CD4046
phase-locked loop chip) are
cheap and easy enough to use; specialized 'voltage-frequency converter'
modules are
pricey instrumentation gizmos (for sub-1-percent precision use); ignore
'em.
The third possibility is to 'clean up' the square wave by using a '555
as a monostable (fixed
pulse width); then the average value of the output voltage is
proportional to the frequency
at which it's triggered.