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.

blue_luke

Well-known member
Joined
Dec 13, 2008
Messages
192
Location
Montréal, Québec
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.

So I am going to build such a thing and will start by stating some initial points of view, that will probably prove to be erroneous during the trip! :)

The first point is about the sound card itself, which interestingly enough I find inadequate for our project in its original intended use.

The main inadequacies are the signal level it can handle and more importanter (sic!) the input and output impedance are not always right.

- We need isolation from the PC USB port, to prevent ground loop if any. (from KA Electronics.com)
- We need controlled attenuation so we can measure large signals input.
- We need a way to set repeatable reference signals
- We need to be able to drive large signals at very low impedance to test transformers and speakers (from Abey Road d'Enfer)
- We need proper known impedance in and out for meaningful test results and calculation
- We need protection and even isolation between the sound card and the front end interface. (from KA Electronics.com)

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

My day to day SC is a RME babyface PRO of the generation before the current one.
The quality of the converters are truly good, the noise floor is very low. It is powered directly by the USB port or by an external power source

I also have a IK Multimedia AxE I/O, powered by a wallwart.

Since both of these SC are meant for the musician, they both have Hi-Z inputs (1MegOhm) to connect directly the instruments.
I checked the spec of these inputs and found them to be very good, with a very good noise floor and great input swing capability: RME BabyFace pro spec
The AxE I/O is pretty much the same give or take a few Ddb here and there.

My other option is to use either my Sound Devices MixPre 10 m2 or my old (2016) Zoom F8
Both are 8 ch recorders with a USB interface. They can be used as SC with very short latency and very good specs, but they have standard IN/OUT signal levels and impedance..
Since they are battery powered, I guess this could be a part of the solution as to how to isolate the SC from the DUT (Device Under Test)

We need also, maybe, to consider connecting a reference microphone for room EQ and analysis. If we are to be completely isolated from the PC USB port and SC, then we have to provide phantom power and some gain stage.
For the moment I have a UMIK1 (usb) by MiniDSP and a Dayton audio (phantom) EMM-6. I consider that a rather moot point, since technically, isolation of the SC to DUT when doing room test is not really needed and gain setting and referencing is done within the software.
Nan! chalk that one! No need! :)

Here are some references and link I find interesting for the development of that test set.

https://www.ranecommercial.com/legacy/pdf/ranenotes/Audio_Specifications.pdf
KA-Electronics.com https://ka-electronics.com/shop/index.php?route=product/category&path=67
This may seem a bit expensive but then again, it is a very good mastering tool that I intend to buy soon and we don't always do lab measurements after all, so it is simply temporarily deviated from it's original purpose

And here a whole library of reference books from AP (Audio Precision) https://www.ap.com/technical-library/white-papers-books
 
One thing you missed off your list of must haves. When testing audio designs you definitely want to be able to "see" well beyond 20KHz. Most interfaces have sample rates up to 192Ks/s so they can in theory see up to 96KHz. In practice they get nowhere near this. In fact, the vast majority of cards bandwidth limit the analogue circuit to 20KHz. Abbey and I have tested several different interfaces and the best of them just about reach 60KHz at higher sample rates. Most of the time these days I use 88Ks/s as this gives good readings on selected sound cards up to 44KHz.

Cheers

Ian
 
One thing you missed off your list of must haves. When testing audio designs you definitely want to be able to "see" well beyond 20KHz. Most interfaces have sample rates up to 192Ks/s so they can in theory see up to 96KHz. In practice they get nowhere near this. In fact, the vast majority of cards bandwidth limit the analogue circuit to 20KHz. Abbey and I have tested several different interfaces and the best of them just about reach 60KHz at higher sample rates. Most of the time these days I use 88Ks/s as this gives good readings on selected sound cards up to 44KHz.

Cheers

Ian
Good point!
Quite a bit of stuff happen passed 20Khz.
I forgot to mention it but I want to be able to 'see' up to at least 40khz. All my SC have 96Ks and I think the RME is rated up to 192 Ks.
I will check the bandpass at these higer rates.
 
Last edited:
Hello everybody, I am thinking about this audio front end and I have a pretty good idea as to how I will make it.
I will have a first draft of a schematic to submit in the next few days.
I have several questions, the first one being that: should I make it stereo or just 1 channel?

I intend to design a few inputs options.
The first input will be a so called " instrumentation amp" and use a Neutrik Xlr/TRS combo input socket and use a selector to set the input impedance load.
I suggest 50/ 150/ 600/ 2K/ 20K/ unloaded (10Meg). This should cover all the standards.

The second input is for unbalanced measurements with a BNC and banana binding post at the input. In this case input Z is 20K or 10Meg and you can load the input with any resistor value inserted in the binding post, including a speaker load.
This input should have an attenuator for say 1Vpp/ 5 vpp/ 10Vpp and 50 Vpp (pp=peak to peak)

I am stealing an idea from Pete Millet and will place a buffered BNC output connector for an external voltmeter or any other instrument we may find useful.
The output to the sound card will be a simple THAT 1646

For the output to the DUT I am thinking of using an op amp with a discrete current stage so we can drive transformers and speakers with a decent voltage swing and some current available. (Thank AbbeyRoad d'enfer for this idea)This section schematic taken directly from any application note or cookbook. No need to reinvent the wheel here.

Any comments, other features I should think of?

I will have a few PCB made for this project, perhaps some people will be interested?
Luc
 
Good point! Quite a bit of stuff DO go on passed 20Khz.

Good point!
Quite a bit of stuff happen passed 20Khz.
I forgot to mention it but I want to be able to 'see' up to at least 40khz. All my SC have 96Ks and I think the RME is rated up to 192 Ks.
I will check the bandpass at these higer rates.
I have yet to find an interface that doesn't go up to the traditional Nyquist filter point, even cheap stuff. With REW, we don't really need absolutely flat response, though, because it can generate a cal file.
 
Hello everybody, I am thinking about this audio front end and I have a pretty good idea as to how I will make it.
I will have a first draft of a schematic to submit in the next few days.
I have several questions, the first one being that: should I make it stereo or just 1 channel?
Stereo...at least my vote. I would add switching to swap outputs (if you can do it without adding crosstalk). Flipping a switch is often faster than doing it in software.
I intend to design a few inputs options.
The first input will be a so called " instrumentation amp" and use a Neutrik Xlr/TRS combo input socket and use a selector to set the input impedance load.
I suggest 50/ 150/ 600/ 2K/ 20K/ unloaded (10Meg). This should cover all the standards.
You're going to have a task finding an in-amp with a 10Meg input Z. THAT 1200 is 48K differential, and that's pefectly fine. But I'd add 10K, and take out 20K. Right now I have loads on connectors, and I picked 150, 600, 5K and 10K. I had a specific reason for 5K that I don't recall right now, but it qualifies for a bridging load of 600 and 150 where 2K doesn't. I'm not sure what I'd use 2K for. 10K bridges everything. Unloaded at 48K is sort of acedemic, but ok to have.
The second input is for unbalanced measurements with a BNC and banana binding post at the input. In this case input Z is 20K or 10Meg and you can load the input with any resistor value inserted in the binding post, including a speaker load.
This input should have an attenuator for say 1Vpp/ 5 vpp/ 10Vpp and 50 Vpp (pp=peak to peak)
Scale your attenuator in dB loss, not Vpp.
I am stealing an idea from Pete Millet and will place a buffered BNC output connector for an external voltmeter or any other instrument we may find useful.
The output to the sound card will be a simple THAT 1646
For the output to the DUT I am thinking of using an op amp with a discrete current stage so we can drive transformers and speakers with a decent voltage swing and some current available. (Thank AbbeyRoad d'enfer for this idea)This section schematic taken directly from any application note or cookbook. No need to reinvent the wheel here.
You'll want to be VERY careful about this. Application notes have a way of working in a lab but not so much in the real world. For example, speakers are complex loads with varying impedance with frequency, often dipping to the low single digits. And you have to drive that with something that doesn't get its shorts in a bunch and oscillate or distort. Speakers also behave very differently at higher levels, and now we're talking about real power.

I'm not sure of the need to drive speakers directly because of this. Probably should be left to a separate amplifier of some kind. Driving transformers is easier, but you'll need fairly high output levels into the +32dBu range that is unconditionally stable with the loads we're going to hang on it. You'll need to breadboard this one for sure, and given the task, you might just make it high line level and off-load the speaker driving task to a separate box (like Quantasylum does).
Any comments, other features I should think of?
On the output side, include a switch to disconnect the DUT from the output completely and terminate its input with a choice of short, 150, 600, 5K, 10K for noise testing. The termination should be on the DUT's input only when the disconnect switch is engaged to prevent burning up resistors or damaging the output driver.

It would also be useful to include some output pads for driving 0dBFS (or close to it) from the audio interface, through the buffer, into lower level devices like consumer gear or mic preamps. This gets complex quickly, but think of pads like 10dB, 25dB, 60dB etc., with appropriate output impedances for those devices. At a minimum, a mic level pad would be nice. But if we put 0dBFS at +32dBu we compromise dynamic range quite a bit when testing devices meant to work at lower levels.
I will have a few PCB made for this project, perhaps some people will be interested?
Luc
It doesn't look like level calibration is being addressed. Not a big deal, but if you included an LED "window" (by that I mean, 3-light with middel green being 1/10dB wide) or even a small digital volt meter, then calibration would be fast and repeatable. Generate a tone from the software at a known level re: 0dBFS, adjust for a known voltage, loop-back to the input, adjust input gain, done. But you need a known reference or voltage display at some point. I use a true RMS voltmeter, but true RMS isn't important. I also fix labels to my interfaces that show what voltage they can supply at 0dBFS, and there's the cal point. But some kind of built-in level cal indication would be nice. We need to know max output at 0dBFS of the audio interface, and find the input gain offset (mostly, we'll adjust for unity, but someone might want a gain offset to go after preamp noise). You can do all of that with a single metering device and loop-back.

This assumes an input our output pads are of reasonable precision of course.
 
Not a big deal, but if you included an LED "window" (by that I mean, 3-light with middel green being 1/10dB wide) or even a small digital volt meter, then calibration would be fast and repeatable.
Dolby used this type of meter in some of their NR units but the meter schematic is rather complicated. Are there simpler implementations of this type of meter?
 
Jadie you make excellent point here and I take note.
I will reply later today, the lady is calling me for some gardening chores! :)
Meanwhile, here is the first draft of the output section.
I tought of using LM1875 as output amp.
The power supply is also designed but I have to modify it so it can handle the current that will be needed for the amps.

Be back later, meanwhile any advice, constructive criticisms and suggestions are welcomed... At the drawing stages, stuff cost nothing :)

Luc
 

Attachments

  • Audio Test Set-Output.pdf
    298 KB
Jadie you make excellent point here and I take note.
I will reply later today, the lady is calling me for some gardening chores! :)
Meanwhile, here is the first draft of the output section.
I tought of using LM1875 as output amp.
The power supply is also designed but I have to modify it so it can handle the current that will be needed for the amps.

Be back later, meanwhile any advice, constructive criticisms and suggestions are welcomed... At the drawing stages, stuff cost nothing :)

Luc
The LM1875 might be ok for driving a speaker but I wouldn't want it in there to test anything else. Again...separate speaker amp driver box.

Might want to hold on the PSU until you get a final design.
 
Which brings me to ask you: Is this project just a "one-off"? Will it be offered as a "kit" to GroupDIY members? Eventual commercial production? What are your long-term plans for this idea/project of yours?
Well thank you for this offer! :)
My intention at first was to make a set just for me while picking the brain of whoever participate in this thread, but most PCB house makes boards in batches of 5, so I was thinking either giving or selling for a very low price plus SH/H the remaining four boards.
But then again, after your offer and all the effort this design will requires, now I feel it would be only fair to make the boards available at a reasonable price for any one who would like to build it for themselves.
But I don't intend to manage a group buy or kit, it's too much hassle.
I would certainly offer a PCB/front panel combo. I make my front plate with PCB now and it looks quite decent.
Of course a part list in a Excel sheet and a kart list at DigiKey or Mouser will be available.
I try to use only common and well stocked parts to ease the procurement.
By the way I use KiCad, my older version of Protel 2000 Altium is just too outdated!

Luc
 
Dolby used this type of meter in some of their NR units but the meter schematic is rather complicated. Are there simpler implementations of this type of meter?
Might be. I used this for a line-up indicator many decades ago. It was a rectificer, filter, and variation on the classic window-detector, but I think the whole thing was done with one quad opamp, not all that complex. I'll have to check my files, and perhaps breadboard the mess with modern parts to see if it can be simplified. The detector is a pair of comparators for sure.
 
Stereo...at least my vote. So far only Midnight Arakis and you have expressed this whish. It was also my first idea but then it occurred to me that usually I would only work on one channel at a time. Perhaps I can design the system where sections would be modular and I guess you simply decide what you need and go ahead and build it.


You're going to have a task finding an in-amp with a 10Meg input Z. OPA2134, input Z: 10(13) ohm


Scale your attenuator in dB loss, not Vpp. Yes of course, I was more or less stating the input level permissible for this input. This is simply a resistive network easy to calculate.

I'm not sure of the need to drive speakers directly. I'm not sure either, my idea was more about the fact that the impedance of the LM1875 is near 0 ohm and the voltage swing becomes very interesting when the supply is about */- 25Vdc so it is easy to insert source resistors of different values and we can chose whatever suits our need. On the other hand we can use any external power amp for speaker testing but in this case, I would argue that most speaker test are at a rather low level to test Thiele/Small parameters and the like. To test a room or a speaker system, it is much better to use the actual amp that will be put to use.

On the output side, include a switch to disconnect the DUT from the output completely and terminate its input with a choice of short, 150, 600, 5K, 10K for noise testing. Noted, this is a good idea! :)

It would also be useful to include some output pads for driving 0dBFS Noted

It doesn't look like level calibration is being addressed. I did not discuss about it indeed, but in the back of my head everything will get calibrated to known standards.
 
The OP2124 is an opamp, not an instrumentation amp. Unless you add more stages, it's single-ended, and has no CMRR at all. Making an in-amp from 3 opamp sections is extremely difficult because of resistor tolerances. They're laser-trimmed in the monolithic solutions. We'll want the in-amp in this front end.

The permissible input level varies for each interface and input gain control setting. That's why you want to scale the input attenuator in dB.

I really want to either talk you out of driving a speaker and put the amp in a separate box, or provide a bypass of the amp to provide a real line out. Most of the stuff we need to test is not a speaker, so mostly any speaker driver will be bypassed, or should be. Most tests of speakers can be low level, but the speaker parameters change...sometimes a lot... at higher power, so that is a concern for any serious speaker testing. When that aspect is combined with the rountine need for lower levels and lower distortion figures, it would seem that the speaker driver is a special and different project. Remember, Quantasylum could have included it in their QA boxs, but they didn't. They make a special box. They do have a bit more experience. Just sayin'.

Reliable and repeatable calibration is the big issue. Anybody doing routine testing has already built up pads and terminations, and figured out a way to drive a speaker. I'm sorry that I keep referencing the Quantasylum line, but they've done this, and at a very attractive price point already. The don't have any cal issues at all when used with their software, and once you establish the cal numbers, you can dial them into REW or anything else quickly and reliably. It's the consumer interface users than need help here. And cal can be a pain until you get the hang of it. That's why I suggested a simplified cal indicator, and I favor that over a voltmeter because it will have no user controls and not need its reading interpreted.
 
... there would be a series of different modules (oscillators, measuring meters, signal-conditioners, analyzers, filters, etc.) ......Whaddya think of that???

/
No need for any of it. Good measurement and analysis softare has all of that already.

If you make it big and complex enough, you miss the target user, who, I belief, is trying to do this all inexpensively. If not, they'd just by an AP rig and be done.
 
... there would be a series of different modules (oscillators, measuring meters, signal-conditioners, analyzers, filters, etc.) ......Whaddya think of that???

/
No need for any of it. Good measurement and analysis softare has all of that already.

If you make it big and complex enough, you miss the target user, who, I belief, is trying to do this all inexpensively. If not, they'd just by an AP rig and be done.
Indeed we want to keep it "simple" and practical.
A new design is always finding the right balance between technicals, cost, ease of use and assembly and practicality.
As Jaddie mentioned we can buy an AP system and be done. Or we can roll our own and include as many bells and whistles we deem fun to have or lean on the frugal side.
I am of the type that like to do things properly and only once.
After all, I have many projects on the conveyer that will need this test set and is kind of a necessary that I build "something" that will prove useful any time I need to do some testing.
At one point I was even thinking of using just some Hammond diecast box to build just passive attenuators, line loads etc... A selector switch, some resistors and banana plugs and off you go.
But as usual, the creative in me starts nagging "would'nt be nice if...." and this is where things could get out of hands rapidly and expensively! :)

I like the little schematic that was posted by Ruffrecord, simple, efficient, passive but I want to go somewhat passed this simple design.
I also considered Pete Millet's PCB he sells for quite a reasonable price, ATEST but there are few things that I don't like about it, notably the final cost.

Once built., for not much more money I would rather buy the Quantasylum gear, which I can't afford at the moment.
So my goal is to have a system that is practical, well conceived and built, for an affordable price, say less than 150$ plus some parts and cabinets I already have..
I thought about going modular but this increases the price of the PCB's (adding connectors, mounting hardware etc), so one big card it will be.
And also some suggested to make it stereo but that will make a big machine, that not everybody needs so my solution for that is simply build two!
When I will design the PCB I will make provision so the boards and the front panel can be stacked neatly.
There is also the fact that it would need selector switches with many wafers, which are harder and harder to find and did you check the cost of these lately?
So my decision is taken, it will be mono and if you want stereo then stack'em!

I have a few odds and ends to cater and I will submit the PSU section schematic for review.
Luc
 
Last edited:
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

1713380485889.png
 

Attachments

  • DIY Audio Analyzer.zip
    7.4 MB
Hello all! :)
Just a little aside note: some of you may have noticed that I often edit my posts. It's not really to change anything but English is not my first language and I take pride in expressing myself and writing as correctly as I can. So often I will correct typos, rearrange a bit the phraseology and the syntax, I like my post to be the most correct that I can achieve. Of course there will be some instances where you will see that sometimes I may sound weird, but the audience here merit that I try my best.

Moving along...
Here is the PSU schematic I envision / project for this design.

Nothing really fancy here, just plenty of filtering for about 1Amp load max on the circuit, good pre-filtering and decoupling, and to me, the LM318/LM337 pair of regulators with a few tricks is still hard to beat!
Yeah of course we can do better! Much better?, worthwhile better?
I think this is an example of my way ofbthinking.
Do things 'good'.
'Good enough' is not sufficient and 'the best this side of the universe' is rarely needed in a real situation.
BUT, it has to be excellent nonetheless.

So the whole thing is quite simple and standard, a transformer with either a CT or two separate secondaries gets in a discrete diode bridge where each diode is bypassed by a 100nF cap to reduce switching noise. You want to use schottky's, ? Go ahead, treat yourself! :)
Then the reservoir electrolytics, 2200uF is good for about 1Amp ripple rate.
Here I like to use low ESR and 5,000 hours+ rating.
Panasonic, Nichicon, Rubycon....
There are others just as good but I tend to stick to those ones.
A 50VA transformer is sufficient for this project. I like toroid's but any type of transformer will do here. The rating is not critical, as long as you use at least 30VCT/1A transfo you will be good. Note, the output of the regulators should be adjusted to the ACv rating of the transformer. If you use a 30V/ct then adjust the ouput to +/-15Vdc. You may come right at +/- 16V but don't chance it. You may end up with noise and hum within the measurements parameters....
Then a diode isolation and a 1000Uf second reservoir cap just before the regulators. The diodes and the series 3 Ohm resistor provides some kind of secondary filtering before the regulators.
The trim pots can set the voltage to slightly less than 15Vdc up to about 18Vdc. I myself run the show at +/- 17VDC.
There is not really need for tracking regulators and pre-regulation.
The rest is there to provide good filtering on the control pin of the regulators and you may find that 10Uf at the output is somewhat puny but it is better to add more filtering near the actual circuits.
You can put pretty much anything here, as long it is 19uF or more.
But there is no point going all hog here, it is better to add filtering close to where the actual power will be used.
I have been using this circuits for years and its performance is very good. Much better than a 7815/7915 pair :)
A few things are not appearing on the schematic, mainly the connectors for output. For the moment they are shown just as 'flags'.

Also I did not draw the primary side of the transformer with the AC line/switch/fuse etc...
The reason is that I always use those AC input modules that comprise a switch, voltage selector, the fuse and an EMI filter. The price of these now is very reasonable.
You may design your own but be sure to include a balanced EMI filter to clean the crap coming from the utility power line.
When building in the chassis, make sure that this filter (Corcom usually) are as close possible to the rear panel and keep the input line as short as possible!
I usually use a DIN AC socket, the ground goes to the chassis, the neutral to one side of the filter, the line to the fuse.
From the fuse to the line side of the filter and THEN you can go to a front panel switch if you like this, or to the rear.
That's why I like those AC entry modules, they make life much easier!
 

Attachments

  • Audio Test Set-PSU.pdf
    185.8 KB
Last edited:

Latest posts

Back
Top