Show by Label

Saturday, October 14, 2017

Setting up an FFT Measurement System

In this post I'll describe how I use a number of components to create a system that you can use to measure harmonic distortion and noise by using FFT's. This system can be configured in several ways to verify and measure the distortion of amplifiers, sine wave generators, power supplies etc.

To measure the performance of a black-box system (the Device Under Test - DUT), a very clean and low distortion sine wave (the fundamental) is used to stimulate the DUT, while the output is sampled. The output signal is stripped from the fundamental sine wave by means of a sharp filter, and the remaining residual, the noise and distortion is fed to an FFT system that can show the results.

Following is a picture of the setup needed to measure harmonic and noise (DHT and DHT+N) from a DUT.

This is a setup that can be used to measure sine wave generators, or to verify the Sound Card interface to the PC and the FFT software.

A high quality low distortion 1KHz sine wave is fed to the DUT, here symbolized as an amplifier. The output of the DUT is fed to the Soundcard Interface and attenuated. This interface protects the delicate and sensitive inputs of the USB Sound Card, and also facilitates the various measurements. The resulting output is then fed to a Twin-T filter which removes the 1KHz fundamental. The residual (everything added to the pure sine wave) is then fed back into the Soundcard Interface and then going to the USB Sound Card Interface, where it is digitized and sent to the PC over the USB link. On the PC, the AudioTester software is used to show the residual (and noise) by means of an FFT.

This same setup can also be used to measure the noise performance of a power supply. In that case, the power supply output is first stripped from the DC component by using a capacitor (not shown), and then fed to the Sound Card Interface, and from there to the USB Sound Card for digitizing and on to the PC and the AudioTester FFT software.

If you want to measure the quality of sine wave generators of verify the components in the link, you can also use the following much simpler setup.

Here, the output of the sine wave generator is fed directly to the Twin-T filter and the residual is digitized by the USB Sound Card. The Sound Card Interface is not needed, because the input levels are low.

In an earlier post on this Blog, I already described how I put the the high quality sine wave generator, and an active Twin-T filter in an enclosure.

This instrument is described here:  simple but precise 1khz distortion system

I use a Sound Card Interface, to attenuate (high) signals coming from the DUT, which would otherwise destroy the input of the USB Sound Card, or the other measurement components. The output from the Interface then goes to the Twin-T filter and then to an actual USB Sound Card connected to a PC. The digitized output of the Sound Card is used by the AudioTester software running on the PC to show the results, typically by an FFT diagram.

The Sound Card Interface above is a DIY project and described here

During my first baby steps in putting this system together and collect some experience, I used this inexpensive (around 25 Euros) USB Sound Card Interface:

It worked OK as you can see in the posts I mentioned earlier, but I was not very impressed with the results. It needed further tweaking, adjusting and modifying. Since then, I moved on to other projects, so for a few years, I really didn't need this setup.

When I recently wanted to profile my DIY Tek SG502, I put the system together again and quickly made some changes that makes the connections between the units easier.

However, problems showed-up I had not seen before. It was probably caused partially because in the meantime, I switched to a newer and different Laptop and also upgraded to W10. I also could have done something wrong during some of my experiments, because I suspect that something in this USB Sound Card box could be damaged because it now shows a lot more harmonic distortion then I remember having seen before.

At first I was mystified to the cause, and could not put my finger on it. I now attribute it to a combination of my W10 Laptop, the W10 sound drivers, the W10 drivers for the USB Sound Card, plus something wrong with the drivers of the AudioTester software, because it is now crashing all the time.

Too many variables, so I started to address them one by one.
When I used my FY6600 DDS Function Generator, it showed THD+noise performance that looked pretty good and a little worse than the specifications. My unprofiled and just finished Tek SG502 was also just outside the specifications, but that was to be expected. However, the ultra pure 1KHz since wave generator from Victor showed results that were only a little bit better than the other two, so I started to suspect my reference.

But first, I wanted to buy a better USB Sound Card. I searched around, and found one that seemed to have the right performance, so I ordered an ASUS 

With the excellent help from Victor Mickevich, we found out by making some measurements, that the problem was not due to his sine wave generator.

I have a license for the AudioTester software, but I was not happy with the overall driver situation, and had problems with the calibration. To eliminate that aspect, I tried another software package, ARTA. I selected this, because there are many references on the web and examples of measurements made using Victor's oscillator, and the ARTA software, so I could start to compare. However, it did not improve on the root cause, the excessive harmonic distortion on Victor's oscillator.

It was now time to take the next step, and invest in a better USB Sound Card. I purchased a (brand new) ASUS Xonar U7. To my utter dismay, I found out that the CD that came with the software, did not have W10 drivers. C'mon ASUS, we're in the middle of 2017, and you have not updated the CD yet? Obviously, that did not give me a lot of confidence. Making a few measurements did not improve the situation much, so I returned the unit the next day.

Time for a reset. I realized that I lacked the knowledge to get to the bottom of this issue, so I had to learn a lot more first of all. I literally spend a few weeks going through all kinds of Forums and Blogs to see what other people were using, and to learn more about the overall system and the components in much more details.

Eventually, after going through many blogs and forum's, there were a number of USB Sound Cards that stood out. The majority were from the same company, the E-MU 0202, the E-MU 0404 and a few others, and, they were available on eBay now and then.
I decided to try to score one of these and after some miss-hits, I scored a used E-MU 0202.

The ultra-pure 1KHz sine wave generator I have, was designed by Victor Vickenich (vicnic), and he also published a couple of modifications to this Sound Card, with lots of pictures together with the FFT results using the same 1KHz source.

At this moment, we are out of the country for 7 weeks, so I will not get my hands on the 0202. This gave me the time to do some more investigations, so I started to study what Victor and others had done to the 0202 to get these incredibly good results. I took me a little while to find information, but I eventually found a few sources of  diagrams that together with his photo's of the PCB, allowed me to reconstruct the modifications. It turned out that the various sources of 0202 schematics I found had errors, or were incomplete.

Since I had nothing else to do at the moment, I took the time to capture all information in my schematic capture program (DipTrace), so I would have a record of the original status, and could put a description together for the modifications Victor, and maybe others did.

Afterwards, I found that the schematics for the 0202 are very similar to the 0404, although in a different layout and with several value changes and part numbering changes. Schematics for the 0404 are available, but I did not find good ones for the 0202.

Based on the various sources and the photographs of the PCB, here is the resulting schematic of the E-MU 0202 for the "B" channel input to the ADC.

E-MU 0202 Front-End Schematic Diagram Channel B 

And here is the more complex "A" channel:

E-MU 0202 Front-End Schematic Diagram Channel A

Note: Because I do not have the 0202 myself yet, I used photographs of the PCB and various sources I found, but I could not verify this for correctness. Use with care!

For the time being, I left out all power related parts. I'll add them when needed, because I'm considering adding a separate power input, instead of using the USB 5V from the PC. That's a potential project for later.

First of all, as soon as I have been able to verify the unit, I will start with the modifications that Victor made to his 0202. He eliminated much of the front-end of the unit. He uses an attenuation of his own, so there was no need for the input section. I will be using my Sound Card Interface if needed, so this is no limitation for me either. Cutting that input section out of the loop saves a number of dB's in noise, and turns the Sound Card more into a tailored measurement instrument.

I scored a EMU0202 on fleabay, and although it was supposed to be working, the output amplifier did not. I could not find the error, but I really didn't care. I wanted the digitizing front-end, so I applied the same modifications Victor published and did on his 0202.

Here are the two links to Victor's modifications and measurement results:
Modifications with results
Scroll down on the next page to get to the photographs with the modifications:
Detailed photo's of the mods
Note that a little below this post is another one with a correction to the value of R46, which needs to be 6K8.

Below is the schematic information I put together for the "B" channel, and the parts to be removed to isolate the front-end circuit to ADC input.

The volume control potmeter is removed to make place for an RCA or BNC connector on the front panel. I used a BNC connector myself.
The two removed series resistors, R54 and R32, both 1K4, will isolate the front-end input from the drivers for the ADC. The two resistors that are used to create the dynamic zero balance, R35 and R41 need to be removed too.

Following are the value changes and the new additions to form the new input circuit to the ADC.

The RCA or BNC connector can be mounted on the front panel in the hole of the potmeter. I had a BNC connecter this fitted perfectly. After that, the input series resistor, the capacitor and the input Z resistor can be mounted Manhattan style. Note that Victor mentioned that this resistor can be tweaked in value to remove artifacts. I kept mine to 220K.

Three feed-back resistors change in value.
R28 : replace the 1K value to 6K8.
R46 : replace the 1K value to 1K5
R34 goes from 1M to 1K. (Victor used the original removed 1K resistor from R28 and simply soldered that on top of R34 with the 1M value.)

Finally, the connection from the output of U6-B to the input of U6-A can be created by soldering the second removed 1K4 resistor, (the originals are too small, I used a new 1K5 0603) "Tomb Stone" and with a small wire to the input of U6-A. His detailed photographs show the way.

The result on my modified EMU0202 is rather stunning I think:

So my new EMU0202 digitizing front-end together with Victor's quality oscillator, this is a perfect reference combination for my applications.

Here is a screenshot of the EMU0202 with my DIY Tektronix SG502:

And here with my FeelTech FY6600-30 Dual Channel Function/Arbitrary Waveform Generator:

So with this setup I finally have a good starting point.
Next step will be to add in the Pete Miller Soundcard Interface and do some more measurements.

It may take a while, I have a few other projects I'm working on, but stay tuned for more...


1 comment:

  1. This comment has been removed by a blog administrator.