Design of a sound card "Front end" for audio test set

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
And instead of a direct connection betweensignal ground and chassis ground a 10 to 100R resistor to avoid ground loop currents. Many people shunt this resistor with a 100nF cap and anti-parallel diodes.

Jan
 
I've built what I would like to call a DIY Audio Analyzer. Not just an Audio Interface Frontend, because I integrated an Audio Interface, PC + touch screen, preamps, attenuators, output amps, Power Amp and 4-channel DVM module into a single instrument. Integrating everything makes it a versatile and easy-to-use instrument. I'm still working on my website, but attached, you will find the chapters about this instrument that I already finished. I'm very happy with it, though it's far from perfect. The cabinet construction, made of wood, profile corner strips and steel plates, will not win a beauty contest. And the internals are a mess of wires and PCBs. Yet, it performs well, and with the modified UMC202HD I was able to get THD figures similar to a Babyface Pro FS costing 9 times as much.

What I'm happy with:
  • Having all functions integrated in a small form-factor instrument (30 x 30 x 35 cm).
  • Very low THD.
  • Sensitivity range of 2mV @ -3 dBfs up to 200V @ -3 dBFs.
  • Protection range on the high-Z inputs estimated to work up to > 250V/50hz, even on the most sensitive 200mV range. (Admittedly, not tested...)
  • Integrated DVM module, displaying the levels on all channels in V (RMS) and dBv. The DVM can also display gain/attenuation between any two signals.
What could be improved:
  • Using relays for signal routing and stepped attenuators, instead of the clunky Aliexpress multi-deck rotary switches that I used. Cheap, but they are garbage. There is varying contact resistance, and you need a torque wrench to rotate the switches.
  • Better cabinet construction.
  • Lower noise outputs (thank you, Behringer for not including a decent LPF on the DAC output).
  • Instead of Bourns multi-turn pots for level adjustment, use e.g. ALPS RK27 series pots with a Vernier reduction. I made one myself on the mic preamp gain potmeter, but there are better, commercially available Vernier reductions.
  • Reduce the number of separate PCBAs to a minimum to minimize wire clutter, hum pickup etc. Place all front-panel switches, pots, connectors etc. on one or two PCBAs.
I hope this build can be a source of inspiration, especially on how not to do it. 😬

Jan

View attachment 127185
FANTASTIC! :)
Not really what I am after, but your build is magnificent!
I like those things! I like the will it takes to complete these projects!

My version (philosophy ? ) is a bit different than yours, but yes indeed, there are quite a few inspiring section that I will study!
Funny enough, I was searching the web for RMS converters and found exactly what you are using, the AD8436!
I was looking at the AD 736/737 (as used by Pete Millet) some discrete version (Heatkit AC volmeter and HP)... There are several options. It is a matter, at the current design stage I am, to chose a good viable and affordable alternative. So far, i Found that discrete AC/RMS converters are simple in theory and build, and inexpensive, but are really bitches to calibrate/adjust/tame! and are quite intolerant of temperature drift! To the point of given the quality and simplicity of those AD converters on a chip, at 10 to 30$ for the chip is actually worth every penny!
I have also to explore the THAT "audio engine" that are used to build dynamic processors, they all contains a RMS/DC converter that are quite capable and some include the op-amps etc needed. I have to dig on their site.
 
And instead of a direct connection betweensignal ground and chassis ground a 10 to 100R resistor to avoid ground loop currents. Many people shunt this resistor with a 100nF cap and anti-parallel diodes.

Jan
Replace the 0R with anything you want I guess...
Cap and diode shunt? really?
I guess I can add this as an option but are we real here?
 
Replace the 0R with anything you want I guess...
Cap and diode shunt? really?
I guess I can add this as an option but are we real here?
My reaction as well. There actually is a possibility of a resonance at diode switching but the issue is mostly of radiated RFI. The rectified DC is filtered...and filtered...and regulated...and filtered...so, no, not necessary. But also, no harm either.

The output decoupling cap is 10X the recommended value.

My blind spot is that I don't know what this thing is actually powering.
 
This 3ohm/ 100uF combination will give an Fc~50Hz. Are you sure it's correct?

Also, what's the purpose of D5/D6?
 
FANTASTIC! :)
Not really what I am after, but your build is magnificent!
I like those things! I like the will it takes to complete these projects!

My version (philosophy ? ) is a bit different than yours, but yes indeed, there are quite a few inspiring section that I will study!
Funny enough, I was searching the web for RMS converters and found exactly what you are using, the AD8436!
I was looking at the AD 736/737 (as used by Pete Millet) some discrete version (Heatkit AC volmeter and HP)... There are several options. It is a matter, at the current design stage I am, to chose a good viable and affordable alternative. So far, i Found that discrete AC/RMS converters are simple in theory and build, and inexpensive, but are really bitches to calibrate/adjust/tame! and are quite intolerant of temperature drift! To the point of given the quality and simplicity of those AD converters on a chip, at 10 to 30$ for the chip is actually worth every penny!
I have also to explore the THAT "audio engine" that are used to build dynamic processors, they all contains a RMS/DC converter that are quite capable and some include the op-amps etc needed. I have to dig on their site.

Thanks, blue_luke! Glad to hear you feel inspired by my post.

Give an X number of engineers, suffering from the "not invented here syndrome," the task of designing a certain product, and you will end up with X different sets of requirements and implementations... Without such a stubborn attitude, there would be less innovation.

Jan
 
My reaction as well. There actually is a possibility of a resonance at diode switching but the issue is mostly of radiated RFI. The rectified DC is filtered...and filtered...and regulated...and filtered...so, no, not necessary. But also, no harm either.

The output decoupling cap is 10X the recommended value.

My blind spot is that I don't know what this thing is actually powering.
Maybe there is some misunderstanding, perhaps from my side? I was referring to R7 from the schematic, which I would propose to change to a 10...100R resistor, maybe shunted with a 100nF cap and antiparallel diodes. I did not refer to the filtering/reservoir caps or the C1...C4 parallel to D1...D4. Such a resistor is quite common in power amps, active speakers etc. See also the chapters Stepped Attenuator and Line-Input and Power Supplies and Grounding from the zip file in post #25 for your reference. This resistor is commonly found between the input ground connection and the chassis. The 100nF cap is supposed to tie the input cable shield to chassis ground for RF signals, for what it's worth: In the tens or hundreds of MHz region, the inductance of the capacitor leads will make it completely ineffective.

AFAIK, there is no recommended value for the output capacitor. At least not one recommended by TI. See below. On all of the 6 PCBAs in my analyzer, I have 100uF decoupling caps on the supply lines. Just in case the inductance of the wiring would cause dips during transients. That 600uF was no problem for the LM317/LM337 power supplies I had initially. What did cause troubles were the magnetic fields from the transformers. I could not place them far enough away from the amplifier circuits. I ended up using Meanwell switching power supplies with additional LC filters on the outputs. And gone were all the hum issues. Making all the cabinet walls from steel sheets also helped to further reduce the 50 Hz mains pickup, btw.

Jan

1713461202543.png
 
Hello all :)
We had a very interesting discussion Here about what is available and how to chose software to use a sound card as the basis of an audio measuring system.

One thing that became obvious during the discussion is that for reason of practicality, some sort of hardware interface, or "front end", to the sound card. must be designed and built.

This is a very practical thing to have since usual good quality measuring instruments are costly and not necessarily toward audio measurements.

One issue is that there is no real common standard between sound cards.

For a while we used sound cards (models irrelevant) with add on boxes as audio interface for testing. We also had an AP2.

In the end we discontinued using sound cards and rolled our own Interface:

1713536774757.png

The middle box is the actual interface, it used galvanic isolation via signal couplers between the XMOS USB interface and both ADC and DAC, so that not only did we have isolation between host PC and audio, but also inputs and outputs were isolated. System was able to run at 192k/32 Bit. ADC and DAC were quite pedestrian, 110dB loopback SNR, with 0dBFS on ADC @ 2.83V and line out at 2V. We extensively used canned isolated DC-DC Modules to isolate the power supplies.

By using a jitter suppressing DAC Chip (ESS) and a transformer isolated SPDIF input from USB, I was able to keep the isolation cost nominal. The ADC absolutely needed an isolator chip, now these are more common and lower cost than back when...

Voltage dividers in inputs and output stages were tuned to each be flat to 40kHz and the whole system was better than -0.1dB @ 40kHz loopback. As the test target was "consumer" gear all signal levels and impedances are set for this. We integrated 50W 8 Ohm resistors as loads.

An external analogue box option was designed in, this was designed later with balanced I/O, a anti Riaa Network to allow testing Phono stages and a measurement microphone preamp with phantom power, a calibrated gain position for testing Speakers and adjustable gain and a highpass to allow probing for ultrasonics around switched mode power supplies.

Later add on's included 400W/4Ohm balanced loads with AES-17 filter.

You notice, all levels for line in/out are fixed. This is because the target application was not to be a kind of AP-2, but mainly QC and basic validation during R&D, as we had an AP2 at hand for "special needs".

We made a batch of like 50pcs of these. This was done over a decade ago now. They are all still in use AFIK.

Software is the real problem, to this day. We used RMAA as basic test system and added Wavegene and Wavespectra for more advanced tests.

I don't think that the AD/DA is particularly bothersome, trying to bodge something in front of a sound card just to avoid dealing with them is not sensible.

These days I use Qantasylum:

https://quantasylum.com/collections/frontpage/products/qa403-audio-analyzer

- We need isolation from the PC USB port, to prevent ground loop if any. (from KA Electronics.com)

USB Isolators are now common, but to test at 192kHz sample rate UAC2 is needed and High Speed (480M) isolators remain not so common or cheap. QA is isolated similar to the way I did on my Analyser.

- We need controlled attenuation so we can measure large signals input.

Well, the usual +20dBu for 0dBFS are more than sufficient. Ideally we would have much lower 0dBFS levels. You can always use 1:10 scope probes is you make the right setup or make attenuated cables.

- We need a way to set repeatable reference signals

If your converters are good enough you can do that in the generator software. You just need to make sure your output levels from the card are consistent.

- We need to be able to drive large signals at very low impedance to test transformers and speakers (from Abey Road d'Enfer)

Personally I had simply another box with a suitable Amp (LM3886 based) with calibrated gain and a 12-step attenuator.

- We need proper known impedance in and out for meaningful test results and calculation

Yup. Designing from scratch makes that easy.

- We need protection and even isolation between the sound card and the front end interface. (from KA Electronics.com)

This is / can be a biggie, as it is non-trivial to protect against serious over-voltage/current without affecting measurements capabilities.

Considering the Sound Card (SC from now on) I have a few options.

Most important is a sound card that on loopback has low distortion, low noise and a flat frequency response.

However, by the time you have done all the circuit, designed it all as PCB, added a nice box, adding some extra ADC/DAC Chip and a USB Interface is really not much of a step.

If you do relay based attenuators with auto level you approach AP2 standards of usability. You do need to frequency compensate and be able to tune the compensation. Output levels, you could use LM3886 at lower voltages with a dual feedback loop to make a very high level and power capable line driver.

While I find the QA system good, I think it can still be improved upon. But as said, I find the software side most challenging.

I'm open to helping out on a serious project.

Thor
 
Last edited:
This is amazing Thor!
I am onto some other stuff these days, including finishing building a rack of 8 preamps that will need to be tested and characterised, but I will definitely return to your post and comments.
Lots of good food for thoughts there.
 
USB Isolators are now common, but to test at 192kHz sample rate UAC2 is needed and High Speed (480M) isolators remain not so common or cheap. QA is isolated similar to the way I did on my Analyser.

Thor

It depends on what you consider "not so common or cheap". When I made my own High-Speed USB Isolator based on the TI ISOUSB211 chip about two years ago, they were indeed quite expensive: over 300 Euros if I remember well. They can be had for 50 - 80 Euros or so nowadays. Google for Topping HS01 USB Isolator, iDefender+, and Hifime High-Speed USB Isolator V2. If you can get the ISOUSB311 chip, you can build my USB Isolator for ~20-25 Euros/US$. You'll find the description in one of the articles I attached to post #19.

In the article mentioned, I said that I had in mind to offer the USB Isolator PCB through PCBWay, but with 50-80 Euros for a complete product, I wonder if anyone still wants to build one themselves. But if there's enough interest, I can make the PCB available through PCBWay. Just raise your hand....

Jan
 
It depends on what you consider "not so common or cheap".

Cheap is 20 bux, which will buy you an aliexpress 12M one. Common means I can order and get.

When I made my own High-Speed USB Isolator based on the TI ISOUSB211 chip about two years ago, they were indeed quite expensive: over 300 Euros if I remember well. They can be had for 50 - 80 Euros or so nowadays.

NOT REALLY.

Topping HS01 USB Isolator

It does not appear to use the TI Chip. Indeed, based on internal pictures I wonder if there is a real isolation barrier at all. For me it would come in at 55 USB plus shipping and tax.

iDefender+

This is based on a ground loop idolator I designed into other iFi product. It is not an galvanic isolator. There was also a true galvanic Isolator I designed, but the core Chip went NRND, EOL and DISC very rapidly and that was that.

and Hifime High-Speed USB Isolator V2.

I cannot find information on what's inside. It's still 60 Bux.

If you can get the ISOUSB311 chip

No stock at mouser, so cannot.

It is much easier to isolate I2S.

To isolate clocks, best use a Transformer. Gigabit ethernet. Use an inverter based recovery and allow clock selection noninverted or not, to match the delay in the data isolator, if using the combination of Transformer and Data Isolator.

IT IS possible to use LVDS and capacitor coupling to isolate Data, essentially at near zero latency, but it can be twitchy. In a pinch, high bandwidth TOSLINK can do 25Mbps, so you could strip the IC's out of their plastic case, place them face to face and have either 12.5Mbps per channel in I2S or 2 X 25Mbps in EIJA 4-wire.

TI ISO7241CDWR allows MCK (upstream up to 25Mhz/Mbps), BCK, WCK and DATA (downstream up to 25Mhz/Mbps) to be isolated on a single chip, where mouser has 2,600 pcs in stock, 6 weeks lead time, 5.24 USD per pc.

Advantage, we can not only isolate our analogue (and mixed signal) section from the PC, but also input from output (which can make a big difference).

On the AP2 you get a floating analogue out using a complex system with an expensive output transformer. If you then buy the USB interface and use an isolator, you get the same triple domain isolation on AP2.

ADC and DAC, I guess ESS measures best ATM, so use these.

Seriously, once you got all the analogue side done to all what has been requested here, adding the AD/DA is trivial. Better even, if designed in from go you may end up with better results than messing around with something "generic" that is expected to fit all sound cards.

AP2 uses quite pedestrian IC's for AD/DA and uses software based averaging etc. together with auto ranging to maximise what can actually measured. Again, software is the biggest limitation.

WaveSpectra has a Mode that averages and allows one to select the window function. This comes quite close to the capabilities of AP's software, but at the cost of being very user unfriendly and poorly documented. And sadly the software is no longer being developed:

https://gtkc.net/wavespectra-and-wavegene-thd-measurement

A good overview of software is also on that site:

https://gtkc.net/software-for-audio-test-and-measurement

Thor
 
Last edited:
I've built what I would like to call a DIY Audio Analyzer.
  • Lower noise outputs (thank you, Behringer for not including a decent LPF on the DAC output).
I remember that thread and experiments on the Behringer on DIYAudio :D
 
Isolated Inputs and Outputs and I2S isolation might be better, but if one wants to use a stock USB Audio Interface and a relatively simple frontend, I guess a USB Isolator is still a good option to avoid ground loops. At least it works for me.

ISOUSB211 should be available directly from TI, but not sure if they sell to consumers directly. Alternatively, you could just buy the EVAL kit, which is available from Mouser and Digikey ($58.80 + VAT). That was actually what I used first, but I needed a smaller device and made my own small PCB with the ISOUSB211.

Another option is the ADuM4166. It is supposedly in the Hifime isolator, but that's from hearsay. A DIY version is here:
https://www.diyaudio.com/community/threads/i-made-a-usb-highspeed-isolator.399023/

I don't know which one is the better option.

Jan
 
Isolated Inputs and Outputs and I2S isolation might be better, but if one wants to use a stock USB Audio Interface and a relatively simple frontend, I guess a USB Isolator is still a good option to avoid ground loops.

Depends on the "simple frontend"

Again, if we have auto ranging to (say) 100V AC max and 100mV full scale on the other end, it ain't going to be simple. Same if we want (say) 40V RMS out capable of driving 8 Ohm Transducers.

At least it works for me.

It worked for me with AP2 and the USB Interface (instead of that dreadful AIPB PIC Card).

I don't know which one is the better option.

As we use USB2 at full 480Mbps and as Audio uses isochronous streaming, we need to avoid dropped or corrupt packets I found that older USB 480M Isolator chip's had issues there. The solution was a hub chip used as repeater on both sides of the isolator IC.

I'd have to play with the new generation to see.

Thor
 
I'm still here and right now I am breadboarding a 'sorta' DOA.
This thing will come dowwn looking like a Melcor "2520" op-amp.
I have found the pinout but not the part number for the pins on the op amp and on the receptacle pins for the mother board. Any one?
I have looked at Mouser and DigiKey and found a few things but I am not sure....
Anyone?
The response here are quite impressive!
I read everything but would rather spend my time in the lab (basement:) ) than on the PC, hence my temporary radio silence.
Luc
 
I'm still here and right now I am breadboarding a 'sorta' DOA.
This thing will come dowwn looking like a Melcor "2520" op-amp.
I have found the pinout but not the part number for the pins on the op amp and on the receptacle pins for the mother board. Any one?
I have looked at Mouser and DigiKey and found a few things but I am not sure....
Never mind, I found everything I need! :)
Unless somebody here can suggest otherwise or less expensive.

Mill-Max stuff is quite expensive but very good quality!

https://www.mouser.ca/datasheet/2/273/MMMC_S_A0004809870_1-2556356.pdf
https://www.mouser.ca/datasheet/2/273/MMMC_S_A0005138205_1-2556822.pdf
 
Back
Top