TPA6120 Kit Mod Composite

Hi fellow experimenters.
This simple project unexpectedly turned into an educational experience for me, so why don't I share some of it.

I bought this amp as a kit from Ebay (the build photo below) as it looked inviting to be rewired into a composite which I wanted to make one day. Very good examples can be found here on DIYA and elsewhere. Design of the kit however included questionable approaches and was lacking such critical things as rail decoupling for opamps and the TPA6120. Those had to be added, along with an easy mod turning the supply filtering into CRC, adding input RFI filter and some other. The board is also wired so that only FET input opamps are suitable. My kit came with TL071 which I used for initial tests and then changed to OPA1641. The two areas where I experimented most were:
  • Ferrite beads in parallel with the output 10 Ω resistors as I wanted to reduce the output impedance;
  • Stability & capacitive load isolation.
They are of course interrelated. Here is the schematic of my amp:
TPA6120A2_COMPOSITE3.png


The legendary NwAvGuy showed his use of ferrite beads across the TPA6120 mandatory output 10 Ω resistor and measured increased distortion. But that was more that 10 years ago and he had used beads for power lines. I figured that manufacturing of ferrite mixes for beads for signal lines may have progressed since then and picked Murata beads NFZ2MSD131SN10 which they specify for audio signal lines with reduced THD compared to beads for power lines. HD is not the whole story of course when it comes to ferrites. I have read Purifi blog posts on the subject of hysteresis distortion in ferro-magnetic cores and a glimpse of what it takes to design feedback to conquer that. Such sophistication is beyond my ability but reduction of output impedance still seemed a worthwhile goal. So I set out to try and measure the ill effects if I could. At least I would know not to do it any more 😉. Air cores were out of question due to the very tight space on the board.

This study showed one possible THD measurement set up and striking results (30 dB difference!) that I thought I would be able to replicate even with my modest tool - the old horse EMU0404. Not so. My measurements of THD before the bead (TP1 on the schematic - feedback take off point) and after it (TP2 - the output) showed no meaningful difference at any frequency or signal level always hitting soundcard loopback measurement floor. Which is just to say I was not able to detect it not that there wasn't any. Standard SMPTE IMD measurement did not reveal any difference either.
Evidence of increased distortion in the bead emerged with CCIF IMD measurements. Even though the measured IMD levels were quite low (below -95 dB) there was consistency of lower IMD at TP1 at different signal levels. A couple of dB but nevertheless. The largest IMD difference between TP1 and TP2 I managed to detect was 5.5 dB in favor of TP1 (see graphs below). But hey, isn't it so that such difference is present also with air core inductors if the Q damping resistor is placed inside? I have not researched that but someone must have measured contribution to THD/IMD of the aircore coils with resistor inside.
1.png

Not being particularly keen on absolutely lowest THD numbers I am happy with what I've got - output impedance of ca. 0.5 Ω and hardly any (audible) HD. The only thing bothering me is the hysteresis distortion and whether I would be able to hear it some day. On the other hand, I guess most phones (and iphones) have a bead in their audio chain so I may have been already numbed by the beads' sound... But maybe qualities of ferrite mixes have really evolved enough and beads are not so objectionable any more? Are there other experiences/measurements around? I hope I have not sparked a general ferrite discussion🙂.

Stability.
Early on I had decided that gain of 2x would be plenty enough for this amp. I also wanted to retain the loop gain as high as I could at 20 kHz. TINA-TI suggested that the circuit (with modest speed opamps) might work even without additional compensation (phase margin a tad above 30° @ unity gain cross-over at 7 MHz, gain margin 8 dB). May be ok, but from what I have learned so far it felt marginal. I ended up with a simple but crude solution of C3 + Rg2.1 shunting opamp input from 1 MHz onwards. Key drawback - loop gain (and bandwidth) varies with the volume pot position since the opamp input is not buffered. For example, -3 dB upper bandwidth varies between ca. 400 kHz and 640 kHz with the lowest being at about mid position of the pot viper. I understand why rather intuitively but could not calculate it unfortunately.

Not perfect, but I can live with the mentioned effects since gain magnitude variation in the audio band stays below 0.01 dB at all pot positions, loop gain at 20 kHz is 54.5 dB at all pot positions while stability margins remain satisfactory - at unity gain cross over frequency varying between 2.75 and 3.5 MHz, PM is no less that 53° and GM no less than 17.8 dB. Tell me please if you see other drawbacks or potential risks in the chosen solution that I have overlooked.
Here the plots with pot at full volume:
Bandwidth and phase response.png


Finally, back to ferrite beads in the output with respect to capacitive load isolation. TPA6120 datasheet recommends output resistor (R5 in my schematic) to be at least 10 Ω to ensure stability. However, if a ferrite bead is added in parallel I found that it is beneficial to reduce the value of R5 because 10 Ω is not dumping enough the inductance of the bead to lower its resonant ringing with capacitive loads. Topping L30 has allegedly used 3.3 Ω (without any bead/inductor though) however they managed to include the resistor in the GNFB and had added a zobel. The 3.3 Ω value concurred with my simulator as the lowest permissible before oscillations would begin on fast transients even with small capacitive loads. I stopped at 4.7 Ω. Experimentally, I found that another dumping resistor R6 of 0.5 Ω in series with the bead is good to have. Not strictly necessary but it decreased the ringing further on higher capacitive loads. Here come scope shots with 10 kHz squarewave into 33 Ω load resistor in parallel with capacitors from 0 to 100 nF. It is very stretched IMO, I consider anything above 10 nF being rather unlikely in the headphones' world, but I will readily admit my ignorance here. As with IMD measurements, TP1 shows capture before the bead, TP2 - after. All measurements here without the input RFI blocking capacitor C1.
2.png

For the sake of experiment only here is also a 10 kHz squarewave with 1 μF load - a highly improbable case. Wave form on the right side shows wild (but well damped) ringing in case of insufficient damping R5 = 10 Ω and R6 = 0. The loop remains stable although TP1 wave form is looking ugly. The bead does its isolation job well!
3.png


The build photo where the original Ebay kit can still be recognized 😉 :
Untitled design.png


Happy experimenting to all!
 
  • Like
Reactions: robjordan
IMG_2754.jpeg


Seems to me what’s happening here is the system is slew limiting on the very fast rise fall times, and then the loop recovers so you then get an overshoot halfway up or down. The loop then recovers, and overshoots again at the top and bottom of the flat parts. Given the x time base (50us per division if I am reading this correctly), I’d say this is begging for some improved compensation. You could try removing C3 and then placing a 50-100pF capacitor from the output of U1 to its inverting input.

Ultra wide bandwidths and ultra fast rise/fall times almost always lead to problems and suboptimal sound. Keep rise fall times to no faster than 2-3 us and amplifier bandwidths to not more than 250-300 kHz - this latter limit merely to ensure the audio bandwidth is not out by more than 0.1 dB at 20 kHz. Keep in mind almost all digital material nowadays is brick wall filtered at a shade over 20 kHz and yet still sounds superb.
 
@Bonsai thank you so much for your considerations. Valuable as always.

I admit I have pushed the BW too much to about 1.2 MHz (note - this is without RFI cap C1). I had tried to put a cap from U1 output back to the inverting input as you suggest. That did not work well as I got notable overshoots in square wave response even with purely resistive loading. It took 100 pF cap and gain increase to x5 to get rid of the overshoots. The response to higher capacitive loading (1 μF) remained the same as in my own version. And in terms of BW I ended up in the same ballpark, too.

Here is something I have arrived at following your advice on sensible BW while still maintaining my goal for overall gain x2:
TPA6120A2_COMPOSITE3_2.png

I changed two things - increased C3 to 1 nF and added R7 1k. R7 appears to play an important BW limiting role, as well as the volume pot. With values shown and volume pot at max the new BW (again, without RFI cap C1) is ca. 230 kHz. ULGF drops from 3.5 Mhz to 2.8 Mhz but I only lose a fraction of a dB from LG @ 20 kHz. All good. I consider negligible the added resistor noise. The nastiness of square wave response with 1 μF load is greatly reduced, and of course response with all lower load capacitances improves too. With the volume pot position of 80% or lower, the square wave response at TP1 becomes clean even with 1 μF load albeit with rounded edges as BW shrinks to ca 140 kHz in the worst case when vol.pot is at ~50%.

Is the new BW not too low now given this response is without the C1 at the input? I suspect it may be and I have overcompensated. Regardless of the BW drop to 140 kHz the increase of gain magnitude variation in the audio band is tolerable as it still remains just below 0.1 dB. So, no issues here. Phase response linearity is suffering more with -5.5° at 20 kHz vs 1 kHz. Should I be concerned?

This is where I am now in my thinking. But I need to think some more before I open the amp box for rework anyway. One more question I have is - how to properly split the BW limitation between the RFI input cap C1 and the following composite stage? From better HP amp designs I have seen that C1 is sized to provide major contribution to BW limitation to the mentioned overall 200-300 kHz range letting the amplifier stage itself be BW limited at much higher level somewhere between 600-800 kHz.
I will very much appreciate also any other comments.

P.S.
I do not remember having seen anyone testing headphone amps with loads such as 1 μF. Professionally made headphone dummy load by Neurochrome limits the test load to 10 nF. OPA1622 (the opamp purposely designed as HP amp) specifies capacitive loading up to 1 nF only. I had tried the 1 μF load only out of curiosity and to see how well reality would match my simulations. To my relief both were indeed very close. Here I mean only frequency and waveform response as indirect indicators of stability margins. Distortion is not part of (publicly available) opamp spice models, AFAIK.