UAC2 DAC + ADC with synchronized separate sampling

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Latest inexpensive USB DACs with ESS chips have excellent params, up to 768/24. Getting better with every new DAC version. E.g. Khadas Toneboard for 99USD.

Parallel-output ADC with external clock - e.g. 24bit EVAL-AD7760 for 65USD EVAL-AD7760EDZ Analog Devices | Analog Devices EVAL-AD7760EDZ ADC Evaluation Board for AD7760 | 698-1407 | RS Components

The Khadas board has two crystals for each audio rates family(24.576MHz, 22.5792MHz), switched by the USB host, the selected clock signal is available at its external socket.

The AD7760 board has an SMB jack for external clock (buffered with NC7S08). Depending on its configured filter setup it could sample at 3.072MHz (24.576/2/4). That would allow running DAC at 768kHz and ADC at 4x that synchronously, being able to sample higher harmonics of a DUT fed with the DAC signal. Synchronous DAC/ADC clock is important as it allows precise FFT of the measurement signal.

A simple short-traced pinheader adapter board would connect the ADC board's pin header to RPi4 GPIOs header, digital levels should be compatible (2.5V ADC, 3.3V RPi). Optionally level shifting 3.3V DAC MCLK -> 5V ADC MCLK for optimal operation (as mentioned in the AD7760 datasheet, not required for the start).

Both boards have complete documentation available (schematics, PCB layout).

Measurement signal generator on linux host -> USB async at 768kHz/24bit -> Khadas board -> DUT -> AD7760 board -> 16bit parallel + control on RPi4 GPIOs read by kernel thread running on isolated CPU core -> USB UAC2 async gadget at 1536/24 or 3072/16 (for now, possible to support 3072/24 later) -> different USB port of the same linux USB host -> any software analyzer (fft - jaaa, scope).

Switching DAC/ADC samplerates would be synchronized, any combination supported by the HW would be available.

A different ADC could be used, requiring just a different communication channel in the special kernel thread on RPi (e.g. SPI, but the parallel bus has the highest throughput).

I cannot develop the analog circuits, but I am willing to take the RPi4 part. I am working on the async UAC2 gadget anyway. IMO it could be an interesting and potentially useful low-cost project.
 
Hi phofman,

Digging this up - needs more attention than it got way back in Feb..

Did this end up going anywhere? is it related to the Pi4 CM project that you mentioned in the REW thread? Howto - Distortion Measurements with REW

Unfortunately I'm not the analogue design help you're looking for. I'm currently fumbling through some projects to learn a bit of that though.


Obviously in Feb the Pi4 Compute module was not available yet. One annoying thing about the CM is that the USB3 controller obviously isn't there and it seems very difficult to purchase in DIY qty, I'd like to be able to run the DAC off the Pi4 USB rather than off a second computer and it looks like that won't be possible once the USB is configured for gadget mode.

Some thoughts -

Reading the Toneboard schematic (thanks to waybackmachine - the official link gives a 404 - https://web.archive.org/web/2019032...Hardware/ToneBoard/Schematic/Tone_V13 SCH.pdf) the ESS DAC is not running in sync mode but actually has a 100MHz input 'XI_CLK'. So the data from xmos is clocked out by the 22.5792/24.576MHz clocks but the ESS DAC 'de-jitters' it. I don't think that this would be ideal for the synchronized sampling approach.



I've been thinking about PCM4222 running off a Pi4 (mostly I want to run a turntable in to Pi for CamillaDSP although I may build two and use one for measurements too). Do you have any more info that you can share on the parallel reading in to the Pi4? I will initially run it PCM but would be interested to see if I can use the 6bit multibit modulator output directly and do the filtering on the Pi instead.

Chris
 
Actually my focus has moved from a bare DAC/ADC to a practically usable analyzer gear since February. Using a ready-made USB DAC board is just too inflexible and expensive in the total BOM as lots of parts would have to be duplicated for the ADC and for the input/output circuits. The RPI's I2S in/out in slave mode negates any need for the USB-I2S chip, RPi also offers I2C, SPI, whatever needed.

PCM4222 should be quite feasible to hook to the RPi via slaved I2S. You will need a clock generator though. E.g. TI and Silicon Labs make some. It would take some kernel/user space support but every hardware does.

Connecting the 6 bit parallel output clocked at 6MHz max and gated by the MCLK signal external to RPi - I am afraid such speed would require some extra silicon before RPi. The fast IO chips on the BeagleBone board would be handy....
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.