Frequency to voltage converter

Thread Starter

gokulpradeep010

Joined Jun 2, 2021
42
T
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.
Thanks
 

Thread Starter

gokulpradeep010

Joined Jun 2, 2021
42
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.

I also want to check if the phase difference between two signals are maximum 10 degrees. I am planning to do it with a zero crossing detector and Xor gate. Are there any other analog methods?
 

dcbingaman

Joined Jun 30, 2021
1,065
For a CPLD or FPGA the following VHDL handles the measuring a signal period and latching it.
Along with a test bench.
The measurement is valid with rdy strobes high.
If no signal is present, the measurement is at the maximum count of 0xFFFF indicating the input signal is not running.
I will work on the comparison part tomorrow.
 

Attachments

Thread Starter

gokulpradeep010

Joined Jun 2, 2021
42
For a CPLD or FPGA the following VHDL handles the measuring a signal period and latching it.
Along with a test bench.
The measurement is valid with rdy strobes high.
If no signal is present, the measurement is at the maximum count of 0xFFFF indicating the input signal is not running.
I will work on the comparison part tomorrow.
Thanks again for your help. But I am only allowed to use analog circuits. Could you give me some idea for finding the phase difference between the signals, As I am only allowed to have a phase difference of 10 degs.
Is it possible with a similar circuit as in the case of frequency
 

dcbingaman

Joined Jun 30, 2021
1,065
Thanks again for your help. But I am only allowed to use analog circuits. Could you give me some idea for finding the phase difference between the signals, As I am only allowed to have a phase difference of 10 degs.
Is it possible with a similar circuit as in the case of frequency
This sounds like homework, if you are only 'allowed' to use a specific method. Is this homework?
 
Top