Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
Sound Card Frequency Counter
The Frequency Counter dialog can be invoked from the Options Menu or toggled open or closed directly via CTRL+F. It enables the usual frequency, period, and event totalizing measurement functions of a conventional benchtop counter, plus a special spectral event counter.
The frequency measurements employ special techniques to allow much higher resolution than conventional frequency counters at low signal frequencies.
In addition, an Fcal dialog allows calibration for external voltage-to-frequency (V-F) converters to be used with DC sensor signals like temperature or pressure, and read out directly in the proper units. Nonlinear sensors like thermocouples are accommodated via calibration tables. Tested V-F circuits (with board layouts) are provided.
The Fcal dialog also supports a simple external Frequency Prescaler circuit to allow reading very high frequencies (MHz).
See Custom Frequency Counter Mini-App for a simple way to obtain custom features via a separate meter display, including calibrated frequency (like Fcal), plus lowest, highest, and average frequency. You can easily add other custom calculations, and optionally enable data logging.
Note: This high-performance Frequency Counter option monitors a single input or output channel, as determined by the current Trigger Source. See the Multiple Meters Mini-App to simultaneously monitor up to two inputs and two outputs on individual dislays, with optional plotting and data logging. However, Multiple Meters has a low-frequency limit: At least one full cycle must fit into the 1024-sample data frame... 1/1024 of the sample rate, or 46.875 Hz for the default 48000 Hz rate. There is no such limitation with this Frequency Counter.
Also: The Frequency Counter does not allow selection of the the trigger source from in the DaquinOscope macro mini-app that uses an inexpensive Arduino board for data acquisition. That's because DaquinOscope only returns data in 1024-sample bursts, unlike the continuous data stream available from the sound card. (It would, however, be possible to modify DaquinOscope to use the above-mentioned Multiple Meters scheme to measure frequency.)
But you can feed signals from the Arduino, such as oscillator outputs, to the normal sound card inputs for the Frequency Counter to read. Note that these signals are typically in the 0-5 V range, which may require an external Input Range and Limiter circuit to avoid overdriving the sound card. Ordinarily this is not a problem if the sound card has Line inputs, but may be needed if only Mic In is available.
Besides the functions selected from the Frequency Counter dialog, operation also depends upon the settings of the Trigger dialog. In general, the mode should be set to Normal. The Trigger Source selects the channel to be measured, while Trigger Slope and Level set the threshold for detection just as in a benchtop counter.
Trigger Hysteresis is very important for proper counter operation in the presence of noise. Usually, you will want to set this to slightly more than the peak-to-peak noise level. You can drag the dotted horizontal cursors that appear when the Trigger dialog is visible until you get a stable reading.
Trigger Holdoff should usually be set to zero for normal frequency or period counting, but it can be very useful for Total and SpecTot operation, or for measuring burst rates or periods without confusion from the burst carrier frequency.
For high frequencies (say, over 10 kHz), Trigger Level should be near zero for best results. Since there must be one sample on the slope before the trigger sample, and there are fewer samples per cycle at high frequencies, this reduces the chance that the next sample will fall past the peak and possibly be lower than the Level value.
Note that although the same Trigger settings also control the start of the trace, the Frequency Counter scans all incoming data for trigger events, including those that are shown within the trace and those that are not shown between traces.
Besides live data, all of the Frequency Counter functions can operate with long (DDisk) data files. This allows you to measure frequency (or period) or count events on pre-existing files, including .WAV files which may have been acquired on other systems.
The Frequency Counter dialog can be positioned by dragging its title bar in the usual Windows manner. The position and size will be maintained independently from other Daqarta dialogs, and will be saved across Daqarta sessions.
Unlike most Daqarta dialogs, the dialog size can be changed by dragging its borders. The numerical display font will be scaled proportional to the height of the dialog, allowing creation of extra-large displays for distant viewing. (On the initial use, you may need to adjust the size for your screen.)
Note: Larger characters take longer for Windows to draw on the screen. In Spectrogram or Pitch Track (Sgram/PT) modes with fast Trace Update rates and/or slow systems, this may be noticeable as slight gaps or discontinuities in the spectrogram or pitch track that repeat at 100 msec or 1 sec intervals (depending on the Fast/Slow measurement update rate).
Due to the Trigger requirements, the Frequency Counter is best suited to waveforms that can provide a clean trigger determination based upon Level and Slope (except for SpecTot spectral event counting). When the signal is noisy or has multiple frequency components, use the Spectrum Peak cursor readout mode instead.
Spectrum Peak cursor mode doesn't provide the same ultimate frequency resolution as the Frequency Counter, especially at low frequencies. But it can still resolve to a fraction of a hertz in most cases, without any Trigger requirements. That's especially important at high frequencies, where triggering the counter may be more difficult.
Note: To copy the Frequency Counter displayed value to the Windows Clipboard, left-click anywhere in the central region of the counter display. This captures a copy of the current value and pops up a message box allowing you to save it to the Clipboard. CTRL+left-click saves it directly, without the message prompt. SHIFT+left-click includes the title above the value. CTRL+SHIFT+left-click includes the title and omits the prompt.
FcountDlg=1 opens the Frequency Counter dialog, FcountDlg=0 closes it, and FcountDlg=x toggles between open and closed.
Closing the dialog also closes the Fcal dialog if it was open.
Note that you do not need to open the Frequency Counter dialog to change its controls directly via macro commands. However, it must be open in order to open the Fcal dialog.
FcountDlg#m=1 sets the dialog to minimized if open. FcountDlg#m=0 restores it, and FcountDlg#m=x toggles between minimized and restored.
You can read the current minimized state via X=FcountDlg?m, which will set variable X to 1 if the dialog is currently open and minimized, else 0.
Freq is an internal variable that holds the current Frequency Counter readout value, dependent on the chosen mode (Hz, RPM, msec, Total, or SpecTot).
Total holds the count of total cycles counted since the last Reset, valid during Hz, RPM, or msec modes.
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
Over 30 Years of Innovative Instrumentation
© Copyright 2007 - 2020 by Interstellar Research
All rights reserved