DIY Distortion Analyzer/Analysis?

For those of us that don't have access to an Audio Precision set, what are folks out there doing for measuring THD, IMD, SID, whatever? Anything clever for helping to set bias points or actually measuring impacts of changing ground connections, etc?

Here are some excerpts on the topic from another thread ( the Leach amp design thread, I beleive); comments welcome (hint, hint!):

From Damon:

...As for other designs and tweaks, I can only point to Doug Self
and Randy Sloan and their books on amplifier design for hints
as to what might be possible. But we're already into a range of
low distortion that my geriatric collection of Heathkit test
equipment can't possibly measure, and I can't afford an Audio
Precision test set.

Unless I can come up with a "cheap" Audio Precision equivalent,
I'd be shooting completely in the dark with new designs. And
that's daunting....

From me (mlloyd1):

..... I wrestle with the same problem as far as distortion measurements. I usually look at distortion waveforms on my scope. I think we need a group discussion about how to work around this issue for DIYers. There was a REALLY nice project in Audio magazine (RIP) some years ago for a very serious analyzer that could be reworked with current tech (using OPA604 op amps and current buffers instead of TL071, for example) and probably have much more performance than we would need. I've also seen some writings in past issues of The Audio Amateur (now Audio Electronics) by Erno Borbely ( I think) for a distortion analyzer. There was a project in Radio Electronics some years back also. I actually made a PCB and partly built this one. In my opinion, it worked very well - it gave consistent measurements with a Audio Precision I had access to at the time. However, it was VERY tough to control the electronical noise in my DIY environment though - halogen lights, misc dimmers, hair dryers, etc. (it's tough being a married DIYer!) don't make for a clean test environment. Finally, reading through the service manual for some of the HP distortion analyzers (I think the guy that did the Audio magazine project referred to doding this also) suggest a few ideas as well. Alas, I can't seem to find my copies of this anymore :-( I can't recommend enough times that service manuals from GOOD test equipment makers like HP and Tek are EXCELLENT sources of material for study!

I'd be happy with a distortion test box that could spot check with high resolution at about 4 frequencies: 50Hz, 1KHz, 20KHz, 75KHz.

Who's game?

Nelson, what do you do when you have something to test (say an idea at home late at night) and the Audio Precision is nowhere around? Wait until later? :)

Maybe we could even ask an analog Guru like Jim Williams at Linear Technology to design a simple, high peformance THD analyzer circuit (I single him out because I remember and oscillator circuit he designed that was claimed to have THD specs in the single digit parts per million. This is incredible!). They might already have such a design sitting around somewhere; I haven't checked their web site and app notes lately. Hmmmmm ....

from Grey:
.... Give the distortion analyzer project its own thread so people will be able to find it more easily.

I'm interested.

I'd like to reiterate--for those who haven't understood what I've said on these matters--that I'm not against low distortion, per se, just the use of massive quantities of negative feedback to achieve the distortion figures. Just don't pursue low distortion as an end in itself, as you'll usually find that once you reach a certain point sound quality suffers. But up to that point it can be a useful tool....
Joined 2001
Paid Member

To evaluate distortion, I currently use a PC-based test instrument from Pico Technologies ( Their ADC-216 has only a 166 kHz bandwidth, but its 16-bit dynamic range and Spectrum Analyzer function makes it useful for looking at distortion products. The software will also calculate THD, S/N, and other standard specs from captured waveforms. At around US $700, it doesn't look cheap until you compare with something like the AP System One.

My signal source is a simple version of the improved Wien/HP oscillator described by Jim Williams in his book "Analog Circuit Design: Art, Science, and Personalities." I plan to build a better version when I have time, but even this little single-IC unit is quite useful as it gives .003% distortion at 1kHz. This is better performance than you'll find in many commercial designs, and costs very little to make.
I know some find the objective approach to measure in audio
design anathema, but I've always been design-oriented and
I have learned that my hearing isn't completely trustworthy;
I need test equipment for a reality check. But I like to think that
listening is complementary to objective analysis.

My test setup is mostly geriatric solid state Heathkit; I can measure down to around .03% THD on a good day. The THD meter has an autonull feature but it is tempermental. It is most
useful in conjuction with a scope display to visually judge the
relative amounts of noise, ripple and distortion products; I always
set amplifier bias so the crossover notch just disappears.

The IM meter has excessively high residuals and needs troubleshooting; it lacks an oscilloscope output. I found a used
Crown IMA a few years ago in a guitar shop for $30, but alas,
both of the meters are shot and I've been quoted $200 for their repair or replacement. And I still think the unit has other problems; I suspect a voltage surge and aging took a considerable toll on the poor thing. But it has some useful features like the oscilloscope output and a tracking level control so a range of power levels can be quickly measured.

Going beyond this level of performance demands not just low residuals but spectrum analysis of the distortion products; an
Audio Precision system does all of this in software with a handy
graphical display and helps to make documentation a LOT easier.
But the price of a new system is a killer, and I can't even bid on
the occasional units that appear on Ebay: I'm poor.

I know there's a company that local to me in Seattle (or thereabouts) which may have an offering similar to the AP, using
commonly available computer sound cards such as the Sound Blaster Live! (the newer Audigy should be even better). I'm not
clear on cost or how capable their system is compared to AP.

I'm convinced that the AP is the route to take for measurement
and documentation to the point that even used Sound Technology
and the HP339 don't interest me as much as they might have ten
years ago.

I could, however, continue to work with a conventional THD meter
if the residuals were an order of magnitude lower than my present setup.

I'd like to do more IM measurements, perhaps with the CCIF standard of two closely spaces HF tones, possibly swept.
Damon's point about spectral analysis is a good one, and in my opinion could stand to be put in italics & bold print.
My take on this is that the harmonic structure of the distortion is <i>far</i> more important than the total percentage. It's widely acknowledged (even by specs-are-everything folks) that lower order harmonics are much less obnoxious than higher order. To the extent that I must, in the real world, have distortion, let it be 2nd and 3rd order rather than higher order products.
I'm also convinced that a lot of the problem is transient in nature, hence difficult to spot with the averaging techniques commonly used. Crossover distortion is a good example of this, as it's there...then it's gone. But while it's there, it's really, really ugly. Yes, it's easy enough to bias for class A and avoid the problem entirely, but then you get into heat dissipation and overall decreases in efficiency. I choose class A and AB in order to sidestep the problem, but that doesn't mean that I'm always overjoyed about the tradeoffs.
Michael, thanks for breaking this out as a separate thread. Rest assured that I'll be watching developments closely.

Pass DIY Apprentice
Joined 2001
Paid Member
I'm currently using a Velleman PCS64i, which is a PC-based DSO. It's available for around 350.00 US$ from I've found it to be a pretty handy instrument. Velleman also has less expensive models (as low as $129) available as kits. The software includes a spectrum analyzer, which can be used for distortion measurements albeit with some post-processing. I've been thinking about writing a post processor to do THD calculations, Distortion vs. Frequency, Distortion vs. Power, etc. But, I'm not sure if there are many people using this instrument, so for now I just do the post in Microsoft Excel.

For those interested in quick and dirty distortion analysis, Nelson Pass published a great sidebar in his Mosfet Citation 12 article which explains how to use one channel of an amplifier to analyze the other.

A DSO is really a pretty indespensible instrument if you're a serious audio hobbyist. And at $129 and up the PC based models available are hard to beat and they can replace several instruments on your workbench.

Another option (if you don't need to measure THD to .001%!) is to build a shunt that could be connected to the line input of a PC sound card. There a several sound card based software FFT analyzers available as open source and freeware. Again, you're limited by the accuracy of the sound card and your function generator.

I asked a sales guy at AP if they've ever considered building a hobbyist-level product. He laughed at me.
low cost analyzer

One can measure distortion down to about .0001% cheaply with the following circuitry:
Can listen to the distortion signal with a headphone while tweaking the amp or the distortion output can be observed on a PC oscilloscope or PC spectrum analyzer with a sound card and the following software (around $35 I think, free demo download):
The usual PC sound cards are good for about 80dB dynamic range I think, can do better (100 dB) with a 24 bit 96KHz sampling card like the following:
mrothacher said:
Another option (if you don't need to measure THD to .001%!) is to build a shunt that could be connected to the line input of a PC sound card. There a several sound card based software FFT analyzers available as open source and freeware. Again, you're limited by the accuracy of the sound card and your function generator.

I asked a sales guy at AP if they've ever considered building a hobbyist-level product. He laughed at me. [/B]

Ah, for the good old days when Heathkit was around and providing us with mid-level test equipment at affordable prices.
Velleman is almost the only kit company left out there. At least
you can get good oscilloscopes, but otherwise signal analysis
has been the forgotten stepchild.

I think the best hope for an Audio Precision equivalent is going
to be based on the better sound cards and someone clever at
writing the necessary support software. I'm >really< impaired
when it comes to the latter.
Test Equipment

Some of you may not be aware that there is a lot of used test equipment available and sold daily on Ebay. If you are satisfied with older equipment that works perfectly well then this is a good place to look.

I have sold quite a few items of my older equipment there and have shipped them all over the world.

Look under the Industrial section and then test equipment. Don't get side tracked in the electronics parts section.

John Fassotte
Alaskan Audio
Pass DIY Apprentice
Joined 2001
Paid Member
The line input on most soundcards is limited to 2 or 3 volts, so you'll need to design some kind of attenuator to scale the voltage down 10 or 100 times for measuring signals at high power.

The neat thing about using a PC sound card as an FFT with a PC-based function generator is that you could sweep the generator and automate THD vs. Frequency for example. However, I'm not sure about the distortion performance of software based function generators.
soundcard protection

Forgot to mention, when using a PC sound card for amplifier testing, make sure you attenuate the amplifier output with a 50 to 1 (or so) resistive divider before connecting to a sound card input. I smoked my old soundblaster card once when I forgot to attenuate the amplifier!
low distortion wein bridge oscillator


I found my app note having the ultra low THD oscillator. It is from Linear Technology AN43 from 1990 "Bridge Circuits: Marrying Gain and Balance" by Jim Williams. I don't have my copy of the book you mentioned handy, so I can't tell if it's the same circuit. This one uses a current buffer (LT1010) for the main gain block op amp (LT1115), another op amp (LT1022) for common mode supression and another op amp (LT1006) to drive the opto coupler (VTL5C10 used as the nonlinear element for gain control. Jim claims less than 3ppm distortion for this very simple circuit.

Joined 2001
Paid Member

The AN43 circuit sounds similar in overall approach. In the piece I refer to, Williams starts with a single-IC wien circuit using the Hewlett idea of a lamp as the AGC element. The circuit grows to two ICs when he replaces the lamp with a FET and IC#2 to drive it. The FET later becomes an obscure opto device (actually I think you can get them through Newark), and he adds IC#3 to buffer IC#1's output and get rid of some residual crossover distortion. Finally, IC#4 is added to cancel common mode distortion, and at that point the distortion figure drops below the AP System One's radar.

I built the single-IC version on a breadboard using an LT1028 and got .003% of mostly second harmonic at 1kHz as soon as I remembered to add local supply bypassing. Or you can omit the local bypass and get 10% at 10 MHz, your choice. :)
I got that Wien bridge oscillator to work with an AD797 and
some random selection of a small incandescent lamp with
a precision decade box. The residual on my old Heathkit
IM-5258 analyzer is just under .02%, but both are twitchy
about settings and the oscillator tends to develop a
crossover notch after a while.

Thanks for the lead on the application note; made for
some interesting reading. Already has me thinking about
taking my spare IG-18 and doing something creative with it!

I wonder what could be done with a word generator and
one of those 24-bit DACs...? I have NO experience with
digital electronics, I'm ashamed to say.
24 Bit D/A

The low cost 24 Bit D/A sound card that I am using (M-Audio Audiophile 2496)($160) has an accuracy of better than .002%. More expensive 24 bit soundcards may be a little better but not much. The best I have seen is the Delta 1010 which has a separate shielded box outside the computer for the D/A and A/D chips and it quotes D/A better than .0015 % dist. and A/D better than .001% dist. Software is available on the Web for oscillators and analyzers to control sound cards. The one I listed in my earlier post has a sine wave generator with optional sweep and other waves available. The white noise function can be used for a clever IM distortion test mentioned in AudioXpress August 2001 page 73. Just feed the amp. with a white noise signal filtered to remove frequencies below 500 Hz or so and measure the amplifer output with a low pass filter that only passes below 500 Hz. Any low frequencies coming out of the amplifier had to be generated in the amplifier.
The best distortion analyzer still remains the simple difference scheme mentioned in my earlier post.
Its sensitive to .0001% distortion or better (depends on the Op. Amp. chip used to construct it). Could use Burr Browns OPA2604 or OPA2134 (Digi-Key $2) or can use the discrete op. amp. in the article. This approach doesn't need a high quality oscillator, can even use a function generator or live music. A design extention in the article even allows it to be used with a speaker load on the amp. instead of a dummy resistive load. The expensive commercial distortion analyzers don't even come close to this capability. Can use the soundcard software approach if you want to get a hard copy of the distortion signal or spectrum. For casual testing can just use a scope or even a headphone to listen to the distortion signal output. Its almost a crime not to put this simple circuit on the PCB for all amp. projects so one has a permanent distortion monitor for occasional tune ups.
The one and only
Joined 2001
Paid Member
To answer the earlier question, I keep an AP at my

I have been trying to talk Karen into a project doing
a very inexpensive IM analyzer that can be built for a
few bucks and works great. If you email her at, maybe she'll get on it. :)

Lacking that, the technique in the Mosfet Citation 12
article works great to check the circuit and adjust the
bias if you have just a scope and an oscillator.
More things to read

Nelson mentioned the AP unit and it reminded me of some of the white papers Audio Precision has on their web site.

One of the ones that may be of interest to those measuring distortion may be the one on the "Comparison of nonlinear distortion measurement methods", by Richard C. Cabot, the vice president of the company.

It can be found here:

I stopped by and talked to the folks at Audio Precision in Beaverton a number of years back and found them to very friendly. They gave me a very nice tour of their facility.

John Fassotte
Alaskan Audio

It's not cheap, but SpectraLAB and a good soundcard make a very impressive measurement system.

Something like a Soundblaster live will allow THD to be measured to 5 decimal places, plus some good FFT plots for examining the spectral content.

There's a built in sweep and tone generator so providing your card is full-duplex saves a bit of space on the shelf.

There is a time-limited full function demo available, it's not cheap to buy, but possbibly much cheaper (and neater) than many s/h test equipment routes.

Bear in mind if s/h equipment fails it can get expensive!

SpectraLAB's power is only limited by the hardware you've got.

FFT Software

I obtained SpectraPlus back in 1996 from Pioneer Hills Software and also HPW Works from a few years back.

These software packages along with SpectraLab are excellent for distortion and other analysis. My SpectraPlus can only handle 16 bit data. Both SpectraLab and HPW Works can handle true 24 Bit sound cards and can internally pad it up to the 32 Bit data width that a PC uses when processing 24bit audio.

If these software packages had some of the features that the AP box uses for automating measurements they would truly be exceptional values. They can already match the basic performance of a AP box when used with a very high quality sound card in both the digital and analog modes. HPW Works is especially worthy since it can handle very high sampling rates. The upper frequency limit on any sound card will be around half the sampling rate.

As mentioned, to get optimum performance from these software packages a very high quality sound card should be used. A sound blaster or built in sound option on a motherboard just won’t do. You will loose a tremendous amount of accuracy and reduce the measurement dynamic range by 40Db or more in the analog mode alone.

HPW Works could use a better human interface (tool bar). Its present layout makes it more difficult to use than SpectraPlus or SpectraLab when you first start to use the package. HansPeter (HPW Works) has however always responded very rapidly to questions that I have asked of him about his software and is very pleasant to deal with. I highly reccommend considering buying his software package if you are in the market for this kind of software.

I use the software packages I mentioned to supplement my HP test equipment when making adjustments to equipment. I retain my HP test equipment since the upper samplig rate of my present sound card is 96Kbs. This is sometimes too low to suit all my needs. I would purchase a AP box but I would gain to little to justify the expense. I can purchase a lot of very high quality high sampling rate cards with balanced line inputs for the price of a AP box. After all the AP box is basically just a high quality external sound card with similar software to those I mentioned for data processing and display.

If you are serious about making subjective measurements on equipment that you design and build I would strongly recommend any of these relatively low cost software packages. HPW Works Pro version has an especially low and very attractive price for the features and accuracy it has.

Any of these programs will allow you to start with a low quality card sound card and then upgrade to a better one later.

John Fassotte
Alaskan Audio
Some 10 years or so, a patent became public, by an article in WW. I think it was a BurrBrown patent, where the idea was to increase the measurement sensitivity of a circuit by appx 60 dB, by a special topology where an high precision op-amp cancelled it's own noise while amplifying the signal. This was specifically designed for increasing the sensitivity in spectral measurements.
Does this sound familiar to anyone??