Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 42 of 42

Thread: Audio library, I2S DAC oversampling?

  1. #26
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,791
    Quote Originally Posted by PaulS View Post
    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.

  2. #27
    Senior Member
    Join Date
    Apr 2014
    Location
    -
    Posts
    9,735
    The "driver" for the PT8211 indeed uses 4x oversampling.

  3. #28
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,791
    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]

  4. #29
    Senior Member
    Join Date
    Apr 2014
    Location
    -
    Posts
    9,735
    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.

  5. #30
    Senior Member
    Join Date
    Apr 2014
    Location
    -
    Posts
    9,735
    + 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 by Frank B; 02-17-2021 at 05:19 PM.

  6. #31
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,594
    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.

  7. #32
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    1,028
    Quote Originally Posted by Theremingenieur View Post
    Since it’s status is “Obsolete”
    Not obsolete (yet), see http://www.princeton.com.tw/en-us/pr...converter.aspx
    I had an email discussion with them recently on the 2 versions of the PT8211, see this thread.

    Paul

  8. #33
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    27,653
    Even if Princeton discontinues the genuine PT8211, seems pretty likely the Chinese counterfeits will remain.

  9. #34
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,594
    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…

  10. #35
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    1,028
    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

  11. #36
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,594
    Good advice! It looks like they have the Burr-Brown logo:
    Click image for larger version. 

Name:	954A27A6-33B6-48A1-B241-4D36C83CF618.jpg 
Views:	84 
Size:	63.5 KB 
ID:	23751

  12. #37
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,763
    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. 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 by manitou; 04-06-2021 at 10:41 PM.

  13. #38
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    1,028
    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

  14. #39
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,763
    Quote Originally Posted by PaulS View Post
    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.

  15. #40
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,594
    @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.

  16. #41
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,763
    Quote Originally Posted by Theremingenieur View Post
    @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

  17. #42
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,594
    Quote Originally Posted by manitou View Post
    Yay! SCK to GND solved it! The two raspberry pi forum articles I had both had SCK unconnected. sigh. many thanks
    You are welcome! Glad that I could share some of my modest experience.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •