3
\$\begingroup\$

I want to synchronize multiple Behringer U-Phoria UM2 (that are at different locations) via GPS clock. These interfaces are used by musicians to make music together in "real-time" over the internet (as far as real-time is possible here).

The idea is to "extend" the interfaces with a word clock input for a sampling rate of 48kHz (which is also going to be the GPS clock frequency). Furthermore, the user can chose (e.g. via a switch) whether the interface is clocked from the wordclock input or clocked internally (so the interface does not become completely useless in case of the absence of the external clock source).

The Behringer interfaces are build with a Cool Audio V2902 codec Datasheet here which is clocked by a single 12MHz crystal. In order to clock the codec from the word clock input I need to multiply the incoming word clock frequency (48kHz) with the factor 250.

I tried to find some solutions online but it seems that this is a rather unusual case. The Texas Instruments Webench tool suggested the CDCM6208V1 for this task. ( Datasheet here ).
While I have no doubt that this solution would work I was wondering wether there is an easier solution. An other approach could be the design of my own Phase Locked Loop (PLL) circuit.

Is designing my own PLL for this a feasible solution or will this result in a ton of work without a functioning circuit and in the end switching to the CDCM6208V1? Are there any other solutions that I am not aware of?


I will use an uBlox EVK-M8T for the GPS Clocking.

\$\endgroup\$
  • \$\begingroup\$ Adding links to datasheets and product information GREATLY helps people to help you. I did. You really should. \$\endgroup\$ – Russell McMahon Jan 18 at 9:25
  • \$\begingroup\$ Can you post a picture of the PCB inside the soundcard? \$\endgroup\$ – bobflux Jan 18 at 11:21
  • \$\begingroup\$ @RussellMcMahon: Thank you very much. I somehow forgot \$\endgroup\$ – le_audio Jan 18 at 19:06
  • \$\begingroup\$ @peufeu This is the Behringer PCB: imageupload.net/image/VthmZ There is space for a BNC connector between the USB and the Chinch ports and also enough space above these components to place my PCB there. \$\endgroup\$ – le_audio Jan 19 at 18:15
  • 1
    \$\begingroup\$ Looks like the quartz is in a convenient place with plenty of ground plane around, if you scrape off the soldermask to expose ground plane copper you can make a mini pcb with the new oscillator and solder it in place with good ground connection... \$\endgroup\$ – bobflux Jan 19 at 18:19
3
\$\begingroup\$

Quick solution:

Use a CS2000 or CS2100 Smart PLL (requires a crystal oscillator), use a cheap micro to talk to it via I2C at power-up, set it to multiply 48kHz by 250x, output 12 MHz, done. You'll have to read the datasheet for details, but it doesn't look too complicated. Here's the product page. This is the chip XMOS uses in their eval boards to generate audio clocks. The resulting clock won't be as clean as a VCXO wrt jitter, but that chip is pretty good.

enter image description here

Note the two clock inputs: one is a local "low jitter timing reference" (ie, a crystal oscillator) and the other "50Hz to 30MHz" is your 48kHz signal. This is a bit counter-intuitive but you should not use a 12MHz oscillator in order to avoid a low frequency beat between the reference and the output, see datasheet page 13. A 10MHz oscillator should work fine.

CS2000 acts both as a stand-alone clock generator and as a configurable PLL ; CS2100 is PLL only ; CS2200 is clock generator only. There are more chips without I2C that won't suit your needs, and there are various versions of each, it's a bit confusing.

CS2000 will probably be the best fit if you want to run the soundcard both with GPS synchro (using the PLL) and without GPS (using the stand-alone clock generator mode).

It is certainly much simpler than a VCXO or the huge TI chip you linked, it's a cheap SO package, it doesn't have noise-inducing sub-nanosecond output rise times, uses one single 3.3V supply, draws only 60mW so you can power it from the soundcard... Quite practical.

The board will probably be small enough to fit inside your USB soundcard box, which means you'll just add a 48kHz input to the soundcard, maybe drill a hole in the back. If you don't want ground loops, you can use TOSLINK optical TX/RX to transmit the 48kHz signal.

Putting it inside the box avoids injecting 12MHz clock into the soundcard via a coax sticking out of it and soldered on to the PCB. Maybe you'll find a nice ground area in exactly the right spot to terminate the shield properly, maybe not and you'll end up with an ugly pigtail. It can cause EMI issues. If the coax ground is connected to a noisy place the clock will be jittery, also the coax ground could make a ground loop with your clock generator and introduce hum or noise, etc.

Over-engineered solution:

After you mod it, you and all the other musicians are going to be married to that Behringer soundcard and unable to change it. So I'll challenge the question and go with another approach, which will not require modding the soundcard, and will work with any soundcard. Also it will be far away from the ADC so whatever noise it introduces will matter a lot less. I'll try to make a list of options...

The easiest way to slave a soundcard to a clock is if it has a wordclock or SPDIF input but this one does not.

Note I'll use ASRC as the acronym for asynchronous sample rate converter/conversion. This is the process of resampling an audio stream into a new sample clock domain that is not synchronized to the original clock.

Software ASRC

You're probably not the only guy doing this, so there must be a way to sync the PC using NTP and use that to resample the audio streams. If the software can't do ASRC using NTP or similar network protocol, then perhaps it can do it using another audio input as sample clock reference.

In this case, I'd use a PLL to generate 128Fs (6.144MHz) from your 48kHz GPS clock (see below) then use WM8804 or any other SPDIF transmitter chip to generate SPDIF synchronized to that and carrying all-zero audio data. Or, if you have any kind of audio equipment that has a wordclock input and a SPDIF output, you can also use that to generate SPDIF synced to your GPS, and you don't even have to design any hardware.

Once you have a SPDIF stream synchronized to your GPS, input that into the PC using the motherboard's SPDIF input, and find a software plugin which can do ASRC between two audio streams and synchronize your recording audio stream to that.

You can record both the original audio from the soundcard and the resampled one too, that can be useful if the resamping plugin doesn't sound good.

Hardware ASRC

If software refuses to cooperate, next solution would be hardware.

The idea is to route the audio through a hardware asynchronous sample rate converter (ASRC) like SRC4392 from TI or equivalent from another manufacturer, and feed that chip with a clock synchronized to your GPS.

Something like: route the audio to the PC's SPDIF output, then through a SRC4392 which has SPDIF I/O, then back to a SPDIF input on the PC. This may require a cheap adaptive USB-to SPDIF-output interface, or maybe this.

However the SRC4392 still requires a clock, so you still need ths CS2300.

Summary: Using a hardware or software ASRC as I proposed above would allow you to use a dirty or jittery clock, so your PLL implementation won't really matter as long as it outputs the correct frequency. Also it is outside the soundcard, so it'll work with any soundcard.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thank you very much for suggesting the Cirrus Chips. Coulde you please help clarify my confusion regarding the minimum input frequency of the chip. The product page specifies a frequency range from 50Hz up to 30MHz. The AC characteristics (page 7) in the datasheet specify a clock range from 8MHz minimum input. Does this chip work with 48kHz input frequency as well? \$\endgroup\$ – le_audio Jan 18 at 20:22
  • \$\begingroup\$ I just gave you the reference to the wrong chip, sorry ;) There are several versions with different features, CS2000/CS2100 is the correct chip. I've updated the link in answer. \$\endgroup\$ – bobflux Jan 18 at 20:53
  • 1
    \$\begingroup\$ @le_audio ...and I forgot to tag you. So, CS2000 acts both as a stand-alone clock generator and as a configurable PLL ; CS2100 is PLL only ; CS2200 is clock generator only. There are more chips without I2C that won't suit your needs, and there are various versions of each, it's a bit confusing. \$\endgroup\$ – bobflux Jan 19 at 13:01
2
\$\begingroup\$

You want to clock synchronously ADCs at different locations? Why would you want to do that? Even microphones that are a few meters apart will record same phenomenom at different sampling points. So just store the GPS timestamp data along with your recording (as far as I know, many DSLR audio recorders meant for video production do this already and there's a standard RIFF tag for it) and do the synchronization post-recording with a computer.

Edit: The data format is called BWF, Broadcast Wave Format, first standardized by EBU in 1997. It's an extension of WAV which continually records timecode to the recording, allowing you to synchronize recordings made in different locations and by different equipment. This way you can get even sub-sample accuracy without having to have an absolute sample rate. For example if exactly 1000 seconds of audio generate exactly 48000001 samples, you know that your sample rate is 48.000001 kHz and you can match that to your other recordings.

https://en.wikipedia.org/wiki/Broadcast_Wave_Format

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thanks for your comment. With different locations I meant like on different locations that are distant to each other at least a couple of kilometers. This is an idea for making music at multiple places over the internet and getting the inputs as synchronous as possible. \$\endgroup\$ – le_audio Jan 17 at 23:52
  • 1
    \$\begingroup\$ If you want to mix tracks it's helpful if the sampling clocks aren't drifting with respect to one another. \$\endgroup\$ – user1850479 Jan 17 at 23:54
  • \$\begingroup\$ Therefore the GPS clock as a master clock for all participants and in theory no drift. \$\endgroup\$ – le_audio Jan 18 at 0:00
  • \$\begingroup\$ @le_audio, record audio at different locations with GPS enabled PCM recorders into BWF format and sync the audio tracks together with video production tools... Hmm, googling "BWF sync" seems to yield quite a lot of information on different software solutions to do this. \$\endgroup\$ – PkP Jan 18 at 0:14
  • 1
    \$\begingroup\$ @PkP for large studio installations, and say events with many people running around with cameras and microphones, clock distributors that both lock time and frequency are standard solutions. Yes, this is a real problem, and yes, having distributed identical oscillators is desirable. \$\endgroup\$ – Marcus Müller Jan 18 at 1:07
1
\$\begingroup\$

In case the CDCM6208 solution feels much simpler than the following, this is TI's CDCM6208 evaluation board. Strip most of that off as unneeded and it is still "impressive".

enter image description here


You may find that a GPS disciplined oscillator works well for you.
These use GPS to 'nudge' an oscillator in the right direction.
While you can spend large amounts on commercial units, you can also implement DIY solutions with remarkable performance for relatively little.

If money is no great object, as appears to be the case then commercial GPS Disciplined Oscillators are available from about $US100

Mini Low Jitter Precision GPSDO Reference Oscillator. About $US115.

Programmable Frequency 450Hz - 800MHz.
Stability 1 ppb 1E-9
< 60 sec Locktime


Once you realise how few active component packages are involved, then a DIY solution MAY start to look attractive.

This page GPS Disciplined Frequency Standard provides an excellent DIY example with frequency accuracy of "a few Hz" with a not fully tidied up example at 10 Mhz.

enter image description here

Here's another design A SIMPLE GPS DISCIPLINED REFERENCE claiming an accuracy of "a few parts in 10^12 locking a 10 Mhz OCXO to a 1 Hz GPS signal.

enter image description here

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thanks. I will use an uBlox EVK-M8T for the GPS Clocking. \$\endgroup\$ – le_audio Jan 18 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.