This is only a preview of the November 2021 issue of Silicon Chip. You can view 45 of the 96 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 "USB Cable Tester – Part 1":
Articles in this series:
Items relevant to "R80 Synthesised Aviation Band Receiver Kit":
Items relevant to "Pocket Weather Station":
Items relevant to "Model Railway Carriage Lights":
Items relevant to "Two- or Three-Way Stereo Active Crossover – Part 2":
Purchase a printed copy of this issue for $11.50. |
Using Cheap Asian Electronic Modules
By Jim Rowe
Self-Contained 6GHz
Digital Attenuator
This new digitally-programmable module
can attenuate signals from 1MHz to 6GHz by
0 to 31.75dB in 0.25dB steps. You control it using five small pushbutton
switches, while a tiny OLED screen shows the current setting.
I
recently reviewed a new and small
digitally-programmed UHF step
attenuator module that could attenuate signals from 1MHz to 3.8GHz by
0-31dB in 1dB steps (October 2021;
siliconchip.com.au/Article/15067).
It has an inbuilt microcontroller, and
the attenuation is set using four small
pushbutton switches.
The results were quite respectable
overall, although there seemed to be
a bit of contact bounce with the pushbutton switches and the RF output
and power input connectors were too
close together.
As I finished writing that review,
I became aware that a slightly larger
digital attenuator had become available, with a broader frequency range
and 0.25dB attenuation steps rather
than 1dB.
The OLED panel is mounted on the
top of this PCB in the centre, along
with the micro-USB power socket,
the mini slider power switch and a
tiny SMD power LED. Then along the
PCB front are the five small pushbutton switches used to select the attenuation setting. Presumably, the rest of
the controller circuitry is mounted on
the underside of this PCB.
The UHF attenuator chip is probably the Analog Devices HMC1119, a
‘big brother’ to the HMC472 used in
the aforementioned 3.8GHz attenuator.
According to the Analog Devices
data sheet, the HMC1119 has a range
of 100MHz to 6.0GHz and seven control bits, giving a setting range of 0 to
31.75dB in 0.25dB steps. It has a specified insertion loss of 1.3dB at 2.0GHz,
drooping to around 1.5dB at 3.5GHz
and a whisker below 2.0dB at 6GHz.
Pretty impressive!
As with the 3.8GHz attenuator, I
couldn’t find a full circuit for the new
module, so I could only work out a
basic block diagram for it, shown in
Fig.1.
The RF1 input and RF2 output pins
of the HMC1119 chip are coupled to
the SMA input and output connectors via capacitors. Apart from various
bypass capacitors, that makes up all of
the actual attenuator section.
Below is the control section, based
on a microcontroller (possibly an
New module
The new module is likely available
from several suppliers on the web, but
I ordered the one shown in the photos
from Banggood, catalog code 1648810.
Currently, it’s priced at $51.80 plus
$6.70 for shipping to Australia. Like
the earlier 3.8GHz module, it’s almost
certainly made in China.
The new module measures 56 x 40 x
16mm overall, not counting the SMA
connectors at each end for RF input
and output.
The digital attenuator section is on
a small PCB fitted down inside a 56 x
40 x 10mm CNC machined aluminium block which forms the module’s
‘case’. The rest of the module’s circuitry is mounted on a second PCB
measuring 56 x 40mm, which forms
the top of the case.
siliconchip.com.au
Fig.1: a simplified version of what we expect the block diagram the 6GHz
attenuator to look like, as there is no full circuit diagram available.
Australia’s electronics magazine
November 2021 37
The 6GHz
digital
attenuator
from Banggood
has an OLED
screen and
weighs about
57g.
STM32F103C8T6, like the one used
in the 3.8GHz attenuator).
Operation
The microcontroller (MCU) controls the attenuation settings of the
HMC1119 via the seven programming
lines, while the user determines the
attenuation setting using the five small
pushbutton switches S1-S5. To make
this easy, the MCU displays the current attenuation setting on the OLED
screen, controlled using a standard I2C
serial interface.
When power is first applied, the
MCU sets the attenuation to 00.00dB.
To change this, you first press S3
(the OK button) and then press S1 (<)
or S5 (>) until the display is flashing
the setting digit you want to change.
Then you can press either S2 (+) or S4
(-) to change the value of this digit. To
change other digits, use either S1 or S5
to move to them, then use S2 or S4 to
change their value. Then if you press
S3 again, this will be the new setting.
It’s pretty straightforward, and
although the tiny pushbuttons used
for S1-S5 seem to be the same as those
used on the 3.8GHz module, the additional two buttons seem to allow the
setting to be changed more reliably.
Perhaps the firmware in the MCU has
also been improved to make it less susceptible to contact bounce.
I have also shown a USB-serial interface chip in Fig.1. This chip may or
may not be in the 6GHz module; I’ve
shown it purely because it was present in the 3.8GHz module. It’s possible
that, in this case, the data lines from
the micro-USB connector go directly to
two pins of the MCU, but they certainly
are routed somewhere on the PCB.
Either way, it would allow the attenuation setting to be programmed from
an external PC, as well as from its own
‘keyboard’. So the micro-USB socket is
not just to feed power to the module,
but also for external control.
As with the 3.8GHz attenuator,
there’s virtually no information provided on doing this external control,
but I found a very cryptic suggestion
in the ‘Customer Q&As’ section of the
Banggood info on the module: “Go to
github.com/emptemp/att6000_control
for Python code.”
I’m not familiar with the Python
programming language, so I sought
help from other Silicon Chip staff.
They advised me that all the ‘att6000’
Python code seemed to do was send
38
Silicon Chip
serial text commands in the format
“wv0XXYY<LF>”, where the XXYY
characters indicate the desired attenuation setting XX.YY.
In other words, sending the command “wv02375<LF>” should change
the attenuator’s setting to -23.75dB.
They also informed me that the command should be sent at 115,200 baud,
not the 9600 baud that seemed to be
used previously. I did try this out, and
the results are described below.
Performance
I measured the performance of the
new attenuator module using my Signal Hound USB-SA44B HF-UHF spectrum analyser and its matching USBTG44A tracking generator. Both were
controlled by Signal Hound’s Spike
software (V3.5.15) in its SNA (scalar
network analysis) mode.
Since the SA44B and TG44A combination will only work up to 4.4GHz,
I could only check the module over
this range.
I first used this setup to check the
module’s performance at an attenuation setting of 00.00dB to see its
insertion loss. This is shown in Fig.2;
the measured insertion loss is less
than -2.5dB up to about 1.3GHz,
then droops down to about -6.0dB at
2.5GHz, then improves to about -2.5dB
at 3.0GHz.
It then droops to about -4.5dB at
4.0GHz, before moving up again to
reach -4.0dB at 4.4GHz, which looks
promising for its insertion loss at frequencies up to 6GHz.
After this, I did response tests at
‘major’ attenuation steps: -5dB, -10dB,
-15dB, -20dB, -25dB and -30dB. These
settings were chosen to give a good
idea of the module’s overall performance. After examining the results I
then checked the response at a number
of ‘fine detail’ settings: -1dB, -1.5dB,
-2dB, -3dB, -4dB, -7.5dB, -10.75dB,
-14dB, -19dB, -28.25dB and -31.75dB.
During each of these tests, I saved an
image of Spike’s plot of the test results.
Then, knowing that there wouldn’t be
enough space to reproduce all 18 of the
plots separately, I combined all of the
plots into a single composite plot, to
allow for easier evaluation – see Fig.3.
The upper plots in Fig.3 (down to
about -20dB) have a shape almost identical to that of the top 00.00dB plot,
just separated from it by the chosen
attenuation setting.
Fig.2: using Signal
Hound’s Spike software
the 6GHz module
could be checked at
an attenuation setting
of 0dB to measure its
insertion loss. Note
that the setup used
for testing can only
measure up to 4.4GHz,
so not the full range of
the attenuator.
Australia’s electronics magazine
siliconchip.com.au
For frequencies above about
1.75GHz, the higher attenuation plots
(-20dB and greater) develop an increasing number of bumps and dips. These
are very apparent in, for example, the
red -25dB plot, the purple -28.25dB
plot, the red -30dB plot and the blue
-31.75dB plot.
All of these four plots show an
increasing tendency to have a significant dip between 2.5GHz and 3.1GHz.
I suspect that this may be due to small
resonances inside the HMC1119 chip
and/or its surrounding tracks on the
attenuator section’s PCB. There might
also be standing waves inside the
attenuator box at specific frequencies.
These plots tell us that the attenuator’s performance is quite respectable,
at least for frequencies up to about
2.2GHz and for settings up to about
-20dB. But the errors do increase for
frequencies above 2.2GHz and with
settings above -20dB.
Of course, the attenuator would still
have many practical uses at frequencies above 2.2GHz and with settings
above -20dB, especially if you were to
use Fig.3 to correct for likely errors.
Armed with the information mentioned earlier on how to control the
device over a serial connection, it
didn’t take me long at all to test sending new attenuation settings from my
Windows 10 PC, using the TeraTerm
serial terminal application.
All I had to do was plug the cable
from the attenuator into a USB port,
then go into Settings → Devices to find
out to which Virtual COM port it had
been assigned. Then I started up TeraTerm and set it up to communicate
with that port at 115,200 baud, with
the 8N1 data format and with only an
LF (line feed) at the end of each line.
I was then able to change the attenuator’s setting at any time simply by
typing in a command like “wv01575”
and pressing the Enter key. No problem! The attenuator’s OLED immediately showed the new setting (like
“-15.75dB”) and also sent back an
“OK” message, to confirm that the
command had been received and
acted upon.
I should perhaps note that there
does seem to be provision on the top
of the attenuator (just to the left of the
OLED) for connecting a separate serial
interface, as you can see in the photos.
But there’s no information on doing
this. I guess that the command interface is the same, but I haven’t tried it,
so I can’t say for sure.
Conclusions
Overall this new attenuator module seems reasonably good value for
money when you consider its relatively wide frequency range and low
price. I also like its ability to be programmed using the built-in MCU, control buttons and tiny OLED screen, or
from a PC via the USB port (and presumably from a separate microcontroller, via the serial port header).
My only real gripe is that when I
tried to unplug the USB cable from
the micro-USB socket after testing it,
the socket lifted straight off the PCB. It
seemed to have been poorly soldered,
and as a result, I had to spend quite a
bit of time soldering it back on (under
a microscope). I’d have preferred a
mini-USB socket, as these seem to be
a bit more rugged and also attach more
SC
securely to the PCB.
Fig.3: a graph showing the combined result from a variety of response tests on the attenuator at various settings.
siliconchip.com.au
Australia’s electronics magazine
November 2021 39
|