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.

PCM1781 click sound

Other Parts Discussed in Thread: PCM1781, LM4860

Hello everybody.

I have made a design based on PCM1781 device which is giving me problems on some boards. Basically, the system is built up of a microcontroller connected to the PCM1781 by means of a I2S interface (through 22ohm line resistors). The converted audio is low-pass filtered and delivered to a LM4860 amplifier. So far I have mounted about 40 boards and 30 of them are working fine. However there are 10 boards whose audio subsystem is not working correctly. The problem symptom is a periodic "click sound" which is produced at the loudspeaker. The "click" appears in long periods (about every 30 to 70 seconds, randomly). I have seen that this click sound is actually a pulse of about 30mV peak and 500 microseconds long, generated at the PCM1781's VOUTL pin. The most astonishing fact is that this peak is also generated even when the MUTE pin is ON (i.e. attenuators should leave VOUTL to 0). I have even separated power supplies (main and audio subsystem power supplies) to assert this event is not produced by noise injected in the power lines by the microcontroller, but the problem persists. Despite of this behavior, the PCM1781 is still able to convert audio data. However, after a couple of hours, the PCM1781 eventually stops converting data. No matter what data is serialized through the I2S pins: the PCM1781 will not convert data anymore until the master clock is stopped and activated again. Can the PCM1781's internal logic hang, somehow? How is it possible to get a peak at the VOUTL when MUTE is on? I have double-checked that there's no peak on the power lines when the click is produced, and the serial data input remains to digital 0 all the time, so the click cannot be data sent by the microcontroller. Furthermore, the ZEROA pin keeps to 0V before and after the peak at VOUTL is generated.

(NOTE: the I2S lines from the microcontroller never stop. When no audio is to be played, zero data is permanently sent to the PCM1781. I have observed that the only way to stop the click sound is stopping the I2S clock signals. But, as I said before, if I2S signals are working and MUTE is either on or off, the click sound appears).

Thanks in advance!

Claudius

  • Claudius,

    It sounds to me like you have a clock problem - invalid sample rate or something like that. Those usually result in periodic clicks in the audio output.

    Please verify your audio clocking is correct.

    -d2

  • Hi Don,

    Thank you for your reply. However how could you explain the fact of having MUTE signal on and still listening the clicks? If clocking is wrong, then I understand I would listen corrupted data, but  if MUTE is on I shouldn't listen anything, should I?

    Anyway, I made a new observation that may shed some light to this issue. I have found the way to produce clicks even faster (i.e. with a shorter clicking period). I've seen that when the microcontroller's CPU is very loaded the clicks appear very close one to another. I wrote a simple C program with an endless loop moving data in DRAM from one location to another and when I run it the problem appears with such clarity. One could think that a high loaded CPU may send data to PCM1781 with lacking clock periods, but it is not true because the microcontroller has an independent I2S module that works alone. Furthermore, remember that clicks appear even when no data is delivered to the I2S module (i.e. the I2S module is continuously sending "0"s).

    Rationale:

    1) A loaded CPU consumes more power. Is the PCM1781's power supply affected?

    Answer: indeed, it could be affected. Since I can isolate audio's circuitry's power lines, I powered the audio circuitry with an external laboratory power source and I saw clicks were still present (obviosly GND from power source was connected to the board's GND). So, the problem apparently does not "come" from power lines. I'll try to tie GND's with a coil or ferrite bead, though.

    2) A loaded CPU generates more bus noise. Is this noise affecting the PCM?

    Answer: there are two possible ways to inject noise into the PCM: through power lines and through digital lines. According to what I've explained at (1), I discard the former. So the only way to inject noise is through digital lines.

    What I will try now:

    - I will increase the values of the series resistors that are currently linking the microcontroller to the PCM. Now they are 22 ohm; I will increase them to 100 ohm and see what happens. 

    - I will try to take a working board and connect its digital audio signals to the audio circuitry of a non-working board. This experiment will tell me whether the problem is in the audio circuitry or in the rest of the board.

     

    Regards,

    Claudius

     

     

     

  • Hi again,

    Well, I think I'm gonna start believing in little gnomes. I have asserted CPU load is causing "click" sound to appear more often, but I'm unable to find what are the consequences on communicating with the PCM.  So far:

    1) I have increased and decreased series resistors between microcontroller and PCM: no improvements have been reported.

    2) I have connected a working board to the audio circuitry of a non-working board and, voilà! The audio circuitry is working OK!!!?? I'm shocked. I have looked at the digital signals again and again and everything looks pretty: master clock is synchronized with bit clock and channel clock, and the I2S protocol is being precisely accomplished (yes, I selected I2S format).

    I have registered the following waveform: the '1' state in VOUTL is the peak that causes the "click" sound. As you can see, the peak appears a little it before the LRCK period ends.

    VOUTL __________________________--------------------______________________......

    LRCK  ----//----------------_______---------_______---------_______---------_______---------  ...

    Microcontroller's internal I2S module works independently from the CPU, so, theoretically, there should no be any relationship between CPU load and this problem.

    My question is: is the PCM internally reset every time LRCK starts a new period (i.e LRCK low)? In such case, the problem must reside in that LRCK period, right? But if I look at the other clock signals and data signal everything is alright there!!!

    Any hints will be very appreciated.

    Claudius

     

  • Claudius,

    Those darn gnomes! Very strange indeed!

    I don't believe the part is reset every time LRCK starts a new period.

    -d2