1
\$\begingroup\$

This is a follow up question for the circuit I designed with the inspiration from here. The circuit works but over time there appears to be some clock jitter or skew. I am interested in an approach to perform a long-term measurement with a measurement period of at least 30min and then process the data with Matlab or Python, to see whats going on. I have never thought of how to perform a measurement like this and did not find anything useful with my google search.

The goal of the circuit is to multiply a 48kHz wordclock input to 12MHz clock for the Cool Audio V2902 codec Datasheet here. The circuit was designed with the following components:

  • BNC Input with 75Ohm

  • Input Buffer: TI RC4558, Datasheet

  • Multiplicator: CS2300CP-CZ, Datasheet

  • A switch for choosing the internal crystal (moved from the Behringer PCB to my extension PCB) or the external source, Datasheet

Unfortunately, I have overseen that the RC4558 is specified for a supply voltage starting at 5V. My circuit works on 3.3V. I removed the IC and replaced the input and output solder pads with a wire. This leaves me with the following circuit (The RC4558 was originally placed between C1 and C2): Resulting circuit

As already asked above: How can I measure the clock signal over a long time (at least 30 minutes) and then process the data. An initial idea was to use Matlab with a R&S HMO2024(Datasheet). More details about Matlab with the R&S oscilloscope here. Is this a meaningful approach and what other options are there?

UPDATE:

Thank you for all your comments on this project. Here is the current status of the project:

  • I use a Rohde&Schwarz HMO2024 with Matlab R2019 and the Instrument Control Toolbox. More details here.

  • The HMO driver from R&S is very easily installed on Windows 10. Not sure if there is a Linux/Mac OS version. There is this .zip file for Linux/Mac OS but I did not understand how to install the files it contained. Rohde & Schwarz HMO driver page here

  • The SCPI commands for the HMO Series can be found here

With some tests I found out that a data transmission usually takes around one second. This is fast enough for me. For initial testing I used the GUI and the help of this video.

clc;
close all;
%% Instrument Connection
% Find a serial port object.
obj1 = instrfind('Type', 'serial', 'Port', 'COM4', 'Tag', '');

% Create the serial port object if it does not exist
% otherwise use the object that was found.
if isempty(obj1)
    obj1 = serial('COM4');
else
    fclose(obj1);
    obj1 = obj1(1);
end
set(obj1, 'InputBufferSize', 500000);
% Connect to instrument object, obj1.
fopen(obj1);

%% Read identifier
%data1 = readData(obj1, "*IDN?");

%% Set start stop of measurement
% Number of measurements
measurementLength = 5;

%% Configure device
%Acquire mode to real time mode
writeData(obj1, "ACQ:MODE ETIM");

% Get samplerate
fs = str2double(readData(obj1,"ACQ:SRAT?")); 
i = 1;

timestamp = zeros(measurementLength,6);

% First measurement
disp("Measurement: 1");
timestamp(1,:) = clock;
data_char = readData(obj1, "CHAN1:DATA?");
data = str2double(split(data_char,','));

% second measurement til end
for i=2:measurementLength
    disp("Measurement: " +num2str(i));
    timestamp(i,:) = clock;
    data_char = readData(obj1, "CHAN1:DATA?");
    data = [data str2double(split(data_char,','))];
end

readData.m

function data1 = readData(obj, command)
% Reads data from given object
fprintf(obj, char(command));
data1 = fscanf(obj);
end
\$\endgroup\$
8
  • \$\begingroup\$ Measuring a 12 MHz signal, with 10 samples per cycle, stored at 10B per sample for 30 minutes generates 2 TB of data. Perhaps you could provide more information if this is not what you're trying to do. If it is then can you stream 2TB of data fast enough to keep up? Can you manipulate 2TB of data in Matlab? Are you chunking up the data? Does it have to be contiguous? \$\endgroup\$
    – scorpdaddy
    Mar 6, 2020 at 14:31
  • \$\begingroup\$ @le_audio: I still don't get the point of your overall idea of a distributed audio recording system that is phase synced to fractions of a microsecond when group delay is still in the range of tens of milliseconds at best (internet). I wonder what use cases you have in mind. \$\endgroup\$
    – Curd
    Mar 6, 2020 at 14:49
  • \$\begingroup\$ Have a look at Allan deviation measurements with frequency counters from Keysight or Tektronix. They are the best way to characterise the stability of a clock. If you want to stay with the oscilloscope: you could use the internal and statistics function and read and reset them every minute or so via MATLAB. This substantially reduces the amount of data to save \$\endgroup\$
    – JLo
    Mar 6, 2020 at 17:03
  • \$\begingroup\$ What exactly are you hoping to measure? The average frequency over a long period? The minimum/maximum clock periods that occur during that long period? What kind of uncertainty can you tolerate...and use numbers, not "as low as possible". \$\endgroup\$ Mar 6, 2020 at 17:23
  • \$\begingroup\$ @Curd Hope this explains more: resurface.audio/dante-over-distance-remote-is-a-reality \$\endgroup\$
    – le_audio
    Mar 6, 2020 at 20:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.