07-18-2025 11:58 AM
Is any solution to measure frequency of sine wave using Counter card. When I tried measuring by providing a square wave using a function generator it measures accurately. But the Problem is that the engine compressor rotor tooth produces a sine wave, when measuring sine wave using counter card of 6612.It delivers a fluctuating result. Thus, it has any solution for the stabilization of measurement frequency programmatically.
07-18-2025 02:45 PM
You are trying to acquire an analog signal (a sinusoid) with a digital I/O card. I can "imagine" strange ways to approximate doing this, but it would be much simpler (conceptually, but I'm not an Electrical Engineer, so this might just be silly) to (analog) sample the waveform with a good A/D converter using a frequency say 100 times higher than the frequency you expect to see, then do an FFT and examine the peak frequency of the Power Spectrum.
The 6612 seems (again, to me, but what do I know?) to be the wrong tool for this task. Maybe I'll learn something ...
Bob Schor
07-19-2025 12:09 PM
For some reason, you attached picture is not visible and we can't really tell what a "fluctuating result" really means. (random? some pattern? fewer counts?, etc.)
What is the amplitude/offset of the sine wave?
Another option would be to insert a conditioning circuit that converts a sine wave to a square wave (search the web)
07-20-2025 01:21 AM
Your signal must adhere to these specifications for the counter to operate properly,
If you need to use 6612 to measure the signal, then your signal must be conditioned to the above required to work.
What is the amplitude, offset and frequency of your sine wave?
07-20-2025 12:50 PM
Jepp, something like a LM393 comparator would help.
To minimize jitter it will help to measure the time between more than one teeth, best one turn.
There are a lot of papers on how to measure frequency with counters. Internal counter frequency, target frequency to measure, update speed and target frequency resolution are related.
If you configure one counter to run up at max internal Freq and capture the counter value on each say rising slope of a teeth, you might find a periodical (often sine shaped) over one complete turn, if you do some math & statistics.
So some boundary conditions of your setup and target speed resolution are helpful.
Basic principle of signal processing: The better method has longer integration times 😉