This is only a preview of the June 2018 issue of Silicon Chip. You can view 38 of the 104 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 "The USB Flexitimer: accurately timed switching":
Items relevant to "Wide-range digital LC Meter":
Items relevant to "Switch on or off anything with a Temperature Switch":
Items relevant to "800W (+) Uninterruptible Power Supply (UPS) Part II":
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
Using Cheap Asian Electronic Modules Part 17: by Jim Rowe
A 4GHz digital
attenuator module
This highly linear 4GHz digital attenuator is programmable over a
range of 0-31.5dB in 0.5dB steps. This sort of attenuator is important
in reducing signal levels in a circuit, to avoid overload in a mixer or
amplifier. It could also be the basis of a precision full range attenuator in
an RF signal generator.
T
his digitally programmed step attenuator module (available from
Banggood, siliconchip.com.au/link/
aaiy) has six internal cascaded attenuators which can be switched in or out
independently, to provide an overall
attenuation range of 0dB to -31.5dB in
0.5dB steps. The operating frequency range of the module is from about
1MHz up to 4GHz.
The module’s PCB is just 33 x
24.5mm in size and RF input and
the output SMA connectors are edgemounted on each end of the PCB while
there are power and programming inputs on the sides.
It uses a PE4302 IC in a 20-lead QFN
(SMD) package measuring 4 x 4mm,
from the San Diego-based (California)
company Peregrine Semiconductor.
Their website (www.psemi.com)
shows that they’re part of the Murata
group and that they make a wide range
of RF ICs based on their patented
“UltraCMOS” process.
This is an advanced form of silicon
on insulator (SOI) technology. It now
appears that the PE4302 is obsolete,
having been replaced by the improved
PE4312.
It is still available though, is significantly lower in price than the PE4312
and gives acceptable performance for
non-critical applications. Banggood
sell the module for just $11.00, but
you can also purchase it on eBay or
AliExpress.
Fig.1 is the block diagram of the
PE4302. The six stages of the RF step
attenuator are along the top, together
Fig.1: block diagram of the PE4302 attenuator IC. It has six attenuation stages
which can be switched in or out by matching DPDT analog switches. Serial and
parallel control inputs are both provided by the IC but the serial inputs are
disabled on the PE4302 module.
80
Silicon Chip
Celebrating 30 Years
with the DPDT analog switches which
allow each stage to be switched in or
out of the signal path between the RFin
pin at upper left and the RFout pin at
upper right.
The switches for each stage are
driven by the Control Logic Interface
shown in the lower part of the diagram.
The first attenuation stage reduces the
signal amplitude by 16dB while later
stages reduce it by 8dB, 4dB, 2dB, 1dB
and 0.5dB respectively.
Since these figures are all powers
of 2, this allows the chip to be programmed in binary fashion to provide
any desired nominal level of attenuation between 0dB and -31.5dB.
In practice, the chip has an insertion
loss even at the 0dB setting (with all
stages switched out).
Typically this insertion loss varies
between -1dB and -1.5dB at frequencies below 2.5GHz, increasing to about
-3.5dB at 4.0GHz. Oddly, this only
seems to apply when there is no attenuation requested. As a result, the
attenuation at a setting of -0.5dB is
actually considerably lower than at
0dB for all the frequencies we tested!
The control logic interface provides
parallel control inputs (along the bottom) and serial control inputs (centre
left). That actually gives the PE4302
three different ways of setting the attenuation level.
Setting attenuation
The first way of setting attenuation
level is via direct parallel programming, where you apply logic-level
siliconchip.com.au
signals directly to the C16-C0.5 inputs
with a microcontroller or a set of DIP
switches.
The second mode is latched parallel
programming, where the control signals are still applied to the C16-C0.5
input pins but the LE (load enable)
pin must be pulsed low when they are
changed because the control signals
are stored in a latch register when the
LE pin is returned to logic high.
The third mode is serial programming, where the six programming bits
are fed into the chip via the CMOScompatible DATA and CLK serial interface pins, with the LE pin then pulsed
high and low to store the bits in the
latch. If the P/S pin is pulled high, the
chip powers up in serial programming
mode; otherwise, it powers up in parallel mode.
When parallel mode is enabled, the
PUP1 and PUP2 pins at lower left in
Fig.1, together with the LE pin at centre
left, are used to determine the chip’s
control settings when it is powered up.
By varying the logic levels on these
pins you can ensure that the chip
powers up at 0dB attenuation (insertion loss only), 8dB, 16dB or 31dB, or
whatever attenuation is programmed
by pins C16-C0.5.
Fig.2 shows the complete circuit
of the step attenuator module and it
is set in direct parallel programming
mode. This has the LE pin (5) tied to
the positive supply rail while the P/S,
PUP1 and PUP2 pins (13, 7 & 8) are all
tied to ground, along with the DATA
(3) and CLK (4) serial interface pins.
The RF input connector is coupled
to pin 2 of IC1 via a 100nF capacitor,
while the output is taken from pin 14
to the RF output connector via another
100nF capacitor.
The parallel programming pins C8
(15), C4 (16), C2 (17), C1 (19) and C0.5
Fig.2: the PE4302 module
has the serial inputs pins
3, 4 & 5 tied high and the
parallel inputs pulled low.
It would not be easy to
change this, if you wanted
to use serial mode instead of
parallel programming.
(20) are each connected to pins V5-V1
on the 7-way SIL programming connector CON1 as well as being pulled
to ground (logic low level) via 10kW
resistors. The C16 (1) programming pin
is connected in a similar fashion to pin
V6 of CON1, although not directly but
via a series 10kW resistor.
This is in line with Peregrine’s recommendation, to prevent resonance
effects within the chip due to the proximity of this pin to the RFin pin (2).
Putting it to use
The simplest way to control this
module is to use a 6-pole DIP switch,
as shown in Fig.3. One side of each
switch is connected to the +3.3V supply line so that when each switch is
closed, the respective pin of CON1 will
be pulled high.
The truth table to the right of Fig.3
shows some examples of the switch
combinations and the resulting nominal attenuation settings.
You could use a similar approach
to control the module directly from a
micro, like an Arduino or a Micromite.
In this case, you’d power the module
from the +3.3V and GND pins of the
micro and connect programming pins
V1-V6 to six spare digital I/O pins on
the micro.
Then it would be a matter of writing a program to control the attenuator
module via these six pins.
The difficulty with this approach
is that you may not have six spare
I/O pins available. Unfortunately, as
noted, the module is hard-wired for
parallel programming, with the serial
interface effectively disabled.
Fig.3: manual programming can be done with a 6-pole DIP switch attached to the PE4302 module. The table below shows
some of the switch combinations and the resultant attenuation settings.
siliconchip.com.au
Celebrating 30 Years
June 2018 81
Fig.4: wiring diagram for the PE4302 module connected to a serial I2C
“piggyback” module (IC1) via a hex non-inverting buffer (IC2). At bottom right
is the format of the byte to be sent from the micro to the PE4302 to activate each
attenuator. Ergo, 01110110 (big-endian) activates C1, 2, 4, 8 & 16 (but not C0.5).
82
Silicon Chip
Celebrating 30 Years
Luckily, there is a way to work
around this so you can control the
module from your micro via a standard
I2C serial interface. That’s by making
use of one of the very low cost piggyback serial interface modules, based
on either the PCF8574T chip or its
sibling, the PCF8574AT.
These modules are intended to
adapt a parallel-interface LCD module for serial interfacing and they often come mated with an LCD.
But they are also available separately for less than $2 each and this
makes them very attractive for solving other I2C/parallel interfacing jobs
like this one.
Fig.4 shows how to use one of these
PCF8574T/AT modules to connect
up the PE4302 digital step attenuator
module to your micro for serial control via the I2C bus.
The upper part of the diagram shows
the circuitry inside the piggyback
module, while the PE4302 module is
shown at lower right, with the interconnections all made via the 16-pin
header which usually connects to the
LCD module.
The six programming lines pass
through IC2, a 74HC367 hex non-inverting buffer. This is needed because
the outputs from IC1 can only provide
very low current in their high logic
state but the V1-V6 inputs of the step
attenuator module are all fitted with
10kW pulldown resistors.
This means that they tend to draw
more current than the outputs of IC1
can provide.
Alternatively, you could leave out
the 74HC367 and simply remove the
six pull-down resistors from the underside of the module.
Notice that we’ve also shown a table at lower left in Fig.4 with the various I2C addresses applying to the
piggyback module, depending on (a)
whether it’s using a PCF8574T chip
or a PCF8574AT chip, and (b) whether any of the onboard links A0, A1 or
A2 are shorted.
If you’re in any doubt regarding
which of the two chips is fitted to your
module, this can usually be clarified
quite easily by examining the top of
the chip with a magnifying glass.
Note that because the PE4302 chip
must be connected to a 3.3V supply,
this also means that pin 3 of CON1 on
the piggyback module should be connected to +3.3V rather than the usually expected +5V.
siliconchip.com.au
This won’t be a problem for the piggyback module because both versions
of the PCF8574T/AT are designed to
work from any supply voltage between
2.5V and 6V.
As shown in Fig.4, you connect
pins V1-V3 of the attenuator module
to pins 4-6 on the piggyback module
(via IC2), while pins V4-V6 are connected to pins 11-13.
As a result, to program the attenuator correctly you simply need to send
it the six control bits embedded in a
single byte as shown at bottom right.
Note that bits B3 and B7 are not used
and can be left at either zero or one.
Performance testing
I measured the performance of the
digital step attenuator with my VHF/
UHF signal generator and power meter. Because of the larger number
of possible attenuation factors, this
inevitably took rather long, even
though I elected to do measurements
for only 12 of the 64 combinations of
programming bits.
But I did take measurements at eight
different frequencies, at 100MHz,
1.0GHz, 1.5GHz, 2.0GHz, 2.5GHz,
3.0GHz, 3.5GHz and 4.0GHz.
Note that the measurements were
taken at nominal attenuation factors of 0dB (ie, insertion loss only),
-0.5dB, -1.0dB, -2.0dB, -4.0dB, -8.0dB,
-16.0dB, -20.0dB, -24.0dB, -28.0dB,
-30.0dB and -31.5dB.
These were chosen to give a good
idea of the module’s overall performance.
The results are quite close to the
nominal values shown in the left-hand
column of Table 1. For example, the
measured value for a nominal attenuation factor of -16.0dB at 1.5GHz turns
out to be -16.06dB; pretty darn close.
Similarly, the measurement at
3.5GHz for a nominal attenuation of
-8dB proved to be -7.95dB. Again,
not far off.
Overall, the performance is quite
good, at least for frequencies up to
about 1.5GHz but at higher frequencies, the relative accuracy does seem
to deteriorate somewhat.
I suspect that there are two reasons
for this, one being that the open construction of the module probably allows some of the RF input signal to
“jump over” the PE4302 chip package,
especially at frequencies of 2.0GHz
and above (ie, due to stray capacitance).
The other likely reason is that the
input and output impedances of the
PE4302 almost certainly vary from 50W
at these higher frequencies, causing
standing waves in the cables.
In fact, the Peregrine Semiconductor data sheet shows both the input
and output return loss plots varying
quite widely over the full frequency
range. Both rise significantly at higher
frequencies.
There’s probably not much that can
be done about the cable matching/
standing waves problem since it’s inherent in the chip itself.
Not content with that, I decided to
try improving the overall attenuation
accuracy at the higher frequencies by
fitting an earthed metal shield over the
PE4302 chip and its input and output
coupling capacitors.
The shield measured 33 x 7 x 2.5mm
and was soldered at each end to the
earthed outer frame of the SMA connectors.
Table 2 shows the modest improvements after the shield was fitted so it
is probably a worthwhile exercise for
very little effort.
SC
The PE4302 module, shown enlarged for clarity. Without and with the earthed metal shield.
siliconchip.com.au
Celebrating 30 Years
June 2018 83
|