• The move to the new server is done. There are some software and database maintenance updates in process. This has us passing the hat around to help out. We appreciate any donations. Seriously, even a dollar helps. The payment page may be found here - https://www.audiokarma.org/support.html

Oscilloscope Basics Part 4: Square wave testing and analysis

Ray Gianelli

AK Subscriber
Subscriber
Often when there are frequency response issues with a device under test you will read about the tech performing square wave testing; this is more efficient than injecting sine waves of various frequencies and seeing where the amplitude drops off. Usually a 400 Hz square wave is used.

As we look at a square wave on the oscilloscope we should see a perfect square, with steep leading and falling edges and a flat top, like this:
20181226_172630.jpg

The flat top shows that the device under test has good low frequency response. If it did not, the top would not be flat. Loss of low end looks like this:
20181226_172647.jpg
Note that while the leading and falling edges of the square wave are going straight up, the top is not flat... at all. If this was an amplifier, it would sound tinny.

At the other end of the spectrum we have poor high frequency response, which looks like this:
20181226_172734.jpg
Notice how rounded the corners of the leading edge is; this amplifier would sound muffled.

Square wave testing is a great way to troubleshoot issues with tone controls, and as a quick test of overall frequency response. If you have a scope and a generator that outputs square waves, look at the output of a receiver or preamp as you move the bass and treble controls. It's a great way to get an idea of what good and bad square waves look like.

Edit: please note that your scope must be DC coupled for this test. AC coupling will distort your square wave, making you think there is a problem with low frequency response.
 
Last edited:
Register to hide this ad
Square wave testing can also indicate potential stability issues. Sharp overshoot on the rising edge with ripples (ringing) along the top often indicate a high frequency resonance. This is mostly something you deal with on tube amps with global feedback, but it indicates the possibility of the amp oscillating and maybe nuking a tweeter or other undesirable behavior.
 

Attachments

  • 1103171833.jpg
    1103171833.jpg
    68.9 KB · Views: 188
I am one who believes in recapping vintage equipment. One of the first things that I do is put a square wave through it. 80% of the time a recap cleans up the square wave. I can find very little information on this test.
 
Thanks for a great post! I wonder what would be a reasonably good inexpensive generator to use for a 400 Hz square wave. This is my iphone playing a youtube 400 Hz square wave (just for fun - ). Obviously it's not a good enough quality signal. Does it take a signal or function generator to do this correctly?

IMG_0529 (2).jpg
 
Hmmmm. Your iPhone looks like your door bell is ringing. New ringtone?

Yes, a function generator would be a better 'answer'. There are several good "digital" ones available - just make sure that the number of modes and the output is adequate for your needs.
 
You can actually build (on a breadboard) a simple square wave generator with a 555 timer. Then an added 3rd order filter will turn it into a sine wave generator. Several circiots available on line.

Be aware that if tone controls are not centered, the square waves go completely goofy because the harmonics will now have phase shift relative to the fundamental.
 
Often when there are frequency response issues with a device under test you will read about the tech performing square wave testing; this is more efficient than injecting sine waves of various frequencies and seeing where the amplitude drops off. Usually a 400 Hz square wave is used.

As we look at a square wave on the oscilloscope we should see a perfect square, with steep leading and falling edges and a flat top, like this:
View attachment 1367512

The flat top shows that the device under test has good low frequency response. If it did not, the top would not be flat. Loss of low end looks like this:
View attachment 1367520
Note that while the leading and falling edges of the square wave are going straight up, the top is not flat... at all. If this was an amplifier, it would sound tinny.

At the other end of the spectrum we have poor high frequency response, which looks like this:
View attachment 1367526
Notice how rounded the corners of the leading edge is; this amplifier would sound muffled.

Square wave testing is a great way to troubleshoot issues with tone controls, and as a quick test of overall frequency response. If you have a scope and a generator that outputs square waves, look at the output of a receiver or preamp as you move the bass and treble controls. It's a great way to get an idea of what good and bad square waves look like.

Edit: please note that your scope must be DC coupled for this test. AC coupling will distort your square wave, making you think there is a problem with low frequency response.
To me, this looks you tweaked the oscilloscope probe to generate the picture?
I see, you already say "if this was an amplifier" :)
 
Does it take a signal or function generator to do this correctly?
Note that Function Generators are more concerned with the ability to produce wave shapes, and other waveform mark/space tricks. So the waveforms they produce tend not to be low distortion, but as a bonus they can be quite cheap. Whereas Signal Generators are supposed to produce pure waveforms, no tricks, but the lowest distortion across the widest possible frequency range. This varies of course depending on which make and model of signal generator you get, and good ones can cost a lot of money. ;)
 
Note that Function Generators are more concerned with the ability to produce wave shapes, and other waveform mark/space tricks. So the waveforms they produce tend not to be low distortion, but as a bonus they can be quite cheap. Whereas Signal Generators are supposed to produce pure waveforms, no tricks, but the lowest distortion across the widest possible frequency range. This varies of course depending on which make and model of signal generator you get, and good ones can cost a lot of money. ;)
Big +1.
And when purchasing low distortion sine wave generators the law of diminishing returns definitely applies!
 
My generator is a (now vintage) Leader LFG1300S and is actually labeled as a "Function Generator". I don't have a distortion analyzer, but all of the waveforms look very clean on the scope. At first, I thought I had poor low frequency response, but later realized that the scope has to be in DC mode for low frequency square waves.
 
Thanks for a great post! I wonder what would be a reasonably good inexpensive generator to use for a 400 Hz square wave. This is my iphone playing a youtube 400 Hz square wave (just for fun - ). Obviously it's not a good enough quality signal. Does it take a signal or function generator to do this correctly?

View attachment 1423572
I picked up a nice little Kenwood signal generator from the auction site for about $50. Model AG-204:

ag-204d.jpg
 
My generator is a (now vintage) Leader LFG1300S and is actually labeled as a "Function Generator". I don't have a distortion analyzer, but all of the waveforms look very clean on the scope. At first, I thought I had poor low frequency response, but later realized that the scope has to be in DC mode for low frequency square waves.
I have the same model, only mine needs a bit of TLC as the square wave is not so square. It looks more like poor high frequency response example Ray provided.
I am thinking a recap of the actual generator might help.
 
Thanks for all the scope threads, Ray. One thing I frequently don’t see people mention when discussing squarewave testing is the length of time one can safely run a squarewave through an amp, and what voltage to use. I learned this the hard way when I had an output tube on a Fisher redplate on me because I had been running a squarewave through it for close to an hour. What are some good guidelines regarding time and input voltage? Thanks
 
Thanks for all the scope threads, Ray. One thing I frequently don’t see people mention when discussing squarewave testing is the length of time one can safely run a squarewave through an amp, and what voltage to use. I learned this the hard way when I had an output tube on a Fisher redplate on me because I had been running a squarewave through it for close to an hour. What are some good guidelines regarding time and input voltage? Thanks
Well, as far as square wave testing, I've never needed to run the test for more than a minute. Just long enough to see what the amp is doing, and hopefully isolate the trouble to a section of the amp.

As far as level goes, any continuous wave testing is hard on an amplifier. Even the brief softer sounds in music give an audio amplifier time to cool.

If you haven't seen it, I used square wave testing to find this frequency response issue in a Marantz:

https://www.audiokarma.org/forums/index.php?threads/finding-frequency-response-issues.985927/
 
So per the Heathkit manual to test 20-20kHz you would use 200 and 2000 kHz square waves. That might explain some of the wave forms I’m seeing on that old Airline receiver…
 
Thanks for a great post! I wonder what would be a reasonably good inexpensive generator to use for a 400 Hz square wave. This is my iphone playing a youtube 400 Hz square wave (just for fun - ). Obviously it's not a good enough quality signal. Does it take a signal or function generator to do this correctly?

View attachment 1423572
Try a tone generator app. My phone is cheaper and performs better than that. Not perfectly square but not ringing that way.
 
Square wave testing can also indicate potential stability issues. Sharp overshoot on the rising edge with ripples (ringing) along the top often indicate a high frequency resonance. This is mostly something you deal with on tube amps with global feedback, but it indicates the possibility of the amp oscillating and maybe nuking a tweeter or other undesirable behavior.
Hi, Could you please take a look at this thread to see if my problem with my tube amp relates to what you said here, especially the later part of comments on the thread?
Thank you very much.
 
Back
Top Bottom