Master clock and isolator for the MiniDSP USBStreamer

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Member
Joined 2009
Paid Member
Some time ago, I bought a MiniDSP USBStreamer. It has a number of nice features. Compared to many of the other XMOS based USB interfaces (and other similar interfaces), the USBStreamer has the advantage that it has digital inputs in addition to the usual outputs. One of the projects I am planning to do is to make an audio analyzer, and for that the input is of course crucial. For normal playback to a DAC it is obviously not needed.

The most important features for my applications were:

1. Digital inputs
2. Up to 192kHz sample rate
3. ASIO driver, to get bit-true data in and out, with no resampling in the PC

Other nice features include
4. I2S interface
5. Up to 10 channels out and 10 channels in

Initially I intended to use the Toslink interfaces for the audio analyzer, since that would allow me to synchronize the PC to my external clock system for the ADC and DAC. I actually made a design for this, but before I got the PCB back from the manufacturer I got the idea to do it in a different way. This was also inspired by the fact that the Toslink receive performance seemed to be a bit critical at 192kHz.

So I decided to use the I2S bus instead of the Toslink. There are two issues when doing this:

1. The USBStreamer I2S bus is not isolated from the PC.
2. There is a relatively high level of jitter on the clocks from the USBStreamer.

So I needed to add isolators on the I2S bus and find a way to synchronize the sample clocks to external high quality clock oscillators.

I already mentioned here that I was looking at that possibility:
http://www.diyaudio.com/forums/equipment-tools/231401-quantasylum-qa400-34.html#post3625860

The design is now up and running. I have tested loopback from a PC generator to a PC FFT analyzer. I am using AudioTester. Initially I had a problem with that at 192kHz, since there was too much delay in the path, so the bits received were shifted one position. Using faster digital isolators solved the problem. So now I can make a loopback at 192kHz with no errors.
The timing on the output side is quite simple, since all the I2S signals are going in the same direction, just getting a certain delay though the isolators.
The timing on the input side is more critical, because the data is coming from an ADC (or other device) clocked by the delayed LRCK and SLCK. But with careful selection of isolators and interface formats this can be handled.
The interface board I have made contains the following functions:

1. Isolators.
2. Two crystal oscillators: 24.576MHz and 22.5792MHz. These can be disabled if an external clock is preferred.
3. A flip-flop to generate 1/2 the clock frequency on a separate output if needed for the converters attached. This is just for convenience and it can be disabled if not needed.
4. A detection circuit to detect the sample frequency set by the USBStreamer (PC application). This circuit determines if the active crystal oscillator should be the 24.576MHz or the 22.5792MHz.
5. An octal flip-flop to synchronize the LRCK, SCLK and output data to the MCLK.
6. Voltage regulators.

I decided to bypass the flip-flops synchronizing the outputs since in most cases it is not needed. And it can be a problem when doing a loopback test due to the additional delay introduced by the synchronization. Most converters just need a clean MCLK and don't care too much about the other clocks.

If an external clock is used, the interface board will signal to the external circuit whether it should input 24.576MHz or 22.5792MHz. Of course these may be derived from e.g. 49.152/45.1584MHz or 98.304/90.3168MHz. This could be useful in connection a synchronous ESS based design, e.g. for the ES9018 and ES9102.

The sample frequency detection circuit has two additional logic signals. These indicate whether the sample frequency is 44.1/48, 88.2/96 or 176.4/192. This can be useful with some converters to put them into Single-Speed, Double-Speed or Quad-Speed mode.

Until now I have mainly tested it with the PC based AudioTester and an oscilloscope. Today I finally got around to test it with a DAC board based on the CS4398 (also my own design). I ran it though my KGSS Headphone amplifier driving my Stax Headphones. I think it sounded fantastic. But I may of course be a little biased. :)

I have not tested all 8 outputs and inputs, but that should not be a problem, since the isolator design is the same for all data signals of the I2S bus.

I am in the process of making a new version of the board, where I will use faster isolators in some places and leave out one of the voltage regulators. I decided to use the 3.3V supply on the USBStreamer as the supply for the interface on the USBStreamer side, since the power consumption is very low and I don't think that the USBStreamer has any problems to deliver this small additional current.
I will probably also remove the flip-flops, which can be used to synchronize the output signals to the MCLK.

I may also make a simpler version with no on-board crystal oscillators. Ideally the crystal oscillators should be close to the converters. It is not terribly important that they are close to the USBStreamer interface.

So what has been achieved here? Well, I Now have an interface which is
1. Isolated from the PC, with 8 channels in/out (10 is possible with an add-on board interfacing to the Toslink channels).
2. Able to use a "perfect clock" for the converters (or as good as it is possible to get them :)).

JensH
 
Member
Joined 2009
Paid Member
Here is a picture of the prototype, attached to the USBStreamer. The PCB is 5x5cm.

A couple of modifications were done on this to test the fast isolators. For a basic version, with just one I2S channel in and out, only two isolator devices are needed.
 

Attachments

  • USBStreamer2_131015_2.jpg
    USBStreamer2_131015_2.jpg
    624 KB · Views: 3,304
Member
Joined 2009
Paid Member
That can probably be arranged. I have just made a couple of new layouts. One is a slightly modified version, with footprints for the faster isolaters. They come in a different configuration than the ones I used for the first design.

The other one is a simplified version, with no on-board oscillators. So this one relies on having the oscillator on the ADC/DAC board (where they should ideally be placed anyway). It cleans up a large part of the area on the lower end of the PCB shown on the picture above. I have just submitted the simplified version to the PCB manufacturer yesterday.

An advantage of the simplified design is that it will be easier to mount. In this case the most difficult components will probably be the SC70 packages. The versions with on-board oscillators use a couple of US8 packages, which are not exactly DIY-friendly :eek:
 
Member
Joined 2009
Paid Member
Hi Martin

Thanks for your kind words.

Actually the form factor is the same, so the board is still 5x5cm. I could have chosen to make it smaller, but I didn't. I did add some mounting holes though. And I shifted the connectors to the side, so that the existing mounting hole in the upper left corner is easier to use, without getting a conflict between the screw and the USBStreamer below.

If only a 2 channel output or a 2out/2in is needed, it is of course not necessary to mount the 2x17pin IDC connector at the bottom. In this case e.g. a 2x10 pin connector (or smaller if some features are not needed) can be used. For every signal pin there is also a ground pin to get a good signal quality.
 
Member
Joined 2009
Paid Member
I hope to receive the new simplified version PCB within the next few days. This is the one, which use the faster isolators and has no on-board crystal oscillators.

I have made a block diagram of this version. The basic principle is the same as for the other versions. I just removed the on-board crystal oscillators. And used one redundant pin for the 3.3 supply, so that it can now be supplied via the same cable that carries the I2S signals etc. In fact I also have the option to mount a local 3.3V regulator, just in case. This is not shown in the block diagram.
 

Attachments

  • Visio-USBStreamer Interface 2 V3 Block Diagram 2.pdf
    13.1 KB · Views: 976
digital crossover

My interest in the USBstreamer is to build a computer music system, do the digital crossover inside the computer (BruteFIR) and have it output six channels (low/mid/high R + L ) over USB into the USBstreamer, and from there connect either to a DAC + amp or to the new Full Digital Amp (those take I2S input).
So, a "better" clock in USBstreamer would be nice.

Thanks, alex
 
Member
Joined 2009
Paid Member
Hi Alex,

I will try to explain it with a bit more details.

On the first version i did include two crystal oscillators. The ones I used were fairly standard types, with OK, but not exceptional jitter levels. I could mount some better oscillators in the design and get even better jitter performance.
But there is a risk of getting added jitter due to buffers and the cable connection when feeding the clock from the USBStreamer Interface to the converter board.

Ideally the oscillators should be placed very close to the converters to avoid added jitter from buffers and cables etc. That is why I decided to make the V3 board without oscillators. It does require that the converter board contains two oscillators. And it must change frequency on command (logic signal) from the USBStreamer Interface.

The converter board can then use the best oscillators you can find (or afford). So good oscillators like the Crystek CCHD-957, Tent Labs or NDK's NZ2520SD series can be used.
If it was possible to find an absolutely perfect crystal oscillator (which does not exist of course) it would be possible to use it with no degradation from the PC interface (USBStreamer + USBStreamer Interface). The clock fed back to the USBStreamer Interface may have some added jitter, but this is not critical, as long as the converters get the clean clock and use it as the master clock. Even a jitter (in the clock going to the USBStreamer Interface) in the order of 1ns (or even more) would not be a problem.

If the converter boards are existing boards, without the oscillators needed for the USBStreamer Interface V3, I guess we are back to the USBStreamer Interface V2 (or even V1 if only playback is needed). I have not built and tested the V2, but basically it should work like the V1, only with faster isolators. I am sure that, with very good oscillators like the NDK's, this will also work very well, with much lower jitter levels than the USBStreamer on its own (and with the added benefit of the isolation).

I have some NDK oscillators on order, but I won't receive them until sometime in December. I will probably use a couple of them for a PCM1794A based DAC design I expect to mount and test within the next couple of weeks.

The digital crossover you mention should certainly be possible as long as you need 8 channels or less. If you need 10 channels it would be necessary to use also the Toslink output. This can also be done synchronous to the master clock, but I have not made a dedicated design for this. I have tested the principle with a couple of SPDIF/Toslink receivers in a similar setup, so it definitely can be done.
 
ahhh...I think I understand (I think...;-)) I will need only 6 channels out (possibly 8 out in the future, but I doubt it), and I don't have yet the converters. I was thinking to use the "new" Full Digital Amplifiers that take I2S input and generate
power....there is no DAC so to speak. Still early in the project, and very probably well over my head, I'm a software guy.

Thanks a lot, I appreciate the explanation. Alex
 
Ahhhh, yes, now it is very clear. When there are 6 channels out (so 3 DAC's) it will be a single DAC (the master) that generates the "clean" MCLK and feeds the other two DAC's and the USBStreamer, correct ??

Found this very inexpensive DAC with ES9023 (supposedly a good one) it has a I2S input, and space for a clock...but I think it has space for just a single clock
(and it is 27MHz) not for a dual 22.57 + 24.57...what do you think, could it be
forced into working with Version 3 of your Interface ?

Hifimediy ES9023 DAC, I2S and left justified input, 192Khz/24bit

Thanks again, I appreciate your time.

alex
 
Member
Joined 2009
Paid Member
Yes, if there are 3 DAC's, one could feed the clock to the other ones, as long as the clocks are transferred without adding too much noise. The 3 DAC's could also be implemented on one PCB together with the oscillators. This could give better control over the clock quality.

The V3 will not work with e.g. a 27MHz clock. Best case the playback speed will be much faster than normal (about 10 to 20%), which of course isn't acceptable. If it works at all. I haven't tried it. With the ESS converters the V1 or V2 could be used. But the clean clocks may not really bring anything unless the SCLK, LRCK and data are resynchronized by the MCLK. And I don't know if it actually helps much in this case, since the ESS DAC's supposedly should be good at eliminating jitter due to the ASRC. The ESS DAC ASRC will do sample rate conversion internally.

Another way to use ESS DAC's, e.g. ES9018 is to run it without sample rate conversion. For the ES9018 this will require the 49.152/45.1584MHz clocks mentioned in the first post. These clocks should then be divided by two and fed to the USBStreamer Interface. It is something I would like to try one day, but it may still take some time before I get to that. Unlike you Alex, I'm a hardware guy and not a software guy. And the ES9018 requires some SW setup.
But the ES9018 could actually give you the 6 channels you need. But it is of course in a different league (also cost wise) than the ES9023 or e.g. the TI PCM5102A. I have actually worked with the PCM5102A recently and got good results.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.