Daqarta
Data AcQuisition And Real-Time Analysis
Scope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
The following is from the Daqarta Help system:

Features:

Oscilloscope

Spectrum Analyzer

8-Channel
Signal Generator

(Absolutely FREE!)

Spectrogram

Pitch Tracker

Pitch-to-MIDI

DaqMusiq Generator
(Free Music... Forever!)

Engine Simulator

LCR Meter

Remote Operation

DC Measurements

True RMS Voltmeter

Sound Level Meter

Frequency Counter
    Period
    Event
    Spectral Event

    Temperature
    Pressure
    MHz Frequencies

Data Logger

Waveform Averager

Histogram

Post-Stimulus Time
Histogram (PSTH)

THD Meter

IMD Meter

Precision Phase Meter

Pulse Meter

Macro System

Multi-Trace Arrays

Trigger Controls

Auto-Calibration

Spectral Peak Track

Spectrum Limit Testing

Direct-to-Disk Recording

Accessibility

Applications:

Frequency response

Distortion measurement

Speech and music

Microphone calibration

Loudspeaker test

Auditory phenomena

Musical instrument tuning

Animal sound

Evoked potentials

Rotating machinery

Automotive

Product test

Contact us about
your application!

Sound Card Event Counting

Introduction:

Daqarta can count events using the Total or SpecTot functions of the Frequency Counter.

To do this, you must first determine some feature of the event that sets it apart from the rest of the signal. The idea is to detect only desired events, but exclude any unwanted "false" events.

Let's say you want to count the number of cars that pass by a particular location, using only the sound gathered by a suitably-placed microphone. If the noise of a passing car is always louder than the background noise, you may be able use the Total function with a suitable Trigger settings. This may require a certain amount of experimentation. For example, if you set the trigger Level too high, you may not detect quiet cars, while if you set it too low you may trigger on noisy trucks from another street.

You can tell when you have the trigger level adjusted properly by watching the waveform display: You should see it update once whenever a desired event occurs, but not for an unwanted event.

In most cases, selection and placement of the microphone or other transducer will be important for maximizing the wanted signals and minimizing unwanted signals.


Spectrum Total:

There may be situations where you can't find reliable trigger settings, if the desired and unwanted signals are of the same general magnitude. However, if they are in different frequency ranges, it may be possible to discriminate between them based upon the energy in the target range. Traditionally, this would be done by applying a band-limiting filter to the signal, which would reduce the unwanted signals enough so that only the desired signal reached the trigger level.

Daqarta provides the SpecTot function to accomplish a similar result, reducing or eliminating the need for external filtering. SpecTot uses the Trigger Level setting, but in an unusual way: It counts an event only if the spectral content between the Spectrum cursors exceeds the Level setting.

Suppose you want to count only passing cars that are using studded snow tires, which have a distinctive whine in a particular frequency range, dependent upon speed. You must set the cursors such that the whine frequency is above the lower cursor frequency at the slowest speeds, but below the upper at the highest speeds.

This might encompass a large frequency range, perhaps more than double, from low speed to high. You can use the Delta cursor mode to count an event if any spectral component between the cursors exceeds the Level; that might be a good choice if most cars have little energy in the range, so a peak would stand out.

Conversely, you can use the Sigma cursor mode to count an event only if the total energy exceeds the Level, even if no individual frequency does.

SpecTot would be a good choice to count things like animal calls in the wild, where you know the frequency range of the desired calls, but the background noise may be unpredictable. Because most noises are spread over a broad band of energies, the noise energy in the region of interest may be relatively low even if the overall noise is rather loud.

You can use Trigger Holdoff in either Total or SpecTot mode. You'll need this to prevent erroneously counting multiple events if a single event is longer than one screen (1024 samples). Just set Holdoff longer than any single event.


Data Logging:

You can use data logging macros to record the Total value at specific intervals. The Frequency Counter must be open to do this.

Here is a simple macro that logs the current count each minute for 24 hours, and also records the time of each count:

UT=0
WHILE.UT=<24 * 60              ;24 * 60 minutes
    WaitSecs=60                ;Wait 1 minute
    LogTxt=n + Freq + p20 + t  ;Newline, total, time
    UT=UT+1                    ;Count the minute
WEND.

Note that the LogTxt line records Freq, not Total. Freq is the current reading of the Frequency Counter, regardless of mode, so this will work with either Total or SpecTot modes. (Or any other mode, if you want to log, say frequency instead of event counts.)


Counting Pre-Recorded File Data:

Note that you can use these event counting methods with previously-recorded file data. This has the particular advantage that you can run through the same file again and again while you are adjusting the Trigger controls, until the Total or SpecTot counts match the results of a manual count (obtained by slowly scrolling through the file, perhaps).

Just open the file and start the counter as for live data. You will see the file position readout advance as the file is scanned, and the count will update for each event. When you get to the end of the file, the count and trace updates will stop and the Pause button will be activated.

Make a note of the total events counted, before you do anything else. (If you use the Notes section, you can optionally re-save the file with the new Notes when you close it.) Then you can hit the Home key to return to the start of the file, hit the Frequency Counter Reset button, and try readjusting the trigger settings before you unPause to run the file through the counter again.


GO:

Questions? Comments? Contact us!

We respond to ALL inquiries, typically within 24 hrs.
INTERSTELLAR RESEARCH:
Over 30 Years of Innovative Instrumentation
© Copyright 2007 - 2017 by Interstellar Research
All rights reserved