Measurement Interface for Sound Card

Several other people have come up with measurement front-ends for sound cards and gotten pretty good results. None of them are to my liking, however, and I thought it would be a good challenge to design my own. The design isn't quite done yet, but I figured I'd post it and try to get a little feedback on the design thus far

The attenuator shown in this schematic is straight out of an AP System 1 schematic. This isn't the final version, and I will likely change resistor values in this for closer to a 40K input impedance. Even when I'm designing tube equipment, I've never felt a need to have an audio analyzer with a 100K input impedance.

I'm not sure what the "correct" way to do an auto-ranger is. This is what I came up with. It's a voltage divider, a TL072 as a buffer, and a bridge rectifier made up of 1N4148s. The RC time constant between the cap and its bleeder resistor is about 170 ms- that should be fine since the attenuator is AC coupled with a cuttoff significantly higher than 5.9 Hz. There's really no good reason for an audio analyzer to work this low anyways. An LM339 quad comparator and a voltage divider is used to set the ranges. This whole system isn't probably the most accurate solution, but as long as it switches within ~20% of its intended value, it should be fine. I really wanted to avoid the use of an AD536 due to its high cost. I also don't necessarily think that its accuracy is necessary. Since I own a few accurate true RMS meters with decent bandwidth, I can live without onboard level measurements.

Once through the attenuator, another relay switches between an instrumentation amplifier and a differential buffer. The differential buffer is there to drive the input of a sound card. The instrumentation amplifier converts the signal to single-ended where it can be routed to several different option cards (that still need to be designed). The idea here is that you can have a few different notch filters and a distortion magnifier built into the same chassis as your sound card front end.

A few questions...

1) The unity-gain buffers consisting of U5 and U6 should be low-noise and low-distortion, while also presenting a high enough input impedance to not load down the attenuator. A little research suggests that this configuration might get around the issue of common-mode distortion in the non-inverting unity gain buffer. Simulations really haven't been much help here (perhaps common-mode distortion isn't something LTspice simulates?) so if anyone knows of a better solution, I'd be greatly appreciative.

2) Is there a noticeable performance advantage (or disadvantage) to using dedicated instrumentation amplifier ICs? The cost tends to be higher for the good ones, but I'm not opposed to it if it improves noise and distortion performance. I don't much care about size or power consumption.

3) As far as I know, AP used to use NEC EA2 relays for switching. Looking at the datasheet for them, the look like they should have pretty good high frequency performance. Are there better options I should be looking at for this?
 

Attachments

  • Analyzer Front End V1.pdf
    159.5 KB · Views: 454
Looks like you're off to a good start.

I would caution using the LM4562/LME49720 with high value bias resistors (e.g. >100K) due to latch-up during start-up. Though the devices have low Ib that would suggest the use of higher value resistors the actual startup bias current is significantly higher. If that current isn't satisfied as they power up they can latch. I ran some experiments and posted the results here: LM4562, LME49710, LME49720 Start-up Behavior - Pro Audio Design Forum

The tests were performed at lower supply voltages but I think you'll see similar results at ±15V.

Unrelated to the LM4562 in the original AP documents you'll see a trick they used with the 5534 to reduce Vos with high value bias resistors. AP System One Front End - Pro Audio Design Forum

I'll be following this thread - I'm very interested in what you finally come up with.
 
Last edited:
One thing I just caught is that U2A/U2B are going to be in current limit during negative excursions due to D3 and its' unlabeled counterpart at the output of U2B.

In answer to question 2 about the only advantage I can see WRT using a dedicated INA chip would be resistor match in the common mode stage. I'm not sure its worth it since you could use selected precision resistors. You could add a trim but would likely have to deal with its' tempco.
 
Member
Joined 2009
Paid Member
Perhaps a candidate for U3A and U3B could be OPA828? Or OPA1642?
The voltage noise is slightly higher than the voltage noise of the LM4572, but the current noise is much lower. Once you use the attenuator, the noise will be dominated by the current noise, at least at the lower voltage ranges.

Do you need a separate differential buffer? You could use U3A and U3B instead.
With some gain they would also improve the common mode rejection.
If you need a balanced output you could add a circuit like the one around U4A, but with swapped inputs.
The U5/U6 buffer will be relatively noisy.
What is the purpose of U5B and U6B? Will it be stable?

Do you have sufficient protection against high voltages on the input?

Regarding INA's: Most that I have seen are rather noisy due to the high resistance values used internally. With a "discrete" INA you can select the feedback resistors, which will suit your application.
 
One thing I just caught is that U2A/U2B are going to be in current limit during negative excursions due to D3 and its' unlabeled counterpart at the output of U2B.

Yes, I just caught that too. I need to do a little rethinking and simulating of this part of the circuit.

Looks like you're off to a good start.

I would caution using the LM4562/LME49720 with high value bias resistors (e.g. >100K) due to latch-up during start-up. Though the devices have low Ib that would suggest the use of higher value resistors the actual startup bias current is significantly higher. If that current isn't satisfied as they power up they can latch. I ran some experiments and posted the results here: LM4562, LME49710, LME49720 Start-up Behavior - Pro Audio Design Forum

The tests were performed at lower supply voltages but I think you'll see similar results at ±15V.

Very interesting, and something I never realized. I was thinking the input bias current spec on the LM4562 seemed a little too good to be true.

What about AD737 for true RMS voltmeter. Project 140

I'm trying to avoid expensive / special purpose chips for this project if I can. I'll probably use it (or something similar) if I really have to, but as long as what I have is accurate enough for the autoranging, that's what counts. These chips aren't cheap at $10 each, and they inevitably go EOL. It's frustrating to find a project that looks like it does exactly what I want, only to see that there are two or three chips that are impossible to get.

Perhaps a candidate for U3A and U3B could be OPA828? Or OPA1642?
The voltage noise is slightly higher than the voltage noise of the LM4572, but the current noise is much lower. Once you use the attenuator, the noise will be dominated by the current noise, at least at the lower voltage ranges.

Do you need a separate differential buffer? You could use U3A and U3B instead.
With some gain they would also improve the common mode rejection.
If you need a balanced output you could add a circuit like the one around U4A, but with swapped inputs.
The U5/U6 buffer will be relatively noisy.
What is the purpose of U5B and U6B? Will it be stable?

Do you have sufficient protection against high voltages on the input?

A buffered differential output is necessary for driving the input of a standard audio interface which almost universally have balanced inputs. The setup with U5/U6 was to hopefully lower the distortion of the unity-gain buffers, although I'm not sure how effective it is. This thread was the inspiration:
Lowering Buffer Opamp Distortion

The OPA1642 is an interesting option, and pretty cheap too. Another chip that I was going to experiment with is the OPA1678. It appears to have excellent performance. Using a FET input might help with the whole issue of common-mode distortion when fed from significant source resistance.

As for HV protection, I have the two 400V caps and clamping diodes after the attenuator. I was probably going to implement something so that a really large AC signal can't overload the inputs of U2, but I think that seems unlikely. I was also going to maybe switch the TL072 out with something that doesn't have the same phase reversal issues. Perhaps an OPA1678. Other recommendations for HV protection are welcome.
 
Member
Joined 2004
Paid Member
A few comments based on experience and studying a number of different versions of this-
The input resistors, R8 & R9 will limit the noise floor BUT they need to be big enough to handle the fault current during extended overload into the diode limiters. The best solution seems to be light bulbs which will have a low resistance until power passes and then it goes up limiting the peak current. I think I first saw this in an Amber circuit.

Common mode up to 100KHz will require some external R/C trims. The stray capacitances will be an issue and really cannot be predicted. You may need some trim caps on the attenuator to compensate for the input capacitance of the buffer.

The buffers for the protection circuit may compromise the distortion with their own voltage dependent input C. Maybe they can be fed post buffer?

On the post buffer circuitry use as low values as the opamps will support. It helps swamp out stray capacitance. I modified the Boonton input circuit and improved the CMRR significantly and made it easier to tune by lowering the stock values 10X. The newer opamps enabled the change with no downside to the distortion. On the buffers the common mode distortion should be lowest when the impedances are matched on the inputs.

I can send schematics of a number of different versions of this input circuit if you PM me. There is a lot to learn from them.
 
A few comments based on experience and studying a number of different versions of this-
The input resistors, R8 & R9 will limit the noise floor BUT they need to be big enough to handle the fault current during extended overload into the diode limiters. The best solution seems to be light bulbs which will have a low resistance until power passes and then it goes up limiting the peak current. I think I first saw this in an Amber circuit.

Common mode up to 100KHz will require some external R/C trims. The stray capacitances will be an issue and really cannot be predicted. You may need some trim caps on the attenuator to compensate for the input capacitance of the buffer.

The buffers for the protection circuit may compromise the distortion with their own voltage dependent input C. Maybe they can be fed post buffer?

On the post buffer circuitry use as low values as the opamps will support. It helps swamp out stray capacitance. I modified the Boonton input circuit and improved the CMRR significantly and made it easier to tune by lowering the stock values 10X. The newer opamps enabled the change with no downside to the distortion. On the buffers the common mode distortion should be lowest when the impedances are matched on the inputs.

I can send schematics of a number of different versions of this input circuit if you PM me. There is a lot to learn from them.

The values for R8 and R9 are straight out of the System 1 service manual. I do worry that light-bulbs could have some amount of non-linear behavior, but I can look into it. R8 and R9 also serve as part of an input filter to keep RF out.

I'm going to lower the resistor values in the attenuator significantly. I think AP got away with fairly high values by doing a significant amount of in-factory alignment and trimming. Personally, I think the need for a really high input impedance is very rarely needed. Even when designing tube equipment, a 10K balanced input impedance has not caused me any problems. With that decrease in attenuator resistances will come a corresponding decrease in the resistances of associated circuits.

I've spent some time thinking about it, and I think I'm going to look into the possibility of an RMS to DC converter. I came up with a fix for the bridge rectifier, however, I wasn't able to find a "happy balance" of quick enough switching times and keeping the ripple on the output to the comparators low enough. Too much ripple here means oscillating relays with certain input levels- not good.

The LTC1967 looks interesting. It's not too unreasonably expensive, and it's available in MSOP packages. These are pretty easy for a DIYer to solder, even without a lot of magnification. The same cannot be said of a QFN. I want to keep the BOM cost for this project down where possible, as I feel that it makes it more useful for people if it doesn't cost more than the sound card it's being used with. I do think however, that the $7.30 that the LTC1967 costs will be worth it for the simplification it provides.
 
Member
Joined 2009
Paid Member
Do you need an (expensive) RMS detector? Wouldn't it be better anyway with a couple of peak detectors, one for positive and one for negative signal values? A peak detector will also work with arbitrary waveforms, which the RMS detector may not, if the peak values are high, but the RMS value is low.
 
Do you need an (expensive) RMS detector? Wouldn't it be better anyway with a couple of peak detectors, one for positive and one for negative signal values? A peak detector will also work with arbitrary waveforms, which the RMS detector may not, if the peak values are high, but the RMS value is low.

The problem I was having with that scheme (which is what I was looking at before) is that this will almost always be dealing with periodic signals. The challenge is getting it configured such that it will have a reasonable response time (1 second to switch ranges is way too slow, for example). There also can't be much of any ripple on the output that goes to the comparators, however, as the relays will just oscillate when you're close to the switch point. Not such a huge issue at 1 kHz, but definitely an issue at 20 Hz.

The RMS converter definitely isn't a great solution for the reasons mentioned, however, it gets around the "galloping relays" issue.
 
Here's a few revisions. More to come. I added one more level of attenuation, which should keep the output signal more in line with the proper input for the audio interface. There was already an extra section available in the LM339 as well.


As for the peak detection though... this is what I was worried about. This is what immediately came to mind, and it's not pretty. I'm going to go read up on precision rectifiers and peak detectors in AoE for a while and see if I can't come up with something less complicated and messy.
 

Attachments

  • Full Page.pdf
    177.7 KB · Views: 155
A few comments based on experience and studying a number of different versions of this-
The input resistors, R8 & R9 will limit the noise floor BUT they need to be big enough to handle the fault current during extended overload into the diode limiters. The best solution seems to be light bulbs which will have a low resistance until power passes and then it goes up limiting the peak current. I think I first saw this in an Amber circuit.
...


I tried the light bulbs in Pete Millett's interface. I used the lamp suggested by him - CM120MB 120V/25mA. They didn't work in that circuit, they added too much noise. I was happy to see this was not a problem in another circuit with very good input CMRR I've tested. However, current is already 5mA at ~9V. We need a bulb specified for something like 5mA at 100-200V or do I miss something?
 
In order to keep it simple you might consider eliminating auto-ranging and focus on front-end performance. I agree that a HF CMR trim should be added.

There's no way to turn off auto-ranging to do THD vs. level and no feedback from the auto-ranger into the measurement software to rescale the measurement.

The auto-ranger, due to averaging, can't protect the front-end from short term overload.

Consider using lamps as series protection elements. AP used them in the System One. Find whatever part number they used. The non-linear delta-R when in the "cold" state is very small in relation to the input impedance so noise will likely be more of a problem than their distortion contribution.

You also might want to put 18V (or so) Zener clamps on the ±15V rails so that input overloads don't get rectified by the protection diodes and push up/down the supply rails. Without them the load (e.g. front end op amps) absorb the overvoltage. Emitter follower voltage regulator outputs will not clamp overvoltage conditions.

I would avoid using surface mount and sole-sourced devices if at all possible.
 
Last edited:
Some digging reveals that AP used the 48ES lamp.

I consider auto-ranging to be an important feature. There can (and will) be a manual range option, however. Again, I'm going to do some research on the possibility of a differential peak detector circuit that isn't as convoluted as the one above.

I agree on the sole-sourced devices issue. With the LTC1967 I was going to use a DIP-8 footprint and use a DIP-to-MSOP adapter PCB (available for about 4 cents each). That way if the LTC1967 ever gets blown up, replacement is easy. If it ever goes out of production, it isn't a huge deal to design a little plug-in board with the same footprint to as a substitute. There will probably be some 1206 resistors in this thing, only because they save a lot of space and are really no more difficult to solder than a through-hole resistor.
 
I'm going to walk back my previous post a bit. Not the first time I may have been wrong. :eek:

I now understand the 'B opamp is supposed to experience the same common-mode distortion as its 'A brother and subtract it from the 'A output. It's an interesting idea and I'm curious how well it might work.

I'm still concerned the paired opamps might oscillate. Each stage will exhibit mild gain peaking near its unity-gain cutoff frequency near 50MHz. There may be enough gain and phase shift to provoke oscillation. If so, a modest amount of lag-lead compensation between A's output and B's input should restore stability. (The compensator would consist of a series R between A's output and B's input, plus a R and C in series shunting B's input to ground.) At audio frequencies the network should offer negligble loss so that each opamp will experience the same common-mode voltage.

Good luck. Cheers!
 
It occurred to me that a justification for 100K per leg (200K differential) input impedance is to maximize common mode rejection from DUT source impedance imbalance.

For 100K per leg inputs the common mode input impedance is 50K. Source impedance error, and thus measurement CMRR, is decreased significantly as the input impedance is lowered.

This is the justification for the THAT INGenius inputs which unfortunately would not be suitable for this front end due to noise.

Stay with 100K if you can. It also reduces loading error for level measurement.

I just noticed that Sound Technology used fuses, diodes and a MOSFET clamp. Fuses, plus rail diodes without the MOSFET, might be a better option than light bulbs plus series resistors from noise and replacement reasons. Fuse clips are easy to put on the PCB as well.

Fuses however would not likely recover from gross auto-ranging errors whereas light bulbs may be more forgiving.