Sunday, May 13, 2018

Measuring Behringer UCA202

I decided to exercise my measurement rig by measuring Behringer UCA202 music interface and comparing the results with the ones NwAvGuy published long time ago. He was using Prism dScope, and it was interesting to me how close could I get to repeating his results on my equipment.

What Is UCA202

UCA202 is quite an old and basic music interface, it's digital section is built using BurrBrown/TI PCM2902 chip which is only capable of 16-bit 48 kHz resolution. The good thing about UCA202 is that it costs less than $30, and is USB Audio Class 1.1 compatible, so it works with any modern operating system without drivers.


Behringer produces these interfaces in large batches, so I was assuming they have a good level of quality control and thus little variance between the characteristics of each device. Which again is a good thing when you are trying to compare your measurements with results from 2012.

But before diving into UCA202 measurements let's digress for one technical observation.

MOTU Microbook IIc Microphone Input

From my previous examinations of Microbook, we have seen that it has a quite uneven noise floor on its line input:


I decided to try other inputs: the microphone input and the instrument input. Their main difference from the line input is that they have higher sensitivity and are equipped with an amplifier. The instrument input was no better than the line input, but the microphone input has turned out to have lower noise floor:


As we can be see the microphone input (cyan plot) has less noise at low frequencies and does not exhibit the peak between 2 and 3 kHz. Its noise level is below -102 dBFS, and reaches -103 dBFS when "pad" (input signal attenuation by 20 dB) is activated.

Then I tried connecting Millet Soundcard Interface (SCI) to the microphone input instead of the line input. Here I found that without padding, SCI's output signal level is too high for the microphone input, but with padding activated it becomes a bit low, so I turned up input amplification in CueMix FX (MOTU's control panel). One advantage of this approach is that I could make a 0 dBFS test signal to reach almost 0 dBFS on the input after passing through SCI. And this did improve measured THD+N and IMD levels, despite the fact that due to amplification the overall noise level has also raised up.

For illustration, here is 0 dBFS 1 kHz signal played from MOTU's line output via SCI back to MOTU's microphone input, padded and attenuated:


The cyan plot is microphone input's noise floor that we have seen before.

This is how distortion figures compare with my previous measurements connecting SCI to MOTU's line input:

                                     Line      Mic
                        THD  1 kHz: 0.00067% 0.00064%
          THD+N (20Hz-48kHz) 1 kHz: 0.0087%  0.0075%
                         THD 20 Hz: 0.0048%  0.0041%
          THD+N (20Hz-48kHz) 20 Hz: 0.010%   0.0090%
                        THD 20 kHz: 0.025%   0.0027%
         THD+N (20Hz-48kHz) 20 kHz: 0.026%   0.0067%
                  IMD CCIF -3 dBFS: 0.016%   0.0034%
                 IMD SMTPE -3 dBFS: 0.0036%  0.0038%

So the microphone input provides the best characteristics you can possibly get from the Microbook / SCI pair. Also it is better isolated from the line output. I have noticed that high frequency tones played over line output can interfere with line input (one possible explanation why there were some issues with measuring IMD CCIF via line input.)

UCA202 Line Out

THD

Now back to UCA202. Here is how my test setup looked like:


Everything was running on battery power, and there were no loops besides the audio signal loop. Note that UCA202 was running at 44.1 kHz sampling rate to match NwAvGuy's measurements.

One good point of using SCI even for line level measurements is that it has the input impedance of 100 kOhm, the same as of dScope. As we can see from the photo on the NwAvGuy's post, the line outs of UCA202 were connected directly into dScope's inputs, so it was acting as a load by itself.

One thing I have noticed from NwAvGuy's measurements is that dScope allows specifying both lower and upper range for THD+N measurements, so on his picture we can see that the FFT was showing frequencies up to 96 kHz, but from the text we see that "The distortion measurements include all frequencies up to 22 Khz."

My attempt to repeat the measurement in the same way has revealed a shortcoming of ARTA—it only allows to specify the lower bound for THD+N measurements, while the upper bound is always half of the sampling rate. So, in order to check the ultrasonic noise bump from noise shaping I had to run the measurement at 96 kHz sampling rate, but for the THD+N measurement I had to switch to 48 kHz sampling rate. So here is the measurement showing the noise shaping bump:

Please, don't compare the THD(+N) figures here with the result from NwAvGuy. Here is the measurement at 48 kHz sampling rate:


Now we can compare the figures:

                               dScope           MOTU/SCI
                    THD 1 kHz: 0.0079%            0.01%
     THD+N (20Hz-22kHz) 1 kHz: 0.0089% (+0.001%)  0.012% (+0.002%)

So the measurements are in the same ball park, but the figures obtained with dScope are lower by 0.002–0.003% (that's 2–2.6 dB difference.)

IMD

NwAvGuy reports "excellent IMD result, run at –2 dBFS ... IMD of 0.0009%." From the graph screenshot, he was using two tones: 60 Hz and 7 kHz with amplitude ratio 4:1 (SMPTE standard).
First I have tried this test with MOTU loopback through SCI:


Even here IMD is 0.0033% which is ~3.5 times higher than he measured with UCA202. So I wasn't expecting any good result when measuring myself. Indeed, the number is quite bad:

It's 0.019% (21 times bigger). However, the patterns of 60 Hz products and 7 kHz sidebands look similar to NwAvGuy's picture.

The inconsistency with NwAvGuy's figures may be due to the fact that ARTA uses DIN standard for IMD calculation. Although the manual says that "This intermodulation factor is very close to the value of intermodulation distortion that can be measured by SMPTE analog instrumentation." but I'm not sure what their definition of "very close" is.

UCA202 Headphone Out

I used 330 Ohm resistive load for UCA202's headphone output (NwAvGuy was using 150 Ohm), which in theory should result in even less distortions.

Note that there are two ways to exercise the headphone output on UCA202: the first is to emit stimulus signal via its USB DAC, and the second is to turn on "Monitor" switch on UCA202 and connect an external generator to its line inputs. I don't know for sure if the signal passes through the digital section in this case, or the line input connects to the headphone output in the analog domain only (from my measurements, I suppose it's the latter.)

In fact, NwAvGuy hadn't specify which way was he using for measuring the headphone output. I was providing stimuli via the USB DAC most of the time, and only used the "Monitor" option when obtaining the frequency response, as in this case I could "subtract" the transfer functions of MOTU/SCI from the measurements.

THD

I have set the headphone volume level on UCA202 to output 400 mV (same as NwAvGuy), and measured THD using 48 kHz sampling rate on MOTU:

So we have 0.0074% THD compared to 0.0070% measured by NwAvGuy. That's very close!

Maximum Output

Here my experience was a bit different. NwAvGuy tells that at the maximum volume his UCA202 was producing 660 mV into a 150 Ohm load, and had 0.97% THD. Again, this is when playing a 0 dBFS 1 kHz sine wave. Whereas my UCA202 at the maximum volume was producing about 1 V RMS into 330 Ohm load, albeit with enormous distortion. And 1% THD distortion level was achieved at 782 mV into 330 Ohm load.

So maybe Behringer have beefed up the headphone output on later revisions of UCA202? Looks so. I couldn't resist opening up the unit, and found that instead of 4558 opamp that was used in NwAvGuy's unit, my unit uses 4556A. So it's definitely possible that the opamp gain was also tweaked to accommodate high impedance headphones better.

Channel Separation

Here ARTA isn't very helpful—it doesn't provide a dedicated measurement mode. But I could use frequency response (FR) measurement mode, play the test signal into one channel and capture another channel to see how much of the test signal did leak in—this is exactly what the channel separation test is about, right? I attempted to do this and found that ARTA always uses both channels for output, so this approach didn't work out.

As a workaround, I have saved the test signal (periodic pink noise) into a file, one channel only. Then I started playing this file via UCA202, and analyzing the input in ARTA. This is somewhat worked but the FR at high frequencies was looking very noisy.

So, I installed good old Room Eq Wizard (REW) and measured the FR using it. I had to connect both UCA202 and Microbook to the same laptop, so I plugged UCA202 through an USB galvanic isolator.

Doing this measurement with REW was much easier as it allows specifying which channels to use for playback and capture. The resulting graph was also noisy at high frequencies, but REW is good at smoothing. And after "calibrating" the graphs—offsetting them so the direct channel FR goes at 0 dBFS, I've got a graph which looks very much like NwAvGuy's:


My output was into a 330 Ohm load, but it didn't affect the results too much. Also note that on my graph the separation at high frequencies is closer to -60 dBFS than on NwAvGuy's. But I still consider the results to be pretty close to expected.

Jitter

This measurement wasn't very conclusive. First I've measured jitter using ARTA on MOTU loopback to establish a baseline (SCI being a fully analog device shouldn't affect jitter at all.) The picture was looking very clean—I guess, all MOTU's jitter got lost in the noise level. Even with averaging I couldn't see any sidebands emerging.

Then I switched to UCA202. Note that I was still hosting it on the same measurement laptop (through USB isolator), so I had to run it at the same sampling rate as MOTU—48 kHz. This is yet another limitation of ARTA—it can't use different sampling rates for input and output devices. As NwAvGuy, I was using the headphone output on UCA202 with RMS level of 400 mV. Here I could see some jitter:


So there are sidebands of about 300 Hz. The absolute levels don't match what NwAvGuy's graph shows, but on the other hand, there is less low frequency "spread."

And note yet another limitation of ARTA—there is only one marker available, so I had to add the labels for sidebars in a graphics editor.

Output Impedance

Measuring output impedance was easy—I didn't even need ARTA for that. I simply used my Agilent DMM to capture open circuit voltage when outputting 1 kHz tone at the same volume level as needed to achieve 400 mV into 330 Ohm. Then I used this value with this online calculator in order to get the result:


And the result—48 Ohm agrees both with NwAvGuy's measurement and Behringer specs.

Frequency Response

Here is a problem: neither MOTU nor SCI do not provide a perfectly flat frequency response by themselves. When measuring line level equipment which can be connected to MOTU's line input directly it's not a problem—the dual channel FR measurement mode in ARTA and STEPS can take care of removing MOTU's transfer function from the measurement.

But I had to test the headphone amplifier of UCA202 which needs to be connected via SCI. For that, I have fired up REW once again. First I have measured the frequency response of MOTU/SCI loopback. Then I connected MOTU's line out to UCA202 line in and enabled "Monitor" mode to send the signal directly to the headphone out of UCA202. After measuring both left and right channels, I used "Trace Arithmetic" in REW in order to remove MOTU/SCI loopback response from the measurement to leave only UCA202's own response. This is what I've got:


It doesn't look like NwAvGuy's graph at all. Here I have realized that NwAvGuy must have been sending the stimulus signal via UCA202's USB DAC, rather than using "Monitor" mode. I did this, and got something looking more similar:


A couple of caveats here:

  • I had to use 48 kHz sampling rate because MOTU doesn't support 44.1 kHz which UCA202 was using in NwAvGuy's test, and REW needs both input and output devices to use the same sampling rate.
  • Apparently, graphs are over-compensated at low frequencies because now the signal only goes through the input path of MOTU but the loopback measurements includes both input and output paths.
I have channel level difference at 20 kHz of 0.28 dB in "Monitor" mode, and 0.55 dB from UCA202 USB. NwAvGuy's result was "0.25 dB." I'm not so surprised with a different result here because as we have found out, the headphone section on my unit uses a bit different hardware compared to what he had.

So for FR, it's easy to obtain good measurements for analog power or line level equipment, but not so for digital sources.

Conclusions

What measurements done using MOTU/SCI rig I can trust:
  • Frequency response for analog power and line level equipment.
  • THD and THD+N, if taken at a proper sampling rate for limiting the upper range. Although, they will likely be slightly higher than actual.
  • Channel separation.
  • Output impedance.
What measurements I can not trust:
  • Frequency response for digital equipment.
  • IMD—will likely be much higher than actual.
  • Jitter—the absolute values can't be trusted but still can be used for comparisons or detecting gross issues.
Shortcomings of ARTA:
  • Unable to specify the upper range for THD(+N) measurements.
  • No channel separation measurement mode.
  • Always emits the stimulus signal into both channels of the output device.
  • Both input and output device have to run at the same sample rate.
  • Single marker in FFT windows.
Shortcomings of Microbook/SCI rig:
  • No support for 44.1 kHz sampling rate.
  • High noise floor.
  • Not perfectly flat own FR, need to compensate for that.
  • Only one channel on SCI so it's impossible to use dual channel FR measurement.
So the capabilities of my rig are good enough for exploratory testing and comparisons, but not so good for doing "absolute" measurements. However, for its price that's a good enough result.

Friday, May 4, 2018

More Measurements of MOTU Microbook and Millet's Soundcard Interface

I've got some progress playing with ARTA and harnessing Windows:
  1. Figured out how to operate the Microbook on Windows at 96 kHz sampling rate—just use ASIO drivers instead of WDM. I guess, that's actually MOTU's fault—their WDM driver only allows selecting 96 kHz mode for playback, but not for recording.
  2. Learned about averaging option in ARTA when doing spectrum analysis measurements—it helps to "thin out" plotting of the noise level. On the graphs from the previous post the noise level was depicted rather thick making it harder to get the figure in dB.
  3. Learned about "two channel mode" for frequency response measurements. In this mode one channel is used as a "reference", and this allows "subtracting" the transfer function of the sound card while measuring the frequency response of the device under test through the second channel of the card.
  4. And the frequency response can be measured even better with STEPS—another program from the ARTA package that uses modulated sine signals instead of periodic noise (although, this measurement takes substantially more time.)
I tried following the measurement procedures of NwAvGuy in his posts about audio interfaces and headphone amplifiers. He used Prism dScope, and it's interesting to compare its capabilities with the ones of my hobbyist tools.


MOTU Microbook IIc Loopback

Once again, I retested the loopback between Microbook's unbalanced line output and balanced line in. I used this combination because the devices that I plan to test have unbalanced (RCA) inputs, hence unbalanced line out needs to be used. While Millet's Soundcard Interface has balanced connections to the sound card. So the output needs to be unbalanced, and the input balanced.

Another reason is that the balanced line input has more headroom, and it's impossible to overload it while driving from the unbalanced out.

THD

I started with THD. It can be measured with ARTA and STEPS. With ARTA, it's only possible to test one frequency at a time. Here are measurements at 0 dBFS for 20 Hz, 1 kHz, and 20 kHz. All the measurements were done with 96 kHz sampling rate:


As I mentioned above, I started using averaging as it thins down the noise plot, so we can see the noise floor more clearly.

The balanced input has 10 dB of headroom, so any distortion products that we see are likely caused by the line output. It's also interesting that all graphs show a small noise bump between 2 and 3 kHz.

This is full noise profile obtained with STEPS. There I had to limit the test signal to -3 dBFS because otherwise it was overloading the output:

This agrees with the results from ARTA—the level of distortions is lowest at the midrange, slightly higher at bass frequencies, and raises steadily at high frequencies.

Noise

For measuring noise I used NwAvGuys technique of playing a very low level test signal—1 kHz at -115 dBFS:


Starting from 400 Hz the level of noise is mostly below -140 dBFS. The strange peak between 2 and 3 kHz can be seen again.

IMD

I used both CCIF and SMTPE methods, as ARTA provides both. CCIF at 0 dBFS was giving a lot of distortions which were gone at -1 dBFS, but I decided to stay at -3 dBFS for consistency with other measurements:


SMTPE IMD at 0 dBFS (not shown) is also a bit worse than at -3 dBFS but not so radically as with CCIF test signal.

Frequency Response

ARTA and STEPS show a bit different curves:



As we can see, STEPS curve has less steeper rolloff at high frequencies. The STEPS manual says that FR measurements done with its method are more precise than the measurements using periodic noise. If we zoom in the STEPS curve we can see a small bump of the antialiasing filter, but it's smaller than at 48 kHz sampling rate—it wasn't even visible on the previous graph:

To me, the FR measured by STEPS is more realistic. It also looks similar to what John Reekie published in HiFiZine.

What I Did Not Measure

NwAvGuy also provided measurments for inter-channel crosstalk and DAC jitter. ARTA doesn't provide a measurement mode for the former, so I've attempted to measure crosstalk by cris-crossing the output lines. This way any inter-channel leaking of the test signal would show up on the measured channel. But the results are very different between ARTA and STEPS so I decided to study more about how to perform it correctly.

As for jitter, ARTA does measure it, but I'm not sure how to measure jitter for 96 kHz sampling rate. Usually jitter is measured with a sine signal of 1/4th of the sampling rate. But for 96 kHz this would be 24 kHz, and as as we have seen from THD measurements Microbook has somewhat high distortion at high frequencies. So I will also read more about how to perform this measurement correctly.

I also did not attempt doing time domain measurements, e.g. the square wave test. Will try next time.


P. Millet's Soundcard Interface

And now some re-measurements of my Soundcard Interface (SCI), this time made at 96 kHz sampling rate and with both ARTA and STEPS, so they are directly comparable to the MOTU loopback measurements.

For the measurements, the left channel of MOTU's unbalanced line output was connected to the SCI's BNC input, grounded. The SCI input sensitivity was set to 2V setting. SCI was powered from an USB power bank to avoid creating a ground loop.

THD

Same method as was used for MOTU loopback:



As we can see from the RMS figures, SCI attenuates the signal by almost 6 dB. It could be the reason why the bump between 2 and 3 kHz originally seen on MOTU loopback measurements is almost gone. If so, then it must be an artifact of MOTU's line in.

Here is a full THD profile obtained with STEPS:


The differences THD between MOTU loopback and SCI are quite small (which is good!), see the summary table at the end of the post.

Noise

I also measured noise by sending 1 kHz test signal at -115 dBFS:


Although, I forgot to zoom the graph in before taking the hard copy. But even at this scale, it can be seen that comparing to MOTU loopback, it is higher by about 5 dB starting from 200 Hz. Overall, the profile is quite even, and there are no problems at 60 Hz.

IMD

The signal level was at -3 dBFS to avoid any distortions from the MOTU's out:



Frequency Response

I used both ARTA and STEPS in two channel mode. The reference channel was a direct loopback from MOTU's line out to in, thus the obtained frequency response is not affected by MOTU's not so ideal characteristics. ARTA and STEPS have produced quite similar curve for SCI's FR, so here is the one from STEPS as it is less fuzzy:


Measurements Summary

So let's compare the numbers from MOTU loopback and SCI measurements:

Frequency Response 20 Hz to 20 kHz: +/- 0.98 dB   +/- 0.06 dB
                         THD 1 kHz:     0.00058%      0.00067%
                         THD 20 Hz:     0.0015%       0.0048%
                        THD 20 kHz:     0.035%        0.025%
                  IMD CCIF -3 dBFS:     0.022%        0.016%
                 IMD SMTPE -3 dBFS:     0.0048%       0.0036%
   Noise (unweighted) at 96 kHz SR:  -101.3 dBFS    -96.5 dBFS

As we can see, the main drawback of SCI is the increase of the noise floor by about 5 dB. Note that the high noise figures are mostly due to the low frequency range. Above 200 Hz both MOTU and SCI are quite good. Although, specialized measurement frontends like affordable Quant Asylum QA401 have much more even noise floor across the entire measurement range.