TI TPA2008D2 audio amp woes

Thread Starter

pbrunnen

Joined Dec 30, 2017
9
Hello everyone,
I'm in the middle of making an audio hat for my Pi and I'm looking to see if anyone has worked with these TPA2008D2 chips before. It seemed like a nice and simple class D amp to run on 5V that didn't need much power or many extra components. I also wanted something that I could connect a set of 8Ω speakers or my headphones to.

I bread-boarded the reference circuit (outlined in the TPA2008D2EVM_UG.pdf document of the eval board) with the following modifications:
- RIN(-) and LIN(-) tied to GND.
- Volume R3 pot added 18KΩ between pot and VDD (keep the volume between 0 and 3.7V vs 0 and 5V).
- ROUT(+) and LOUT(+) each have a 470uF 50v electrolytic cap before going to a headphone jack.

I'm having issues where when I raise the volume to between 80-90% I hear static (not like amplified background noise but like the chip is generating white noise) and above 90% it goes away. I've been testing this circuit by itself on a 5V bench supply with with and without my DAC tied to RIN(+) and LIN(+).

I have tried letting RIN(-) and LIN(-) float with no change. Also I tested connecting the headphone jack common to LOUT(-) instead of GND.

I've not looked further into it yet, but I do see quite a bit of ringing on the output square wave at the transitions.

I'm still very novice with analog circuits (I'm a software guy who is still learning), so any help would be appreciated.
Thank you! -Peter
 

Audioguru again

Joined Oct 21, 2019
3,318
The datasheet says on P17 that each input must be capacitor-coupled (NOT grounded) to allow the amplifier to bias the input signal to the proper dc level for optimum operation. The inputs you are not using should have the input capacitor connected to ground.
On P16 it says the pcb needs a special layout of the volume control wiring to avoid noise (NO Mickey Mouse solderless breadboard). Also, I think the class-D switching frequency is too high for a solderless breadboard.
 

Thread Starter

pbrunnen

Joined Dec 30, 2017
9
Hello Audioguru again,
Ah, I see where I misread that... I read the "In a single-ended input application, the unused input should be ac-grounded at the audio source..." but I overlooked "... with a single-ended source, ac ground either input through a capacitor...". Thank you for that and I will try it.

Yea, I was trying to be very careful about where the GND and AGND met and keeping the volume on a separate breadboard with some 4cm wires.

Ok, so you think I need to chalk these issues up to the breadboarding and do a test pcb. Thank you, that tells me where to go next. Not sure it matters, but the switching frequency looks to be 256kHz based on my measurements.

Thanks again! -Peter.
 

Thread Starter

pbrunnen

Joined Dec 30, 2017
9
Hello Audioguru,
Ok, so I have put this together on a PCB as you suggested. I've tried to mirror the TI reference design as close as I could. I see the switching on the output and it looks very close to what I saw on the breadboard, but the static is gone and the output sounds clean. I do still see the ringing when the amp switches, but I haven't yet added any decoupling caps on the line. See photo 1; the yellow trace is at the DAC output and the green trace is at the amp output.01.jpg

But unlike the breadboard, now when I start to play audio to the amp, it immediately shuts down (switching stops). Photo 2 here shows after I start to play audio (same configuration as photo 1). I'm feeding the audio from the same DAC with the same setup as what went to the breadboard.
02.jpg
Now I'm not using a balanced output to feed the amp, but I did make sure to run the negative inputs run next to their positives counterparts away from the chip and to connected them to audio ground via a 0.1uf cap. I've tested setting my DAC's output to the lowest output level, and it still causes the amp to shut down. The audio output is peak to peak at most 400mV and the amp datasheet shows that I should be able to provide anywhere from 0V to Vdd. My rail voltage is 4.7v...

Do you have any suggestions?
Thanks again! -Peter.
 

Audioguru again

Joined Oct 21, 2019
3,318
Your 4.7V rail is very close to the minimum allowed of 4.5V. Maybe your 4.7V drops lower than 4.5V when the amplifier is playing.
Of course the amplifier shuts down with an output max of only 400mV p-p because something is shorting the amp output.
 

Thread Starter

pbrunnen

Joined Dec 30, 2017
9
Ok, that is a good point... Let me try setting up a separate power supply and see if that helps.
Sorry, I meant that the DAC output was max 400mV p-p heading into the amp. Average is 270mV p-p.

Thanks!
 

Thread Starter

pbrunnen

Joined Dec 30, 2017
9
Hello Audioguru,
So I've got my psu bypassed and everything is running off my bench supply. The supply is set at 5.10V and with the RPi source and everything I'm measuring 4.8V now at the amp chip... The amp datasheet shows it should use about 1 amp, but my supply only reports about 600ma in use with spikes up to 780ma. I don't see any voltage drop on the scope when I start the audio playback (it jumps up 0.1V when the amp shuts-down), but that is all.

I'm going to try reaching out to TI support and see if they have any suggestions... I'll report back.

Thanks!
 

Audioguru again

Joined Oct 21, 2019
3,318
If your speakers are 8 ohms then with a 4.8V or 5.0V supply each output clips at 1W. The amplifier is 85% efficient then the power supply must produce 2.3W. Then the 4.8V current is 2.3W/4.8V= 480mA when both channels are barely clipping.

What is "RPi" and why is it not your 5.1V power supply voltage?
 

Thread Starter

pbrunnen

Joined Dec 30, 2017
9
My apologies -- RPi is Raspberry Pi which I'm using to create the I2S signal for the DAC. That is also pulling power from the supply, but I did subtract the 350ma operating current of the Pi from the values I reported. My assumption had been that the load from the Pi was pulling down the voltage... I'm reading the RMS voltage from the scope measurement.
 

Thread Starter

pbrunnen

Joined Dec 30, 2017
9
Hello Audioguru,
So I think I tracked down why the amplifier keeps shutting down, but I'm still at a loss to solve the issue. At the moment I have my amp running from my bench supply and everything else is running on its own supply.

I've noticed that in some cases, there is a large amount of noise appearing on the power pin of the amplifier. The amplifier also uses more current in this situation going from a 20ma up to 25ma draw. The noise waveform seems to be the same as the source audio signal, so there is some sort of feedback occurring. It is interesting, but audio playback though just one channel (L or R) and out of phase stereo signals cause the largest amount of distortion while with stereo playback the distortion is minimal.

I have the caps installed that are recommended by the reference design, tried some additional decoupling caps closer to the chip, and I added some beefier electrolytic and film caps to the power pins without much success.

Did you have any further thoughts on what I could try?
Thanks again! -Peter.
 
Top