This is only a preview of the December 2021 issue of Practical Electronics. You can view 0 of the 72 pages in the full issue. Articles in this series:
|
Balanced Input and
Attenuator
for the USB
Part 1 – by Phil Prosser
This compact balanced input attenuator is designed to fit into the same
instrument case as the USB SuperCodec finished last month. It provides
four attenuation settings of 0dB, −10dB, −20dB and −40dB and has
performance to match the superlative SuperCodec. Together, they form a
potent recording and/or measurement system.
T
he SuperCodec USB Sound Card described
You could build our 2-Channel Balanced Input Attenover the last three issues has excellent recording and uator for Audio Analysers (May 2016) and hook it up to the
playback performance, so it can form the core of a SuperCodec inputs. That would solve both problems and
give you a test instrument with flexibility approaching that
high-performance audio measurement system.
One thing that it lacks compared to our commercial Audio of the AP System Two (and in some senses, exceeding it).
However, then you would have two boxes or three boxes,
Precision systems is a balanced input. Our AP System One
and System Two devices both have balanced and unbalanced two different power supplies and cabling connecting them.
Clearly, that’s less convenient than having a single ‘all-ininputs, and you can select between them.
There are times where you need those balanced inputs; one’ do-everything device.
Also, the May 2016 project only has three attenuator
sometimes, you want to measure the performance of a balanced audio device. However, even with unbalanced devices, settings (0dB, 20dB and 40dB) and we think that it doesn’t
it is common to get better results using balanced measure- quite have the performance to match the SuperCodec, for
ments. That’s because it helps to eliminate the common-mode reasons we’ll explain shortly.
Hence, we came up with this project. It does a similar job
noise inherent in connecting two different devices (the measto the May 2016 attenuator, but with the addition of a −10dB
urement system and the device under test or DUT).
attenuator setting
Another thing that
and lower impedthe Audio Precision
ances for less noise.
devices have but the
Importantly, it has
SuperCodec lacks is
been designed to ininput attenuators.
tegrate with the USB
The AP systems
SuperCodec and fit
can measure a wide
in the same case, by
range of signals from
Fig.1: one channel of the Balanced Input Attenuator. There is an RF
keeping the PCB asline level (well befiltering and DC-blocking stage before the relay-switched resistor-based
sembly compact and
low 1V RMS) up to
attenuator. After the attenuators are the over-voltage protection stages,
designing it to run
the output of multibuffers and differential-to-single-ended converters before the signals are
off the same power
hundred-watt amplifed to the ADC inputs on the SuperCodec board.
supply rails.
fiers (50V+ RMS).
28
Practical Electronics | December | 2021
eatures and spe ifi ations
bala
a l
i
. mm S
USB SuperCodec
ala
i
la
a a l
bala
i
igi al
ig
bala
mai
a a l
ai
92
2 bi
i ga
layba
a abili i
igi al SuperCodec
i i
SuperCodec a a
am
ly
2
a
a
ai
i g
l
ia
a l i
S
.
2
a
.
2
Sig al a li g
S
2
So with the addition of this balanced input board and some free
or low-cost software, you can build an audio testing
system that only a few years ago would have cost thousands.
Recording professional audio
Another reason you might want to build the Balanced Input
Attenuator is to interface the USB SuperCodec with professional audio equipment. It gives you much greater recording
flexibility, allowing you to use either balanced or unbalanced
signals. And with the attenuator, it can handle much ‘hotter’
signals than the 1V RMS of the original Sound Card design.
The 10dB attenuation setting puts professional +4dBu
signals right in the sweet spot of the analogue-to-digital
2
S
S
.
2
.
S
converter (ADC), with good headroom. In this configuration, it can handle up to 3.6V RMS without clipping, or you
can switch to the −20dB setting to handle signals up to 10V
RMS, with relatively little degradation in performance at
‘normal’ signal levels.
The design provides very well balanced inputs, with
common-mode rejection typically better than 60dB. The
attenuation ranges of 0dB, −10dB, −20dB and −40dB allow
full-scale inputs of 1V, 3.6V, 10V and 50V RMS, which correspond to 1.4V, 5V, 14V and 71V peak or 2.8V, 10V, 28V
and 142V peak-to-peak.
This allows low-level signals, preamplifier outputs and
power amplifier outputs to be used as signal sources (among
other devices).
Here is the finished add-on board, with low-profile components to fit under the SuperCodec PCB. The inputs, RF filtering
and AC-coupling components are at right, with the divider resistors in the middle. To their left are the attenuation
selection relays, with the buffer op amps next to them, then the balanced-to-single-ended conversion circuitry at far left.
Practical Electronics | December | 2021
29
Operating principles
Refer now to the block diagram, Fig.1. If you have a copy of
the May 2016 issue, (or a download from the PE website) you
might also like to read back over the earlier Balanced Input
Attenuator design, as this design has many similarities.
0
SuperCodec Balanced Input CMRR
left channel,
0dB
left channel, -10dB
left channel, -20dB
left channel, -40dB
right channel, 0dB
right channel, -10dB
right channel, -20dB
right channel, -40dB
10
Common Mode Rejection Ratio (dB)
23/07/20 10:59:20
20
30
40
50
60
70
80
90
100
20
50
100
200
500 1k
Frequency (Hz)
5k
10k 20k
Fig.2: we tested the common-mode rejection ratio (CMRR)
for both channels on our prototype, at four different
frequencies and all four possible attenuation settings. The
resulting plot is a bit messy but gives you an idea of the
CMRR spread. A higher CMRR is better since it rejects
proportionally more of the hum, buzz and EMI that may be
picked up in cables.
Fig.3: the noise floor of the combined Balanced Input
Attenuator and SuperCodec ADC with the Attenuator set
to 0dB and the inputs shorted out. This shows that the new
board adds minimal noise to the overall system.
Fig.4: the same plot as Fig.3 but here the Attenuator has
been switched to −10dB. As explained in the text, this is
the setting where the Johnson (thermal) noise contribution
of the attenuator resistors is highest. Despite this, the noise
floor has only increased by around 1dB compared to Fig.3.
30
The balanced input is via a 1/4-inch (6.35mm) standard
tip-ring-sleeve (TRS) type connector (also often referred to
as a ‘jack socket’). This was chosen over an XLR connector to save space, so that it will fit in the SuperCodec case.
6.35mm TRS is bog-standard, and often used for balanced
signals, which makes this a versatile choice. We’re sticking
with the standard TRS pinout of tip = ‘Hot’ or positive, ring
= ‘Cold’ or negative and sleeve for signal ground/screen.
The balanced signals pass through an RF filter and DCblocking capacitors, then into the resistor and relay-based
switched attenuator. After that, they pass through a clipping
stage to provide over-voltage protection before going onto a
set of buffer op amps.
The buffered signals are then converted from balanced to
single-ended signals, which are then fed to the inputs of the
USB Sound Card already described.
Performance
We thoroughly tested the performance of the Balanced Input
Attenuator to make sure it was up to SuperCodec standards.
Fig.2 shows the measured common-mode rejection ratio
(CMRR) value for both channels of the prototype, at all four attenuation settings and measured at four different frequencies.
As you can see, the CMRR is between 71dB and 89dB at
1kHz for both inputs, and at all attenuation settings. Those
are pretty good figures, and 1kHz is a typical test frequency.
CMRR is slightly worse at lower and higher frequencies, but
is better than 63dB at all tested frequencies below 1kHz, and
better than 53dB at 10kHz.
CMRR will be almost entirely a function of matching of
the attenuator and balanced receiver resistors. So if you pay
more attention when selecting those resistors, you could
beat our prototype figures.
With the 0.1% resistors specified, the attenuation error is
less than ±0.1dB across all tested frequencies.
The noise and distortion performance is not significantly
worse than the straight USB Sound Card with a 10kΩ input
impedance (the input impedance options are described below). There is a small increase in THD on the −10dB range
for the 100kΩ input impedance version.
Fig.3 shows the output spectrum with the Attenuator on
the 0dB setting and the inputs shorted to ground. If you
compare it to Fig.5 on page 19 of the September 2021 issue,
showing the same measurement for the SuperCodec alone,
you will see that there isn’t all that much extra noise being
introduced by the Balanced Attenuator.
A view inside the ‘new’ SuperCodec with the added PCB
at bottom. It is designed to slot into the edge guides in the
recommended Hammond 1455N2201BK aluminium case.
Practical Electronics | December | 2021
Fig.4 shows the same measurement but with the attenuator
on the −10dB setting, which is the worst case (as explained
below). Overall, the noise has only crept up by about 1dB
compared to the 0dB attenuator setting, so that’s a good result.
Fig.5 shows the THD+N measurement for a test signal
of around 300mV RMS being fed into the Balanced Input
Attenuator with the attenuation setting at 0dB.
This is virtually unchanged from the measurements we
made previously without the Balanced Input Attenuator
board. You can compare this to Fig.4 on page 19 of the
September 2021 issue, but note that the test signal level is
slightly different.
Fig.6 shows that the distortion performance on the −10dB
setting, with the same signal applied as for the 0dB setting,
is barely any worse. So the attenuator does not appear to be
introducing any signal distortion.
Similarly, Fig.7 shows the result with the attenuator
on the −20dB setting. The THD measurement has risen to
0.0003% / −111dB.
However, note that if the applied signal amplitude were
increased to a level that you would need the 20dB of attenuation to measure, the THD level would probably drop quite
close to the 0.0001% / −120dB shown in Fig.5.
Circuit details
Refer now to the full circuit diagram, Fig.8, and compare it
to the block diagram, Fig.1. Let’s consider the left channel
signal path, starting at CON1; the right channel is the same.
The input signal goes via a ferrite bead with a 22pF bypass capacitor to filter off the worst of any RF signals on
the input. The USB Sound Card is AC-coupled, so a DC
blocking capacitor is included between the input RF filter
and the attenuator.
We want a lower cutoff frequency (−3dB point) an order
of magnitude below 20Hz; we chose 1.5Hz. This means
that non-linearities in the DC-blocking capacitors will not
introduce any distortion, so long as they are not gross nonlinearities (as with high-K ceramic capacitors, for example).
Fig.5: we measured the total harmonic distortion (THD)
with a −7.66dBV sinewave fed into the balanced inputs
and a 0dB attenuator setting. The result shows very little
difference from the same test without the Balanced Input
Attenuator add-on. So it appears that the added circuitry
is not introducing any extra distortion to the signals.
Fig.6: the same test as Fig.5 but with the Attenuator set to
−10dB. Other than the signal level falling by the expected
amount, there isn’t much difference. The increase in
THD reading is mainly due to the change in signal level;
increasing the input signal level by 10dB would likely give
the same result as in Fig.5.
And here’s a view from the opposite end, with the lid
removed, showing how the new PCB fits ‘upside down’
above the existing SuperCodec board.
Practical Electronics | December | 2021
Fig.7: and the same test again with an Attenuator setting of
−20dB. The same comments as for Fig.6 apply. Note how the
signal level drops by very close to 10dB and 20dB in these
two tests, showing off the excellent attenuation accuracy.
31
2-Channel Balanced Input Attenuator
For a 100kΩ input impedance, as
used in the May 2016 Attenuator design, this demands the DC blocking
capacitor be 1µF. But the Johnson noise
in a 100kΩ resistance is enough to affect
the performance of the USB SuperCodec, so we really need a lower input
impedance, say 10kΩ. This demands
32
a 10µF DC-blocking capacitor for the
same 1.5Hz −3dB point.
The current through these capacitors is extremely low, and pretty much
any film capacitor will work well. You
could use an electrolytic, but many people don’t like the idea of electrolytics in
the signal path (even though they work
OK for signal coupling). Also, they tend
not to last as long as film capacitors.
And as mentioned above, ceramic is a
poor choice, so plastic film it is.
The switched attenuator
The input attenuator reduces the input
signal level by 0, 10, 20 or 40dB. That
Practical Electronics | December | 2021
Fig.8: the circuit of the Balanced Input Attenuator add-on board. CON1 and CON2 are the new 6.35mm TRS jack
socket inputs connectors, while CON3 and CON4 connect to the ±9V supplies and CON4 input header on the USB
SuperCodec Sound Card board respectively. The attenuator resistor taps are selected via relays RLY1-RLY8, and the
signals then pass to op amp buffers IC1-IC4 and the differential-to-single-ended converter stages based on dual op
amps IC5 and IC6 before going to the ADC.
means division ratios of 3.16:1, 10:1
and 100:1. We chose these values as
0dB (ie, straight through) gives the best
sensitivity and a useful 1V RMS input
level. −10dB is well suited to professional audio signal levels.
It is also low enough to be useable
with consumer equipment like CD,
Practical Electronics | December | 2021
DVD and Blu-ray players which tend to
produce an output signal of around 2.2V
RMS. The −20dB and −40dB settings
are handy for power amplifier testing.
The attenuator is a simple resistive
divider. The total series resistance sets
the input impedance of the balanced
interface, and as mentioned above, this
has an impact on the noise performance
and the size of the DC blocking capacitor required.
Thermal noise
The noise impact will depend on
the attenuation setting. At 0dB, the
divider is effectively bypassed and
33
Parts list – Balanced Input and Attenuator
1 assembled USB SuperCodec without 2x12-pin headers attached or front/rear panels
drilled but with loose MCHStreamer module (described in PE, Sep – Nov 2021)
1 assembled Balanced Input Attenuator board (see below)
1 set of Test Leads (optional; see below)
2 6x2-pin header sockets, 2mm pitch with pigtails
(supplied with MiniDSP MCHStreamer)
1 180mm length of heavy-duty figure-8 shielded audio cable
[Altronics W2995, Jaycar WB1502]
1 1m length of red medium-duty hookup wire
1 1m length of black medium-duty hookup wire
1 1m length of green medium-duty hookup wire
1 30cm length of 5mm diameter black or clear heatshrink tubing
1 30cm length of 2.4-2.5mm diameter black or clear heatshrink tubing
Balanced Input Attenuator board
1 double-sided PCB coded 01106202, 99.5 x 141.5mm from the PE PCB Service.
2 6.35mm DPDT switched stereo jack sockets (CON1,CON2)
[Altronics P0076, Jaycar PS0180, element14 1267402]
1 right-angle 3-pin polarised header (CON3) [Altronics P5513, Jaycar HM3423]
1 right-angle 4-pin polarised header (CON4) [Altronics P5514, Jaycar HM3424]
4 4-5mm ferrite suppression beads (FB1-FB4) [Altronics L5250A, Jaycar LF1250]
8 2A DPDT 5V DC coil telecom relays (RLY1-RLY8)
[Altronics S4128B/S4128C, Mouser 551-EA2-5NU]
1 DP4T right-angle PCB-mount switch (S1) [Altonics S3008]
Semiconductors
6 NE5532AP or NE5532P dual low-noise op amps, DIP-8 (IC1-IC6)
2 12V 1W zener diodes (ZD1,ZD2)
2 3.9V 1W zener diodes (ZD3,ZD4)
8 1N4148 small signal diodes (D1-D8)
Capacitors
1 100µF 16V electrolytic
4 10µF 100V polyester film*, 15mm lead pitch [Mouser 871-B32562J1106K]
6 10µF 35V electrolytic
6 100nF 63V MKT
8 100pF 50V C0G/NP0 ceramic
4 22pF 250V C0G/NP0 ceramic
Resistors (all 0.25W ±1% metal film unless otherwise specified)
4 1MΩ 2 3.3kΩ
1 82Ω
4 68Ω
4 39Ω*
4 33Ω
6 10Ω
4 6.81kΩ* ±0.1% [Mouser 71-CMF556K8100BEEK]
4 2.15kΩ* ±0.1% [Mouser 71-RN55C-B-2.15K]
16 1kΩ ±0.1% [Mouser 71-PTF561K0000BXR6]
4 900Ω* ±0.1% [Mouser 71-CMF55900R00BHEB]
4 100Ω* ±0.1% [Mouser 71-CMF55100R00BEEB]
* for 100k input impedance, substitute these instead:
4 1µF 250V polypropylene film, 7.5mm lead pitch [Mouser 667-ECW-F2105HAB]
4 68.1kΩ ±0.1% [Mouser 279-H868K1BYA]
4 21.5kΩ ±0.1% [Mouser 279-YR1B21K5CC]
UK/EU/US... readers
4 9kΩ ±0.1% [Mouser 71-PTF569K0000BYEK]
You don’t need to use
4 1kΩ ±0.1% [Mouser 71-PTF561K0000BXR6]
the exact Altronics/
4 390Ω ±1%
Jaycar parts listed
here – they are quoted
Test Lead parts
so you can find local
2 90° 6.35mm TRS line plugs [Altronics P0048 or P0049]
alternatives from the
2 1.2m lengths of microphone cable (or length to suit)
specs provided online.
[Altronics W3024/W3029, Jaycar WB1534]
2 small red alligator clips [Altronics P0110, Jaycar HM3020]
2 small black alligator clips [Altronics P0111, Jaycar HM3020]
2 small green alligator clips [Altronics P0102]
1 30cm length of 6mm diameter black or clear heatshrink tubing
1 30cm length of 3mm diameter black or clear heatshrink tubing
1 30cm length of 2.4-2.5mm diameter black or clear heatshrink tubing
so the input impedance has no real
effect on the performance.
At the other three settings, the input
impedance ‘seen’ by the SuperCodec is
34
the upper and lower halves of the divider,
bisected by the selected tap, in parallel.
The worst case is the −10dB setting,
at 21.6% of the overall input resistance
(ie, 21.6kΩ for the 100kΩ option and
2.16kΩ for the 10kΩ option). For the
−20dB setting, it is 9% of the input
resistance and for the −40dB setting, it
is 1% of the input resistance.
Thermal noise in a resistance is calculated as (4 × K × T × B × R) where
K = 1.38 x 10−23, T is the temperature
in kelvin, B is the bandwidth in Hz and
R is the resistance in ohms.
At room temperature (around 300K),
for a bandwidth of 20kHz and a resistance of 21.6kΩ, this works out to
2.67µV RMS, which is −111.5dBV. That
is a higher level than the inherent noise
in the SuperCodec’s ADC, so it would
definitely degrade performance.
A source impedance of 21.6kΩ to
the buffer op amps would also increase
their distortion contribution slightly.
For 1/10th the resistance, that noise
level drops by a factor of 10 = 3.16, to
845nV RMS or −121.5dBV.
This is usefully below the noise
floor of the SuperCodec, so it will
have little impact on performance at
−10dB, and even less on the −20dB
and −40dB settings.
In fact, the biggest impact on performance is likely to be EMI pickup
due to the higher input impedance in
this case.
Consider errors caused by loading
the DUT with 10kΩ. A preamp might
have a 100Ω resistor in series with
its output.
If we measure this preamp with a
10kΩ input impedance balanced line
test set, we will introduce a 1% scaling error.
That probably does not matter in
most cases, but it does need to be considered. We certainly would not want
errors greater than this.
So 10kΩ is the lower practical limit,
especially when you consider that film
capacitors with values above 10µF are
expensive and bulky, and would not fit
in the space available.
We also need to consider power dissipation in the divider. With 50V RMS
fed into the divider, the power dissipation is 0.25W for a 10kΩ divider. This
is spread out through several resistors,
but heating in those resistors could lead
to some inaccuracies.
The ratings of the divider resistors
would allow up to 80V RMS to be fed
in, but besides this being possibly
unsafe, we prefer not to run them at
their limits.
So there is no perfect answer. Hence,
we are providing resistor values for the
input attenuator that give either a 10kΩ
or 100kΩ input impedance. Remember
to choose the right value capacitor to
go with them. Our inclination is to go
with 10kΩ, but we fully understand
why others might choose 100kΩ.
Practical Electronics | December | 2021
Benefits of balanced signals
Professional audio equipment uses balanced signals
carried on three conductors: the positive ‘Hot’, negative
‘Cold’ and a screen. Electromagnetic interference picked
up in the cable (usually heard as hum or buzz) affects both
the Hot and Cold signals similarly. The balanced receiver
subtracts the Cold signal from the Hot, resulting in twice
the signal with severely attenuated noise.
If the Hot signal is given by: (signal × 1) + noise
And the Cold signal is: (signal × −1) + noise
Then, Hot – Cold is: [(signal × 1) + noise] − [(signal × −1) + noise]
= (signal – – signal) + (noise – noise) = signal × 2
This is a great way to reject noise and hum from things
like ground loops, especially on long cable runs.
Besides added complexity in the circuitry, the main disadvantage of this approach is that converting a balanced
signal into an unbalanced signal generally introduces a bit
of white noise; so while hum and buzz are rejected, the
signal-to-noise ratio (SNR) can suffer.
When testing audio equipment, we often need to analyse
the signal between two particular points in the device
under test (DUT). We certainly want to avoid measuring
any voltages within the ground system of the DUT or our
test equipment itself.
By using a balanced input in this situation, we can connect the Cold conductor to an appropriate ground reference point in the DUT. The Hot connection is then used to
measure the signal of interest. Any noise between the USB
Sound Card ground and the DUT ground is subtracted out
of this measurement.
When measuring low voltages and exceptionally low
distortion levels on signals at moderate voltages, this is
extremely important, as sometimes we are looking for
microvolt or even nanovolt level distortion signals.
As good as balanced interfaces are, earthing remains
essential. To achieve good results below −100dB, you will
need to work on the test earthing and layout. You might
be surprised how much things like the orientation of the
equipment being tested and its proximity to computer
equipment and even the operator can affect the results!
We have used relays to switch between the four possible attenuation settings. This is a little bit expensive, as
they are a few pounds each, but it makes the design nice
and clean in terms of layout and avoids the possibility of
noisy, unreliable wafer switches failing. The relays give a
satisfying ‘clunk’ as you switch across ranges, suiting such
a high-performance device.
Buffers
The voltage divider output impedance varies depending
on the range selected. This does not suit the balanced-tosingle-ended converter, so buffers are needed.
We use two paralleled op amps to do this, driving two
balanced-to-single-ended converters. These are combined
at the output to get a 3dB improvement in signal-to-noise
ratio compared to using fewer op amps.
The differential-to-single-ended converters subtract the
Cold input signal from the Hot input signal. The matching of resistors in these is important, at least within each
arm of each converter. Therefore, we have specified 0.1%
tolerance 1kΩ resistors here. This tolerance is required to
deliver the specified performance.
Practical Electronics | December | 2021
We have chosen 1kΩ resistors as they have a low enough
resistance to add negligible thermal noise to the convertor
without loading the op amp outputs too much.
And as many constructors will likely have plenty of 1kΩ
1% resistors, they could select well-matched pairs using
just about any DMM and avoid the cost of 0.1% types.
The output of the differential-to-single-ended convertors is combined through 10Ω resistors (necessary to allow
for the op amps having different offset voltages), which
then feed into the USB Sound Card.
We have included input protection comprising diodes
clipping to a 3.9V rail. We have tested that this does not
impact distortion performance.
Note though that if you connect this to a high-voltage
source on the 0dB range, you will risk damaging this
part of the circuit!
There is additional protection on the power supply rails
provided by 12V zeners, which again should only operate
under extreme fault modes.
Next month
We don’t have room for the construction details this
month. That will have to wait for the next issue.
As well as describing the construction, and what you
have to do to get the Balanced Input Attenuator to fit into
the same case as the USB SuperCodec, the second and final
article in this series will also cover the testing procedure,
and how to make some handy balanced test leads.
Reproduced by arrangement with
SILICON CHIP magazine 2021.
www.siliconchip.com.au
Your best bet since MAPLIN
Chock-a-Block with Stock
Visit: www.cricklewoodelectronics.com
O r p h o n e o u r f r i e n d l y kn
o w l e d g e a b l e st a f f o n 0 2 0 8 4 5 2 0 1 6 1
Components • Audio • Video • Connectors • Cables
Arduino • Test Equipment etc, etc
V is it o u r S h o p , C a ll o r B u y o n lin e a t:
w w w .c r ic k le w o o d e le c tr o n ic s .c o m
0 2 0 8 4 5 2 0 1 6 1
V is it o u r s h o p a t:
4 0 -4 2 C r ic k le w o o d B r o a d w a y
L o n d o n N W 2 3 E T
35
|