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!

Full-Duplex Techniques

Controls: Calibration Menu >> Duplex Delay

Some sound cards do not allow simultaneous input and output ("full-duplex" mode) with perfect synchrony, or they may provide it at only one sample rate. AC97 chipsets, for example, may sync only at 48000 Hz, and exhibit drift at other rates.

Other cards, including AC97 tpyes, may provide synchronous operation at one or more sample rates, but the delay between input and output may not be predictable from one run to the next. If that happens, Daqarta may be unable to show the signals with the correct alignment; a response may actually be in perfect sync with a stimulus, but it may appear to be arriving earlier or later than it really is.

Sometimes this is not an issue at all. For example, if you are measuring frequency response using swept sine waves, or white or pink noise, there is no need for synchrony. But if you are using impulse or step responses, then you need to make sure you capture the transient properly.

It is especially important to have perfect synchrony for waveform averaging; if there is drift, the average will be smeared. And if there is synchrony without proper alignment, measurements of response latency will be in error.

If you have run the Duplex Delay calibration and can't find a sample rate without drift, there are still a few techniques that may allow you to get the results you need.

The best approach is to simply not rely on there being any synchrony at all between sound card input and output streams. Connect a direct loopback cable from an output channel to an input channel; now the output signal appears on an input, and since Left and Right inputs are always in perfect sync and alignment, you can be assured of good results.

You will not be able to use Gen Sync trigger mode, nor any triggering using an output channel as the Source. Instead, set Normal mode and set Trigger Source to the input that receives the loopback. While viewing that input, set Trigger Slope and Level to get reliable triggering.

This trick relies upon the output being a waveform that has a clean trigger point, such as an impulse or step. A tone burst will work if you use Reset Phase on Burst, so every burst looks alike; you may also need to use Trigger Holdoff to insure the trigger only sees the leading edge of the burst.

But if the stimulus is an FM wave and you want to trigger on a certain phase of the modulation cycle, there is no unique slope and level for triggering. Likewise if the stimulus is ongoing noise with occasional gaps that you want to trigger on, or tone bursts of arbitrary phase or variable frequency.

Even if you have a signal with a clean trigger point, you can't change the output volume without affecting the trigger. This is a common situation; for example, biological evoked potentials such as auditory brainstem responses typically require lots of waveform averaging to recover the response from background neural activity, and the whole process is repeated at different stimulus levels and/or frequencies.

A work-around in all of these cases is to use one output channel for the actual stimulus, and the other to supply the sync via the loopback. The sync output can be a square wave at the same frequency as the FM modulator, burst onset rate, or whatever. In general, you just need to set both to the same numerical frequency value, using the same frequency step mode; Daqarta will compute both the sync wave and the stimulus modulator wave the same way, so they will track.

A square wave provides a nice clean trigger edge, but that sharp edge also increases the chance of leakage between channels. Leakage could appear in the other output channel and thus contaminate the stimulus, or it could appear in the other input channel and thus contaminate the response. You can view the signal input during a dummy run and look for leakage artifacts.

Make sure the leakage is not coming from your cable setup. The cables will need to split into separate Left and Right shielded conductors, and the split should be near the common connector so the problem signal is kept apart as much as possible. But the leakage may just as well be coming from inside the sound card.

If you have card leakage problems, you can generally reduce them by reducing the frequencies involved. That means using a wave with softer edges than a square wave or pulse. A sine wave would seem to be a good choice, but note that sound cards block very low frequencies; if your stimulus repeats at only once per second, for example, a 1 Hz sine wave may not make a good sync signal. (Even if it did get past the sound card input stage, note that the trigger would be on a very shallow slope where tiny amounts of noise would cause it to come early or late.)

One possibility would be to use a single cycle of a raised cosine as the sync signal. Set the main frequency to 0 and the Phase to 90 degrees, and set Reset Phase on Burst. With Burst on, the output will be the same as the burst envelope. Set Burst High to 0 and set Rise and Fall equal, increasing or decreasing them together to get the desired shape. The only issue with this approach is that the burst repeat rate will always be a multiple of the sample period; if you are trying to sync to a frequency like an FM modulator, that frequency should be set using the Lines frequency step mode to insure that it will be synchronous with the sample rate.

The use of a separate input channel just for triggering does, of course, have the drawback that you can't view two response channels. If you have to do that regularly, it may be worth investing in a new sound card with better full-duplex operation. But for rare occasions and special cases, there is one more possiblity. This won't work for sample rates that have duplex drift; it is only for those situations where the sync is stable but the alignment is not repeatable.

The idea is that you can set up everything just the way you need it for the experiment, and manually adjust the alignment. This will hold only until you toggle the Input or Generator off, so you have to keep them running the whole time. You can't change anything other than volume or dB on the Generator once you set the alignment, since changes cause it to restart (at possibly another alignment).

Once you have everything set up and running, connect the output to the input temporarily with a loopback cable. Now you can compare the alignment between the input and output channels. If the Left Input doesn't line up with the Left Output, use the Duplex Delay dialog to set the delay manually until they are aligned. Then reconnect the cables normally and run the experiment. (Afterward, you may also want to reconnect the loopback to verify that things are still aligned.)


See also Calibration Overview, Auto-Calibration Dialog, Duplex Delay Dialog


GO:

Questions? Comments? Contact us!

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