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.

Glitching in the TPA3125D2

Other Parts Discussed in Thread: TPA3125D2, TPA3106D1, TPA3125D2EVM, TPA3123D2

I am using the TPA3125D2 in exactly the BTL configuration depicted in Fig 30 of the 2008 datasheet. Supplies are perfectly quiet at 24V. I have an additional 20K ohms in series with two audio inputs that are being summed at Rin (return is common at Lin). \SD is tied to 24V; Mute is tied to Gnd. Gain0/1 are both at Gnd for now, but can be switched under firmware control.

I am getting a noise burst at the output every 276 mSec, lasting 52 mSec each. It seems to be white noise, above normal audio frequencies but rail-to-rail and thus audible (deafening, actually) at the output. The board is controlled by a PIC microcontroller with which I have extensive experience, and holding the microcontroller in reset has no impact on the noise, so any interaction with the firmware or other sections of the board seems to be eliminated.

Vclamp is sitting at about 10.6V, and droops by about 200 mV during each noise burst. Not sure if this is a cause, effect, or some other symptom.

Where do I go next?

  • Hi, Steve. Thanks for using the TPA3125D2 in your design.

    Were you able to measure the power supply ripple at the amplifier itself? Can you please share a plot of this? I'm curious if the amplifier is having some issues with its PVCC, because VCLAMP relates to VCC, and you're seeing effects on it.

    Are you able to measure these noise bursts on an oscilloscope and post the results here? Try to get the signal before and after the output filter.

    I assume this is your own schematic and layout. It helps if you can share them. One thing to check in your layout is that the 0.1 µF ceramic capacitor for PVCC coupling is placed as closely to the PVCC (L and R) pins as possible. The same applies for the 0.1 µF and 10 µF capacitors coupled to the AVCC pins. We see very strange things happen when this isn't the case. Check to make sure your 470 µF bulk capacitors are rated for well above 24 V. I suggest 50 V rating in case there is power supply ripple we haven't measured yet. Make sure the bootstrap caps are placed as closely as possible to the switch nodes and bootstrap pins.

    Are GAIN0 and GAIN1 asserted to ground by your microcontroller, or are they actually tied to ground? A part in this line of products called the TPA3106D1 experiences issues when SHUTDOWN goes low, and then GAIN0 and GAIN1 are driven from an external source (such as a microcontroller). Since your \SD is tied to your supply, I have to wonder if something similar is happening, because if \SD goes low with your PVCC, and GAIN0 and GAIN1 are driven by the microcontroller running off a separate power rail (I assume), things could get funny the next time you apply PVCC. See this forum post and this Application Note for more on this error. I am not sure if it applies here, but it sounds similar.

    I hope this helps!
    Matt

    • Were you able to measure the power supply ripple at the amplifier itself? Can you please share a plot of this? I'm curious if the amplifier is having some issues with its PVCC, because VCLAMP relates to VCC, and you're seeing effects on it.

    Any supply ripple is really small, order of millivolts at most.

    • Are you able to measure these noise bursts on an oscilloscope and post the results here? Try to get the signal before and after the output filter.

    Yes, as described earlier.

    • I assume this is your own schematic and layout. It helps if you can share them.

    It accurately matches the sample schematic given in the datasheet, except for the previously described summation of two audio inputs via 20K resistors.

    • One thing to check in your layout is that the 0.1 µF ceramic capacitor for PVCC coupling is placed as closely to the PVCC (L and R) pins as possible. The same applies for the 0.1 µF and 10 µF capacitors coupled to the AVCC pins. We see very strange things happen when this isn't the case.

    the only way to get them any closer would be to move them up onto the legs of the part. I'm well-experienced with RF, UHF, and microwave layouts where even a via is too long; my layouts tend to get into trouble with the manufacturability boys for being too tight. The caps here are 0603s, right on the pads of the DIP leads.

    • Check to make sure your 470 µF bulk capacitors are rated for well above 24 V. I suggest 50 V rating in case there is power supply ripple we haven't measured yet. Make sure the bootstrap caps are placed as closely as possible to the switch nodes and bootstrap pins.

    This is one slipup on my part. The local cap was insufficiently rated, and has been lifted. The bulk capacitance is at the power supply, perhaps an inch of trace away.

    • Are GAIN0 and GAIN1 asserted to ground by your microcontroller, or are they actually tied to ground? A part in this line of products called the TPA3106D1 experiences issues when SHUTDOWN goes low, and then GAIN0 and GAIN1 are driven from an external source (such as a microcontroller). Since your \SD is tied to your supply, I have to wonder if something similar is happening, because if \SD goes low with your PVCC, and GAIN0 and GAIN1 are driven by the microcontroller running off a separate power rail (I assume), things could get funny the next time you apply PVCC. See this forum post and this Application Note for more on this error. I am not sure if it applies here, but it sounds similar.

    Gain0/1 are indeed driven by microcontroller outputs. However, the microcontroller supply is itself derived from the 24V supply that feeds the TPA3125.

    Thanks for taking the time for a detailed response. Any other ideas?

  • My Service Request # 1-821703757 has received no response other than to direct me back here. Any chance of any further support for this issue?

  • Hi, Steve. I'm sorry for not writing back earlier. I am looking further into what might be the root cause of this. I intend to reply back with more information today.

    Matt

  • Hi, Steve. I'm going to need some more information to help you further. Can you please provide the following?

    1. An oscilloscope plot of the voltage at the BYPASS pin of the amplifier
    2. An oscilloscope plot of the bursting output waveform you're seeing
    3. A part number for the capacitor attached to the BYPASS pin (or just a description: X5R, X7R)
    4. Your schematic/layout. Even if it's just the section with the TPA3125D2 (I don't want you to reveal anything you're uncomfortable revealing), it will help tremendously. I understand it's similar to the application circuit in the data sheet, but I have to admit I'm confused about the 20 kΩ input resistors you mentioned. I'm a visual thinker, so your schematic will help me make sense of it.

    I hope I can help you further on getting this information!

    Matt

  • I have prepared images of hte schematic and layout of the relevant section and captured them in a Word doc, but I can't find any way to attach them here. The "Paste from Word" button doesn't work for the pictures, and I don't see anything to attach a file. How?

  • I'm getting pressure from my client to get this resolved, and still can't find any way to paste anything in here. The "Paste from Word" button doesn't work, nor do any of the normal Windows keyboard shortcuts to cut and paste.

  • Hi, Steve. I'm sorry I didn't reply when you first wrote. I'm also sorry your client is pressuring you at this point. I'll do my best to help you.

    Attaching a file is done with the small paperclip icon in the text entry menu. If you hover over it, it will display "Insert File". It is immdiately left of the "Past from Word" button. A menu will pop up giving you the option to insert a file. It may take a few seconds to load. Please let me know if this gives you any trouble.

    Matt

  • Thanks, Steve. This helps. Are you able to provide the other data I'm asking for below? I have a suspicion this problem has to do with the BYPASS cap, and the waveforms I'm asking for will help me determine if this is correct.

    1. An oscilloscope plot of the voltage at the BYPASS pin of the amplifier
    2. An oscilloscope plot of the bursting output waveform you're seeing
    3. A part number for the capacitor attached to the BYPASS pin (or just a description: X5R, X7R)

    Regards,
    Matt

  • I'm having trouble getting those scope plots, because connecting the scope to the PC also ties the system Gnd to PC Gnd which is line Gnd (standard desktop PC). I'll have to set up to do the scope capture and freeze it, then transfer to the PC. My scope is fully floating, as is my policy. Yes, I'm well aware of the possible hazard. Not to start any religious wars, but my position is that if you don't understand electronics enough to safely float a scope, you don't have any business using one.

    I have done a bit of further exploration. With the inputs completely disconnected, the TPA3125 has a continuous rail-to-rail 290 KHz square wave output. Lifting R661A and R662A so there's no path to earth or line (the design includes 5KV of isolation to line and earth, other than these two earth connections) does not change the noise. Connecting either audio input to the speaker output of my laptop (with no audio coming out) makes the noise come in bursts as described above, still a 290 KHz square wave during the "on" time. Disconnecting the laptop's wall-wart, so the laptop is itself fully floating, resumes continuous noise.

    There's 10K across the TPA3125 inputs. Does that need to be significantly lower? Do I need to add low-impedance terminations to the inputs? Not shown in the datasheet; and to what would I terminate them?

    Bypass is absolutely quiet. The various Vcc pins show a small amount of noise with the noise bursts, but that seems to be an effect rather than a cause. The final output stage slapping the rails would surely inject some noise back onto the supply rails. The only other signal that moves is Vclamp, which rests at about 10.6V, and drops sharply by about 200 mV during the noise bursts.

    I'm suspecting rather strongly that I need some termination on the inputs, but I'm not sure just what's called for here.

  • Thank you for the additional details, Steve. I have to think about how these affect the noise problem you're having.

    Have you observed this on more than one TPA3125 IC? If not, are you able to use another one and see that this phenomenon still occurs?

    Best,
    Matt

  • I have a set of 8 boards made up with identical configurations. All that I have checked (probably at least 5 or 6 if not all 8) show identical problems. However, I have characterized it a bit further.

    I did indeed have a power supply problem (purchased power supply). On four of the eight units, the power supply was alternately going into thermal shutdown, even though total system current (even under worst case inrush conditions) should be well under half the supply's rating. So we're looking at changing that supply in the design, of course. Meanwhile, I'm continuing checkout using a robust and trusted bench supply to provide 24V. Now I get a continuous hiss from the TPA3125, with the inputs open except for the 10K shorting resistor shown on the schematic.

    Looking at it on the scope, I see a full rail-to-rail swing square wave at about 295 KHz. I presume this to be the class-D modulation waveform. Greatly attenuated though still visible after the output filter.

    Looking past the output filter, there are bursts of noise repeating at a 300 Hz interval. The 300 Hz repetition rate is what I hear audibly. Each burst is a rapidly decaying sinusoid at 54 KHz. There is nothing else in the system that should be running at either of those rates.

    Does that provide any more clues?

  • Hi, Steve. Thanks for the clarification.

    You are correct that the rail-to-rail swing square wave at 295 kHz is the switching output of the class-D. (Page 4 of the data sheet confirms this.) Again, if you can capture this scope plot and post it here (using the "Insert image" button, immediately to the left of that paperclip button), it will offer so many insights into what you're seeing. That way I can see just how visible the switching still is after the output filter.

    I still need to understand and comment on a few things about the design.

    1. Why did you choose to use a sole 220 µF bulk capacitor for your power supply pins? Our reference design calls for 2 × 470 µF bulk capacitors in parallel (added).
    2. I am not a fan of using so few capacitors around your power rail pins, especially when the DIP package of the TPA3125D2 requires greater trace length to cover the power rails. In particular, I recommend your design use more ceramic capacitors for the power rails, and very close to the power pins themselves. For instance, your right power supply pin has zero ceramic capacitors in front of it, but plenty of trace before it. Even if the supply itself is clean, weird things could pick up along the trace. I know what the data sheet reference design shows, but I think it could use some touching up with more ceramic caps. Please have a look at what we've done with the evaluation module for this part. We have dedicated ceramic capacitors for every power pin. (We put the ceramic capacitors as close to the power pins as possible, usually on the bottom side of the board.) 1016.TPA3125D2 EVM Schematic.pdf I can't guarantee this will solve the error, but I think it could help. The part can do strange things when its supply pins don't have proper ripple control.
    3. I am still not sure what is happening with the TPA3125D2 left input and output in your design. (You said, "Return is common at Lin," and I don't know what you meant there.) What is pin 1 on headers J660 and J661? Where does that pin go and what is it used for? LIN is solely an input, and it is looking for an audio signal input. Are you not using it for audio? What is pin 1 on header J662? Why does the right output channel get two pins on your speaker connection? If your intent is to use solely the RIN input channel, then LOUT should not be connected to your speaker output (nor should it have L633 and C665 following it), because it won't do anything (LOUT is solely the amplified LIN), and LIN should be connected to (only) ground through the 1 µF ceramic capacitor. 

    Sorry for the barrage of questions, but these are things that really stuck out at me upon review of your schematic and layout.

    Regards,
    Matt

  • I like your idea of bypass caps right on the pins, on the opposite side of the board. I'm used to working up in the MHz and GHz realms, and have done lots of designs like that. Even heard of (but never actually tried) sticking an 0603 cap into an unplated hole in a 62 mil thick board going right to the ground plane on the other side, with a part pin sitting right on top of the cap - can't get much tighter bypassing than that!

    That said, I wasn't anticipating anything quite so fussy at audio frequencies. However, the sharp edges of the class-D switching could certainly stir things up. I'll try some tighter bypassing when I get back to the lab midmorning tomorrow (EDT).

    The inputs are a pair of mini-phono jacks, which have two connections for the ring; hence the double pin shown on the schematic. The two inputs are additively mixed, except that one has a mute clamp which can be operated by firmware. The inputs are not ground-referenced except via the 1 meg ground resistors. The wiring is exactly that shown in the datasheet for the BTL configuration, using the two channels in push-pull to produce a combined 20W into a single speaker, which is also connected via a mini-phono plug. Does that help explain things a bit better?

  • I'll look forward to seeing your test results. Switching audio amps are surprisingly fickle about tight bypassing.

    Is that to say your tip and ring route to pins 2 and 3 in J660 and J661? Or do you have a TRRS connector with a tip, ring, ring, and ground, and ground doesn't attach? (I'm using this terminology.) Am I to read that the sleeve (ground) of your phono connection connection touches pin 1 on each phono header? Please tell me how pins 1, 2, and 3 connect to your tip, ring, (extra ring?,) and sleeve, and which mono/stereo scheme you're using (following the terminology I linked).

    Thanks,
    Matt

  • Sorry about the terminology mixup. Inputs are mono, just tip and sleeve. Neither is referenced to Gnd except as shown.

  • I hate to be so particular, but please tell me how tip and sleeve connect to the headers. Something like "Tip = pins 2 & 3, sleeve = pin 1" works just fine. I'm still not getting that.

    Additionally, I read your last post as you are not using LIN as an audio input, and instead the (single, unbalanced) audio signal on mono (from either source, summed), enters only RIN. Can you please confirm this? Or are you using sleeve as something besides ground? What signal is on tip and what signal is on sleeve?

    Thanks,
    Matt

  • Some progress, mostly sideways....

    Tip is pins 2 & 3 as shown on the schematic. Sleeve is labeled 1.

    Neither tip nor sleeve is Gnd-referenced, and thus the incoming signal is fully differential (although admittedly the sleeve is unlikely to wiggle around as much as tip). I may have to give that some thought. Both sides are fully AC-coupled to the TPA3125, though.

    I've been blithely going along assuming someone (that would have had to have been me) actually did the passband calculations on the input filter. Time to check assumptions....hmmm, 20K into 1µF doesn't leave much of an audio passband, does it? Peeling egg from face, I have changed the input resistors to 2K and the caps to 0.01µF. Also added 0.01µF directly across pins 4 & 5 (literally right on the pins).

    I have also added 1µF 50V directly across pins 1-20 and from 16/17 to the nearest available Gnd (trace between 3 & 7). That seems to have quieted things down a bit; it's actually quiet now with nothing plugged in. But I still get that "ticking" when I plug in external audio. And I can't hear any of the external audio at the outputs.

    What next?

    And thanks again for your patient help thus far!

  • Hi, Steve. I'm going to keep asking for it: a scope shot of your output waveform (especially now with no audio) will help enormously. In fact, I don't think I can solve this without it.

    When you plug in external audio, does it make a difference if only one input is plugged in? Try one, then the other, then both.

    Matt

  • Sorry to be so slow gathering data and getting those scope shots. I'm having trouble getting any kind of a stable scope display (and I've had a lot of practice at capturing transients etc.). I'm slowly working my way thru some things like the input cutoff frequency and the jack connections.

    At present the TPA3125 seems to be injecting some pretty impressive noise back into its inputs. I'm at least now able to make the output change by changing the input, but not in any way like it should.

    Can you give me some idea what the input impedance of the TPA3125 looks like, and if possible what sort of input structure is there?

  • I dug up an appnote on the TPA3125 (slou250.pdf) that suggests that the datasheet didn't give me quite the whole picture.

    The inputs are shown using RCA jacks rather than phono plugs. While not definitive, that at least suggests that the unit is expecting something more like a standard audio line input rather than a microphone or speaker type; that is 1K rather than 8 ohms. That alone would go a long way toward explaining why I'm never getting any audible output.

    In addition, I overlooked the 470µF series cap in the speaker output. This is probably less critical since I'm running it in a fully differential configuration, but I should still have some series capacitance there to block any DC.

    More subtly, the appnote shows two 2nd order filters in series on each output, hence two inductors and two caps in each output chain.

    I'm thinking that the first order of business is to get an audio transformer on the input, and step up the 8 ohm impedance I'm feeding it with, to more like 1K that it's expecting. That will also address any issues of breaking ground loops etc. I'll also add a cap in series with the output, although I don't think that's critical to getting the critter going.

  • Okay, you asked for it! <grin> Here come some scope shots, with descriptive text for each, if I can recall how to send a file with this. Everything is completely isolated from line and earth ground, and I'm working on a natural wood surface, so there shouldn't be any 60 Hz injection other than just inductive pickup from florescent lights etc. Have fun deciphering all this!

  • Hmmm...it doesn't look like the file uploaded, even though it originally said it did. Trying again....2867.TPA3125 Scope Shots.doc

  • Hi, Steve,

    Let me chime in here... There is something wrong with your circuit, or how you are trying to use it.

    I might suggest that you get a tpa3125d2evm to play with. That would help you get faster resolution as to where the problem is occurring. 

    The other thing I might suggest is reviewing the TPA3123D2 device (it's from the same family as TPA3125D2). The d/s (here) shows a BTL configuration in Figure 28. It's not terribly clear, but you need to feed a fully differential signal into the device when using it in BTL mode. No output series DC blocking cap is required in BTL operation - that's one of the main advantages of using a BTL-configuration.

    -d2

  • I like your suggestion of getting an EVM to play with. But I'm not sure I have the luxury of that much time, and more to the point, what's different between the circuit whose schematic and layout I uploaded earlier in this thread, and the EVM? Note that per earlier suggestions, I have added more bypassing, right on the pins, to no effect.

    I have asked several times now without response, what sort of input impedance the TPA3125 is expecting to see. I have concluded that it wants to see a much higher impedance than I was initially providing (more voltage, less current). So I will need to add a matching transformer, which will itself provide that fully differential input, and will also guarantee galvanic isolation. But I need to know what sort of impedance is desired. The inputs currently come from speaker outputs of other units, thus around 8 ohm impedance. But feeding in a signal from a siggen at 4Vpp only gets little chirps thru the audio amp, and it clips off, as shown in the scope plots I uploaded yesterday.

    So the two key questions at the moment are:

    1) What input characteristics does the TPA3125 provide, as in what impedance should I feed it with?

    2) Are there any relevant differences between my circuit / layout and that of the EVM?

  • Steve,

    The input of the TPA3125D2 is an op amp. On page 3 of the data sheet, it says the input can accept a voltage from -0.3 to 7V.  If you are driving it with significantly more, than you are going to clip the input like crazy, which would result in square waves at the output. Even with a smaller input signal, you're probably still going to clip the outputs due to too much gain. You could try jacking your phone or PC or other device designed to drive HPs into it, and it should play audio OK with that signal. Those are typically quite a bit less then 1Vrms output level.

    My only idea with the EVM is we know it works, and it could help speed you to a solution. If you order it today, it will ship out by Tuesday, and be to you by Thursday.

    -d2

  • Steve,

    I just checked, Digikey has one EVM in stock, and they can ship Monday, and it will reach you Tuesday if you do expedited shipping.

    -d2

  • I ran out to the local hobby electronics shop and found a couple of 8 ohm / 1K audio transformers to isolate the inputs, and that makes it much happier. Even feeding it with fully floating inputs, just touching one side of the line seems to make the TPA3125 go into some kind of overload / shutdown condition. But with the isolation, I can feed in a variety of inputs and get pretty good audio out. I still have a bit of work to do on bypassing and filtering, but the chip seems to be behaving as advertised now. Thanks for all the help.

  • Back to the old problem...

    I have now removed the hobby-grade transformer I was testing before and  installed the PCB mount input matching transformer I intend to use, and the problem of dropouts is back. Dropouts last a fraction of a second and repeat a couple times a second. During the dropouts, Vclamp jumps up about 200mV above its resting 10.4V. Surely that's trying to tell me something, but what?

    Returning to the hobby-grade transformer I was using for testing, the amp is happy again. Both are supposed to be 8 ohm to 1K audio matching transformers; they have nearly identical DC resistance on both inputs and outputs.

    With the hobby transformer (slightly bigger physically, evidently intended for a bit more power, or just not built as compactly), I can get good audio thru the system, although touching the TPA3125 side of the transformer goes back into the pulsing dropouts. With the PCB mount transformer, anything touching either side, even a fingertip touching any terminal of the transformer, kills the audio. And my fingertip is pretty isolated - I'm sitting in a synthetic chair, on an antistatic mat, with rubber shoes, and working on a natural wood table.

    What does it mean when Vclamp jumps up and the audio cuts off?

  • Another twist...

    I measured the output at the TPA3125 side of the input transformer, disconnected from the circuit with with input from the outside. The output voltage of the hobby-grade transformer is significantly higher than that of the PCB mount transformer. I have confirmed using a siggen that a higher input voltage (AC) suppresses the glitching better. This is backwards to what I'd have expected - I was thinking that I might somehow be overdriving the TPA3125 and causing its output protection to kick in.

    I note that the glitching I'm getting acts exactly like that described under "Short-Circuit Protection" on page 17 of the datasheet. But I have exactly the output topology shown in the datasheet for the BTL configuration, and the only connection to Gnd is via the filter caps right on the speaker terminals.

    Next????