3
\$\begingroup\$

I'm an electronics engineering student and I want to state that this question is not my homework, it is a tiny part of my project (PWM encoder) but I couldn't pass it.

I'm trying to make a "frequency to voltage converter" but 3 days of web search didn't allow me to do that. (Seriously, even in SE there are no clear topics about frequency to voltage converters) I know some ICs can do that but I want to do my project without any IC, using only primitive components so I tried RC low-pass filter as an integrator to make frequency to voltage converter.

The input is a square wave between 10-20kHz

Design objectives are :

The converter should handle frequencies between (all frequencies at that range) 10kHz and 20kHz.

And it should converge under 10 cycles

I made 2 different circuits and simulated but in first circuit output voltages are the same and they are not converging fast enough.

Here is the first circuit scheme and simulation results:

Two lowpass filter connected with voltage follower

And in second circuit output voltages are different but too close, I need like 4 volts for 20kHz and 2 volts for 10kHz. How can I separate them? And again it is not converging fast enough.

Here is the second circuit:

Second Circuit

To be honest, I took the left-hand side circuit from the internet and couldn't understand the principle behind it. The diode was between the schmitt output and ground (parallel to the first capacitor) but since I don't know its purpose, I tried different combinations and decided that this version is better.

In both circuits, the more outputs separate, the more time needing for converge and more ripples occur. Is it always a choice between one or another? Are there some ways to make it better?

I am not wanting full solution or design (if you can provide I'll appreciate), I'm just asking for guidance and tips/tricks.

Edit : Additional Information

The circuit below is designed for PWM encoder which generates 25% pulse width for data "0" and 75% for data "1" between 10-20kHz. Monostable Multivibrator(MMV) pulse width is depended on RC on its Rx, Rx/Cx pins and the voltage on the RC part. The Difference between the three images below are clock frequency(first is 10kHz second is 15kHz the last one is 20kHz) and the voltage on RC (Top left Voltage source will be replaced by Frequency-To-Voltage Converter) are 5v, 7.5v, and 10v respectively. These three values are for example. I need correct voltage on RC part for every frequency so I need to obtain voltage value from clock signal. The question is about it, how can I obtain voltages between 5-10v as precise as possible by connecting Frequency-to-Voltage converter between MMV's RC part and clock signal.

10kHz - 5V 10kHz - 5V

15kHz - 7.5V 15kHz - 7.5V

20kHz - 10V 20kHz - 10V

\$\endgroup\$
  • \$\begingroup\$ upvote for clear question and demonstrated attempts ..... maybe move 4 volts for 20kHz and 2 volts for 10kHz to the design objectives section \$\endgroup\$ – jsotola Apr 18 at 17:25
  • \$\begingroup\$ What is the purpose of a constant 50% to 25% duty cycle conversion for this range of frequencies? Maybe this answer will lead to better solutions with better specs \$\endgroup\$ – Sunnyskyguy EE75 Apr 28 at 18:24
  • \$\begingroup\$ I added additional information. I hope it'll make clear the question. \$\endgroup\$ – CanSevgi Apr 29 at 19:33
1
\$\begingroup\$

SEARCH for TACH designs. This is very common.

But define your specs carefully;

f1 min.=___ Hz    Vout=___ % Ripple=___   
f2 max.=___ Hz    Vout=___ 
Slew rate=____ ms or ___ cycles 
   ( f1 to f2 to f1  is related to %ripple)

Tach is short for Tachometer which can take a pulse per rev and convert it into a voltage for some analog reading of Speed or RPM.

The principle is simple. For each cycle of f, create a constant pulse width, Tpw, of some fixed amplitude Volt pulse at a fixed pulse duration so that when it is filtered by a low pass filter the frequency from the PFM is proportional to voltage.

The maximum output is to increase the frequency until the duty cycle is 100% at the pulse peak voltage. This means the V-Tpw product is also your transfer function of V/Hz for some Tpw for each cycle.

There are many implementation methods which you look up after you understand how they work.

One solution for you is a linear VCO in a PLL IC (eg. '4046) to operate with some linear voltage from 10k to 20kHz. Then apply gain and offset to "scale your voltage".

You only have a 2:1 f range, so that part is easy but a fast slew time, so this is hard for the filter with low ripple.

  • Look for PLL method or alternating S&H methods.

For a full range tach. like 500 RPM to 10k RPM has only a 20:1 range. So a simple is RC differentiator pulse with a comparator to make a short one-shot on the leading edge. This period must be less than or equal to your maximum pulse rate T=<1/f(max)

other

For a 100:1 to 1000:1 range it needs more precision in the filter and 1-shot.

  • A precision one-shot ignores variations of input pulse height or supply voltage and integrates a time-averaged Voltage using constant current independent of input frequency then uses a Sample & Hold (S&H) circuit to save the previous time interval then update to the present value so there is less jitter.

    • PFM on a digital channel
  • This communication method can also be used as a spare bit on a digital communication link to represent an analog value with high resolution but does not need the full speed sampling rate a high-speed data link. In this case, each PFM pulse sets a FF to a "1", which is only cleared by the channel when that bit is transmitted. This prevents sampling with alias effects of a beat frequency.

    • e.g. a PFM from 0 to 10kHz can be sent on a spare bit of some Mbps comm. channel sampled at a 10kHz rate and recovered at the other end without aliasing with 1 sample per pulse max and 10^4 resolution for low-frequency PFM values. ( I have used this to monitor remote 2 servo motor bipolar analog currents and used 0.1% of my SCADA data bandwidth at 10Mbps circa 1077)

your example

f1 min.= 10k Hz    Vout=2V  % Ripple= 1%  !!   
f2 max.= 20k Hz    Vout=_4V__ 
Slew rate=__250us or _5_ cycles !!!

This requires the precision approach with a PLL with a fast loop.

\$\endgroup\$
  • \$\begingroup\$ I gave upvote for this good answer and I'll mark it as answer if no better answer came. But the problem is I mentioned that I want to do that without any IC. Of course there are excellent solutions with different approaches (like lm2907 or lm331) but I'm trying to make it real by using primitive components like op-amps capacitor and resistors. \$\endgroup\$ – CanSevgi Apr 28 at 14:31
  • 1
    \$\begingroup\$ You did not include specs for resolution and accuracy 1%? 0.1%? 10 bit accuracy? \$\endgroup\$ – Sunnyskyguy EE75 Apr 28 at 14:43
  • \$\begingroup\$ In the picture bottom plot the 10kHz and 20kHz Frequency-to-voltage converter outputs converges to approx. 2.5V at approx. 1.3 ms which means 26 cycle for 20kHz and 13 cycle for 10kHz. I need both of them under 10 cycle and resolution is not very important (I mean, if i obtain 5volts for 10khz in 3 cycle and 10volts for 20khz in 6 cycle, +- 0.5 Volt is not a problem since the gap is big enough). Thank you very much for your interest ! \$\endgroup\$ – CanSevgi Apr 28 at 17:04
  • \$\begingroup\$ So this is not a linear tach but just a digital switch for <15k or >15kHz? \$\endgroup\$ – Sunnyskyguy EE75 Apr 28 at 17:11
  • \$\begingroup\$ No, it's linear, I'll use it for some kind of frequency lock, the output of this Frequency-to-voltage converter will be used as input voltage to monostable multi-vibrators so that they can produce similar(+-%5) frequency to incoming data. For example, the receiver takes 13kHz input and 1011 as data, the encoder will code 1 as 75% pulse width and 0 as 25% pulse width at 13kHz output signal. Input clock will trigger monostable multivibrators and Frequency-to-voltage converter output will define pulse width (there is a RC circuit that produce 12.5us pulse for ++ \$\endgroup\$ – CanSevgi Apr 28 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.