ΣSigmaStudio Ask AI Русский Log in

How to calculate freq of a tone input?

SigmaDSP & SigmaStudio Jackie Dec 9, 2013 00:00 4 replies Original on forum ↗
Subscribe
Jackie Question
Dec 9, 2013 00:00

Hi

I want to know the freqency value of a single freq tone input. How to achieve it by ADAU1701?

Thanks,

Jackie

Audio Signal Processors

SigmaDSP Audio Processors

adau1701

KJBob Reply
Dec 10, 2013 00:00

Hello Jackie,

Here's a simple method that works as long as the input is a simple tone -- the waveform need not be a pure sine, as long as it would trigger a scope without fussing. It's modeled after traditional charge-pump V-F converter ICs:

The Value-Crossing detector produces a one-sample wide pulse at each input zero crossing. Higher frequency makes more pulses, increasing the pulse train's duty cycle. Simply low-pass filter this to get a DC level proportional to frequency. For some reason that's beyond me, only first-order filters produce correct results. The filter cutoff frequency is as usual, a compromise between response time and output ripple.

This frequency conversion turns out to be the exact opposite of SigmaDSP's VCO -- connect a VCO to the output above and it mimics the input frequency. Connect a DSP readback block to the F-V output to read frequency with its push-button or via microcontroller -- see Brett's tutorial at https://ez.analog.com/message/7669#7669

Bob

0456.e9d56d647fff7049e647ccd20859e338.jpg
0456.e9d56d647fff7049e647ccd20859e338.jpg
0456.e9d56d647fff7049e647ccd20859e338.jpg-450x129.jpg
0456.e9d56d647fff7049e647ccd20859e338.jpg-450x129.jpg
ADIApproved Reply
Dec 10, 2013 00:00

Excellent solution, Bob! I think I remember you had posted this some time before. I'm glad you responded to this question, because I really couldn't recall this solution.

I was going to suggest using the value cross cell and then implementing some kind of counter system that would approximate the frequency, but your solution is more elegant and probably much more resource-efficient.

Jackie Reply
Dec 12, 2013 00:00

Thank you very much!

EZAdministrator Reply
Aug 2, 2018 00:00

This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

Thank you,
EZ Admin