This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PCM5102A: DAC producing music, but with heavy distortion

Part Number: PCM5102A
Other Parts Discussed in Thread: PCM5122, PCM5102, PCM5242

Hi all, I have an AudioB I2S bluetooth audio module that i am connecting to a PCM5102A based chip and the output, while recognizable as music, is heavily distorted.

the module: https://www.tinyosshop.com/audiob-i2s-bluetooth-digital-audio-receiver-module

the PCM5102A based DAC chip: https://www.amazon.com/gp/product/B075B44CL6/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1

I have the DAC connected to the audio module using BCK, DIN, and LRCK and I am able to hear musical notes but I suspect something is wrong with the DAC's interpretation of the bit stream since there is distortion and I cannot lower the volume through the bluetooth volume controls. When the music is paused, the DAC goes quiet, but if the music volume is changed to zero, i get an intense buzzing output.

The bluetooth module's digital output is known to be left-justified format, so I have the FMT pin brought up using the 3.3v pin supplied on the DAC. (For reference the pin-out description for FMT is: Audio format selection : I2S (Low) / Left-justified (High))

To turn off the mute,I have also brought up the XSMT pin to 3.3v using the same pin. (For reference: Soft mute control(1): Soft mute (Low) / soft un-mute (High))

For reference, the last three pins on the DAC are listed below, and I have not connected them to ground or 3.3v in any combination with success.

FLT for Filter select : Normal latency (Low) / Low latency (High)

DMP for De-emphasis control for 44.1-kHz sampling rate(1): Off (Low) / On (High)

SCL (or SCK on the PCM5102A's pin-out) for System clock input(1), note is (1): Failsafe LVCMOS Schmitt trigger input.

I would like to have this contraption working of course, but insights on how to troubleshoot and to show the problem is the AudioB and not the PCM5102A would be good too. I have a simple oscilloscope if that should come in handy.

Thank you in advance. 

  • Hi Tobin,

    Heavy distortion is usually caused by one of two things: 1. you clocks are not accurately synchronized or are not compliant with the requirements of the DAC, or, 2. The load on the output is too great.

    For the first issue, I recommend to you very the clock speeds of the LRCK and BCK.  SCK should be grounded if you are not using it.  The BCK must be a continuous clock, and 32*fs or 64*fs as shown on the table below.

    For the output load, the PCM5102A only supports a minimum load of 1kΩ (line out).  This means that it is not capable of driving headphones or speakers directly and must have an output amplifier.  If you are using an amplifier, verify that it is not loading the output.

    Sharing a schematic would be useful as well.

    Thanks,

    Paul

  • Thank you for the prompt reply. I have grounded SCK and have measured the AudioB chip's LRclock at 48-49kHz. I measured the BCK at 198kHz, but i think its past the limitations of my 20$ diy oscilloscope kit (no sharp wave form at the smallest time division, 10us.) Instead, i refer to the manufacturer data and see that the published rate is not included in the table. The listed rate is 2.304 MHz- close, but not quite either 1.536 or 3.072 MHz, for a 48kHz sample rate. Is there anything that can be done?

    For reference from the AudioB chip manufacturer:
    "...I2S digital output and music resampling frequency is 48KHz...

    The module PIN7,8,9,10 are I2S output pins, I2S voltage 1.8V.

    • 7 - GND
    • 8 - BCK   I2S synchronous data clock, It's a 2.304MHz square wave signal.
    • 9 - SD     I2S synchronous data output.
    • 10 - LRCK   I2S word select, 48KHz. 1 - Left channel data, 0 - Right channel data."

     I am not sure how to measure the load, but I am using a mini Jambox portable speaker through its line in-aux input, so it's not driving anything. 

  • Hi Tobin,

    I suspect the device is experiencing clock error due to this.  Can you confirm that the BCK is continuous? Meaning that the BCK signal is just a standard square wave without any gaps from a gated operation?

    If it is continuous, you could try connecting BCK to SCK on the PCM5102A.  This will put the device in 4 wire mode.  While 48×fS is not really supported in this mode, I suspect the device will still auto-configure correctly as 2.304MHz is fast enough.

    Thanks,

    Paul

  • It is continuous, though it seems my scope cannot make out the signal into square waves, BCK appears sinusoidal with some variations, around 190-199kHz. In comparison, the LRCK signal looks kind of like a chain of batman head silhouettes, and the 1kHz test signal on the scope itself is a nice sharp square, so I suspect the scope is to blame for not reading with enough fineness for MHz readings. Anyways, when SCL and BCK are connected together along with the BCK pin on the bluetooth module, the output goes silent.

  • Hi Tobin,

    If you are seeing very poor edge quality, then I expect you have non-ideal wiring between the two modules. If you are using wires to connect them, you will want to make sure they are short and direct.  Also, verify that the grounds are well connected between the two boards.

    Thanks,

    Paul

  • i disconnected the DAC and am looking only at the BCK pin with a super small probe wire, shown here. The signal looks like this, so maybe it is in fact a problem with the chip not providing a good signal to synchronize with the DAC?

  • Hi Tobin, looks like the attachment did not work.  The PCM5102A requires a clean and accurate BCK in 3-wire mode to use with the PLL to generate all other clocks in the system.  If there is not a continuous clock, you can get clock errors where the device must re-synchronize.  That can result in low quality performance.

    Thanks,

    Paul

  • I think we have identified the problem as a clock synchronization error and it's a dead end with this module and DAC combination. it's probably safe to say that I have a good chip, but an incapable scope to explain the anamalies on BCK. Anyways, the data sheet mentions that using the PCM5102 probably won't work for the atypical BCK of 2.304MHz, and also hints at why the AudioB's compatible DAC uses PCM5122 instead. excerpt below. The AudioB proprietary DAC can be found here: 

    For reference, from the PCM5102A datasheet (emphasis in bold:)

    9.3.5.2 Clock Slave Mode With Master/System Clock (SCK) Input (4 Wire I2S)
    The PCM510xA requires a system clock to operate the digital interpolation filters and advanced segment DAC
    modulators. The system clock is applied at the SCK input and supports up to 50 MHz. The PCM510xA systemclock
    detection circuit automatically senses the system-clock frequency. Common audio sampling frequencies in
    the bands of 8 kHz, 16 kHz, (32 kHz - 44.1 kHz - 48 kHz), (88.2kHz - 96kHz), (176.4 kHz - 192 kHz), and 384
    kHz with ±4% tolerance are supported. Values in the parentheses are grouped when detected, e.g. 88.2kHZ and
    96kHz are detected as "double rate," 32kHz, 44.1kHz and 48kHz will be detected as "single rate".
    The sampling frequency detector sets the clock for the digital filter, Delta Sigma Modulator (DSM) and the
    Negative Charge Pump (NCP) automatically. Table 10 shows examples of system clock frequencies for common
    audio sampling rates.
    SCK rates that are not common to standard audio clocks, between 1 MHz and 50 MHz, are only supported in
    software mode, available only in the PCM512x, PCM514x, and PCM5242 devices, by configuring various PLL
    and clock-divider registers. This programmability allows the device to become a clock master and drive the host
    serial port with LRCK and BCK, from a non-audio related clock (for example, using 12 MHz to generate 44.1 kHz
    [LRCK] and 2.8224 MHz [BCK]).


    Anyways, this has all been very educational, thank you for the input. Moving forward, I have a CSR programmer module on its way for playing with the AudioB modules and if it should happen to be able to control the clock rates, maybe this project can be saved.