Simpel 1/2 DIY 1KHz Distortion Analysis Tool

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Some of the designs that are discussed in the forums are way too elaborate, too precise (beyond my means and need) and too expensive for me. I wanted to take a quick and not-so-dirty route that would help me to measure amplifiers and power supply noise.

I decided to use a 1KHz sine wave generator from Victor (vicnic), and simplified the Twin T-Filter notch filter design from Dick Moore (richiem)(Active Twin-T notch filter) for just 1Khz operation.

I use a scope and the AudioTester (V3.0) software to analyze the output of the filter, and I will use a simple pre-amp as the front-end for my Laptop (has no line-in). I found a cheap unit on Amazon to get me started, the SD-AUD20040 for less than $25.

I'm also building the "Pete Miller" Sound card interface, but in this post I would like to report on the building of the oscillator and twin-T filter.

Basically, I put Victor's oscillator and the twin-T together in one box, and added a power supply.

Let's start with the power supply.
I selected to use a separate AC transformer outside of the box, to avoid mains hum etc. I found a very nice one on Amazon, that supplies 25.5 V AC with 650 mA. (Look for Rain Bird UT1) The nice thing about this transformer is that it comes in a housing, has leads and an LED. The transformer goes into a mains distributor that has filtering. The reason why this transformer is so nice, is that it outputs 25.5 V AC, and not the usual 24VAC. Because Victor's oscillator needs 35VDC, I could use a full bridge rectifier and an LM317 and keep things cool, rather than using a doubler and deal with 70VDC as input to the LM317. They will get hot, causing temperature related drifts. I also did not want to "steal" the +/- 15V coming from Victor's oscillator to feed the filter, so I added it's own supply. To create just enough headroom for the first LM317, I adjusted the output to 34V, instead of 35V.

Twin T-Filter info.
I used two (cheap) 5K 10T pots for the filter, and shunted them with 1K. This will still leave them linear enough, but the adjustment is still a little coarse. I have two 2K 10T pots on order (eBay $4.40 each) and will use them, but still shunted with 750 Ohm to get to about 500 Ohm.
I use R11 and R15 (rather than 10T trim pots) to set the filter notch about in the middle of the 10T filter pots.

To get the filter as accurate as possible, I purchased 6 good 10nF caps, and sorted them to get the optimum balance of the filter. The values are in the schematic.

Enclosure:
Because I also wanted a nice enclosure, and not expensive, I used a plastic one that only set me back $27 (look on eBay for 130711627464). I needed to shield the inside and did that the easy way by using copper foil (look for guitar hum materials) and circuit board material. So far this seems to be adequate.


Attached are the schematics for the power supply and the Twin-T as well as pictures of the boards, the shielding and the instrument panel.
I do not (yet?) have a front panel with descriptions, so here's an explanation from left to right.
1. Volume control of the oscillator
2. Double RCA outputs for the oscillator
3. Just above the output is a switch I use to attenuate the output signal -10 dBV by using a 275 Ohm resistor to ground, if I use a mic input.
4. Filter input RCA
5. Filter 10T potmeter 1
6. Pass through switch to bridge the filter (to set the output)
7. Filter 10T potmeter 2
8. Filter output RCA
9. Switch to control the 20dB amplifier boost.
The AC jack and the power switch are on the back panel.
The stability of the oscillator and the filter, together with the shielding and the reduced heat from the power supply leaves the notch very stable after an initial warm-up period. There is no need to rush an FFT measurement!

The quality of Victor's oscillator is well known and reported, and so is Dick's twin-T, so I did not add measurements.

Should there be interest for more details, feel free to ask.
 

Attachments

  • Power Supply.pdf
    15.7 KB · Views: 257
  • Twin-T Filter.pdf
    18.2 KB · Views: 330
  • Power Supply.jpg
    Power Supply.jpg
    25.9 KB · Views: 842
  • Shielding.jpg
    Shielding.jpg
    29.2 KB · Views: 839
  • Inside.jpg
    Inside.jpg
    30.8 KB · Views: 835
  • Back of Frontpanel.jpg
    Back of Frontpanel.jpg
    33.4 KB · Views: 839
  • Analyzer.jpg
    Analyzer.jpg
    26.7 KB · Views: 839
Last edited:
Disabled Account
Joined 2012
Hi,

This is great practical use of the information you have found. How about a schematic that puts it all together as you have done in your box? Block diagram of assemblies/sub-assembles and over-all schematic. Then it can be quickly put to use by others.

THx-RNMarsh
 
Thank you Richard!
Because I have no practical experience working with audio analyzers and specifically THD+N measurements, I'm building up my tools set while learning on the way. I'm waiting for the circuit board from Pete Millet to build his Soundcard Interface. (I already blew one of the mic channels in my laptop)

I'm also waiting for the arrival of three more 10T pots to make the output level adjustments of Victors oscillator more precise, and I also want to change the tuning pots for the filter.

In my complete measurement chain of bits and bobs, I also need to find the right place of it all. Currently I am trying to decide where to put the T filter in this chain. The most logical place for me seems to be after Pete's DUT input attenuation, and before the Soundcard input driver and RMS measurement. (by opening-up the connection at R28 if you're familiar with the schematic)

If I can get that all working, then yes, it does make sense to document my setup in more detail. And IF (big) it passes the approval of the experts of course. I can't be the only novice out there (with a limited budget) so there must be many more like me (I hope) that could benefit from my findings.

BTW, I learn a helluvelot by virtually sitting on the lap of the real experts like yourself!

Thanks,

Paul
 
Update

I received the 1K 10T trimpots for the filters so I could finish the filter schematic and do a measurement just to show the result of what's possible.

The copper shielding took a lot of hum and noise away. Pleased with that result.

The resulting FFT looks pretty good to me, but I'm no expert :D.

Next step is to build Pete's Soundcard Interface and test out where I can put the filter in the measurement chain for a THD+N analysis. PCB is in the mail...

To be continued...

Paul
 

Attachments

  • Twin-T Filter schematic.pdf
    18.1 KB · Views: 347
  • First FFT.pdf
    157.9 KB · Views: 278
  • Test Setup.pdf
    89.9 KB · Views: 246
Last edited:
Member
Joined 2004
Paid Member
Change IC1 to an AD797 or an LME49990. It will lower the distortion significantly. If I'm reading the plot correctly the harmonics are around -105 dB. You should be able to get the harmonics of the Viktor oscillator to about -140. The 134's are good but won't give that performance in that location. See this: http://www.diyaudio.com/forums/equi...matic-distortion-analyzer-17.html#post3847749 for my results in the same location.

The next challenge in the design is the input signal processing, You will need a really good differential input circuit with low noise to get the most from the rest of the circuit.
 
Thank you Damian!

I looked at the datasheet of both suggestions. Mouser does not have the 49990, Digikey has both. There are a number of variations available for both amps, is there one of each you can further recommend?

Either way, I would need to change the layout to accommodate single channel chips. I selected the dual channel 2134 with an attempt to reduce temperature drift on the notch. I'm pleased with the stability after a good warm-up period, but for this measurement, distortion has the higher priority.

Going back to single channel amps is not a big issue, but I'm going to hold off until I have Pete's Sound Card Interface build. I "upgraded" the differential input amp from OPA2604AP's on that board to the LME49720NA per forum thread of that project. The PCB should arrive today.

I will post the results in a day or two and since I will need to order your proposed chips, I'll hold-off until I have more suggestions for improvements to avoid the high shipping charges.

Paul
 
Some observations

I've had two problems with the Soundcard Interface so far.
1. I could not reach the "zero"mV RMS on the display with the zero adjustment pot R25.
2. I experienced excessive noise on the SC Input jack

Both contribute to the "zero adjustment" of course, but 7 mV is definitely too much, despite using copper shielding all around the enclosure and using a 12 uH choke between the fuse and the DC-DC convertor, 470nF caps across C22, C7, C8 and 1uF across the C18, C13 and C11 electrolytes. All resistors are 1% metal film. R 21 and R23 are hand matched to 0.01%. I use 4.7 uF caps for C2 and C3 with a 30nF difference between the two.

Here is what I did and found.

Based on suggestions in the Soundcard I/F forum, I ordered for U4 an LME 49720, for U7/U6 a THAT 1240P08-U and for U8/U1 a THAT 1646P08. That produced the disappointing results, so I also ordered the originally suggested parts.

When they arrived, I could now try various combinations for U4 and U7, and found that the combination of the OPA2134 for U4 (tried 2 different ones) and the INA134AP (tried 3 different ones) all produced between 0.3 and 0mV RMS on the display, albeit with R25 all the way up to the +15V rail. The two different THAT 1240's that I tied produced a 7mV offset. They may be better, but for now they are back in the box.

I noticed that there is about a 10 second warm-up and stabilization period, so keep that in mind.

So, switching back to the originally suggested parts by Pete, I managed to get to a real zero. The noise level will probably the reason for not getting the adjustment below 0mV, but I could not get the noise down. (with a shorted and grounded input) Measuring that with the AudioTester software, I could not get much below a 100dB noisefloor.

I should mention that I'm still juggling (struggling?) with the optimum connection between the balanced SC interface and my cheapo USB Sound Card (with a stereo 3.5mm line input plug). I've added ferrite clamps on all cables.

Switching to a 5V DC wall-wart instead of the USB power from my Dell Studio laptop helped with the noise. I suspect that here is a ground loop if I use the USB power for the SC I/F and the USB Sound Card box, which is also connected by a USB cable.

I'm now waiting for some more parts to make a dedicated balanced cable, but to circumvent the balanced connection, and also to add-in my Active T-Filter, I added RCA connectors in parallel to the SC Input and the SC Output.

Adding the floating RCA connectors with a shielded cable to J5 and J6 did not adversely effect the noise floor. At a later stage I can move the RCA connection to R28 (I already tried that) for the SC Input and to pin 4 of U1 to eliminate the balanced output if I decide I won't need that, but that will also eliminate the amplification, so I did not want to do that right away.

When using the RCA connections, I use a 6.3mm telephone plug without a cable attached to "open" J6, which is otherwise grounding the input signals. Messing around with some different variations of cables and connectors, I could get the noise level down to about 120dB, but that is still too high for my goal of at least 130dB. (despite the amplification of the SC I/F)

My Victor 1KHz sine wave oscillator has a noise floor of 130dB, and that's my intended noise floor.

In a few days, we're moving to our summer quarters, so I have to put this project to rest for a while. Starting in September, I will pick-up where I left and report back.

Stay tuned if you're interested.
 
I also had a lot of struggles getting the grounding just right to satisfy the sound card interface (M Audio Profire 610). Also, the distortion from the Millet interface was significant. Biggest improvement was ironic - I had to use the USB supply internal to the laptop, and not an external supply. This forced the Millet interface to use the DC/DC converter, which ended up providing a low noise result. Somewhere in the forum are my results, which confirm really low distortion of Victor's oscillator.
 

Attachments

  • pre-notch1.jpg
    pre-notch1.jpg
    115.8 KB · Views: 272
  • post-notch1.jpg
    post-notch1.jpg
    118.3 KB · Views: 162
Member
Joined 2004
Paid Member
The underlying problem of noise comes from the nimpedances and levels the system is optimized for. In my efforts around the THAT parts they could deliver excepptional results as long as the signals are close to the 10V max they were designed for. But to get better than 100 dB SNR the signal had to be more than about 5V. its limited by the resistor values and scaling internal to the chips. I gave up and designed a classic three opamp setup where I could control the impedances and use the low values necessary for low noise. Fortunately .1% resistors are pretty easy to get so trimming is not as necessary.
 
Some more observations I

Well, the connectors and plugs I was waiting for arrived, so I could do some more building and testing before I have to abandon this project for a while.

1Audio made some valuable remarks and suggestions.

For now, his suggestion about the "optimization of the circuit it was intended for" let me go back to the intended function of the SC I/F. The connectors and plugs I ordered were required to build a "real" balanced or floating cable, and not use half-baked kludges. See Balanced Cables picture.
From left to right:
1. From 1KHz osc. RCA Out to BNC SC I/F Input.
2. From 1KHz osc. RCA Out to USB Soundcard (right channel only)
3. From 1KHz osc. RCA Out to Balanced SC Output
4. From Balanced SC I/F Output to 2.5mm USB Line Input (right channel only)

I also have included a picture of various connectors, plugs and convertors that I used to get from connector type A to connector type B, although helpful, they turned out to be less than optimum for balanced work. My first mistake!

So back to the intended use and the minimum setup.
I have included a picture of the USB Sound Card that I found on Amazon (see an earlier post) to get me going. I use a laptop and I only have a mic input. I wanted to start small and cheap and found this unit for only $9.98 :D

Because I have absolutely no experience with this kind of setup, my intention was to learn from it before I spend serious money on a good interface. Anyway, the Line Input is a 3.5mm stereo plug. I use a USB cable to connect to my DELL Studio 1735 laptop, and I've added a ferrite clamp on both ends of this cable.

The noise floor of this interface is attached as well, so this is my baseline. Note the mains hum at 60Hz, but also the many 20dB peaks across the spectrum, because they puzzle me. This is without the 1KHz oscillator even powered on. Also note the 65536 points of the FTT, but read on.

Next, I wanted to show you the result of the previous post with the null on a grounded and shorted input of the SC I/F, and the resulting noise floor. Note the 65536 Points of the FFT again.

The I fed the 1KHz sine wave into the input, and to use the 200mV attenuator setting, I used a 90mV RMS input signal. See the picture and the two FFT's. The first one uses the default number of Points (8192), but when I played with the various settings, I noticed that the noise floor dropped when I used a higher Point setting. I don't understand why the noise floor is affected. :scratch: Can somebody enlighten me on that please?

Next post are some more measurements...
 

Attachments

  • 1KHz 82mV - Input Gnd - FFT 65536 Points.jpg
    1KHz 82mV - Input Gnd - FFT 65536 Points.jpg
    320 KB · Views: 137
  • 1KHz 82mV - Input Gnd - FFT 8192 Points.jpg
    1KHz 82mV - Input Gnd - FFT 8192 Points.jpg
    313.9 KB · Views: 172
  • 1KHz 90mV Input Gnd.jpg
    1KHz 90mV Input Gnd.jpg
    43.5 KB · Views: 172
  • FFT Noise Floor- Input Shorted and Grounded.jpg
    FFT Noise Floor- Input Shorted and Grounded.jpg
    297.9 KB · Views: 187
  • Input Grounded.jpg
    Input Grounded.jpg
    37.3 KB · Views: 344
  • FFT Noise Floor SD-AUD20040 USB Soundcard.jpg
    FFT Noise Floor SD-AUD20040 USB Soundcard.jpg
    297.9 KB · Views: 353
  • SD-AUD20040 USB Soundcard.jpg
    SD-AUD20040 USB Soundcard.jpg
    37.6 KB · Views: 346
  • Connectors & Plugs.jpg
    Connectors & Plugs.jpg
    55 KB · Views: 335
  • Balanced Cables.jpg
    Balanced Cables.jpg
    61.9 KB · Views: 335
Member
Joined 2004
Paid Member
Noise is a somewhat different case from measuring a signal. Noise is random and the measued level is an average (RMS technically) of the energy in a specific band during the time its measured. The FFT divides the band into subbands. The number of points is the number of subbands. So 1V of noise uniformly distributed from 20 to 20K (white noise) will get divided into 8192 sub bands with 1/8192 part of the noise. Going up to 131K points divides the noise that much more with less per band. A repetitive signal, say a 1 KHz tone will always be in one band so the noise falls away while the signal stays. When looking at low level harmonics this helps make it possible to see really low level harmonics, since the noise falls with increasing resolution. All the other little spurious signals creep up with increasing resolution like power line harmonics.


I hope this helps.
 
Thank you Demian for this explation!

Because you can seemingly "manipulate" the noisefloor by the number of points/ subbands, is there an agreed default to compare apples and apples, or, rather FFT's with FFT's when you measure things like a noisefloor or a THD+N?

And if so, is this the 8K version?
 
Member
Joined 2004
Paid Member
Using FFT's for looking at noise leads to the confusion here. Noise is usally specified in a band; e.g 20Hz to 20 KHz or with a weighting curve e.g. A weighting. When measuring with an FFT to get back to the standards you need the RMS sum of the noise in the included bands. The software usually does this for you somewhere. I don't know audiotester at all so I can't help there. The other way noise is compared is in what is the "unit bandwidth" as in nV/rtHz, which means the noise in a 1 Hz band at the target frequency. This is good because its interchangeable and uniform, much as is "A" weighted noise. The other benefit is that you can tell if the device is noisy at specific bands.

You can use this online calculator Noise calculation calculator calculate Thermal noise Johnson noise white voltage level Nyquist dBu dBV signal-to-noise ratio S/N temperature bandwidth noise figure - sengpielaudio Sengpiel Berlin to see how much noise a resistor will add to a circuit. In combination with LTSpice's noise function you can see where noise is from and what you can do to reduce it.
 
Last edited:
Some more observations II

So the next step was to start using the SC I/F input section. I fed the 1KHz sine wave into the Balanced Soundcard Out input. (using cable Nr. 3)
I internally looped this signal to the Input, using the GenMon switch, and measured the result with the 1KHz GenMon FFT.

I don't see significant changes, so this section seems not to add any artifacts or noise, with this setup. Note however that the RMS meter now shows twice the input voltage, due to the amplification of the signal. This is why I selected about a 90mV signal to stay in the 200mV setting.

BTW, the amplitude of the oscillator is very hard to finely adjust with the standard 20K potmeter, so I ordered a 10T wire-wound one. When I wanted to install that, I noticed that although the schematic for the 1KHz oscillator shows a 10K potmeter, which is what I ordered, Victor changed it to a 20K one. I did not want to mess with his circuit by using a 10K pot, so had to order a new one...and it's still in the mail...

Next measurement was to make an external loop, as if there was a DUT in between, just to get a baseline again. The picture shows the BNC cable loop, the RMS display, and next the resulting FFT.
It's hard to see any difference, which is good of course!

I could use the oscillator and feed that directly into the DUT, but then I'm loosing my RMS input measurement and I begin to like that, despite the x2 amplification and resulting recalculation. So far, I've used a scope to set the output levels. (I'm a "no scope, no hope" guy, so I still think more in Volts P-P then RMS, let alone dB's) Time will tell if this pony is still able to learn some new tricks. ;)

Finally, I made a measurement with the maximum output of Victors oscillator. It turns out that this is 2.75V RMS (7.8 V P-P) measured with a scope, so the RMS meter shows a nice 5.49V result on the 20V attenuator setting.

Again an accurate result, and I probably at this point also should apologize to Pete Millett for the misleading issues that I had with his design, because they were all based on my inexperience and outright stupidity. :eek:

Next up, I will start to measure some real DUT's just to learn how to do all that with my kit. And after that, I need to integrate the Active double T-Filter to finally get to my intended THD+N measurement.

I have three headphone amps, two self made and one O2, my reference amp, and these are typical for what I want to measure. All these have 3.5mm stereo inputs and outputs.

The other type of measurement I would like to start doing with this setup is power supply noise.

After I have figured out what I need and how to do all the measurements I would like to make, I will hopefully be in a better position to take the plunge and invest in a better USB soundcard to further attack the noise floor, artifacts and extend the measurements. One baby step at a time..

The QA400 looks interesting...
 

Attachments

  • 1KHz 2.75V Ext. LoopThru.jpg
    1KHz 2.75V Ext. LoopThru.jpg
    44 KB · Views: 105
  • 1KHz - Ext Loop - FFT 65536 Points.jpg
    1KHz - Ext Loop - FFT 65536 Points.jpg
    316.7 KB · Views: 126
  • 1KHz 90mV Ext. LoopThru.jpg
    1KHz 90mV Ext. LoopThru.jpg
    40.5 KB · Views: 132
  • 1KHz - GenMon - FFT 65536 Points.jpg
    1KHz - GenMon - FFT 65536 Points.jpg
    316.3 KB · Views: 131
  • 1KHz 90mV GenMon.jpg
    1KHz 90mV GenMon.jpg
    43.1 KB · Views: 134
  • 1KHz 2.75V - Input Gnd - FFT 65536 Points.jpg
    1KHz 2.75V - Input Gnd - FFT 65536 Points.jpg
    313 KB · Views: 111
Member
Joined 2004
Paid Member
Measuring power line noise needs special care to make sure you know what you are looking at and don't make a pile of fried stuff or people. The easy way is to get one of these http://gryphon-inc.com/Spec Sheets/Power Monitoring/917010A - ONEView.pdf but at a more realistic price- $50. Manual here: http://pdf.textfiles.com/manuals/STARINMANUALS/ETA/Manuals/Power Probe.pdf shows that is pretty simple inside but you would need to be sure the transformers you use will have adequate insulation. I have one somewhere around here and can provide more info if you need it. Expect to see about 3% THD. If you have the usual assortment of switching supplies (TV's computers, phone chargers etc.) you will see a lot of junk in the 20 -50 KHz range and up. Have fun.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.