Author Topic: How to use my Hantek Scope for THD  (Read 4780 times)

0 Members and 2 Guests are viewing this topic.

Offline chinoyTopic starter

  • Regular Contributor
  • *
  • Posts: 95
  • Country: in
    • RDDreams
How to use my Hantek Scope for THD
« on: October 16, 2023, 11:49:08 am »
So I have a 100 Mhz 2 channel Hantek DSO.

Am into testing various amps. Have built a few and want to test their THD.
Ive seen a few videos online in them all of the scopes seem to have a function or app to measure THD.
This is missing on my Hantek.
Is there some kind of firmware upgrade I can do that will add this functionality ?.

Or do I have to make do with the very basic math functions like FFT on the scope.
If somebody could step me thru the process of setting up a test.
In addition to test the THD of the amp. I would also like to see how changing cap values in the bootstrap / feedback impact the amps output.

How I have it setup right now is I have a blue tooth module connected to my phone or laptop. This sends out either a fixed freq signal or a freq sweep.
This goes into the amp.
So I have one brobe on the input and one probe on the output. And Im comparing these two either with one freq playing or thru a sweep.

How would I measure THD ?.
It seems I can just pick math function. Select a probe and ask to see the FFT for that signal.
Can somebody pls help. Maybe Im going at this from the wrong angle.

PS: Im also in the process of building a wien light bulb osilator. Because most of the time I cant figure out if the THD is coming from my source signal or the amp.
A friend recommended I first make sure my input signal to the amp had no THD. Sorry For the noobish question.
Good thoughts, Good deeds, Good words.
All the religion you need in life.
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 17187
  • Country: de
Re: How to use my Hantek Scope for THD
« Reply #1 on: October 16, 2023, 03:07:58 pm »
Most modern amplifiers have a pretty good THD and most scopes have a pretty limited linearity. So chances are the just the scope alone may not be good enough to measure THD.
Similar the build in generators are often also not that great and it gets a bit tricky to measure better than the generator to start with (can be done, but is tricky and may want special SW support for this).

So one may want in addition to the scope:
a) a better generator for a very pure sine
b) a notch fitler to suppress most of sine signal. The notches are usually fixed frequency.

In the audio range at least a PC sound card is usually the better instrument that a scope.
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 11867
  • Country: us
  • Retired, now restoring antique test equipment
Re: How to use my Hantek Scope for THD
« Reply #2 on: October 16, 2023, 03:33:05 pm »
I just bought a Rigol DHO914S DSO with AWG.
The first thing I tried was the FFT function, playing with the different windows to do a harmonic analysis.
With the AWG making a 1 kHz square wave, I found that the odd-order harmonics were clearly visible.
However, the AWG itself is specified for < 1% THD on the sine wave, and I could not see its harmonics  in the inherent noise of the FFT.
Later, I'm going to experiment using the distortion output from my -hp- 339A distortion analyzer, which gives an amplified output of the harmonics and noise left over after nulling out the fundamental
 

Offline chinoyTopic starter

  • Regular Contributor
  • *
  • Posts: 95
  • Country: in
    • RDDreams
Re: How to use my Hantek Scope for THD
« Reply #3 on: October 17, 2023, 12:41:06 pm »
I assume AWG means your scope outputs signals. Im not sure if my Hantek DSO5102P can do that.
I did try one of the cheap function generators out of china. It was really noisy. But changing up a few parts did clean up the signal.
But using my phone or laptop sound card did give a much cleaner signal. The Samsung Note 9 Exonos does have a very good DAC and produces clean signals.
So I have two options I can either keep working on my signal generator till it gives me a very low THD.
Or I can find some other way of benching the amp.
What if I were to use a A-B option would that show up any useful info like what the amp was adding to the signal ?.

Based on the above two responces it would seem a Scope esp a cheap one like what I have will not suffice.
Am looking into using ARTA software to see if it can help.

Other than THD how would I look for things like how my transistor choices color the music output. Or is it all down to just THD
Good thoughts, Good deeds, Good words.
All the religion you need in life.
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 11867
  • Country: us
  • Retired, now restoring antique test equipment
Re: How to use my Hantek Scope for THD
« Reply #4 on: October 17, 2023, 02:34:29 pm »
Yes:  that version of the Rigol (with "S" suffix) contains an "arbitrary waveform generator" option that has settings for the usual waveforms (including sine and square waves), along with the capability to generate user-programmed waveforms.
This option is becoming more popular on digital oscilloscopes.
 

Offline wasedadoc

  • Super Contributor
  • ***
  • Posts: 1730
  • Country: gb
Re: How to use my Hantek Scope for THD
« Reply #5 on: October 17, 2023, 02:49:12 pm »
IMHO when you get to the point that half decent measuring equipment isn't capable of measuring the THD of the amplifier, the speakers are limiting the overall performance.
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 11867
  • Country: us
  • Retired, now restoring antique test equipment
Re: How to use my Hantek Scope for THD
« Reply #6 on: October 17, 2023, 04:30:36 pm »
Back to "THD":
Of course, real amplifiers will have some distortion of the input signal.
Two popular ways to quantify that distortion are THD and intermodulation distortion (IMD).
Normal non-linearities in the amplifier will create both measurable effects.
Other, probably nastier, problems such as clipping, "blocking", and slew-rate limiting may create problems that last longer from a particular stimulus, but both THD and IMD are normally measured in steady-state measurements.
The audible effect of IMD is probably more important to actual musical reproduction, but THD is easier to measure.
The traditional way to measure THD is to apply a very clean sine wave to the amplifier input, send the amplifier output to a filter (such as a Wien Bridge) that removes the fundamental tone from the signal, and measure the remaining signal (which contains the harmonics of the single input tone plus noise).
As you increase the signal level, the THD (as a fraction of the output) normally increases:  this is technically "SINAD" (ratio of signal to noise and distortion).
The output (fundamental removed) can be put into a spectrum analyzer or FFT.
Now, the harmonics are at higher frequencies than the fundamental, so the frequency response of the amplifier may reduce them and give an optimistic measure of distortion.
For IMD, you need to input two tones:  there are several standard choices for the measurement technique.
I like to use two closely spaced frequencies in the middle of the audio band, for example 1000 and 1200 Hz.
You then need a spectrum analyzer or similar device that can find the 3rd-order IM products, 800 and 1400 Hz for this case.
For a typical DSO FFT, these may be hard to see next to the stronger input tones.
 

Online macboy

  • Super Contributor
  • ***
  • Posts: 2409
  • Country: ca
Re: How to use my Hantek Scope for THD
« Reply #7 on: October 17, 2023, 06:05:59 pm »
Any decent power amplifier will have a few hundredths of a percent distortion (e.g. 0.05%). Some may be in the thousandths of a percent (e.g. 0.005%). So, that is a few tens to hundreds of parts per million. Any way you look at it, it is a very small aberration compared to the signal level.

An oscilloscope front end (the analog stuff and digitizer) will certainly have much more noise and distortion than that amount. So, no matter what kind of signal analysis you do on the scope, you will not be able to directly measure the distortion from a modern amplifier using only a scope. It is not the right tool.

On the other hand, many people do use good quality computer sound cards to do this (of course most people don't use an actual separate sound "card" these days but you know what I mean). The sound card can generate the clean sine wave that goes through the DUT (Device Under Test) and can digitize its output with minimal added distortion. The actual residual distortion contributed by the sound card itself can easily be measured by connecting its output directly to its input and measuring the distortion on that. This is then the floor of the measurement... You will need to see at least 5x this amount of distortion in the DUT to have any confidence in the measurement of it. Obviously a better sound card will perform better. Various software helps to do this: TrueRTA, Rightmark RMAA, and others. While the oscilloscope has 1000x the bandwidth of the sound card, the sound card may have 1/1000 of the noise and distortion. The sound card will need some help, such as an attenuator on the input, but it can be a very cost-effective and feature-rich solution.

Dedicated test equipment also exists for this purpose. HP 339A or 8903B, Panasonic VP-7722A, anything by Audio Precision, Keithley 2015, to name a few. There are many others, old and new, with various capabilities. Some can only measure THD+N, some can also do IMD, some can do THD (ignoring/removing noise floor).
 
The following users thanked this post: tochnia

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 11867
  • Country: us
  • Retired, now restoring antique test equipment
Re: How to use my Hantek Scope for THD
« Reply #8 on: October 17, 2023, 06:12:13 pm »
I like my -hp- 339A, which uses a feedback circuit around a tracking notch filter to null the fundamental frequency.
It includes a very low distortion generator (10 Hz to 110 kHz frequency set by decade rotary switches) and automatically tunes the bridge to achieve that null.
When varying the overall signal level, the meter (and analyzer output) automatically scale to fraction of pre-notch input level.
The most sensitive full-scale is 0.01%, and my unit achieves a floor of 0.002% from its generator connected directly to the input.
More recent equipment includes that from Audio Precision, which I can't afford.
 
The following users thanked this post: tochnia

Offline chinoyTopic starter

  • Regular Contributor
  • *
  • Posts: 95
  • Country: in
    • RDDreams
Re: How to use my Hantek Scope for THD
« Reply #9 on: October 18, 2023, 08:03:02 am »
This is as far as I have got.
Pic1 shows a clean input signal going into the amp.
Pic 2 whos the output of the amp before cleanup.
Pic3 to follow where I have cleaned up the amps otuput and made it as good or equal to the Input.

I have a DatsV3 sound card. Which I feel can be used both as input and output. Need to figure out how to use it for functions other than extracting speaker parameters. It does have a scope window.

Ps: My phone is putting out a slow sweep from 35hz to 22Khz. That is why the screen shots have diffirent Freq values. Sometimes I spot specific areas in the range where there is noise I then switch from sweep mode to a fixed freq mode to zero out those areas.
The amps are
1. An old Akai Amp based on STK IC
2. Rod Elliot inspired P3a done on a single layer PCB
3. A 7294 Stereo Board Amp. On a 2 layer board.

Im trying to see which AMP works the best as in lowest noise.
So far the Chip AMP 7294 is wining hands down.
« Last Edit: October 18, 2023, 08:07:48 am by chinoy »
Good thoughts, Good deeds, Good words.
All the religion you need in life.
 

Offline chinoyTopic starter

  • Regular Contributor
  • *
  • Posts: 95
  • Country: in
    • RDDreams
Re: How to use my Hantek Scope for THD
« Reply #10 on: October 19, 2023, 08:25:00 am »
Ok I finally understood your point about using a sound card and some software as the best route to do this.
ARTA is one software I found.
There are others.
Will go down this route.
The learning curve is steep with these windows and mac programs.
Just google software spectrum analysis.
Im just starting out here but for sure the results are better.
« Last Edit: October 19, 2023, 08:26:34 am by chinoy »
Good thoughts, Good deeds, Good words.
All the religion you need in life.
 

Offline Vovk_Z

  • Super Contributor
  • ***
  • Posts: 1585
  • Country: ua
Re: How to use my Hantek Scope for THD
« Reply #11 on: October 19, 2023, 02:18:35 pm »
ARTA is one software I found.
Yes, ARTA works fine, even in free demo mode. You just need good enough soundcard (with a good linear input ADC) and 1:10 voltage divider for most amplifiers (for example 1800 R : 200 R).
Here on the forum there were several topics about soundcards for software measurements.

« Last Edit: October 19, 2023, 02:20:21 pm by Vovk_Z »
 

Offline Yuu

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: How to use my Hantek Scope for THD
« Reply #12 on: October 19, 2023, 08:39:26 pm »
Scopes are primarily time-domain instruments. Not really the right tool for the job. Also, I get the feeling FFT functions on scopes are sometimes more of an afterthought.

If you want, you can write a script to take time-domain data from the scope and then do the FFT and processing on your PC. It's a good exercise to do.

A PC soundcard might do just as well or better for audio-frequency characterization. What you really want is a distortion analyzer but those are expensive. There is however a reasonably priced one by a company called QuantAsylum. I bought one and have been playing around with it. Seems to work pretty well.
 

Offline chinoyTopic starter

  • Regular Contributor
  • *
  • Posts: 95
  • Country: in
    • RDDreams
Re: How to use my Hantek Scope for THD
« Reply #13 on: October 21, 2023, 09:21:41 am »
I have one doubt though.
My understanding has always been that you inject a 1Khz signal or you do a freq sweep and then look at the results.
But in some places. They talk about a main signal and a pilot signal.
Can anybody share some clarity on why two signals are used. ?
I have an app on my phone that allows me to inject any 4 freq at the same time. And each can have its own volume set.
Pilot signals are normally smaller than the main signal.
Good thoughts, Good deeds, Good words.
All the religion you need in life.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf