Preamp/input frequency response

Status
Not open for further replies.
I'm going to build a device that will allow me to use any audio interface or computer as an audio-range oscilloscope and function generator, but I'll need to know how low it will be usable, as well as any kind of ripples or distortions show up near Nyquist.

How can I measure an audio interface's input frequency response? In my wholly uneducated thought process, a well designed A/D converter could compensate for frequency response variations native to it's accompanying input stage, right? Would most audio inputs be quite flat as a result?

I'm using REW to get loopback measurements of my audio output, but without knowing how flat my input is, it won't be much use. I'm currently using it with a Behinger UM2, but I'll also want to use the device with a motherboards' integrated audio equipment.
 
One useful idea is that digitally generated signals can be pretty accurate, as long as the math used to create a digital signal is basically right, so you have the chance to test the D/A with a precise input, and measure its output with a suitable AC voltmeter. Likewise, one could measure an A/D output by stimulating it with a known accurate analog signal and then analyzing its digital output using numeric techniques on the A/D digital output.

So, yes, there are a lot of variables there, but the system can be split into smaller chunks, and as long as you have some external, accurate AC voltage measurement system, one could work out all of the static correction factors and response errors.

One final idea is that nothing in the physical world is 'perfect', but often, measurements of the errors can be made with some known degree of uncertainty. Also, oscilloscopes are generally not all that accurate at measuring amplitudes, usually no better than 0.1% even for pricey instruments, but again, one can use instruments that have a known accuracy to evaluate what you have.

The thing I think you lack is an accurate analog AC voltmeter, and while one could use a sound card to do that, you're just making some assumption about the accuracy of that A/D. You alluded to whether it's valid to make assumptions about the accuracy of some random A/D and in reality, you can't really make any sort of statement like that.

Accurate AC voltage measurement (i.e. more than around 4 accurate digits) isn't all that simple either, but it can be done given a few magic tricks, such as synchronous generator / analyzer sampling, and not all that exotic equipment. Or, one could pony up for a really nice multimeter, like an HP/Agilent/Keysight 3458A, and easily get some really nice AC voltage measurements in one of several ways. That's $10K though, but it does what few meters can do, and there aren't that many other cheaper choices that don't involve a lot of special tricks and only somewhat less pricey gear.

Given all of this, you have to decide how good you need the measurements to be, and what you're willing to pay to get better measurements. One can get pretty accurate measurements, let's say 5 or more digits, but the cost rises quickly as the accuracy requirement rises.

What are you trying to do and how good does it really have to be?
 
oscilloscopes are generally not all that accurate at measuring amplitudes, usually no better than 0.1%
I reckon accuracy of reading @ ±2% to ±5%
With a full scale wave of 8divisions, I can see 0.1division. That would be +-1part in 80 or ±1.2%
Then you have to add on the calibration tolerance. That would be roughly ±1%
so we are up to ±2.2% total.
If the wave is @ just over 4divisions we have ~±3.4%

I use the scope to monitor gross changes in signal level and use either a cheap average reading DMM AC voltmeter, or a fairly accurate rms reading AC voltmeter.

I regularly use comparison rather than trying to find absolute measurements.
Comparison is a very powerful tool.
Read up on the Hamon divider. It can achieve accuracies better than 10ppm and with great care better than 1ppm for home built comparisons.
Another example of the power of comparison:
Compare input to and output from an amplifier. The answer is amplifier gain. But it is totally dependent on the accuracy of the AC voltmeter and the very variable frequency response of the AC voltmeter. The resolution of the meter is our main variable, a 2000 count meter allows 1 part in 2000 resolution, if we can arrange the signal to be near full scale of the meter.

Now add on an accurate attenuator between the signal source and the amplifier input.
Set the attenuator to make the input voltage from the source exactly equal to the output voltage from the amplifier.
The AC voltmeter is now reading two voltages at the same frequency and at the same voltage level. This comparison removes meter accuracy and removes an unknown frequency reponse from the voltage comparison.
The amplifier voltage gain is equal to the attenuator setting.
This "comparison" technique allows uncalibrated cheap measuring equipment to give a gain measurment that would otherwise require expensive regularly calibrated rms reading AC voltmeters.
The Wheatstone Bridge is another "comparison" method that can be supremely accurate. The Hamon divider could be used to calibrate the Wheatstone Bridge.
 
Last edited:
I reckon accuracy of reading @ ±2% to ±5%
With a full scale wave of 8divisions, I can see 0.1division. That would be +-1part in 80 or ±1.2%
Then you have to add on the calibration tolerance. That would be roughly ±1%
so we are up to ±2.2% total.
If the wave is @ just over 4divisions we have ~±3.4%

Yep… why I said "no better than…" The best digital scopes, AFIK, use no more than 10 bits for vertical, which is actually sorta tough to do really quickly. So, while the screen might be pretty sludgy and sloppy, the raw data can be 10 bit, if you pay for a nice DSO. 10 bit -> 0.1% at best. Most are quite a bit more sloppy, and as you state further, that's usually not a problem, unless you're exporting the data and doing analysis on the sampled trace data.

We still don't know what the OP is trying to do with his measurements, and how much accuracy / resolution is actually needed.

A soundcard A/D does have some 'goodness' to it, and with something along the lines of the comparison measurements you discussed, one could trim out some longer term errors and shorter trim drift with a nice source and a nice attenuator. Still, measuring AC voltage accurately is still largely a PITA. The best tricks are to use a synchronous generator and sampler, which a soundcard could do, and essentially rely upon the inherent linearity of modern sigma-delta converters - not an awful assumption.
 
Forgot to mention this: the comparison method can work well for AC voltage measurement, but it gets tricky when the reference and DUT paths have any sort of unequal phase shift or time delay. In that case, one can't directly subtract voltage like one would with a DC bridge. Sure, some DUTs have very low delay / phase errors, so this isn't always a show stopper, but some devices do not.

One technique that does work well is to use a generator to stimulate a device that is synchronous with a sampler, used to measure the output of that device. If a sampler can be made to sample a waveform twice, 90 degrees apart, the AC amplitude of the sampled wave is equal to the square root of the sum of the squares of those two measurements. In this case, any time delay or phase shift in the DUT will not affect the 90 degree spacing, so this method can work well with many devices. Since a sound card can sample a signal pretty accurately and pretty quickly, then the 90 degree requirement can be done fairly easily as long as the test signal is synchronous to the sample rate. The remaining errors are due to sampling jitter, which should be pretty low with an audio A/D.
 
Now add on an accurate attenuator between the signal source and the amplifier input.
Set the attenuator to make the input voltage from the source exactly equal to the output voltage from the amplifier.
The AC voltmeter is now reading two voltages at the same frequency and at the same voltage level. This comparison removes meter accuracy and removes an unknown frequency reponse from the voltage comparison.
The amplifier voltage gain is equal to the attenuator setting.
This "comparison" technique allows uncalibrated cheap measuring equipment to give a gain measurment that would otherwise require expensive regularly calibrated rms reading AC voltmeters.
The Wheatstone Bridge is another "comparison" method that can be supremely accurate. The Hamon divider could be used to calibrate the Wheatstone Bridge.

This makes a lot of sense.

To clarify this project, I design loudspeakers. This tool will help me easily make good quality measurements so I'm not designing blind. I would like to:
-put amplifier output into a line level op-amp based crossover network of one or more elements. Use the inputs to measure noise, frequency response.
-Use a precision resistor bridge with REW to obtain low noise, accurate impedance measurements to calculate T/S parameters
-Use the same resistor bridge to measure the values of capacitors, inductors, and potentially audible inductances/capacitances of resistors.
-apply the amplifier output to a passive crossover network, then use the input (with in-line attenuator) to measure frequency response, impedance, and any potentially audible hysteresis artifacts or other nonlinear distortions.
-Apply the amplifier output to a loudspeaker, then apply a measurement microphone's output to the soundcard input

Since I will only be measuring audio signals that will eventually travel through a transducer, my requirements aren't terribly stringent. I need to measure:
-Frequency range (ideally ~5Hz-22kHz, at least 20Hz-20kHz)
-Frequency response (ideally +/-.1dB, at least +/-.5dB)
-Nonlinear distortion (ideally -60dB, at least -40dB)
-Noise level (-90dB, ideally less)

The first part of this device will be a class A or class AB amplifier module attached to the headphone output to have low distortion, high(er) voltage, low noise, and consistent signal generation even into low impedance loads so I can get better results.

The second part of this device will have a couple bypass-able elements attached to the audio inputs depending on what measurement I am taking.
-A Zener clamp to protect the audio inputs
-A non-inductive attenuator for measuring high voltage signals
-A precision resistor bridge to measure impedances
-A low wattage amplifier module to measure low output voltage/impedance signals
-A loopback circuit to calibrate frequency response
-A phantom power module to power a measurement microphone
 
Status
Not open for further replies.