This is only a preview of the October 2008 issue of Silicon Chip. You can view 30 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 "USB Clock With LCD Readout, Pt.1":
Items relevant to "Digital RF Level & Power Meter":
Items relevant to "Versatile Special Function Timer":
Items relevant to "Railpower Model Train Controller, Pt.2":
Purchase a printed copy of this issue for $10.00. |
By JIM ROWE
T
RADITIONALLY, RF level/power
meters have been quite expensive
beasts costing many hundreds of dollars, even secondhand. Small wonder
that many of us have simply had to do
without them. Such RF level/power
meters have always been expensive
because of the measurement technique they used: converting the RF
energy into heat and then measuring
the temperature rise using a sensitive
thermocouple system.
Luckily for us, advancing semiconductor technology now provides an
easier way: the wideband logarithmic
amplifier/detector IC. Its DC output is
closely proportional to the logarithm
of the RF input voltage. We can achieve
the desired result by combining one
of these chips with an “intelligent”
metering circuit, capable of processing
this logarithmic DC voltage to indicate
both signal level and the corresponding power level.
In a nutshell, our circuit uses an
Analog Devices AD8307AN logarithmic amplifier/detector to convert RF
signals into DC which is processed by
a PIC microcontroller. The micro uses
some fairly fancy maths routines to
work out the signal level and power,
which is then displayed on a standard
2-line LCD panel. The whole set-up
works from a 9V battery or DC plugpack and draws less than 35mA.
The AD8307 log amp/detector
Digital RF Level
& Power Meter
Need to measure small signals at radio
frequencies? Here is a low-cost digital level
and power meter which will allow you to
measure RF signals from below 50kHz to
above 500MHz. As well as indicating the
signal level in volts and dBV, it also shows
the corresponding power level (into 50 ohms)
in both milliwatts and dBm.
30 Silicon Chip
To help understand logarithmic
amplifier/detector ICs, take a look at
Fig.1. This gives a simplified view
inside the AD8307AN device. The incoming RF signals are passed through
six cascaded wideband differential
amplifier/limiter stages, each of which
has a gain of 14.3dB (about 5.2 times)
before it enters limiting (ie, clipping).
This gives a total amplifier gain of
about 86dB or about 20,000 times.
The outputs of each amplifier/limiter
stage are fed to a series of nine fullwave detector cells, along with similar
outputs from three cascaded passive
14.3dB attenuator cells connected to
the input of the first amplifier/limiter.
The differential current-mode outputs of all nine detector cells are
added together and fed to a “current
mirror” output stage, which effectively
converts them into a single-sided DC
output current. Because of the combination of cascaded gain and limiting in
the amplifiers (plus an internal offset
compensation loop), the amplitude
siliconchip.com.au
Specifications
SIX 14.3dB GAIN, 900MHz BW AMPLIFIER/LIMITER STAGES
+INP
INTERC.
SET
–INP
•
3x PASSIVE
ATTENUATOR
CELLS
MIRROR
Iout
NINE FULL-WAVE DETECTOR CELLS WITH
DIFFERENTIAL OUTPUT CURRENTS – ALL SUMMED
ENB
BAND-GAP REFERENCE
AND BIASING
OUT
25mV/dB
12.5k
INPUT OFFSET COMPENSATION LOOP
Fig.1: block diagram of the AD8307AN amplifier/detector IC. The incoming
RF signals are passed through six cascaded wideband differential
amplifier/limiter stages and these in turn drive full-wave detector cells (see
text).
4.7
TO MAIN
BOARD
(CON1)
100nF
47nF
8
Rin*
7
VPS
IN H
6
EN
4
OUT
IC1
AD8307AN 5
INT
47nF
1
10
IN L
COM
2
OFS
INTERCEPT
ADJUST
SLOPE
VR2 ADJUST
50k
1
2
3
4
VR1
50k
100nF
3
100nF
51k
SC
RF LEVEL & POWER METER
33k
HEAD END CIRCUIT
Fig.2: the head-end circuit is based on the AD8307AN. The incoming RF
signals are fed to pins 8 & 1 via 47nF capacitors, while the detected output
appears at pin 4 and is fed to pin 3 of a type A USB socket.
of this output current is closely proportional to the logarithm of the RF
input voltage, over an input range of
100dB from about -93dBV (22.4mV) up
to +7.0dBV (2.24V).
In fact this “logarithmic law” relationship is linear to within ±0.3dB
over most of the range. The output
current Iout increases at a slope of very
close to 2mA per dB increase in RF input level. This current passes through
an internal 12.5kW resistor, resulting in
a DC output voltage which increases
at the rate of 25mV/dB. This slope
can be fine tuned using an adjustable
external resistor in parallel with the
12.5kW internal resistor.
So what’s that “intercept set” input
for? This allows us to adjust the DC
offset in the output current mirror,
which adjusts the effective “zero level”
point of the chip’s output current and
siliconchip.com.au
•
•
•
•
•
Input impedance: 50W (can be
changed to 75W or 1.1kW)
Measuring frequency range:
from below 50kHz to above
500MHz
Maximum input signal level:
2.238V RMS (+7.0dBV)
Minimum input signal level:
22mV RMS (-93dBV)
Maximum input power level:
100mW into 50W (+20dBm)
Minimum input power level:
1nW (0.001mW/-60dBm)
Measurement linearity:
approximately ±0.3dB
Measurement accuracy:
approximately 0.2%
Power requirements: 9V DC at
35mA (no backlight) or 120mA
with backlight
CON5
USB TYPE
'A' SOCKET
* Rin = 100 //220 //220 FOR 50 INPUT
2008
•
•
COM
RF
INPUT
CON4
•
voltage, ie, the “origin” from which the
output slope rises. You can think of
it as setting the detector’s zero point.
Head-end circuit
It’s desirable to separate the RF
detector section from the rest of the
meter circuitry, partly because it is the
only section handling RF signals and
partly because it has very high gain
and is therefore susceptible to electromagnetic interference. The AD8307AN and its accompanying components
are therefore mounted on a small
“head-end” board which in turn is
mounted inside a small diecast aluminium box, for shielding.
The circuit of this head-end section is shown in Fig.2 and involves
little else apart from the all-important
AD8307AN (IC1). The incoming RF
signals are coupled into the inputs
of IC1 via two 47nF capacitors, with
Rin providing the desired 50W input
termination. (Rin is a combination of
paralleled surface-mount chip resistors, to give a value of 52.4W with
very low parasitic inductance. As the
input impedance of the AD8307AN is
itself very close to 1.1kW and this is
in parallel with Rin, the resulting total
input resistance is very close to 50W).
Trimpot VR1 and its 33kW series
resistor are connected between the
output (pin 4) of IC1 and ground, so
they are effectively in parallel with
the 12.5kW resistor inside the chip
itself. This allows the output slope
of the detector to be fine tuned to a
value of 20mV/dB, when the meter is
calibrated.
Trimpot VR2 is used to adjust the
DC voltage fed to pin 5 of IC1. This is
the “intercept set” input, so VR2 effectively becomes the detector’s zero
set adjustment.
The head-end section connects to
the main meter unit via a standard USB
cable. This cable carries the detector’s
output voltage to the main board via
pin 3 of CON5 and also supplies IC1
with +5V power via pin 1.
Main circuit
The processing part of the circuit
is shown in Fig.3. Here is where the
real “work” is done, by the firmware
October 2008 31
Volts, dBV, Milliwatts & dBm
The RF Level and Power Meter described in this article gives four indications for
every measurement: the RF input voltage (in volts or millivolts), the corresponding
value in dBV, the corresponding power level in the meter’s 50W input load (in milliwatts
or microwatts) and the corresponding value in dBm. The voltage and power levels
probably need no explanation but I should perhaps explain the significance of the two
decibel readings.
For many years, engineers working in the communications and RF fields have found
it convenient to describe signal amplitude and power levels in decibels, because of the
very wide ranges involved – from microvolts (mV) to kilovolts (kV), and from nanowatts
(nW) to kilowatts (kW).
Because decibel scales are logarithmic, they make it easier to work with signals
varying over such wide ranges. To describe the voltage gain of an RF amplifier in terms
of decibels, for example, we simply take the base-10 logarithm of the voltage gain
(Vout/Vin) and multiply this figure by 20. So a voltage gain of 10 corresponds to +20dB,
a gain of 100 corresponds to +40dB, a gain of 1000 corresponds to +60dB and so on.
Similarly an attenuator which reduces the voltage level by a factor of 10:1 can be
described as having a “gain” of -20dB. Get the idea?
When we’re describing power levels rather than voltage, the power gain of an
RF amplifier can be found by again taking the base-10 logarithm of the power gain
(Pout/Pin) but this time multiplying the figure by 10. So a power gain of 10 times is
+10dB, while a power gain of 100 times is +20dB and so on. (If you’re a bit puzzled
by the difference between voltage and power when calculating the decibels, it’s merely
because power increases with the square of the voltage. That’s why we multiply the
log of voltage ratios by 20 but we only multiply the log of power ratios by 10).
dbV and dBm
So what’s the difference between “dBV” and “dBm” figures? Well, these are both
decibel scales but in this case they are used to compare one specific voltage or power
level with a known reference value, rather than to compare two specific values. So
the contractions dBV and dBm indicate that the figures they accompany are absolute,
rather than relative.
“dBV” is a voltage level expressed in decibels with reference to 1.000 volts. So
+6dBV (2V) is 6dB greater than 1V, while -20dBV (100mV) is 20dB smaller than 1V.
So expressing a voltage in dBV merely indicates that it is measured on a decibel scale
which refers to 1.00V as its 0dB point.
Similarly, “dBm” is a power level which is expressed in decibels with reference
to a specific reference power level of 1mW (milliwatt); in other words, on a decibel
scale where 1mW corresponds to 0dB. So +10dBm corresponds to 10mW, +20dBm
to 100mW and -30dBm to 1mW (microwatt).
There is another “absolute” decibel scale used for expressing voltage levels, the
dBm scale. This refers to a level of 1mV (microvolt) as its 0dB point. So +120dBm is
the same as 0dBV, while 0dBu is the same as -120dBV.
One last point: since the dBV and dBm scales are “absolute”, surely they can be
related to each other? Yes they can but to work this out you need to know the impedance level – because that is what relates voltage and power in any circuit.
In most RF work, the impedance level is 50W. At this level, a voltage of 1V corresponds to a power level of 20mW (12/50), so 0dBV equals +13dBm. On the other
hand -30dBm (= 1mW) corresponds to 7.07mV, or -43dBV. In other words, there’s a
fixed 13dB difference between the two scales.
This difference changes with impedance level, though. For example when the impedance level is 600W, 0dBm or 1mW corresponds to 0.7746V or -2.218dBV, so there’s
a fixed 2.2dB difference between dBm and dBV.
Older RF level and power meters often indicated in just dBm or perhaps in dBV as
well. If the user wanted to know the actual voltage and power level, they had to either
refer to a chart or grab a calculator and work them out. This could be pretty tedious,
and that’s why we’ve given this new RF Level and Power Meter the ability to calculate
and display not just dBm and dBV but the equivalent volts and milliwatts as well, for
every measurement.
32 Silicon Chip
running inside the PIC16F88-I/P micro (IC3). The PIC16F88-I/P device is
well-suited to this application, as it
includes an analog-to-digital converter
(ADC) module with 10-bit measuring
resolution. The ADC is also flexible
in terms of its operating mode, with a
choice of positive and negative reference voltages and also a 7-channel
input multiplexer.
We take advantage of these features
by using a positive reference voltage
of 3.50V which is fed into pin 2 of IC3
and by using three of the ADC input
channels to allow firmware selection
of the measuring range via pin 1 (AN2),
pin 18 (AN1) and pin 17 (AN0).
Why do we need three ranges?
Because it allows us to get higher
measuring resolution when the RF
input signals (and hence the output
voltage from IC1) are quite small. For
these signals, we are able to amplify
the DC output voltage from IC1, in
order to use a larger proportion of the
ADC’s measurement range of 0-3.5V
and hence increase the measurement
resolution.
We provide the three ranges in
the following way. The incoming DC
voltage from IC1 enters via pin 3 of
CON1, and is then passed through a
simple input protection circuit using
diodes D1 & D2, the 100nF capacitor
and the 100W and 1MW resistors. It is
then fed to the paralleled inputs of
op amps IC2b, IC2c & IC2d. Each of
these provides a different amount of
gain, to change the effective slope of
the log-law input signal.
The gain for the normal default
measuring range is 1.75, provided by
IC2b with its 1.5kW and 2.0kW feedback resistors. This gives the incoming
DC signal an effective slope of 1. x 20
or 35mV/dB, translating to a total span
of 100dB for the ADC’s 3.5V measuring range.
For signals of less than 223.9mV
(-13dBV), we select the output from
IC2d, configured for a gain of 2.19.
This gives the incoming DC signal an
effective slope of 43.74mV/dB, translating to a total ADC measuring span
of 80dB. Then for signals of less than
22.39mV (-33dBV) we select the output of IC2c, with a gain of 2.916. This
gives the incoming DC signal a slope
of 58.32mV/dB, which translates to a
total span of 60dB.
Using this approach we obtain
much better measuring resolution
for these much smaller signals. The
siliconchip.com.au
siliconchip.com.au
October 2008 33
2
3
4
1
100nF
D2
100
A
K
A
K
D1
1M
+5.00V
100nF
6
5
13
12
9
IC2c
4
LED1
330
7
1.5k
2.4k
14
3.9k
TP1
2.0k
2.0k
220k
2.0k
220k
TPG
1
18
17
2
2.2k
RB4
AN2
AN1
Vss
5
10
11
3
CLKo
15
9
RB3
8
RB2
7
RB1
6
RB0
IC3
PIC16F88-I/P
AN0
RB5
RA4
4
14
Vdd MCLR
Vref+
12
RB6
13
RB7
16
RA7
LED3
+3.50V
K
A
MAIN BOARD
11
IC2b
IC2d
8
200
6.8k
LED2
3.0k
K
A
IC2: LM324N
10
K
A
RF LEVEL & POWER METER
USB TYPE
'B' SOCKET
CON1
100nF
+5.00V
6
4
Vdd
2
SET 5.00V
330
TPG
D3
K
A
K
D1,D2: 1N4148
A
TP2 (2.0MHz)
IN
K
A
5
R/W
IC2a
LEDS
2
3
A
OUT
ADJ
1
3
LM317T
IN
–
+
CON3
9–15V DC
INPUT
OUT
CON2
CAL/MOD
OUTPUT
LCD
VR4
10k CONTRAST
68k
1.5k
9V
BATTERY
S2
POWER
CONTRAST
470 F
16V
K
D3 1N4004
16 x 2 LCD MODULE
VR3
100
220 F
ADJ
OUT
D7 D6 D5 D4 D3 D2 D1 D0 GND
1
14 13 12 11 10 9 8 7
EN
RS
S1
SELECT
RANGE
10k
100nF
120
REG1 LM317T
Fig.3: the main-board circuit is based on an LM324 quad op amp (IC1) and a PIC16F88 microcontroller (IC3). The incoming signal is fed to paralleled op amp
stages IC2b-IC2d, each operating with a different gain to provide three ranges. Their outputs in turn drive the ADC inputs of IC3 which processes the signals
and drives a 16 x 2 LCD module.
SC
2008
FROM
HEAD
END
(CON5)
TPG
TP3
ALTRONICS
16X2 LCD MODULE
Z-7000A OR Z-7011 (B/L)
A
18090240
8002 C
K
RE W OP/LEVEL FR LATI GID
)DRA O B NIA M( RETE M
14
330
SET 5.00V
TP3
5.00V
REG1
LM317T
1
2.0k
4148
LED2
–20dBV
LED3
–40dBV
470 F
2
3
CON1
POWER
S2
4004
0dBV
1M
4148
100nF
D2
LED1
4
100nF
D3
S1
2.4k
220k
1
100
330
3.9k
220k
RANGE
SELECT
D1
1
IC2 LM324N
2.0k
2.0k
100nF
220 F
1.5k
CAL OUT
CON3
9–15V
DC IN
TPG
CON2
INPUT FROM
HEAD END
68k
LCD
CONTRAST
1.5k
TP2
(2MHz)
200
6.8k
2.2k
10k
3.0k
100
VR3
120
TPG
TP1
(3.50V)
IC3
PIC16F88 -I/P
100nF
10k
RBL*
VR4
TPG
18 0.5W
1
+
–
BATTERY
* SEE TEXT
Fig.4: follow this parts layout diagram and the accompanying photograph to build the main board. Both IC2 and the
PIC16F88 microcontroller (IC3) should be installed in sockets.
outputs from op amps IC2c, IC2d &
IC2b are fed directly to the AN0, AN1
& AN2 (ADC) inputs of the PIC and its
firmware selects the appropriate ADC
input channel by stepping from one
range to the next each time you press
the range select button (S1).
To indicate which range is currently
selected, the firmware switches on
LED1, LED2 or LED3 and automatically changes the scaling factor, so that
the displayed values are correct. After
performing the calculations for each
measurement, the firmware then displays the results via the LCD module.
Power supply
The complete circuit runs from 5V
DC, which is derived from either a 9V
34 Silicon Chip
battery or a plugpack supply of similar voltage, using regulator REG1, an
LM317T adjustable device. We use this
rather than a fixed regulator because
this allows us to set the supply rail
accurately to 5.00V.
We need to do this because the 3.50V
reference voltage for the PIC’s ADC is
derived directly from the 5V rail, via
a voltage divider using 3.0kW, 6.8kW
and 200W resistors. This reference
voltage for the ADC is fed into pin 2
of the PIC, which is configured as the
Vref+ input.
Notice that there are a number of
test points provided in the main board
circuit, to allow more convenient setup and calibration. TP1 allows you to
measure the ADC reference voltage, so
you can adjust trimpot VR3 to achieve
exactly 3.50V at pin 2 of the PIC. TP3
also allows you to measure the 5.00V
rail directly, if you wish, while TP2
allows you to check the PIC’s internal
clock oscillator.
This runs at 8MHz, which means
that the signal available at TP2 should
be very close to 2MHz (Fc/4). So if the
PIC is running correctly, you will find
a 2MHz square-wave of 5V peak-topeak at TP2.
Finally, the fourth op amp, IC2a, is
provided purely as a voltage follower/
buffer from the output of IC2b (the
default ADC driver). Its output is made
available via CON2, to allow you to
monitor the amplified output voltage
from the AD8307AN head-end extersiliconchip.com.au
nally, with a DMM or oscilloscope.
This could be convenient for calibration and also for looking at any
amplitude modulation of the RF
signals being measured. Note that
any observed modulation envelope
is likely to be distorted because of the
logarithmic response of the head-end
amplifier.
51k
4
3
2
10
100nF
100nF
1
VR1
50k
33k
TOP VIEW OF
HEAD END BOARD
SIDE OF
BOX
CON4
CON5
1
100
220
47nF
220
BNC
INPUT
SKT
TO MAIN BOARD
CON5
2
3
4
47nF
Fig.5: these two diagrams & the
above photo show the parts
layout on the head-end board.
Use a fine-tipped soldering
iron to solder the SMDs to the
copper side of the PC board
and take care to ensure that IC1
is correctly orientated. Do not
use a socket for ICs – it must
be soldered directly to the PC
board.
C 2008
04208082
siliconchip.com.au
50k
100nF
IC1
AD8307
Construction
As noted earlier, the project is comprised of two parts: the AD8307AN
head-end fitted into a small metal box
for shielding and the main meter circuitry which is fitted into a UB1-size
plastic jiffy box (158 x 95 x 53mm).
The two are connected together using
a standard USB interconnect cable.
The meter’s main circuitry is all
fitted on a PC board coded 04210081
and measuring 146 x 84mm, and with
a recess in each corner so that it fits
neatly behind the lid of the UB1 box.
The head-end circuitry is installed on
a second PC board coded 04210082
and measuring 43 x 44mm.
There is actually a third PC board for
this project, coded 04210083 and measuring 95 x 38mm. This is for an optional 20dB/50W attenuator, to allow
measurements of higher-level signals.
The location and orientation of all
parts mounted on the main board are
shown clearly in the board overlay
diagram of Fig.4. Note that connectors CON1, CON2 and CON3 are all
mounted directly on the board,
along the righthand side. Power
switch S2 also mounts directly
on the board, with its connection
lugs passing through the board and
soldered to pads underneath.
Range select switch S1 can be
mounted in the same way or mounted
on the box lid with its leads extended
through the board using short lengths
of tinned copper wire. The three range
indicator LEDs are again mounted directly on the board, with the underside
of their bodies spaced up by about
14mm so that the LEDs just protrude
through the matching holes in the front
panel (ie, the lid) when the board is
mounted behind it.
Use sockets for IC2 & IC3, rather
than soldering them directly to the
board.
There are four wire links on the
board and it’s a good idea to fit these
before any of the components so that
they’re not forgotten. The test point
terminal pins can also be fitted at this
VR2
4.7
8002 C
28080240
COPPER SIDE OF
HEAD END BOARD
The head-end board is attached to a panel-mount BNC socket and mounted
upside down inside a diecast metal case. A type A to type B USB cable
connects the unit to the main PC board.
stage, along with the two further pins
used for the optional battery connections. By the way, these last two pins
are mounted from the rear, to make the
battery connections easier.
Mounting the LCD module
The LCD module used for this
project is the Altronics Z-7000A or
Z-7011, with the second type number
signifying the version with backlighting. Regardless of which version you
use, the module is mounted above the
main board using four M3 x 15mm machine screws, with M3 x 6mm tapped
Nylon spacers used as standoffs. Then
nuts are fitted under the board to hold
everything together – but with one Nylon flat washer under the nut at lower
left, to ensure that it doesn’t short-circuit
October 2008 35
What The Firmware Does
As we explain in the main text, the
AD8307 chip in the RF Meter’s “head
end” detects the incoming RF signals and
converts them into a DC voltage according
to a logarithmic conversion scale. A PIC
micro then measures and converts this
into the equivalent RF voltage and power
readings, under the control of a firmware
program.
To do this, it makes use of a suite of
maths routines made available to PIC
programmers by Microchip Technology
Inc, the manufacturers of the PIC family of
micros. These routines are used to perform
24-bit and 32-bit floating-point addition,
subtraction, multiplication and division,
base-10 exponentiation, fixed-point multiplication and division, and floating-point
to ASCII conversion.
Without going into much detail, the
PIC firmware program works through
the following sequence in making each
measurement:
First it directs the PIC’s 10-bit analogto-digital converter module to take a
measurement of the DC output voltage from
the AD8307 chip. It then converts that into
24-bit floating-point form, after which it
is multiplied with a pre-calculated scaling
factor (24-bit also) for the currently chosen
measurement range. The resulting product
is then divided by the ADC’s full-scale value
of 3FF (in 24-bit FP form), to give the measurement value in what I call the “raw dB”
form. This is essentially a 24-bit number
varying between 0 and 100.
This raw dB value is then used to
calculate the equivalent dBV value, by
subtracting decimal 93 (in 24-bit FP
form) and also the equivalent dBm value
(for 50W impedance level) by subtracting
decimal 80 (again in 24-bit form). These
values are then saved for display but also
used to calculate the actual voltage and
power levels.
The dBV value is used to calculate the
equivalent voltage by first dividing it by
decimal 20 (in 24-bit FP form) and then
raising decimal 10 to that power using
EXP1024, the Microchip 24-bit floatingpoint base-10 exponentiation routine. This
is equivalent to calculating the antilog
arithm, so we end up with the equivalent
voltage value in 24-bit FP form.
After saving this for display, the program then does the equivalent calculation for power, taking the dBm value and
first dividing it by decimal 10 and then
again raising decimal 10 to that power
using EXP1024. This gives the equivalent
power in milliwatts, which is again saved
for display.
Once all four parameters have been
calculated, the final steps of the measurement sequence involve taking each 24-bit
parameter and processing it for display
on the LCD module. For the dBV and dBm
figures, this means working out the correct
polarity indication (+ or -) and then using
a Microchip routine called Float_ASCII
to convert the numbers themselves into
ASCII digits for display.
Things are a little more complicated for
the voltage and power values, because
these must first have their 24-bit binary
exponents analysed to work out their scaling, the position of their decimal point and
the most convenient multiplier to give them
(eg, milli or micro).
After this is done, they are again converted into the equivalent ASCII digits
using Float_ASCII.
As you can see, there’s quite a bit of
mathematical jiggery-pokery involved
but luckily most of this is performed by
Microchip’s fancy maths routines.
The full source code for the firmware
will be available on the SILICON CHIP website, along with the source code for the
floating point maths routines it uses (in
a file called FPRF24.TXT) and, of course,
the assembled hex code of the complete
firmware ready to burn into a PIC.
a PC board track close by.
The 14 main connections to these
modules are all in a horizontal row at
lower left. To make these connections
reliably but in a manner which allows
easy removal and replacement of the
module if this is ever needed, I elected
to use a custom-made 14-way plug and
socket system. The socket was made
from one side of a 28-pin IC socket,
cut away neatly and then mounted
on the top of the main board. To mate
with this socket, I made a plug from a
14-pin length of SIL pin strip, the pins
of which were soldered to the pads on
the underside of the module.
This must be done carefully, so that
there is enough clean length of each
pin extending down to mate with the
socket clips (this is easier to do than
to describe).
Backlit LCD module
This larger-than-life-size view shows how the LCD module is connected to the
main PC board. A 14-pin header is soldered to the LCD module and this plugs
into a matching 14-pin socket strip cut from a 28-pin IC socket.
36 Silicon Chip
If you use the backlit LCD module
(Z-7011A) you will have to connect its
“A” & “K” terminals (for the backlight
siliconchip.com.au
A
A
19
61
16
63 x 16mm
LCD WINDOW
26
63
HOLES A:
3.5mm DIA.,
COUNTERSUNK
7
24.5
D
B
HOLES B:
3.5mm DIA.
CL
HOLES C:
6.5mm DIA.
(RIGHT-HAND
SIDE OF BOX)
24.75
8.25
B
12
HOLE E:
9mm DIA.
17.75
12
(BOX LID)
HOLE D:
11mm DIA.
B
7.5
B
15.25
7.5
E
B
A
A
21
3
C
9.5
11.5
C
9
30.5
CL
ALL DIMENSIONS IN MILLIMETRES
Fig.6: this full-size diagram shows the drilling details for the plastic case that’s used to house the main PC board. The
large cutouts can be made by drilling a series of holes around the inside perimeter, then knocking out the centre piece
and filing the job to a smooth finish.
LEDs) to the main PC board. This can
be done using short lengths of tinned
copper wire.
Similarly, resistor RBL (18W 0.5W)
is installed only if you are using this
module. It gives a nominal LED current
of about 80mA.
Once all of the components are
mounted on the main board, it can be
placed to one side while you assemble
the head-end board.
Head-end board assembly
The board overlay diagrams for the
siliconchip.com.au
head-end board are shown in Fig.5.
The USB type A socket CON5 mounts
on the top of the board, along with the
two trimpots, three 0.25W resistors
and three 100nF monolithic capacitors. IC1 should be soldered directly
into the board, to ensure an absolute
minimum of input lead inductance.
The remaining surface-mount
components all mount on the copper
side of this board, ie, the two 47nF
input coupling capacitors and the
three resistors used for the RF input
termination. Solder these components
carefully using a fine-tipped iron, using the “tack first to hold it in position”
technique to avoid damaging either the
parts or the board pads.
When you have finished wiring up
this board, place it aside also while
you prepare the meter’s two boxes by
drilling and cutting the various holes
in them. These are all shown in the
drilling diagrams (Figs.6 & 8), so the
job should be quite straightforward.
To complete assembly of the headend unit, first mount the BNC input
connector CON4 in the hole at the
October 2008 37
Table 3: Resistor Colour Codes
No.
2
1
1
1
1
1
1
1
1
1
3
2
2
1
1
1
1
1
1
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
Value
220kW
68kW
51kW
33kW
10kW
6.8kW
3.9kW
3.0kW
2.4kW
2.2kW
2.0kW
1.5kW
330W
200W
120W
100W
18W
10W
4.7W
Fig.7: when the unit is first turned on,
it displays “Silicon Chip RF Level/Pwr
Meter” as shown at top. The display
immediately above shows typical
level (top line) and power readings.
4-Band Code (1%)
red red yellow brown
blue grey orange brown
green brown orange brown
orange orange orange brown
brown black orange brown
blue grey red brown
orange white red brown
orange black red brown
red yellow red brown
red red red brown
red black red brown
brown green red brown
orange orange brown brown
red black brown brown
brown red brown brown
brown black brown brown
brown grey black brown
brown black black brown
yellow violet gold brown
5-Band Code (1%)
red red black orange brown
blue grey black red brown
green brown black red brown
orange orange black red brown
brown black black red brown
blue grey black brown brown
orange white black brown brown
orange black black brown brown
red yellow black brown brown
red red black brown brown
red black black brown brown
brown green black brown brown
orange orange black black brown
red black black black brown
brown red black black brown
brown black black black brown
brown grey black gold brown
brown black black gold brown
yellow violet black silver brown
end of the metal box, with the lug of
its earthing washer orientated at “3
o’clock” so that once the mounting
nut is fully tightened, it can be bent
around at 90° ready to be soldered to
the PC board copper (along from the
socket’s centre spigot). Then mount
the head-end PC board upside down
inside the upper part of the box, ie,
with the trimpots underneath and
facing the matching adjustment holes
in the top of the box.
The board is mounted using two
A
M3 x 10mm tapped Nylon spacers as
standoffs, with M3 x 6mm countersink-head screws holding the spacers
inside the box and pan-head M3 x
6mm screws attaching the board assembly to them.
Once the board assembly is mounted
in position, you can solder the centre
spigot and earthing lug to their respective pads on the board to complete the
input connections. The USB cable’s
type-A plug can then be mated with
socket CON5 at the other end of the
B
C
39
(CENTRE LINE)
5
25.5
12.75
A
B
A
13.5
31.5
HOLES A: 3.5mm DIAMETER, COUNTERSUNK
HOLES B: 3.5mm DIAMETER
HOLE C:
9.5mm DIAMETER
7.5
46
5
(UNDERSIDE OF BOX)
(ALL DIMENSIONS IN MILLIMETRES)
Fig.8: here are the drilling details for the metal case that’s used to house the head-end board assembly.
38 Silicon Chip
siliconchip.com.au
RF INPUT (Zo = 50)
Pmax = 500mW
RF LEVEL & POWER METER
SILICON
CHIP
SLOPE
ADJUST
LCD
CONTR
SET
5.00V
CAL
OUT
SILICON
CHIP
RANGE
RF LEVEL & POWER METER
SENSOR HEAD
RF INPUT
Zo = 50
Pmax = 4W
(+36dBm)
INPUT
FROM
SENSOR
SELECT
INTERCEPT
ADJUST
POWER
0dBV
SILICON
CHIP
20dB (10:1) RF
ATTENUATOR
(0 – 500MHz)
–20dBV
–40dBV
9–15V
DC INPUT
OUTPUT
Zo = 50
Fig.9: this full-size artwork can used to make the front panels of the various units, including the Sensor Head case
and the optional RF Attenuator (see text). The artwork can also be downloaded from the SILICON CHIP website.
The main PC board is attached to the lid of its case via four M3 x 15mm tapped spacers. Four M3 x 6mm countersinkhead screws secure the lid to the spacers, while four M3 x 6mm pan head screws are used to secure the PC board.
siliconchip.com.au
October 2008 39
Optional 20dB (10:1) RF Attenuator
board, after which the cable can be
fitted with its P-type clamp, which is
then fastened into the box using an M3
x 10mm countersink-head machine
screw with a nut and lockwasher. The
cable is then looped around and fed
out of the box via a rounded slot cut
in the end and the box lid screwed on
to complete the assembly.
Initial checkout
At this stage you should be ready
to give your RF Level & Power Meter
a preliminary functional checkout,
because this is easiest done before the
main board is attached to the lid/front
panel of the main box. Don’t worry
40 Silicon Chip
27k
INPUT
2.7k
SC
2008
OUTPUT
4 x 1k
16 x 1k
5 x 330
820
P
You will have noticed from the
specification panel that the maximum input level of the basic power
meter is essentially +7.0dBV, corresponding to 2.238V, 100mW into
50W and +20dBm.
As this may be a little low for some
applications, we have designed a
compact 20dB (at 50W) wideband
attenuator which may be used to extend the meter’s range up to 22.38V
(+27dBV) and +40dBm (10W) –
although it may not be able to cope
with 10W of input power for more
than a few seconds if you have to use
0805-type SMD resistors.
SMD resistors are used low parasitic inductance and capacitance
but they do have a fairly low power
dissipation (especially the 0805
size). So try to use the larger 1206
size resistors if you can get them, especially in the input leg. Otherwise
the continuous input power rating
will be limited to about 4W.
Despite this limitation, this attenuator can be built quite cheaply and
would make a handy optional extra
for the meter for those who want to
be able to measure higher RF levels.
Please note, however, that when the
attenuator is connected ahead of the
meter’s head-end, the meter itself
won’t be able to allow for the extra
20dB of attenuation.
This means that you’ll need to
add 20dB to the readings yourself,
although this shouldn’t be too much
of a chore.
10:1 (20 B) RF ATTENUATOR (50, 5W MAX INPUT)
Fig.10: the circuit for the optional 20dB RF attenuator uses a standard pisection configuration. The resistors are all surface mount types.
All you need to do is add 20dB to
the dBV and dBm readings. You will
have to multiply the voltage reading
by 10 and multiply the power reading by 100.
short pieces of tinned copper wire
(leaded resistor lead offcuts) are
used to make the connections from
the earthing lug of each socket to
the earthy side of the board copper.
Construction details
Shield plate
The circuit for the attenuator is
shown in Fig.10 and it is a standard
pi-section type. Everything fits on
a small PC board measuring 95 x
38mm and coded 04210083, which
fits in a second diecast aluminium
box identical to that used for the
head-end.
Fig.11 and the photos show the
parts layout on the PC board.
Note that the board assembly
is supported behind the box lid
simply by soldering the input and
output pads to the “active” spigots
of the BNC connectors. Multiple
As you can see from the internal
photos, the prototype attenuator
has a small shield plate which was
mounted vertically across the centre
of the attenuator, to reduce the possibility of RF energy radiating past
the attenuator pad at the highest
frequencies. This is probably gilding the lily but you may want to add
such a shield to your attenuator also.
It can be cut from a small rectangle of
blank PC board and is supported by
soldering it to four PC board terminal
pins fitted to the earth copper at the
centre of the main board.
if S1 (the range select button) hasn’t
been mounted on the main board at
this stage – it’s not really necessary
for this operation.
To begin, make sure that IC2 & IC3
have both been plugged into their sockets the correct way around and then
set trimpots VR3 and VR4 to the centre
of their ranges. After this, connect the
main board to a suitable source of 9V
DC, either via a battery connected to
the pins at the bottom of the board or
a plugpack lead plugged into CON3.
There’s no need to plug in the lead
from the head-end as yet.
When you apply power via switch
S2, LED1 should light and you should
be greeted by a reassuring glow from
LED1 and “Silicon Chip RF Level/Pwr
Meter” on the LCD, although you may
have to adjust trimpot VR4 before this
message is displayed clearly and with
good sharpness. Note that this greeting
message only lasts for a few seconds,
after which it is replaced by the meter’s
normal display of readings.
If all is well so far, you can now set
the Vref+ voltage at pin 2 of IC3 to
3.50V. This is done with one adjustment. Connect your DMM to TP1 and
its nearby TPG pin and then adjust
trimpot VR3 until you get a reading as
close as possible to 3.50V. This should
also set REG1’s output to close to 5V.
siliconchip.com.au
oo
330
330
330
820
330
1k
1k
27k
1k
1k
330
2.7k
1k
1k
1k
1k
1k
1k
1k
1k
(INPUT)
1k
1k
1k
1k
1k
1k
1k
1k
o
SILICON CHIP 04209083
(OUTPUT)
20dB RF ATTENUATOR
Fig.11: follow this diagram to build the RF Attenuator board. The
copper side of the board carries the SMDs plus four PC stakes to
support the central shield plate (see photos below). The BNC input
and output sockets are mounted on the other side of the board.
Above: because RF signals are involved,
the RF Attenuator must also be housed
in a metal diecast case.
Left: the RF Attenuator board is secured
to the lid of the case via the BNC input
and output sockets. Note how the
central shield plate (consisting of blank
PC board material) is supported by
soldering it to four PC pins in the centre
of the attenuator’s PC board.
Use your most accurate DMM when
making this adjustment because to a
large extent, the accuracy of this setting will determine the accuracy of
your RF Level Meter.
That completes the initial set-up,
although if you have access to a scope
or a frequency counter you may want
to check the PIC’s clock signal at TP2
and its TPG pin. You should find a
5V peak-to-peak square wave with a
frequency very close to 2MHz.
Main box assembly
You are now ready to mount the
main board assembly behind the lid
of the main box (the lid becomes
siliconchip.com.au
the front panel). It attaches to the lid
via four M3 x 15mm tapped spacers
which are fastened using M3 x 6mm
countersink-head screws. The board is
then attached to the spacers using four
pan-head M3 x 6mm screws.
You will need to remove the upper
mounting nut from switch S2 so that
the threaded ferrule of S2 can pass up
through its matching hole in the lid
during this assembly. You also need
to make sure that LEDs 1-3 are positioned so they pass up through their
corresponding holes in the lid.
If you have elected to mount S1 on
the lid before this assembly, you’ll also
need to ensure that its connection lugs
or their extension wires pass down
through their corresponding holes in
the board.
When this part of the assembly is
complete, the top nut for S2 can be
carefully refitted to the top of the
switch ferrule and the lower nut and
its lockwasher underneath carefully
wound up to support the lid.
Your meter’s main board assembly
should now be complete and can be
lowered into the box. This needs to be
done with the righthand side angled
downwards, so that the outer sleeve
of RCA connector CON2 slips into its
hole in the side of the box, allowing
the lid assembly to be swung down as
October 2008 41
Parts List
1 PC board, code 04210081 (146
x 84mm)
1 PC board, code 04210082 (43
x 44mm)
1 Jiffy box, UB1 size (158 x 95 x
53mm)
1 diecast aluminium box, 111 x
60 x 30mm
1 16x2 LCD module, Altronics
type Z-7000A or Z-7011A (with
backlight illumination)
4 M3 x 6mm tapped Nylon
spacers
4 M3 x 15mm machine screws
1 SPST pushbutton switch, momentary (S1)
1 SPDT mini toggle switch (S2)
1 USB type B socket, PC-mounting (CON1)
1 RCA socket, PC-mounting
(CON2)
1 2.5mm concentric DC socket,
PC-mounting (CON3)
1 14-way SIL socket (half of 28pin IC socket)
1 14-way length of SIL terminal
strip
1 18-pin IC socket
1 14-pin IC socket
4 M3 x 15mm tapped metal
spacers
4 M3 x 6mm countersunk machine screws
5 M3 x 6mm pan head machine
screws
5 M3 nuts, with star lockwashers
1 M3 Nylon washer
8 1mm-diameter PC board pins
1 PC-mount type A USB socket,
PC-mounting (CON5)
1 panel-mount BNC socket
2 10mm long M3 tapped Nylon
spacers
2 6mm long M3 machine screws
with lockwashers
2 6mm long M3 countersunk
machine screws
1 USB cable, standard type A to
type B
1 P-type 5mm plastic cable clamp
1 10mm long M3 countersunk
machine screw
1 M3 nut, with flat and star lockwashers
well. The self-tapping screws supplied
can then be used to fasten the lid assembly inside the box.
the head-end into CON1 on the main
board, then fit a 50W termination load
plug to the RF input of the head-end
so that it has a nominal RF input of
“zero”. Now turn on the meter’s power
switch (S2) and check the LCD readout
after the greeting message has been
replaced by the normal readings.
Pay particular attention to the dBV
reading, because initially you’ll probably find that it shows a figure rather
higher than it should. After leaving
it for a few minutes for the circuit to
stabilise, try adjusting the “Intercept
Adjust” trimpot (VR2) on the head-end
carefully with a small screwdriver or
alignment tool, to reduce the reading
down to the lowest figure you can –
ideally below -80dBV.
Final adjustment
Now we come to adjustment and
calibration. To do this, you’ll need an
RF signal generator which is able to
supply an RF signal (preferably unmodulated) of known level.
If you don’t have access to such a
calibrated generator, an alternative is
to use an uncalibrated RF oscillator
with another RF measuring instrument of some kind to let you adjust
its output to a convenient level – such
as 1.0V RMS.
The calibration process is quite
simple. First, plug the cable from
42 Silicon Chip
Semiconductors
1 AD8307AN log detector/amplifier (IC1)
1 LM324N quad op amp (IC2)
1 PIC16F88-I/P microcontroller (IC3) programmed with
0421008A firmware
1 LM317T adjustable regulator
(REG1)
1 3mm green LED (LED1)
1 3mm orange/yellow LED
(LED2)
1 3mm red LED (LED3)
2 1N4148 diodes (D1,D2)
1 1N4004 diode (D3)
Capacitors
1 470mF 16V electrolytic
1 220mF 10V electrolytic
7 100nF monolithic
2 47nF ceramic, 1206 SMD chip
Resistors (0.25W 1%)
1 1MW
3 2.0kW
2 220kW
2 1.5kW
1 68kW
2 330W
1 51kW
2 220W (0805 SMD)
1 33kW
1 200W
1 10kW
1 120W
1 6.8kW
1 100W
1 3.9kW
1 100W (0805 SMD)
1 3.0kW
1 18W 0.5W
1 2.4kW
1 10W
1 2.2kW
1 4.7W
Trimpots
2 50kW mini horizontal trimpot
(VR1,VR2)
1 100W mini horizontal trimpot
(VR3)
1 10kW mini horizontal trimpot
(VR4)
Optional 20dB attenuator
1 PC board, code 04210083, 95
x 39mm
1 diecast aluminium box, 111 x
60 x 30mm
2 BNC sockets, panel-mounting
1 27kW resistor, 1206 or 0805
SMD chip
1 2.7kW resistor, 1206 or 0805
SMD chip
20 1kW resistor, 1206 or 0805
SMD chip
1 820W resistor, 1206 or 0805
SMD chip
5 330W resistor, 1206 or 0805
SMD chip
4 1mm-diameter PC pins
The next step is to remove the 50W
termination plug from CON4 and instead connect a cable from the output
of your RF generator. Set the generator
to some convenient frequency (say
100MHz) and of course with a known
RF level – say 1V (0dBV). It’s then a
matter of adjusting the ‘Slope Adjust’
trimpot (VR1) on the head-end unit –
again with a small screwdriver – until
you get a reading of +00.0dBV on the
LCD.
Once that’s done, your RF Level and
Power Meter is finished, set-up and
ready for use.
Finally, note that you will have to
power this device from a plugpack if
you use the backlit LCD, as the current
SC
is too high for battery power.
siliconchip.com.au
|