There are lots of practices in the DIY world that are more than a little out dated. I’m obviously not talking about using vacuum tubes but rather the methods used in building and testing the circuits we build with them. Many of these test methods came about for very good reasons; perfectly applicable at the time. But as technology has advanced the reasons for many of these practices are no longer valid. And there is really no better example of this than the practice of testing audio amplifiers with square wave (or various sawtooth or triangle wave) signals.
First a little background.
The idea of testing audio amplifiers with non-sine wave signals dates back over 60 years. At that time the average hobbyist workbench was not what it is today. Most builders had little if any test equipment and needed a way to check out what they were building. In the audio realm this usually meant plugging it in and seeing how it sounded. But with the advent of the transistor age two things became more widely available to the amateur builder.
The first was oscilloscopes (or at least their analogs). Small transistor driven oscilloscopes and projects to convert televisions to oscilloscope stand-ins started to show up. And as businesses retooled with the new transistor equipment, the older vacuum tube driven oscilloscopes started showing up used at equipment resellers and flea markets. Suddenly more and more hobbyists had the ability to actually look at a waveform.
The other thing to show up was lots of simple projects for square wave signal generation using the new Transistor-Transistor-Logic (TTL) circuits. Projects started popping up in electronics magazines for all manner of circuits using the new technology. And the ubiquitous 555 timer circuit hit the market for pennies a piece. Suddenly it was relatively simple to generate square wave (and triangular) waveforms at audio frequencies and higher. At the same time, good quality sine wave generators were still not widely available for less than a high price. And such equipment still tended to be rather finicky requiring frequent adjustment and calibration.
It was only a matter of time before someone thought of driving an audio amplifier with a square wave and looking at the output. And this is where the trouble began.
At first glance the prospect of driving an audio amplifier with a square wave seems a little strange. That is until one applies a little bit of mathematics to the problem. A square wave can be formed mathematically by the superposition of a fundamental frequency sine wave and all of its odd order harmonics in ever decreasing magnitude. Mathematically, the relation looks like this:
For the value k=1 the right side of the summation reduces to just sin(2π t). As k increases, the frequency increases as the (2k-1) term gets larger and the magnitude decreases as the 1/(2k-1) term gets smaller. And a quick check shows all the harmonics are odd (i.e. 1, 3, 5, 7, 9 … etc.).
So in theory, if enough odd harmonics can be reproduced by the amplifier, the output waveform should be a reasonable approximation of the input waveform. And since most audio amplifiers are fairly wide band, if the square wave frequency is kept to a reasonable frequency it should be possible to include a fair number of harmonics. For example, if the input square wave is at 1kHz the output could include up to the 19th harmonic (based on a 20kHz upper frequency limit). If the square wave was only 500Hz then the series could contain up to the 39th harmonic. Under these conditions a reasonable square wave output could be produced. Unfortunately, it’s not enough to simply produce a waveform. It is necessary to compare the input and output waveforms and attempt to determine something about the amplifier.
So as hobbyists started talking about this option, many experimented with limited bandwidth amplifiers and attempted to come up with some guidelines and rules-of-thumb to tell “acceptable” performance from “unacceptable” performance. Many of these rules were obviously based on the imperfect characteristics of output waveforms and included things like slew rates for various parts of the waveforms, overshoot, undershoot, ringing, etc. And so long as the various rules-of-thumb were kept in context of the mathematical underpinnings (as shown above) a person could begin to estimate amplifier bandwidth. In reality, it’s an imaginative and ingenious way to get at amplifier bandwidth data without having the proper test equipment available. But there’s a catch.
To truly understand what the imperfect output waveform is showing, those imperfections need to be mapped back to the collection of waveforms that, when superimposed together, form a square wave. And it requires a person to think in both the time domain and frequency domain and be able to relate one to the other. But it always was, and remains today, a work around. And a work around of dubious accuracy as well.
Now we fast forward to today.
The square wave testing idea is still very much alive and well in the DIY community. However things have changed on the technology front. Today, accurate sine wave generators are ubiquitous. Available as software for computers, pads, and cell phones there are generators for free or at most a few dollars. There are small standalone electronic waveform generators available for just a little bit more. For measuring the signals, there are AC voltmeters which cover the entire audio range and and even full capability oscilloscopes for less than the cost of the iron for a single small amplifier. (The Rigol DS1054Z and the Rigol DS1102Z are a couple of good examples.) With such items readily available there is absolutely no need for non-sine wave testing of audio gear.
Simply by using a sine wave generator and a dual channel oscilloscope the bandwidth and phase characteristics of an amplifier can be measured in a few minutes. There is no need to infer anything when you can actually measure the input and output voltage and phase. And once the bandwidth magnitude and phase response is determined, the resultant square wave response can be fully constructed mathematically.
When I mention to someone that there is no need for this square wave testing I often get pushback. With people insisting that there is some critical information revealed which cannot be deduced from simple bandwidth testing. The favorite topic is talking about “slew rate” but without any understand of how slew rates (in the time domain) are affected by bandwidth response (in the frequency domain). Others insist that it’s a great “time saver” as if a few minutes of testing is an undue burden after spending tens of hours assembling an amplifier. We seem to have reached a point where many in the DIY community have not caught up to where the technology is at today.
It is not very often when I directly make a recommendation for how things should be done. Usually, I tell people to test in whatever way they want. But when it comes to the topic of arbitrary waveform (square wave, triangular wave, sawtooth waveform, or otherwise) testing of audio gear, I’ll make an exception. There is simply too much bad information, too many misconceptions, and far too much internet bravado concerning this type of testing to ever recommend it. And, in most cases, when people do find a “fault” due to such testing, it’s never about how the amplifier sounds. It’s almost always all about a picture on a screen or some parameter they found on the internet with no context or justification.
So I’m just going to say don’t do it! I’ve seen too many truly exceptional balanced amplifier designs ruined by people tinkering to get some waveform characteristic without ever considering how it affects ALL aspects of the amplifier’s performance. I’ll get off my soapbox now.
As always, questions and comments are welcome.
Hi, great article as always. It’s been a year since I’m using REW software which is a free software with a Scarlet 2i2 soundcard to test my diy amplifiers, transformers, etc… It produces perfect sine wave and can perform all the required tests including Frequency response, Power vs THD, THD harmonic content, etc..
I no longer use the square wave testing, because I found that if the high frequency roll off is high enough and the wave form shows no oscillations, there is no need to do that.
Another thing that I found interesting is the bumps at low frequency response, it is often that you find a bump or boost at low frequency response. I found that it is mostly due to undamped resonances from PSU LC filters, and can be addressed by increasing the filter caps or series resistance.
The resonance between the final PSU capacitor and the output transformer can also be intentionally used to fill out the lower end register. Particularly in UL topologies where the power stage output impedance is higher. In which case, it’s a feature, not a bug.