My amplifer is only making a popping noise! - Page 1
Forum section: electronics / projects

author: Starlord
author_rank: Frequent Contributor
timestamp: August 05, 2016, 08:56:33 pm
content: http://www.ti.com/lit/ds/symlink/tpa3131d2.pdfThis is the schematic for my amplifier. The amplifier was working fine with both 4 ohm and 2 ohm loads until I added the filtering on the output. Now it works with neither.The filter was intended to remove frequencies above 100KHz because the speaker wires were emitting electromagnetic interference that was being picked up by another part of my circuit. I attempted to simulate it and it looked like it would do the job even though the inductor used is a bit lower value than the 10uH ones in the datasheet.The only change I made was to add that filter, which is comprised of L2, L3, C1, and C4.The only thing I can think of is that these filters have a peak near the upper frequency range, and perhaps the peak with this one was too great and that is causing the overcurrent protection on the amp to kick in, but this is happening even if I turn the volume way down, which I would assume would make it work if that were the case.Any suggestions would be appreciated.The only thing I can think to try would be to remove the inductors and jump across them, but I don't have a heat gun to do that sort of rework on surface mount components. I'm going to put my scope on there and see what I see with and without a speaker attached and report back.

author: Starlord
author_rank: Frequent Contributor
timestamp: August 05, 2016, 09:53:36 pm
content: Okay, I put the scope on it, and I'm seeing a 60Vpp spike every 1.5s. If I attach a speaker it becomes 70Vpp. The input is 12V, so normally the output should be 24Vpp at most.So it seems like perhaps there is a fault condition going on here. I'm not certain, but page 16 of the datasheet has an image showing >1.4s above an image of the fault, sdz, and mute signals and that may be indicating that fault will remain low for at least 1.4s, and then as I have it connected to sdz, the fault condition is cleared after that amount of time.But why the amplifier is seeing a short even with no speaker connected, I have no idea.

author: Andy Watson
author_rank: Super Contributor
timestamp: August 05, 2016, 10:21:47 pm
content: The values of L and C given in the datasheet give a resonant frequency that ismuchlower than the PWM switching frequency. However, L=2.2\$\mu\$H and a C of 100nF gives a resonant frequency of 340kHz - i.e close to the switching frequency.Also, have you heeded the warnings about ensuring that the components, especially the inductors, can cope with the current? If the inductor is saturation it will lose most of its inductance.

author: Starlord
author_rank: Frequent Contributor
timestamp: August 05, 2016, 10:35:50 pm
content: Quote from: Andy Watson on August 05, 2016, 10:21:47 pmIs that bad? I'm guessing it is. But when I asked here previously what values to select, nobody suggested that a resonant frequency near the switching frequency was something to watch out for.Is this something I can solve simply by using a larger capacitor? Say, 1uF? My intuition tells me that would either increase or decrease the resonant frequency by 10x to get it away from the switching frequency and I can test that easily enough.QuoteYes, the inductor I've used is rated to 3A:http://datasheet.octopart.com/IFSC1515AHER2R2M01-Vishay-datasheet-13160403.pdfAnd with a 12V input and 2 ohm load minimum, I don't expect to go above that. Also my supply is a battery and has a 2-3A current limiting circuit in it. But if there were an issue that arose from that, I can always lower the volume a bit to keep it within the limit.

author: Starlord
author_rank: Frequent Contributor
timestamp: August 05, 2016, 10:52:25 pm
content: Found an LC resonance calculator:http://www.daycounter.com/Calculators/LC-Resonance-Calculator.phtmlAt 2.2uH (2200nH) and 100nF (100000pF) it says the resonant frequency is 339KHz, which matches with what you said, so I know the calculator is working.And if I change the capacitor to 1uF (1000000pF) it says the resonant frequency is 100Khz. So my guess that it would change by 10x was off by a bit.On the other hand, I could change the capacitor to 10nF to get a resonant frequency of 1Mhz. But I suspect that that would be the wrong way to go, since I am trying to attenuate high frequencies.

author: Starlord
author_rank: Frequent Contributor
timestamp: August 05, 2016, 11:02:48 pm
content: Just found this tutorial on resonance with an inductor and capacitor in series (which I have in my circuit, with the cap in series with the inductor and ground):It says that in resonance the capacitor and inductor in series look like a short. So that could well explain why the amplifier is shutting off.Only question is whether changing the resonance to 100KHz would avoid this problem, or if I should lower it to say 50KHz, just above the sampling frequency of the audio, or if I should go higher to 1MHz?It occurs to me I should probably check and see what TI's inductor and capacitor combination's resonant frequency is...Hm... well assuming I put the correct values into the calculator... 10uH (10000nH) and .68uF (680000pF) it says the resonant frequency for TI's suggested components is 61KHz.That would imply I might want to increase my capacitor value to 2.2uF to get the resonant frequency down to 72KHz with my 2.2uH inductor.

author: Starlord
author_rank: Frequent Contributor
timestamp: August 05, 2016, 11:20:46 pm
content: Well my simulator says there would be a 12db peak at 82KHz and a -86db drop at 10MHz with a 2.2uF cap in place.While for 1uF caps, it says there's a 12db peak at 119kHz, a -19db drop at 340KHz (switching frequency), and a -79db drop at 10MHz.As I already have 1uF caps in my BOM and I think I have some on hand, I guess I should try those first. It seems like they ought to do the job.Also I like that the simulator is giving me results that match up with the calculator. That tells me my simulation is probably accurate!

author: Starlord
author_rank: Frequent Contributor
timestamp: August 06, 2016, 08:59:57 pm
content: Well, after switching to 1uF caps I do finally get audio, and all the high frequency noise is now gone:And here's my data line that also used to have tons of noise on it:There's just two problems. First, my audio now seems to sound "thinner" than before. Less bass. I wonder if perhaps this has something to do with the size of the capacitor I'm using?And second, the audio is still cutting out. Only occasionally, but obviously not good. It seems to cut out at consistent points in a song, though I can't say if those are the points which are louder or have more bass or treble. I think I may have to increase the capacitor to 2.2uF to lower the resonant frequency some more. That would put it near where the default components had it set.Unfortunately, I'm guessing this will also remove even more bass from my audio.And that leaves me in a predicament, because I assume the only ways to solve this are to either use larger inductors so I can use smaller caps while still keeping the resonant frequency low, OR, I need to increase the amplifier clock frequency.I'm thinking if I went back to using the 0.1uF caps, but bumped up the frequency of the amplifier from 400KHz to 1.2MHz, that I might be okay. Then again, that is only a 3x increase, and if my resonant frequency for the 1uF caps is 100KHz and the amplifier frequency is currently 400KHz, than the resonant frequency there is 4x lower than the amplifier frequency, but it was still causing the amplifier to cut out on occasion. With a 0.1uF cap the resonant frequency was 340KHz which is only 3.5x lower than an amplifier frequency of 1.2MHz.If I bumped the amplifier frequency up to 1.2MHz and the cap up to 0.22uF, the resonant frequency would be 229Khz. That would be 5.2x lower...By default TI's 61KHz resonant frequency is 6.5x lower than the amplifier clock though... Hm.Anyway, no matter how I slice it, it seems like in order to resolve this I will have to get yet another prototype made, which sucks. That's gonna waste another 3 weeks.I'd appreciate some feedback on this. Am I thinking along the correct lines here?

author: Starlord
author_rank: Frequent Contributor
timestamp: August 07, 2016, 01:10:28 am
content: So I just realized I made an error earlier when I said I thought the capacitor formed a low pass filter. I meant to say high pass filter.But in the capacitor's present location it should be forming a low pass filter.So I don't really understand now why it seems like I have a lot less bass in my output. I thought it was the fault of that capacitor, because I thought I had a high pass filter formed with that and maybe the resistance or impedance of the amplifier output, or maybe the resistance of the inductor, and I thought someone had mentioned being wary of that when selecting my capacitor, but I can't find any reference to anyone having said that, and I don't see a high pass filter here.Which means I'm not sure where to go from here. Unfortunately I don't have any 16V 0603 0.01uF caps on hand to test those, or any 2.2uF caps to see what going the other way will do. I'd hate to waste three days waiting on parts form Digikey only to find out that they don't help. Though I suppose I do still have that issue of the amplifier shutting down that I have to deal with.

author: Starlord
author_rank: Frequent Contributor
timestamp: August 07, 2016, 08:04:45 pm
content: Does anyone have any suggestions or insights into this? I'm not sure what to do at this point besides randomly trying different component values until I find one that works.

author: voltz
author_rank: Frequent Contributor
timestamp: August 07, 2016, 08:24:24 pm
content: Different angle on this.Rather than the output filtering, try checking the power rails while its popping. 1.5 second intervals sounds very slow and that would suggest a condition called 'motorboating' which is caused by bad power supply de-coupling. Make sure those power rail caps are correct in value and use your scope (high voltage range of course) to see if the rails are stable.

author: StillTrying
author_rank: Super Contributor
timestamp: August 07, 2016, 10:35:22 pm
content: Quote from: Starlord on August 05, 2016, 11:02:48 pmPerhaps there's more going on than just the resonant frequency of the L and C here.Using lower values of L and higher values of C to make up the resonance value will mean a lot more of the digital edgegets throughthe L, to beshorted outby the C.There could be a good reason why they use 10uH on the data sheet, - about 5 times less current spike on the switching edges.Well it's a theory!

author: Circlotron
author_rank: Super Contributor
timestamp: August 08, 2016, 01:55:24 am
content: Yeah, I'd definitely try a higher value of L rather than C. The peak inductor currents may be going off the map.

author: Starlord
author_rank: Frequent Contributor
timestamp: August 08, 2016, 08:23:20 am
content: Is it possible that changing the switching frequency from 400KHz to 1.2MHz could help here?http://www.daycounter.com/Calculators/LC-Resonance-Calculator.phtmlAt 2.2uH (2200nH) and 100nF (100000pF) which is what I've got on there now, this calculator says the resonant frequency is 339KHz.I assume that the switching frequency being so close to the resonant frequency is what was causing the amplifier to shut down before. When I changed the cap to 1uF, the resonant frequency dropped to 100KHz, and it started working. But it also started shutting down on occasion.If the problem now is that all the switching current is flowing through the cap because the cap is too large relative to the inductor, then maybe if I went back to a 100nF cap, keeping the same 2.2uF inductor value, but tripling the switching frequency of the amplifier instead to get it away from the resonant frequency of my filter, the switching current shorted to ground through the inductor and cap would be reduced sufficiently to fix it?

author: CJay
author_rank: Super Contributor
timestamp: August 08, 2016, 08:58:25 am
content: I may be being really dumb here and can't be bothered to go back and read the other threads related to this but why didn't you use the recommended values in the TI datasheet?Particularly the one in Fig29, Typical Application Schematic on page 21?Given that the minimum load spec for the amplifier chip you're using is partly determined by the output filter that would seem to be a very sensible thing to do no?Also, have you checked the status of FAULTZ while this 'popping' occurred?

author: voltz
author_rank: Frequent Contributor
timestamp: August 08, 2016, 09:38:24 am
content: I doubt this fault has anything to do with switching frequency or output filtering for that matter. Stick to the original TI spec sheet as CJay says.Have you checked your power rail filtering capacitors for correct values yet? What power supply are you driving the amplifier with, and it is capable of delivering high enough current. Scope the rails for excessive V drops.

author: StillTrying
author_rank: Super Contributor
timestamp: August 08, 2016, 09:47:18 am
content: Quote from: Starlord on August 08, 2016, 08:23:20 amYes, if I've simulated it closely enough.Edit: You might not have to change the cap right down to 100n, because at the higher Freq a lot less of the switching gets through the L.

author: Starlord
author_rank: Frequent Contributor
timestamp: August 08, 2016, 10:08:48 am
content: Quote from: voltz on August 08, 2016, 09:38:24 amWhy do you doubt that?And if you doubt that it has anything to do with the output filtering then why suggest I stick to TI's suggested values?QuoteThere's a schematic in my first post showing which values I chose. I believe the values I chose are correct.QuoteA 12V lithium cell pack rated for 3A output.This is not the first prototype of this board by the way. I have had several prototypes. I have run some of them with a 2A wall adapter. They all worked fine, until I added this filter on the output. In fact the only real difference in the design from the last working version and this one, is the addition of this filter. I did have to shift the amplifier half an inch on the PCB to make room but I really don't think that is what suddenly caused this problem.Also, there is the fact that changing the output caps from 0.1uF to 1uF made the amplifier go from not working at all, to working 95% of the time. So if the filter is not the cause of the problem, it's sure doing a heck of a job of pointing fingers at itself.

author: voltz
author_rank: Frequent Contributor
timestamp: August 08, 2016, 10:34:03 am
content: Quote from: Starlord on August 08, 2016, 10:08:48 amBecause the RC values you are adjusting in the output filter are in no way related to cycle times of 1.5 seconds. It just doesn't add up.QuoteBecause the TI output filtering values have been tested by TI and should work as is. The fact you have a fault with the correct TI recommended values suggest a fault elsewhere?QuoteYes and have you checked the values you have actually fitted are correct. And have the correct polarity.QuoteIndeed. My suggestion was to rule out the power supply and filtering as an issue before diving into changing output filter values, you shouldn't need to and may save you timeThe 1.5 time interval is key here i think.

author: Starlord
author_rank: Frequent Contributor
timestamp: August 08, 2016, 10:59:20 am
content: Quote from: StillTrying on August 08, 2016, 09:47:18 amI'm not super familiar with LTSpice, and I don't really understand how this simulation works, but I loaded it and hit the run button and got a scope window and probed around the resistors on the three schematics and I'm not sure what I'm seeing exactly, but it looks like a signal which is being attenuated over time.I also tried probing the inductors, and I got something that looks more useful. A graph of the current over time. And I can see that the graphs for the suggested 10uH inductor and 680nF cap, and for the 2.2uH inductor and 1uF cap at 1.2MHz are similar, at least in the average amount of current at each point in time. The 2.2uH spikes higher at the start (4.2A vs 1.8A) and seems to oscillate faster though.And at 400KHz, the 2.2uH inductor and 1uF cap spike at 5.5A.Still, 4.2A seems like an awfully high spike and that's not much lower than 5.5A, so I tried the 0.1uF cap value that I originally had in the circuit. And with a 1.2MHz switching frequency, I see that it now spikes at a much more reasonable 1.8A. While at 400KHz with the 0.1uF cap... holy crap! It spikes at 8.4A and barely lets up, staying over 5A for the rest of the graph. That might explain why the amp was immediately going into over current and staying there until I changed that cap.So it looks like I might be able to fix this just by putting the 0.1uF caps back in place and cutting a few traces... except the traces are underneath my QFN package.But if all I need to do is change the switching frequency, that would be fantastic! It just sucks that I need to wait another three weeks for a new prototype for such a minor change. But it's either that or invest in a hot air rework station and attempt to remove the chip, cut the traces, make new connections, andavoid electrocuting myself.

author: Starlord
author_rank: Frequent Contributor
timestamp: August 08, 2016, 11:22:05 am
content: Quote from: voltz on August 08, 2016, 10:34:03 amhttp://www.ti.com/lit/ds/symlink/tpa3131d2.pdfLook at the timing graph on Page 16. The 1.5s I believe is how long FaultZ pulls SDZ low for when a short is detected. It then auto resets, and shorts again.QuoteI'm not using TI's recommended values for the output filter. I used a 2.2uH inductor and 0.1uF cap instead of the recommended 10uH inductor and 680nF cap. My selection didn't work at all, so I changed the cap to 1uF and it started working, sort of.I didn't use TI's recommended value because space on the PCB was limited and I wanted to keep costs down. I used a small 2.2uH inductor with the right current handling capability on a 5V switching regulator elsewhere on the board, so if I could use the same one here that would be ideal. I ran simulations on the design, and it seemed to be okay. At least, the bode plot showed the frequency response was attenuating the high frequency noise sufficiently. And I didn't see a much larger spike in the graph than I did with the recommended values.But I never checked the current through the inductor and capacitor to ground because I didn't know it might be an issue, nor do I know know. But that simulation the other fellow posted for LTSpice tests for that, and if I'm reading it right then it explains why the initial values I chose (2.2uF and 0.1uF) when combined with the switching frequency of the amplifier (400KHz) were causing it to shut down. I believe what I'm seeing is that the amplifier would see a dead short to ground at the switching frequency.However, if I increase the switching frequency to 1.2MHz, then the dead short goes away.The dead short also goes away if I keep the switching frequency at 400KHz and bump the capacitor up to 1uF, which is what I did. Except, it doesn't go away entirely. The first few nanoseconds on that graph show a significant current spike. So I'm guessing somehow that's responsible for the amplifier shutting down on occasion with the 1uF cap.But like I said, the simulation seems to indicate that if I just bump the frequency up to 1.2MHz then everything should be hunky-dory. The graph with those values looks similar to the recommended values, and my other simulation with the bode plot shows that those values should work well enough to filter out the high frequency noise from the switching and above. It's -21db at the switching frequency of 1.2MHz.QuoteWell I can't check the ceramic caps once in the circuit, but the large capacitors are correct and the right way round.

author: StillTrying
author_rank: Super Contributor
timestamp: August 08, 2016, 11:26:58 am
content: Forget about the switch-on spikes.Green is the current through the LC reaching 1.6A, with 400KHz, 2.2uH, 1uF.Blue is the current through the LC reaching 0.8A, with 400KHz, 10uH, 0.68uF.Red is the current through the LC reaching 0.5A, with 1.2MHz, 2.2uH, 1uF.IfI'm doing it right, some of these currents will be higher if the L saturates on large signals.I don't know why the 6R load doesn't provide enough damping on the data sheet's recommended values for the stereo version, it justs gives a box labeled Filter for the mono version.Have you tried scoping both ends of the output at the same time, you might be able to catch one side giving up for a period.The 1.4 seconds is something to do with page 16.

author: voltz
author_rank: Frequent Contributor
timestamp: August 08, 2016, 11:39:50 am
content: I see. I had not read (probably missed it) that you had a constraint with the selection of your inductor filtering. Thats important. Good luck!

author: Monkeh
author_rank: Super Contributor
timestamp: August 08, 2016, 11:48:58 am
content: Raising the switching frequency of a design which already misbehaves in the RF world is not the way to go. It's likely to cause more issues, which you may or may not pick up on.Do yourself a big favour and find room for 10uH inductors.

author: StillTrying
author_rank: Super Contributor
timestamp: August 08, 2016, 11:50:54 am
content: You might have to put 2 small inductors in series, even if you have to stand them both up in an 'A' shape.

author: Starlord
author_rank: Frequent Contributor
timestamp: August 08, 2016, 12:56:37 pm
content: Quote from: Monkeh on August 08, 2016, 11:48:58 amThe simulations indicate a -21db drop at 1.2MHz and it only gets better beyond that. What reason do you have to believe that this will cause new issues? At the present time, with 2.2uF inductors and 1uF caps, even though the amp is restarting on occasion, I'm not seeing any significant noise from it on my data lines, nor any noise when I probe the amplifier output itself. I was seeing tons of noise before I put the filter there. So it's clearly doing its job.That said, I'll probably try both variations this time around, and see which is better.

author: Monkeh
author_rank: Super Contributor
timestamp: August 08, 2016, 01:07:18 pm
content: Quote from: Starlord on August 08, 2016, 12:56:37 pmI haven't seen your layout and I know full well that you don't know RF design principles - intentionally operating in MW is asking for trouble.Simply trying to save you time and money. Find the few bare millimetres the recommended filter requires.

author: Starlord
author_rank: Frequent Contributor
timestamp: August 08, 2016, 01:55:29 pm
content: Quote from: StillTrying on August 08, 2016, 11:26:58 amWhy did you choose 6R for the load? Did you just pick that because it was between 4 and 8?And if I change R to 2, to emulate two 4 ohm loads in parallel, and I probe one of the inductors, is the current I'm seeing after that initial spike what I might expect to see passing through the inductor in that use case? In other words, if it's telling me the inductor is seeing 1.9A, am I probably safe with a 2A rated inductor with a 2.3A saturation?

author: StillTrying
author_rank: Super Contributor
timestamp: August 08, 2016, 03:17:40 pm
content: Yep, the 6R was just a guess, you might be confusing me with someone who knows what they're doing.Here I've changed the loads to 2R, and modulated them all with a 1kHz sine to give near max power which seems to be about 32W. (Hold the 'ALT' key while over the load and click to see the Watts.)The peak volts across the loads is +-11V.The peak current through the loads and inductors is +-5.5A, which might be enough to saturate the inductors ,I dunno.The Watts in the loads at the peaks are 58 Watts.How useful this is I don't know, but by looking at the current through the load, the 400KHz, 2.2uH, 1uF version looks the noisiest.

author: diyaudio
author_rank: Frequent Contributor
timestamp: August 08, 2016, 07:17:23 pm
content: Quote from: Starlord on August 05, 2016, 08:56:33 pmClass-D amplifier LC filter is an anti-aliasing filter used reject frequencies above nyquist. 100Khz ?The filter core used is critical, a core with low permeability that allows wide band frequencies is almost always used, if that's not correct nothing will work.Note as a reference see this thread. User @Eva is just a freaking master at this topic.http://www.diyaudio.com/forums/class-d/215657-air-core-toroidal-inductor-class-d-amp-output.html