Frequency to voltage converter

Thread Starter

gokulpradeep010

Joined Jun 2, 2021
42
Hi,

I would like to know if it is possible to build a frequency to voltage converter circuit using opamps. I prefer not to go with any in build single IC solutions.


Thanks
 

dcbingaman

Joined Jun 30, 2021
1,065
On possible solution is an integrator followed by a rectifier (there are many ways this is just one):1676903607181.png
This would give a decreasing voltage for an increasing frequency.

The other method is a differentiator:
1676903674924.png
Followed by a rectifier.
This method as shown gives you an increasing voltage for an increasing frequency.
 

Thread Starter

gokulpradeep010

Joined Jun 2, 2021
42
On possible solution is an integrator followed by a rectifier (there are many ways this is just one):View attachment 287967
This would give a decreasing voltage for an increasing frequency.

The other method is a differentiator:
View attachment 287968
Followed by a rectifier.
This method as shown gives you an increasing voltage for an increasing frequency.
Thanks,

But I don't want my output voltage to be dependent upon the input voltage, only on the input frequency
 

MrChips

Joined Oct 2, 2009
34,628
Basically if the input frequency is between 47 to 51hZ then I need to generate a flag say positive voltage of 3.3V and for remaining all frequencies the flag should be zero
That makes even more simple.
It takes two retriggerable monostable multivibrators, 19.6ms and 21.3 ms and some digital logic.

Or you can use a phase-locked loop and adjust the lock-in range to suit.
 

dcbingaman

Joined Jun 30, 2021
1,065
Thanks,

But I don't want my output voltage to be dependent upon the input voltage, only on the input frequency
That is easily fixed by simply running one stage at saturation with a high gain essentially converting the 'sine wave' to a square wave, or just converting it to a square wave using a comparator, the basic idea will work regardless if the waveform is a square wave or a sine wave.
 

dcbingaman

Joined Jun 30, 2021
1,065
Basically if the input frequency is between 47 to 51hZ then I need to generate a flag say positive voltage of 3.3V and for remaining all frequencies the flag should be zero
Be sure you use very tight tolerance capacitors and resistors (1% or better) with very low temperature drifts and long term stability: 2*(51-47)/(47+51) is only an 8% range and if you really want close to that range, you need components with a tolerance of 1/10 of the range, thus less than 1% tolerances on the caps and resistors and don't forget about long term stability, they will change with time, used in timing function. This applies to any of the solutions here being they all involve analog components. Personally I would recommend using a crystal oscillator and a digital circuit to accomplish the goal at is will be a lot more accurate.
 

Thread Starter

gokulpradeep010

Joined Jun 2, 2021
42
Be sure you use very tight tolerance capacitors and resistors (1% or better) with very low temperature drifts and long term stability: 2*(51-47)/(47+51) is only an 8% range and if you really want close to that range, you need components with a tolerance of 1/10 of the range, thus less than 1% tolerances on the caps and resistors and don't forget about long term stability, they will change with time, used in timing function. This applies to any of the solutions here being they all involve analog components. Personally I would recommend using a crystal oscillator and a digital circuit to accomplish the goal at is will be a lot more accurate.
Could you please elaborate more on the circuit you are suggesting?
 

dcbingaman

Joined Jun 30, 2021
1,065
Here is another circuit that will accomplish the goal if you really are 'set' on using nothing but op-amps. I did 'cheat' on this one and use some comparators. But you could replace them with op-amps. It still needs R9, R10 and R11 tuned for the 47-51Hz window. But it gives the basic idea. U1 squares up the waveform and removes any noise via some hysteresis. U2 provides push pull current to U3. U3 integrates the signal. R8/C2 converts to a voltage. U4 and U5 creates the 'window' comparator for a lower and upper frequency range.

1676929445922.png
 

Attachments

dcbingaman

Joined Jun 30, 2021
1,065
Could you please elaborate more on the circuit you are suggesting?
For the digital one there is a series of different possibilities. One is use a CPLD and a crystal oscillator to drive the CPLD. Another one would be to use a micro-controller again with a crystal. The final one would be to use discrete digital logic chips to do it. In all three cases the output will be much more accurate. The question becomes what technology are you comfortable with?

In all three cases the basic idea is the same:
1. You have a 'gated' counter. It starts counting on the rising edge of the signal you want to measure the frequency of.
2. On the next rising edge, the counter value stops and is transferred to a comparison register.
3. The comparison register compares the counter value to an upper and lower limit (fixed) and if it is between those limits outputs a logic high, if not outputs a logic low.

The counter is basically calculating the period of the input wave form that is just the reciprocal of the frequency. And the logic is then determining if it is between the period necessary for a frequency of 47-51 Hz.

In this case the accuracy is based mostly on the number of bits in the counter. For better than say 1% you need a counter of at least 7 bits.

If you want a solution using a given technology, that is more details, that may take me a little while to get to you. But it is not difficult.
 
Last edited:
Top