• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

My attempt to design of high performance composite headphone amplifier

Bamboszek

Active Member
Joined
Mar 17, 2018
Messages
181
Likes
306
Hello guys,
About half a year ago I decided to design my own high performance headphone amplifier. The idea came more from some kind of engineering challenge rather than serious need - my O2 was probably more than enough.
My designs considerations were pretty simple:
  • Challenge myself and check what lowest distortion can I archive
  • Decent power with ability to drive almost any headphones
  • Near zero output impedance
  • Safe for headphones, no DC at output and stability in any conditions
  • Relatively cheap and easy to build - no unobtainable, expensive or exotic parts
After a bit of reading, tinkering and simulations I settled with composite amplifier architecture. I've considered lot of solutions including discrete buffer, LME49600, numerous models of opamps, ADSL line drivers. Every solution had its pros and cons like price, stability, output impedance, DC characteristics, output power, minimum load resistance, complexity, power dissipation limit, temperature and so on.

Finally I decided to nest already very good TPA6120A2 inside feedback loop of another operational amplifier. At this time I'm using OPA1602 but want to experiment with something else like OPA1652 or OPA1656. Especially the last one seems promising but first I need better test equipment to analyze such small distortion levels.
TPA6120A2 is almost perfect candidate apart from one thing - stability. It is current feedback operational amplifier and its stability is not so easy to tame. High attention must be paid to minimize stray capacitances at PCB.

Apart from that TI recommends at least 10 ohms of series output resistance. But this means rather high output impedance. I tried to address this issue in two ways - complex feedback, post output resistor or output inductor.

At this time I'm using ~300nH air core inductor at output. TPA6120A2 seems happy with it and output impedance is very low, about 10 miliohms. There is downside tho. Such inductors are hard to get off the shelf so I had to hand wound them. Inductors with other that air cores probably would introduce high distortions.

But there is another way. PCB can be configured to take feedback post resistor/inductor. This configuration is not so popular way of isolating capacitive load from amplifier while maintaining low output impedance. I haven't tried it yet but possibility of omitting inductor is very promising.

For power supply good, old LM317 and LM337 regulators are used with half wave rectifier. Board can be powered by AC-AC wall wart or transformer. Those wall warts are cheap and easy to use as there is no contact with potentially dangerous mains wiring.

Instead of using more common voltage divider to set output voltage I decided to use zener diodes. Dynamic resistance of zener diode is lower than required resistor which should result in lower output noise. By default 13V zeners yields about +/- 14.5V at output with less than 10mV difference between negative and positive rails.
Cadj capacitors are of course present. There are two LEDs at both rails. Besides being indicators they run at relatively high current, providing constant load to regulators which keeps low output impedance of power supply.

Whole PCB was designed in free and open source software - KiCad. Simulations were done in LTspice.
At 3D render it looks like this:
comp_hpa1.png
And the real look, photo taken before mounting my ugly hand wound inductors ;)
IMG_20191013_204434-01.jpeg
Schematics could be found in attachment.

What are my plans for future?
  • Learn CAD software to design enclosure and order it at CNC workshop
  • Acquire/build equipment allowing me to measure true performance of amplifier (aiming <-130 dB THD)
  • Adding micro controller (probably STM32) used for monitoring amplifier - temperatures, DC offset, failure, relay control and etc.
  • Maybe bigger version with XLR input, preamp output, switchable gain and Alps RK27 volume control?
 

Attachments

  • M. Szykuła - Composite Headphone Amplifier Schematics.pdf
    55.3 KB · Views: 942
Last edited:
OP
Bamboszek

Bamboszek

Active Member
Joined
Mar 17, 2018
Messages
181
Likes
306
Now, probably most interesting part for most of us - measurements.

Everything was measured with Audio Precision APx525. Unless otherwise noted given conditions were used: 1kHz, 2Vrms, 150Ω load, AC - 20kHz bandwidth, no weighting, maximum power at 1% THD+N, both channels driven.

Gain: 12dB (x4)
Frequency response (±0.1dB): 12Hz – >80kHz
20Hz – 20kHz ±0.05 dB
Output impedance: <10mΩ
DC offest: <300µV
THD+N 1kHz: <-110dB
THD 1kHz: <-117dB
SNR: >124dB
Power, 32Ω: 3W per channel
Power, 150Ω: 700mW per channel
Power, 600Ω: 185mW per channel

As you can see I'm limited by performance of Audio Precision APx525. Measurements were done without any enclosure in very noisy lab with cheap cables.
 
OP
Bamboszek

Bamboszek

Active Member
Joined
Mar 17, 2018
Messages
181
Likes
306
FFT 1kHz, 256k length, 8x avg.
Everything looks same like direct APx525 loopback, maybe apart from 50Hz peak coming from mains. Lab in which tests were performed is very noisy.
FFT 1kHz 256k 8x 2Vrms 150R.png


Frequency response
There is low pass and high pass filters at input of amp for filtering out possible DC voltage or radio frequency intererences.
APx525 is limited to only 80kHz. I also have access to Audio Precision System Two with higher bandwidth but I think such high frequencies are not meaningful anyway.
Note the scale used - 1dB max with 0.1dB step.
Relative Level (1,00000 kHz).PNG


THD+N 1kHz vs measured power with 150Ω load
THD+N Ratio vs Measured Level 150R.PNG


THD 1kHz vs measured power with 150Ω load
Measurement similar to previous one but only harmonic products, excluding noise
THD Ratio vs Measured Level 150R.png


THD+N 1kHz vs measured power with 32Ω load
THD+N Ratio vs Measured Level 32R.PNG


and for comparison
THD+N 1kHz vs level - blue channel is amplifier and red is Audio Precision loopback
THD+N Ratio loopback vs 150R.png


THD+N ratio vs frequency
THD+N Ratio 150R.PNG


THD ratio vs frequency
Again, just THD without noise.
THD Ratio 150R.PNG


IMD: SMPTE 60 Hz + 7 kHz @ 4:1
SMPTE Ratio 150R.PNG
 
Last edited:

pozz

Слава Україні
Forum Donor
Editor
Joined
May 21, 2019
Messages
4,036
Likes
6,827

Dave Zan

Active Member
Joined
Nov 19, 2019
Messages
168
Likes
486
Location
Canberra, Australia
....free and open source software - KiCad. Simulations were done in LTspice.
Looks nice work, did you do stability analysis in LTspice?
I would be interested to see the Tian probe plots if you did them.
Kicad and LTspice do not seem to be coordinated as well as would be nice.
Did you re-enter the schematic in Kicad?


Best wishes
David
 
Last edited:
OP
Bamboszek

Bamboszek

Active Member
Joined
Mar 17, 2018
Messages
181
Likes
306
Thread is updated with AP graphs! Pretty much same as loopback of APx525. Unfortunately I don't have analog oscillator option installed in my AP so SINAD measurements are limited to about 105-110dB.
Hah, I wish ;) Too bad NwAvGuy is gone. I really appreciate his input in popularizing objective approach in audio. I been using O2 since 2012. Build handful of them for myself or friends at Polish audio forum.

@Dave Zan
Yes, I used LTspice mostly for stability simulations. To be honest I never heard of Tian probe method. Thanks for pointing it out as it seems very interesting. I need to try it for sure.
Having one, uniform environment for both PCB design and simulations would be really handy. You're right that Kicad and LTspice doesn't integrate much. I had to draw schematics in both programs. That wasn't that bad as whole PSU part could be omitted.
Altium Designer offer build in SPICE simulation. Tried it once but it is not that handy and ended with PCB at Altium and simulations in LTspice, TinaTI or MicroCap.
Altium is insanely expensive so for personal projects I have no choice. In my opinion Kicad is very solid tool. Missing some features like automatic via stitching or rounded tracks but I find it easier to work with than Altium for most projects.
 

Dave Zan

Active Member
Joined
Nov 19, 2019
Messages
168
Likes
486
Location
Canberra, Australia
Yes, I used LTspice mostly for stability simulations.

What method did you use?
Do you have any plots?

To be honest I never heard of Tian probe method... I need to try it for sure.

Tian isn't quite theoretically perfect but works very well in practice.
I have posted a bit about it on DIYaudio (easy to find because same user-name and the search function is identical to ASR).
The posts include a few enhancements I wrote for differential probes and nested loops, if you need this.
Definitely worth a try.

...one, uniform environment for both PCB design and simulations would be really handy....
In my opinion Kicad is very solid tool...

I haven't used Kicad yet, just looked it over and read peoples' opinions.
But it is my choice for the next project.
If I wait maybe someone will build an LTspice to Kicad port.

Best wishes
David
 
OP
Bamboszek

Bamboszek

Active Member
Joined
Mar 17, 2018
Messages
181
Likes
306
@Dave Zan
Basic Bode plot analysis. If I gonna find some free time gonna try to post sims, including Tian method.
@MediumRare
Slightly less than 25 USD in all parts and PCB per piece with 5 amplifiers prototype run. Wall wart style 15V AC power supply is same as in O2 and it's rather cheap, maybe next 5 dollars. And that's with usage of decent parts - 0.1% 25ppm resistors, Nichicon Muse ES and Rubycon ZLH capacitors, gold plated Neutrik jack and etc. However I guess that nice enclosure will be 2-3x times more than that.

BTW. First post updated with schematics!
 

jasonhanjk

Active Member
Joined
Mar 24, 2019
Messages
252
Likes
180
What are my plans for future?

  • Adding micro controller (probably STM32) used for monitoring amplifier - temperatures, DC offset, failure, relay control and etc.

When draw too much current from the positive rail, would it cause the line voltage offset and not be balance?
 

solderdude

Grand Contributor
Joined
Jul 21, 2018
Messages
15,891
Likes
35,912
Location
The Neitherlands
Hello guys,
About half a year ago I decided to design my own high performance headphone amplifier. The idea came more from some kind of engineering challenge rather than serious need - my O2 was probably more than enough.
My designs considerations were pretty simple:
  • Challenge myself and check what lowest distortion can I archive
  • Decent power with ability to drive almost any headphones
  • Near zero output impedance
  • Safe for headphones, no DC at output and stability in any conditions
  • Relatively cheap and easy to build - no unobtainable, expensive or exotic parts
After a bit of reading, tinkering and simulations I settled with composite amplifier architecture. I've considered lot of solutions including discrete buffer, LME49600, numerous models of opamps, ADSL line drivers. Every solution had its pros and cons like price, stability, output impedance, DC characteristics, output power, minimum load resistance, complexity, power dissipation limit, temperature and so on.

Finally I decided to nest already very good TPA6120A2 inside feedback loop of another operational amplifier. At this time I'm using OPA1602 but want to experiment with something else like OPA1652 or OPA1656. Especially the last one seems promising but first I need better test equipment to analyze such small distortion levels.
TPA6120A2 is almost perfect candidate apart from one thing - stability. It is current feedback operational amplifier and its stability is not so easy to tame. High attention must be paid to minimize stray capacitances at PCB.

Apart from that TI recommends at least 10 ohms of series output resistance. But this means rather high output impedance. I tried to address this issue in two ways - complex feedback, post output resistor or output inductor.

At this time I'm using ~300nH air core inductor at output. TPA6120A2 seems happy with it and output impedance is very low, about 10 miliohms. There is downside tho. Such inductors are hard to get off the shelf so I had to hand wound them. Inductors with other that air cores probably would introduce high distortions.

But there is another way. PCB can be configured to take feedback post resistor/inductor. This configuration is not so popular way of isolating capacitive load from amplifier while maintaining low output impedance. I haven't tried it yet but possibility of omitting inductor is very promising.

For power supply good, old LM317 and LM337 regulators are used with half wave rectifier. Board can be powered by AC-AC wall wart or transformer. Those wall warts are cheap and easy to use as there is no contact with potentially dangerous mains wiring.

Instead of using more common voltage divider to set output voltage I decided to use zener diodes. Dynamic resistance of zener diode is lower than required resistor which should result in lower output noise. By default 13V zeners yields about +/- 14.5V at output with less than 10mV difference between negative and positive rails.
Cadj capacitors are of course present. There are two LEDs at both rails. Besides being indicators they run at relatively high current, providing constant load to regulators which keeps low output impedance of power supply.

Whole PCB was designed in free and open source software - KiCad. Simulations were done in LTspice.
At 3D render it looks like this:
View attachment 44591
And the real look, photo taken before mounting my ugly hand wound inductors ;)
View attachment 44590
Schematics could be found in attachment.

What are my plans for future?
  • Learn CAD software to design enclosure and order it at CNC workshop
  • Acquire/build equipment allowing me to measure true performance of amplifier (aiming <-130 dB THD)
  • Adding micro controller (probably STM32) used for monitoring amplifier - temperatures, DC offset, failure, relay control and etc.
  • Maybe bigger version with XLR input, preamp output, switchable gain and Alps RK27 volume control?

Just some notes about your fun project:
Your input resistance will be varying between 10k and 5k depending on volpot position.
An idea could be to put the 33uF in front of the potmeter. When there is DC on the input of the amp the pot may get scratchy otherwise.
Also do some measurements on the output using a 300 Ohm load and 1nF capacitance (to see if the inductance is enough for stability) Need a scope with wide bandwidth for this.
 

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,835
Likes
16,497
Location
Monument, CO
OP
Bamboszek

Bamboszek

Active Member
Joined
Mar 17, 2018
Messages
181
Likes
306
When draw too much current from the positive rail, would it cause the line voltage offset and not be balance?
Thats thing to be considered but shouldn't be an issue. MCU draws little current and can be powered directly from transformer instead of +15V
Just some notes about your fun project:
Your input resistance will be varying between 10k and 5k depending on volpot position.
An idea could be to put the 33uF in front of the potmeter. When there is DC on the input of the amp the pot may get scratchy otherwise.
Also do some measurements on the output using a 300 Ohm load and 1nF capacitance (to see if the inductance is enough for stability) Need a scope with wide bandwidth for this.
10k are indeed harder to drive than usual 50k or 100k pots but IMHO today when most sources uses opamps at output it shouldn't be an issue.
As far I know DC current is dangerous for pot, but only when it flows thru wiper so cap placement doesn't matter.
Amplifier simulates well even with 10nF load. But right, simulations can be one thing and real circuit could be another. I plan to test amp with various capacitive load soon. I have access to 2.5GHz Tek at work so it should be enough ;) Also I consider testing it with vector signal analyzer. Too bad lately I'm really busy.
I use Middlebrook's method for loop analysis. One article I found on-line is https://www.edn.com/middlebrooks-and-rosenstarks-loop-gain-measurements/ Many of the simpler methods have frequency limitations and/or do not properly load the loop probe points.
Oh, thats article from Sergio Franco. His books are really useful, especially in fields of feedback, stability, compensation techniques and etc.
 

Dave Zan

Active Member
Joined
Nov 19, 2019
Messages
168
Likes
486
Location
Canberra, Australia
I use Middlebrook's method for loop analysis. One article I found on-line is https://www.edn.com/middlebrooks-and-rosenstarks-loop-gain-measurements/ Many of the simpler methods have frequency limitations and/or do not properly load the loop probe points.

Thank you for the link, it's quite an informative article.
But it considers only Middlebrook's 1975 paper (now 45 years old) and which Middlebrook himself realised was incomplete.
So a more educational comparison would be with Middlebrook's 2006 work.
Not sure why Franco excluded it from this article when he clearly is aware of it, as shown by an earlier discussion- https://www.edn.com/feedback-with-bidirectional-blocks/.
So there is a bit of confusion when people say they use "Middlebrook's method" because it's not clear what they mean, the 2006 paper or which of several versions discussed in the 1975 paper.
As well as my DIYaudio posts on differential Tian I started a thread for the Middlebrook 2006 version too https://www.diyaudio.com/forums/solid-state/261973-middlebrook-gft-probe.html if anyone is interested.
 
Last edited:

restorer-john

Grand Contributor
Joined
Mar 1, 2018
Messages
12,579
Likes
38,280
Location
Gold Coast, Queensland, Australia
10k are indeed harder to drive than usual 50k or 100k pots but IMHO today when most sources uses opamps at output it shouldn't be an issue.

10K is simply too low. Even pro front ends are/were 20K minimum. For a headphone amp, 50K is a decent number.

It's all very well to get amazing noise figures by passing the buck to the stage before to do the heavy lifting, anyone can do that.
 

solderdude

Grand Contributor
Joined
Jul 21, 2018
Messages
15,891
Likes
35,912
Location
The Neitherlands
10k are indeed harder to drive than usual 50k or 100k pots but IMHO today when most sources uses opamps at output it shouldn't be an issue.

At max. volume the input resistance is 5k. Most opamps are measured or capable to drive 2k resistances but still. Having the input resistance vary 100% (or 50% depending on how one looks at it) could be avoided and at the same time the capacitor could be smaller as well.
 

KSTR

Major Contributor
Joined
Sep 6, 2018
Messages
2,690
Likes
6,013
Location
Berlin, Germany
Tian isn't quite theoretically perfect but works very well in practice.
That's my findings as well. Conventional techniques often have errors at high frequency around the 0dB intercept of the loop gain that make phase and gain margin estimates sketchy, Tian seems to be more robust.
Below, two sim plots of a composite (with two 5532's) as "measured" in the same closed loop config, upper is Tian, lower is conventional (note the suspicious looking wobble and rise at 20MHz++) :
1579183650278.png

1579183700320.png


During development, I use conventional methods to see what is going on everwhere but I always double check the resulting loop gain with Tian.
 

Attachments

  • 1579184106393.png
    1579184106393.png
    25.4 KB · Views: 168
OP
Bamboszek

Bamboszek

Active Member
Joined
Mar 17, 2018
Messages
181
Likes
306
10K is simply too low. Even pro front ends are/were 20K minimum. For a headphone amp, 50K is a decent number.

It's all very well to get amazing noise figures by passing the buck to the stage before to do the heavy lifting, anyone can do that.

While I agree that having flat input impedance is desired and I consider moving cap before pot at next PCB revision I see nothing wrong with 10k. Highly praised JDS Labs Atom has 10k input impedance. Neumann KH 120 A monitors has 10k input impedance. Everyone will agree that are examples of competently designed and excellently performing devices. That's just a few examples.
Maybe poor tube stages might struggle to drive 10k.
But whats the point on putting poor source which can't drive 10k in front of high performance amplifier?
 

restorer-john

Grand Contributor
Joined
Mar 1, 2018
Messages
12,579
Likes
38,280
Location
Gold Coast, Queensland, Australia
But whats the point on putting poor source which can't drive 10k in front of high performance amplifier?

Your design, you do what you like, but bear in mind plenty of proper sources will exhibit varying frequency response variations due a 5-10K input impedance.

We get it, you're minimizing impedance for noise on your product and at the same time compromising the performance of the stages before. The more difficult the load they drive, the more THD they exhibit all because you want nice numbers. Buck passing at its finest.

20K would be a bare minimum and 50K preferable. Go look at some typical amplifier input impedances. Benchmark AHB-2 is 50K.
 

KSTR

Major Contributor
Joined
Sep 6, 2018
Messages
2,690
Likes
6,013
Location
Berlin, Germany
Personally, I'd consider any gear broken than can't deliver the typical 2Vrms into 10k without increase of distortion. A ridiculous 300uA of peak current!
Lowest loading with lowest noise can only be had with a low-noise FET-input opamp running unity or low gain driving something like a 1k or 2k pot (big bipolar e-cap ahead of the pot, Nichicon Muse). The best pot resistance is determined by the the voltage and current noise specs of the following stage.
 
Top Bottom