Audio library, I2S DAC oversampling?

Status
Not open for further replies.
The PT8211 seems to have some advantage of the 4x oversampling, but it's minor.

Just looking back over this thread and had a quick look at the PT8211 ds - no oversampling at all, its a
straight DAC. The datasheet says you can do 8x over-sampling, which simply means its rated for upto
384kSPS which is 44k x 8.

Drive it at 44kSPS like with the Audio library out the box and there's no oversampling - should be very
obvious if you stick a 'scope on its output and drive it with 10kHz sine wave!

This should also mean it has much less delay than the other DACs mentioned, so its a great choice for
a control loop output.
 
Ah, I was looking at the Frank B version... whoops.

This means the PT8211 output class is incompatible with the I2S input class, which seems rather restrictive.
Also from what I can tell the PT8211 class CIC interpolation has a spurious gain of x4 compared to the other modes.

Maybe I'm misreading the code, but it seems to correct for sinc3 x4 interpolation by using a factor of 1/16 rather than
(1/4)^3

[edit: I was wrong about the factor, I misread the upsampling step]
 
No, its compatible :) let's say, compatible to the audio library. The T4 has a 2nd I2S.
Or, you can switch off the oversampling.

Anyway, you would need a ultra cheap adc that a PT8211 makes sense. Its more intended for applications with output only.
 
+ don't forget that there should be a lowpass at the outputs...

Edit: in any case. With or without interpolation. The higher frequency is helpful for the needed filtering.
They did not add any inbuilt lowpass... well.. its cheap :)
 
Last edited:
The PCM5102 does 8x over sampling internally. You can even choose between 2 filter algorithms, either for flattest frequency response or for minimal delay. And it will use 24bit of the up to 32bit which one can send over i2s. Feeding it only with 16bit is a waste and will not allow to reach the lowest possible distortion and noise values.
On the other hand, Frank is right. The PT8211 is cheap. Since it’s status is “Obsolete”, dealers are emptying their stocks and I wouldn’t recommend it for new designs.
 
Ok, I stand corrected. I was pretty sure I had seen it marked as obsolete in a distributor listing. But from a technical point of view, only 16bit without internal over sampling filter, it is at least outdated. I’m really fascinated by the PCM5102A. Got breakouts with pins from China at around 2USD, shipping included…
 
I hope these 2USD boards have a genuine PCM5102A mounted...
On Aliexpress I see PCM5102A chips offered at 1.5USD but they do not have the BB logo printed on the package. Genuine parts do have the logo on them.

Paul
 
Good advice! It looks like they have the Burr-Brown logo:
954A27A6-33B6-48A1-B241-4D36C83CF618.jpg
 
EE help needed for I2S DAC.

I have successfully tested adafruit I2S DAC UDA1334A, with Teeeny 3.2/3.6/4.0 and Arduino ZERO. Tested sine wave with ear-buds and scope to DAC line out. DAC is wired with (3v3, GND, LRCLK,DIN,BCLK). All is good.;)

I purchased amazon/china PCM5102A DAC and testing was NOT good. :confused: On line out I see short spike every 16.5 ms ?? However, in wiggling and jiggling the DAC board, I occasionally see 4 or 5 good sine wave cycles. I happened to attach a 2nd jumper to the DAC's VIN pin, and lo and behold if I grasp the bare end of that jumper with my fingers and touch the breadboard with my other hand, I often get a good sustained sine wave on the scope!

Having me as part of the circuit is not acceptable. So what kind of circuit/components do I need to add to get my body out of the loop?
 
Last edited:
Hi Manitou, what voltage do you power the DAC board with: 3V3 or 5V?
The board you referred to should be powered by 5V.

Paul
 
Hi Manitou, what voltage do you power the DAC board with: 3V3 or 5V?
The board you referred to should be powered by 5V.

Paul

I have tried 3v3 and 5v, and behavior is the same. I even tried DC power jack on ZERO instead of USB power. Still misbehaves.
 
@manitou: Do you feed the PCM5102A with a master clock on the SCL pin or do you only connect bit clock, data, and frame sync, letting the PCM5102A’s PLL do the rest? In the latter case (which works very well for me), it’s crucial to connect SCL to GND. Don’t leave it open to prevent parasitic noise from de-synchronizing the PLL which could lead to the effect which you describe. Furthermore, XMT should be at a constant and stable high level, to prevent the soft muting algorithm from jumping in.
 
@manitou: Do you feed the PCM5102A with a master clock on the SCL pin or do you only connect bit clock, data, and frame sync, letting the PCM5102A’s PLL do the rest? In the latter case (which works very well for me), it’s crucial to connect SCL to GND. Don’t leave it open to prevent parasitic noise from de-synchronizing the PLL which could lead to the effect which you describe. Furthermore, XMT should be at a constant and stable high level, to prevent the soft muting algorithm from jumping in.

Yay! SCK to GND solved it! The two raspberry pi forum articles I had both had SCK unconnected. sigh. many thanks
 
Status
Not open for further replies.
Back
Top