This is only a preview of the July 2022 issue of Silicon Chip. You can view 44 of the 112 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Items relevant to "Multimeter Calibrator & Checker":
Items relevant to "VGA PicoMite":
Items relevant to "0-110dB RF Attenuator":
Items relevant to "Secure Remote Mains Switch, Part 1":
Articles in this series:
Purchase a printed copy of this issue for $11.50. |
By Charles Kosina
Features & Specifications
Usable frequency range: DC to 100MHz
Input & output impedance: 50W
Attenuation range: 0dB to -110dB in 1dB
steps up to 2MHz; reduced maximum
attenuation at higher frequencies (see Fig.2)
Attenuation error:
typically ≤0.5dB (see Fig.1)
Power supply: 5V/100mA
Fits in the same diecast case as the AM/FM
Signal Generator from last month
0-110dB RF
Attenuator for
Signal Generators
This Attenuator was designed to accompany my recently published AM/FM
Signal Generator design (May 2022; siliconchip.au/Article/15306). However,
you could combine it with just about any signal generator to provide easy
output level adjustment over a wide range.
W
e often need a very low amplitude RF signal to test, align
or adjust a radio. Unless you buy
an expensive signal generator, the
chances are that your generator’s output level is far too high for such a task.
My recent AM/FM Signal Generator design has an output near 0dBm,
which translates to about 220mV into
a 50W load. To reduce this to 1µV RMS
(eg, for testing a radio’s sensitivity), we
need 107dB of attenuation.
The simplest way to achieve this is
to buy off-the-shelf fixed attenuators.
These are available from 1dB to 40dB
and cost about $5 each. They have
SMA connectors on either end, and
you screw them together to give the
required attenuation.
Variable digital attenuators are also
available, as reviewed by Silicon Chip
last year (October & November 2021;
siliconchip.com.au/Article/15067 &
siliconchip.com.au/Article/15100).
These have a maximum attenuation
of about 30dB and can be adjusted in
small steps, eg, 1dB or 0.5dB. Combining one of these with a few fixed
62
Silicon Chip
attenuators is one possible solution.
However, I decided to design my
own attenuator as it is pretty straightforward; it’s basically just a string of
fixed attenuators, each consisting of
three resistors, selected in combinations using relays. This works fine at
low frequencies, eg, below 2MHz, but
once we get much higher than that, the
signal will sneak through by various
paths to make a 1µV output difficult
to achieve.
Does this Attenuator achieve such a
task? Yes and no. At 2MHz and below,
the maximum attenuation is 110dB,
but once we get to 75MHz, the attenuation is only 81dB. So for a 0dBm
input, the lowest output level is 20µV
RMS. However, adding one fixed 30dB
attenuator to its output lets us get to
110dB and still gives quite a bit of
adjustment range, so I consider that
reasonably good.
This is because, at higher frequencies, stray capacitance and inductance
become more significant. In addition,
circuit board tracks act as antennas and
radiate energy that is picked up further
Australia's electronics magazine
downstream in the attenuator string.
Professional signal generators with
attenuators use extensive internal
shielding to reduce such effects. For
home-built equipment, this is somewhat impractical. That is why I did
not build the Attenuator into the Signal Generator but rather in a separate
diecast aluminium enclosure. There
is far too much RF floating around
in the signal generator which would
make it difficult to isolate the attenuator section.
Fig.3 shows the attenuator circuit.
The signal is fed in via CON4 then
passes through ten switched attenuator sections using DPDT relays RLY1
to RLY10 before reaching output connector CON5. These sections attenuate
by 1dB, 2dB, 3dB, 5dB, 10dB (twice)
and 20dB (four instances).
The ideal resistance values for these
attenuators are not in the standard
range, so I have chosen the closest
standard values, resulting in slight
inaccuracies.
With a relay de-energised, the signal
just passes through the normally-closed
siliconchip.com.au
Parts List – 110dB RF Attenuator
1 double-sided plated-through PCB coded CSE211003,
76 x 95.5mm
1 diecast aluminium enclosure, 119 x 93.5 x 34mm
[Jaycar HB5067 or Altronics H0454]
1 5V 100mA+ regulated DC power supply (eg, USB
charger with adaptor cable)
1 0.96in OLED screen module with I2C interface and
SSD1306 controller (OLED1)
1 mechanical rotary encoder with integrated pushbutton
switch and 20mm total height (RE1) [eg, Bourns
PEC11R-4215F-S0024]
10 EC2-5NU DPDT 5V coil relays (RLY1-RLY10)
1 10μH axial RF inductor (L1)
1 28-pin DIL IC socket (optional, for IC1)
1 PCB-mount DC barrel socket with 2.1mm or 2.5mm
inner pin diameter (CON1)
1 2-pin, 2.54mm pitch polarised header and matching
plug with pins (CON2)
1 3-pin, 2.54mm pitch polarised header (CON3) ●
2 SMA edge connectors (CON4, CON5)
2 2x3-pin header (CON6; optional, for programming IC1)
1 4-way female header socket (CON7; for OLED1)
1 large knob to suit EN1
4 12mm-long M3 tapped metal spacers
2 10mm untapped spacers
sets of contacts. If it is energised, the
signal instead passes through the resistive attenuator section.
A rotary encoder is used to adjust
the amount of attenuation required,
in either 1dB or 5dB steps, toggled by
pressing the encoder’s integral pushbutton switch. The firmware in the
ATMega168 or ATMega328 microcontroller translates the attenuation to
switch in the appropriate set of relays.
For example, to select 35dB, relays
3, 6 and 7 would be energised. To prevent relays chattering while the shaft
encoder is turned, there is a short delay
after the number is selected before the
appropriate relays are turned on and
off. Each relay’s coil is switched using
a small signal Mosfet.
You might have noticed that there
are no diodes to absorb the backEMF of the relay coils at switch-off at
Fig.1: the attenuation settings are very accurate at low
frequencies down to about 90dB, with a maximum error of
only 1dB. The +0.5dB blip between 6dB and 8dB could be
due to measurement error.
siliconchip.com.au
4 M3 x 6mm panhead machine screws
4 M3 x 8mm countersunk head machine screws
2 M2 x 16mm or M2.5 x 16mm panhead machine screws
and nuts (to match OLED mounting holes)
4 M3 flat washers
Semiconductors
1 ATmega168 or ATmega328 8-bit microcontroller
programmed with CSE211003.hex, DIP-28 (IC1)
1 LP2950-3.3 or similar 3.3V LDO regulator, TO-92 (REG1)
10 PMV15UNEA, PMV19XNEA or similar avalancherated N-channel Mosfets, SOT-23 (Q1-10) [Mouser Cat
771-PMV15UNEAR or element14 Cat 3268027]
2 2N7000 N-channel Mosfets, SOT-23 (Q11-Q12) ●
Capacitors (SMD 0805 6.3V+ X7R ceramic unless stated)
1 10μF M3216/1206-size
1 1μF
4 100nF
3 10nF
Resistors (all SMD M2012/0805 1% thick film)
5 18kW
2 4.7kW
1 1kW ●
2 820W
2 470W
2 270W
4 220W
2 180W
4 100W
2 68W
8 56W
1 33W
1 18W
1 12W
1 5.6W
● omit if the debugging interface is not needed
SC6420 kit ($75): a short form kit is available that
includes most parts. See page 106 for more details.
switch-off. This is a bit unusual, but it
does cut back on the number of components. This only works if the Mosfets are rugged enough to withstand
the voltage spikes caused by the relay
coil magnetic fields dissipating. See
the section below on “Avalanche-rated
Mosfets” for more details on this.
As with my other designs, I have
added a simplified RS-232 interface
for debugging using Mosfets Q11 and
Fig.2: the actual attenuation for a selected value of 110dB
between 2MHz and 75MHz. As the signal frequency
increases, parasitic capacitances on the circuit board result
in more of the input signal leaking through to the output.
Australia's electronics magazine
July 2022 63
Q12. These may be omitted unless you
plan to use that interface.
The Attenuator is powered from a
standard 5V DC mobile phone charger
(or other USB power source). While
this could be obtained from an output socket on the Signal Generator,
I decided to use a separate supply to
reduce potential RF leakage. You will
note that the photos show an additional DC socket. This is for powering
64
Silicon Chip
an external amplifier that was used for
measurement.
Inductor L1 is in series with the
incoming supply to further reduce any
outside RF. This seems to be effective
as powering it from a battery of three
AA cells made no measurable difference in readings.
The same 0.96in SSD1306-based
OLED screen is used to display the
attenuation value as in the Signal
Australia's electronics magazine
Generator. A 3.3V regulator generates
the OLED supply rail. The I2C interface
requires pull-up resistors to +3.3V. As
the SDA and SCL outputs on PC4 and
PC5 of IC1 are open drain, there is no
problem with the 5V-powered micro
interfacing with the OLED.
I chose NEC EC2-5NU relays. They
are DPDT types with 5V DC rated
coils. These are readily available and
have good isolation. The measured
siliconchip.com.au
capacitance between open contacts
is 1pF, which does not sound like
much. Still, the reactance at 75MHz
is -j × 2122W, which is effectively in
parallel with the 220W resistor in the
20dB sections, slightly reducing the
attenuation.
The measured attenuation tracks
the set attenuation fairly closely at
2MHz and below, as is shown in Fig.1.
I took these readings with the tinySA
spectrum analyser. The noise floor of
the tinySA is about -90dBm, so I used
a 30dB low-noise amplifier (LNA) to
measure down to -110dBm. The measured value varied slightly on each
pass, so I averaged several readings.
Once the frequency gets above
2MHz, the accuracy drops off, and
Fig.2 shows the maximum attenuation
achievable up to 75MHz. To get a lower
signal level at the higher frequencies,
Fig.3: the entire circuit of the
110dB Attenuator. The main
section consists of 10 switched
attenuators, each made from
three resistors, one relay (RLY110) and one Mosfet (Q1-Q10) to
drive the relay. The transistors
are driven by microcontroller
IC1, which also monitors the
rotary encoder and pushbutton,
and communicates with the
OLED to show the current
attenuation setting.
you will need to put a fixed 30dB attenuator on the unit’s output.
Avalanche-rated Mosfets
Avalanche-rated Mosfets (such as
those specified in the parts list) must
be used to ensure longevity. This is
easy to check by searching the device
data sheet for the avalanche energy rating (usually expressed in mJ).
When a Mosfet’s drain-source rating
voltage is exceeded, it can enter avalanche breakdown, similar to a zener
diode. In this mode, the channel conducts current until the voltage drops.
The problem with this is that a typical Mosfet is made of many (usually
thousands of) cells, and there’s no
guarantee that each cell will break
down at the same voltage. That means
the energy may pass through a very
small proportion of the Mosfet area,
causing intense local heating and possibly failure.
Also, the avalanche current is not
conducted through the normal channel
but rather through a ‘parasitic bipolar
transistor’ formed by two semiconductor junctions within the Mosfet. This
also has the effect of concentrating the
current into a smaller area than usual.
Avalanche-rated Mosfets solve this
by two methods. Firstly, they are
designed and manufactured in such a
way to minimise the variation in breakdown voltages between individual
cells so that the current is spread out.
Secondly, after being manufactured,
they are tested by being forced into
avalanche breakdown with a pulse
of energy at least as high as specified
in the data sheet. Any ‘weak’ devices
that cannot handle this fail and are
discarded. Only the survivors go on
to be sold.
We’ve calculated the energy pulse
from the relay coils in this design at
around 1mJ. The Mosfets we have
specified have single-pulse ratings of
around 15mJ. They only need to handle one pulse every few seconds, so
this should be well within their capabilities. If substituting Mosfets, choose
types with a minimum avalanche rating of 10mJ.
For more information about this
topic, see the excellent PDF from
Infineon at siliconchip.com.au/link/
abdb
Construction
The unit is built into a standard aluminium diecast box, available from
siliconchip.com.au
Australia's electronics magazine
July 2022 65
Fig.4: the front panel label for the Attenuator. The number and size of cutouts
have been minimised to prevent RF leakage into or out of the case.
Fig.5: luckily, there aren’t too many holes that need to be cut in the diecast case.
They can all be drilled, except for the rectangular OLED hole. There are various
ways to make that; just be sure to do it slowly to avoid it becoming jagged or
oversized.
66
Silicon Chip
Australia's electronics magazine
Jaycar and Altronics (the same one
used for the recently-described AM/
FM Signal Generator). It’s best to prepare this before assembling the PCB.
I sprayed mine black to improve its
appearance.
I printed the label (Fig.4) on
photographic paper and added a
1.5mm-thick protective clear polycarbonate sheet on top, cut to the same
size as the label. You can download
this artwork from siliconchip.com.au/
Shop/11/6419
The PCB attaches to the inside of the
case using 12mm threaded spacers. If
you can’t get these, use 10mm threaded
spacers with an added nut to extend
them to 12mm. I also sprayed the
screws through the front panel black
to improve the overall appearance.
The required cutouts in the enclosure are shown in Fig.5. For best accuracy, locate the reference point in
the bottom left and drill this to 3mm
diameter. Then attach the blank PCB
to use as a template. Square it up, drill
the opposite corner and secure it with
another screw. Now drill the other
mounting holes.
The encoder location on the PCB
has a small hole in the centre on the
PCB. Drill the panel through this using
a 1.5mm diameter drill bit, then drill
holes in the case corresponding to the
four OLED mounting holes to 2.5mm.
Remove the PCB and enlarge the
hole for the shaft encoder to 14mm
siliconchip.com.au
diameter. It needs to be that large so
that the PCB can be manoeuvred into
position. Increase the size of the OLED
mounting holes to 4mm and use the
outside of these to mark the cutout
needed.
How you make the cutout depends
on the equipment and skills that you
have. Perhaps the simplest approach
is to drill a series of reasonably small
(say 3-4mm) holes around the inside
of the perimeter. Join these with a file
until the centre part drops out, then
use a larger flat file to smooth the edges
until they are straight and the hole is
just large enough.
Finally, drill two 7mm holes for the
SMA connectors on the front and a
hole for the DC connector on the back.
There is not much room for this connector; it should be 7mm up from the
bottom of the case. I also placed a small
toggle switch next to the DC connector for the power, but that is optional.
PCB assembly
Most of the components mount on
a double-sided PCB coded CSE211003
that measures 76 x 95.5mm. Fig.6
shows where the parts go.
The resistors and capacitors
are mostly SMD M2012/0805 or
M3216/1206 size, while the transistors
are in SOT-23 packages. Solder all the
SMDs first, followed by the throughhole components, then the SMA connectors, and the rotary encoder last.
siliconchip.com.au
Fig.6: the resistors, capacitors and Mosfets all come in SMD packages but
are pretty easy to solder. The micro, regulator, relays, headers and rotary
encoder are through-hole parts. Fit all the SMDs first, then the through-hole
parts from lowest profile to tallest, with the edge connectors last. Be careful
to orientate the microcontroller and regulator as shown.
There are options for other 3.3V
regulators if the LP2950-3.3 regulator
is not available. Some have different
pinouts, so check this if substituting.
If your replacement regulator has a
reversed pinout, you can mount it on
the opposite side of the board.
The OLED screen plugs into a 4-pin
socket strip. Although four mounting
holes are provided, attaching it with
two screws and two 10mm spacers is
adequate.
The holes in the OLED may be
either 2mm or 2.5mm, so use either
Australia's electronics magazine
M2 x 16mm or M2.5 x 16mm machine
screws and nuts.
Using it
It’s about as easy as it gets. Simply power the unit up, use the rotary
encoder to dial in the amount of attenuation required while checking the
screen display, then ensure your input
and output cables are connected to the
correct sockets. Remember that pushing down on the rotary encoder knob
switches between adjustment steps of
1dB and 5dB.
SC
July 2022 67
|