Measuring Internal Sample Rate Error with AP2700

Created on 2010-10-14 01:35:00

Many devices contain internal clocks that are not accessible but that need to be measured. A USB headset is an example of an inaccessible A/D converter. Inaccessible D/A converters are found in MP3 players and smart phones. In some cases, disassembly would make testing overly complex. In others, the device must remain assembled so that the internal temperature and environment is not altered.

The internal sample rate error of these types of devices can be indirectly determined by measuring the frequency error of a known tone. AP has developed a set of AP2700 macros that do just that.

Measuring A/D Error

To measure A/D clock error, record a tone of precise frequency to a file using the device under test. The Analog Generator in the 2700 Series analyzers, with the waveform set to Sine (D/A), works well for this purpose, as it has a frequency accuracy of 2 PPM (±0.0002%).

Analog generator set to Sine (D/A) waveform.

Now, load the macro “A-to-D Sample Rate Error.apb” and start it running. At the prompt, browse for the wave file that was just recorded, enter the frequency of the recorded tone, and click OK. The analyzer will now perform an FFT, measuring the level of the tone in the central and adjacent bins, to determine its precise frequency. When finished, an FFT response graph will be shown, and the prompt will reappear with the frequency error displayed. Since the nominal sample rate of the recorded file is known, the actual sampling frequency can be calculated. In the example shown in the figures below, the device under test has shows a sample rate error of 1.0000%. Since the nominal sample rate is 48,000, the actual sample rate of the device calculates to 48,480.00.

A/D FFT spectrum graph.

A/D frequency error result.

Measuring D/A Error

The process for measuring D/A clock error is just the opposite. A prerecorded file of precise frequency is played on the device under test, and its analog output is connected to the analyzer input. You can make your own reference files using an audio editing program such as Adobe Audition that has a precise tone generation function built in. The macro download includes .wav and .mp3 files with a precise 1 kHz tone at both 44.1k and 48k sample rates, which should suffice for most situations. Run the macro “D-to-A Sample Rate Error.apb” and follow the prompts. The example in the figures below shows a device that plays slight slow.

D/A FFT spectrum graph.

D/A frequency error result.

RELATED DOWNLOADS

AP2700 Sample Rate Error Measurement Macros
Many devices contain internal clocks that are not accessible but that need to be measured. Examples include the A/D converters in USB headsets, and the D/A converters in MP3 players and smart phones. The internal sample rate error of these types of devices can be indirectly determined by measuring the frequency error of a known tone. This download contains two AP2700 macros that calculate the error. See the associated KB article for instructions.