Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Digital Wattmeter PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

TEST&MEASUREMENT

Digital
RF Wattmeter
with LC Display
for 1 kHz to 1 GHz
Design by Thomas Scherrer OZ2CPU www.webx.dk

Any radio amateur knows the importance of an accurate RF power meter.


A wattmeter can be used to measure gain in amplifiers, bandwidth in
filters, field strength from antennas, transmitter power, SWR, return loss
and many other things.

16 Elektor Electronics 10/2002


TEST&MEASUREMENT
engineers are conversant with the dBm unit,
Specifications others prefer watts and still others like to
talk about RMS voltage. This meter displays
Frequency coverage: 1 kHz to 500 MHz (calibrated) all three units at the same time...
1 kHz to 1000 MHz (uncalibrated, for
relative power measurements only)
Nominal input impedance: 50 About the AD8307
Input power range: 60 dBm to +30 dBm
(1 nanowatt to 1 watt). The AD8307 monolithic logarithmic amplifier
Input power range using 50-dB attenuator: up to 100 kwatts. from Analog Devices was first described in
Dynamic range: 90 dB with good RF shielded case. the article RF Decibel Meter, see Elektor
Resolution: 0.1 dBm (1 dBm on bar-graph) Electronics, January. For reference purposes,
Input return loss: @300kHz: 35dB the block diagram of this hugely successful
@100MHz: 27dB IC is given in Figure 1. The AD8307 is a rela-
@500MHz: 25dB tively low cost component at least accord-
Input SWR: @ 300kHz: 1.036 ing to the datasheet in practice, the
@100MHz: 1.094 author paid about 13 (approx. 8.50) for one
@500MHz: 1.12 off plus postage.
Accuracy before calibration: 1 dB from 1 MHz to 450 MHz. The author initially tried the DIL version of
After calibration: 0.2 dB at each calibrated frequency. the AD8307 this is also the type used in
DC Voltage Measurement: 0 to 20 volts.
the previously mentioned article. Although it
DC Voltage Resolution: 20 mV
is easier to solder and use than the SMD chip,
DC Voltage accuracy after calibration: 20 mV
its longer connecting pins make it unusable
Power supply: 9 to 20 VDC
Current consumption: with no LCD light: 30 mA; for frequencies higher than about 100 MHz.
with normal LCD light:120 mA. Several experiments were carried out using
this type before it was found that the SMD
type could be used up to about 500 MHz.
This RF wattmeter uses an AD8307 storage, plus many extra features, Again several experiments were set up,
to measure the power level. The see the software description further boards where made, input resistors and
AD8307 front end circuit is both fre- on in this article. capacitors where changed to optimise the lot.
quency compensated and optimised At frequencies above 300 MHz input
for return loss to give optimum input power should not exceed +20 dBm (100
SWR over a wide frequency range. The decibel milliwatt mW) to maintain accuracy. This is a docu-
A pre-programmed microcon- (dBm) unit mented weakness of the AD8307. Not a big
troller type PIC16F876 with built-in In RF technology 0 dBm represents problem, really, if you are aware of it it is
10-bit analogue to digital converters 1 milliwatt into 50 . Similarly, just a matter of using the right input attenu-
is used to convert the analogue volt- 0 dBW represents 1 watt into the ation, to reduce the actual RF power applied
age output from the AD8307 into dig- same impedance. to the chip to a level below 20 dBm and so
ital values. Next, a set of lookup So, +10 dBm = 10 mW; +20 dBm = guarantee optimum accuracy.
tables are used to convert the dBm 100 mW; +30 dBm = 0 dBW = 1 W The author is grateful to all the radio ama-
values into RF voltage and RF power and so on. teurs and skilled engineers who have con-
(watts). The readout of all values The term dBm is used at any tributed with their experience, good ideas,
including a bar-graph appears on a professional radio development, help with measurements, and lending out
large 20 2 LCD display with back repair and servicing facility as well expensive equipment so that it was possible
light. There is also a DC voltmeter as by radio amateurs, to describe to construct this input circuit.
with minimum and maximum peak (relative) RF power levels. Some
Circuit description
The circuit diagram of the RF Wattmeter is
AD8307 given in Figure 2. It consists of four sections,
SUPPLY
VPS
7.5mA
BANDGAP REFERENCE ENB
ENABLE
which will be discussed briefly below, leav-
AND BIASING
ing a bit more space in the article to ponder
SIX 14.3dB 900MHz INT
AMPLIFIER STAGES INT. ADJ on the second main components yes thats
INP
+INPUT the PIC16F876.
1.15k MIRROR
INPUT The RF voltage converter is draw as a sep-
INM 3 2 A OUT
/dB OUTPUT
arate unit around the AD8307. The log
NINE DETECTOR CELLS 2
SPACED 14.3dB
12.5k equivalent of the voltage representing the RF
COMMON COM COM power applied to socket K4 appears on K5 in
OFS
INPUT-OFFSET
OFS. ADJ. the form of a step level between 0 and 2.5 V.
COMPENSATION LOOP
The input resistor network is dimensioned for
020026 - 11 50 input impedance which is the de facto
standard in RF work. The input network can
Figure 1. Block diagram of the AD8307 (courtesy Analog Devices). handle power levels of up to 1 watts. C1 and

10/2002 Elektor Electronics 17


TEST&MEASUREMENT
type for ease of software develop-
LCD
S1 S2 ment and debugging. Furthermore,
LCD Display 2 x 20 Chars
4 digital inputs, 2 for the pushbut-
SELECT MENU
tons and 2 for the encoder, 7 outputs

LED2
LED1

VSS
VDD
RW

VO
RS
D7
D6
D5
D4
D3
D2
D1
D0
E
K1
+5V +5V +5V
16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
to the LC display in 4-bit mode or 11
outputs in 8-bit mode. The Microchip
K6
R9
16F873 and 16F876 PIC microcon-
47k

C10
+5 K3 trollers with 4 and 8 kwords of Flash
0
100n +5V C14
A program memory proved an excel-
100n
DC
R15 R17
C8
20 P1 lent choice. Their price being almost
DC
the same, the author went for the
120k

180k

VOLTMETER 1n 1
INPUT MCLR 10k
2
IC2
11 RS K3 larger 8 k type.
RA0/AN0 RC0
R16
C7
3
RA1/AN1 RC1
12 D0 2 1 The 16F876 has 5 analogue inputs
10k

4 13 RW RS 4 3
5
RA2/AN2 RC2
14 E E 6 5 RW
with 10-bit resolution, representing
RA3/VREF RC3
100n 6
RA4/T0 RC4
15 D5 D1 8 7 D0 a range of 0-1023 in discrete values
7 16 D6 D3 10 9 D2
RA5/AN4 RC5
17 D5 12 11 D4
when the input voltage goes from 0
28 RC6/TX

27
RB7
RC7/RX
18 D7 D7 14 13 D6 to 5 volts. The DC signal from the
RB6 16 15
ENCODER K2
26
RB5 OSC1
9 AD8307 covers 0 to 2.5 volts for the
ENCODER D1
D2
25
24
RB4
PIC16F876
X1
LED2 LED1 entire operation range. To get full
RB3 R14
D3 23
RB2
digital resolution the ADC inside the

10
4MHz
+5V D4 22
RB1 OSC2
10
PIC could use an external positive
21
RB0/INT
R10
reference for the full-scale voltage.
BOURNS
3315Y-1-016 +5V This function is implemented by R10
1k

8 19

and R11 which create a 2.5-volt ref-


R11 erence from the 5-volt power supply
C9
rail. This voltage is not super critical,
1k

+5V'
100n if there is a small error, it will be cal-
ibrated in software with a zero dBm
C4 C5
offset point.
100n 100n K5 A good and simple programmer
R3 C1 +5
100
7 6
0
for this PIC was designed by Johann
8p2 SUP EN
K4 R2 R6
8 5
A 8...16VDC IC3 Aichinger and is called PROPIC,
100 68 INP IC1 INT 150mA D1 7805 +5V
R1
R7 schematics and software may be
AD8307
47

100
1
INM OUT
4
1N4001 downloaded at
R4 R5 L1 COM OFS R8 C13 C12 C11 http://jaichi.virtualave.net/
C2 C6
470k
39

33

2 3
100 10 100n
Many other PIC programmers sup-
100n 25V
3T 100n 16V
port the 16F876 type, including IC-
3mm
020026 - 12 PROG by Bonny Gijzen. This one
also works fine and supports almost
any IC that can be programmed.
Figure 2. Circuit diagram of the RF Wattmeter. The two main components are the AD8307 Youll find it at
in the input converter and the PIC16F876 in the controller section. www.ic-prog.com
The wattmeter software was devel-
oped using the Microchip MPLAB
L1 serve to cancel stray capacitance and to adjust the contrast. PIC programming suite in combina-
inductance and so optimise the input SWR for The fourth unit is the power sup- tion with an external C compiler
higher frequencies. ply around IC3. Totally conventional called PICC from HI-Tech, their web
The second unit is the digital controller in design, the supply should not site is at
around IC2. This black box runs software require further discussing. Input www.htsoft.com
written by the author to handle the following power may be obtained from any old where you can download a free trial
functions: mains adaptor capable of sustaining demo version. If you need to re-com-
process the output from the AD8307 into a a current demand of 150 mA or so at pile the software for this wattmeter,
format we earthlings can read and under- 8 to 16 VDC. you can change the start up screen
stand; to display your name or callsign if
read the user controls (pushbuttons S1, S2 you like. The wattmeter software
and the rotary encoder on K2); About the PIC16F876 source code files can be downloaded
drive an LC display, enabling it to present The requirements for the digital sec- from the Free Downloads section of
menus, values, etc. tion of this projects included a cheap the Elektor Electronics website. The
The PIC is reset at power on by R9-C8. It is micro controller with 10-bit analogue relevant file number is 020026-11
clocked by a 4-MHz ceramic resonator. to digital converter (ADC), a cheap (October 2002). For those without
The third unit is the LCD. Here, a 2-line by and simple programming interface access to the Internet (raise your
20 character type is used. Preset P1 is used and program memory of the Flash hand please), the files are also sup-

18 Elektor Electronics 10/2002


TEST&MEASUREMENT
plied on floppy disk through our of tin on the right-hand solder pad. BNC socket with four M2.5 threaded mount-
Readers Services. Place the component carefully ing holes. Some BNC sockets have a 3-4 mm
with your left hand using tweezers, long Teflon isolation piece around the cen-
solder the right-hand side while tre pin. Cut this isolation away, and cut the
Construction holding the component perfectly
An instrument like the present RF straight. Now simply solder the left-
Wattmeter should be built with due hand pad to the left-hand side of the
consideration given to mechanical component. COMPONENTS LIST
aspects as it will never function To solder the AD8307, carefully
properly when screening is and quickly pre-tin pad number 3 on Resistors
neglected. the board. Then keep the IC pressed SMD case 1206 or 0805:
To begin with, the double-sided in place when applying heat to pin R1,R2,R3 = 100 (R3 on top of R1/R2)
and through plated circuit board 3, joining it to the solder pad by R4 = 39
shown in Figure 3 should be cut in pushing gently with the solder tip. If R5 = 33
two to separate the controller sec- necessary re-align the IC and then R6 = 68
tion from the input board. solder the other pins. R7 = 47
R8 = 470k
The input board has specially
R9 = 47k
Input Board designed shapes with generous
R10,R11 = 1k
This board (Figure 4) employs pads that allows both 1206 and 0805 R15 = 120k
SMDs (surface mount devices) style SMD components to be fitted. R16 = 10k
because small components better Inductor L1 consists of 3 turns of R17 = 180k
handle high frequencies. Read the 0.5-mm enamelled copper wire R14 = 10 1W
following paragraphs if it is the first (ECW). The internal diameter of this P1 = 10k preset
time you build up a board using inductor is 3 mm and the turns are
SMDs. spaced about 0.5 mm apart. Capacitors
If you are soldering with your The input board needs to be SMD case 1206 or 0805:
right hand, first add a small amount mounted directly onto the flange of a C1 = 8pF2
C2-C7,C9,C10,C11,C14 = 100nF
C8 = 1nF
C12 = 10F 16V radial
020026-1
1-620020
C6 R8 C3
ROTKELE )CR9
( K2 R14
H1

C13 = 100F 25V radial


C8 K1
C10
K5 C7 Inductor
A IC1 R16
IC2
L1 = 3 turns, 0.5mm dia. ECW (SWG #30),
0
IN
R15 turns spaced at 0.5mm, internal dia. 3mm.
C5 C4 C2 R1 R2 R17 C9 X1
K6
C14

+5 DC R10 P1
L1 C1 R4
C11
K3 Semiconductors:
A C12 R11
R7 R6 R5 0 IC3 D1 H2
D1 = 1N4001
+5 C13
0 + IC1 = AD8307AR (SMD)
IC2 = PIC16F876-04/SP, programmed,
order code 020026-41, see Readers
Services page
IC3 = 7805

Miscellaneous:
K1 = 5-way SIL pinheader
K2,K5 = 3-way SIL pinheader
K3 = 16-way SIL pinheader
(C) ELEKTOR K4 = BNC socket with flange
020026-1
K6 = 4-way SIL pinheader
S1,S2 = pushbutton, 1 make contact, chassis
mount
PC1,PC3,PC8,PC10,PC12 = solder pin
X1 = 4MHz ceramic resonator (3 pins)
LCD module with 2 lines of 20 characters,
e.g., LM032L (PC2002LRS-BEA-C)
Rotary encoder type 3315Y-1-016 (Bourns)
Mains adapter socket, chassis mount
IC socket, 28 pins, narrow
PCB, order code 020026-1 (see Readers
Services page).
Disk, source code files, order code 020026-
11 (files also available from Free
Figure 3. PCB design for the instrument. The board is double-sided, through plated Downloads)
and available ready-made through the Publishers Readers Services.

10/2002 Elektor Electronics 19


TEST&MEASUREMENT
centre pin so that it is about 2 mm long.
Check that it is possible to solder the rear
side of the flange. If not, remove any protec-
tive layer by scratching it with a tool so that
soldering is possible. Now mount the input
board, dont be economical on the solder tin,
solder it all the way, including at the bottom
side of the board.
Controller Board
An early prototype of this board is shown in
Figure 5. If the PIC16F876 is mounted in an
IC socket, you should use one of undisputed
quality, say, one with turned pins. However,
those of you with access to suitable PIC pro-
gramming tools may also solder the PIC
directly on to the controller board as the chip
can be updated in-circuit with new software
when available.
The ceramic resonator frequency is 4
MHz, this is not critical. If you dont want to Figure 4. Input board with BNC flange socket attached by soldering along the edge.
use the optional serial output discussed in
the menus inset, use a 3-pin type with built
in capacitors. A normal 2-pin version will also remove it, if the PIC is soldered in adjust pin 3. This will yield maxi-
work fine. the main board, a variable DC power mum contrast so that you can see
The controller board is mounted on the supply should be used for the testing the LCD is alive. Adjust P1 for best
rear side of the LCD module, using two stand- described below. contrast at your viewing angle.
offs with a length of about 10 mm or what- Start with just the controller Check for green backlight in the dis-
ever you have available. board, with the 7805 fitted and play and you will see the display
Four stand-offs are needed to mount the maybe also the PIC. The display and writing the RF Power Meters wel-
LC display to the case front panel. the input board are not yet con- come message (see inset). Touch the
Resistor R14 is a 1-watt type, which con- nected. input A terminal with a finger, this
trols the LCD backlight level. A value of 10 Before proceeding you need to will give a response on the display.
Ohms will give normal light but if you want verify that the 7805 regulator is Switch off.
to use batteries to power this instrument it working okay. Supply the board with Double check all the soldering on
will be a good idea to increase the value of 9 volts, check for +5 V at the pad the AD8307 and the input board,
R14 to 20 Ohms or so, or maybe mount an for the input board near C12. Check then connect it to the main board
switch so you can disable the light when the for +2.50 volts at IC1, pin 5. using shielded audio-style cable or
meter runs battery powered. Check for +5 V at IC1 pin 1. whatever you have to connect the
The 7805 voltage regulator will run a bit Switch off, connect the display, signal from the input board to the
hot if the input voltage exceeds about 10 V. insert the PIC, and switch on again. controller board. Apply power again
Either bend the regulator down to the case Turn P1 counter clockwise so that and check that current consumption
and secure it using an M3 screw, or mount a the display get zero volts on the is under 150mA.
heatsink to its metal tab. A small click-on
type will be enough.

Rotary encoder and switches


The rotary encoder is a cheap double contact
type supplying Gray code. This encoder is
used as a dial to select options from the menu
and to change different settings, see the soft-
ware description further on. If the encoder
appears to turn the wrong way, simply
reverse the wires at the two data output con-
nections.
The two switches S1 and S2 must be push
button types. S1 is used to pick options from
the menus and S2 is the menu access button.

Initial testing (hardware)


At this point it is assumed that both boards
are ready assembled. If the PIC is in a socket: Figure 5. Controller board attached to back side of LCD module.

20 Elektor Electronics 10/2002


TEST&MEASUREMENT

Using the menus RELATIVE mode. In this mode dBm and bar-graph is shown,
when entering this mode the dB read out is zeroed.
(software v. 1.03)
The menu
All intelligence vested in the instrument resides in the software To enter the menu / settings use the MENU button. When in a
developed by the author and Flashed into the PIC microcon- menu, use the rotary encoder to get the desired setting. At the
troller. Those of you with access to suitable PIC programming right setting, use SELECT to activate, this is also shown on the
software and equipment will care to know that the source code display.
files for this project are available free of charge from the Pub-
lishers website (Free Downloads, item 020026-11, October
2002). Ready-programmed PICs are also available under order
code 020026-41.

The instruments welcome screen should look like this:

Available menu entries:


0: 0 dB, no attenuator mounted, 1 W max.
1: 10 dB attenuator mounted, 10 W max.
2: 20 dB attenuator mounted, 100 W max.
3: 30 dB attenuator mounted, 1 kW max.
The main start up screen shows: 4: 40 dB attenuator mounted, 10 kW max.
dBm, status, RF-voltage Bar-graph, RF-power watts
5: 50 dB attenuator mounted, 100 kW max.
6: DC Voltmeter, actual and min. and max.
7: RF Power Meter, the default start up screen.
8: SSB PEP (peak envelope power) Wattmeter, with peak hold
and variable decay.
9: Return loss with SWR readout, usable with a SWR bridge.
10: Calibrate 0 dBm in the selected band.
11: Read all calibration values.
12: Zero all calibration memories.
13: Display update delay 2-80 ms, peak hold and decay speed.
14: About Info, shows software version and so on.
If no attenuation is used, the dBm readout goes from 63 dBm
(noise floor) to +30 dBm (1 W).
The status readout shows the selected frequency band, and atten- DC voltmeter
uation mode. Use the band dial to change between LF, HF, VHF, Nothing gets burned if the input polarity is reversed. In the DC
UHF and SHF calibration memories. It is suggested to calibrate voltmeter screen, actual voltage, minimum and maximum are dis-
the wattmeters 0 dBm reference at: LF = 3.5MHz, HF = 14 played. To reset min. and max. readings, press the Select button.
MHz, VHF = 145 MHz, UHF = 430 MHz, SHF = 440 MHz. Of The voltmeter can be used to monitor the battery voltage if a bat-
course, you can calibrate at your own favourite frequencies for tery supply is used, or whatever you want to measure, but
best performance.
remember the input impedance is about 80 k.
In the RF power meter menu, use the SELECT button to enter

Extra features
Some enthusiasts requiring additional features may find a serial
output a useful extra. On pin 17 the PIC outputs a serial datas-
tream which may be converted to RS232 levels using a MAX232
IC in its usual configuration. The datastream produced by the
PIC may be connected to a free RS232 port on your PC. Any
communications or terminal emulation program like HyperTer-
minal should be able to read the datastream. The comms set-
tings are: 38400 Baud, 8 bit ASCII, no parity, 1 stop bit. In short:
38K4 8 N 1.

10/2002 Elektor Electronics 21


TEST&MEASUREMENT
If you do not have an RF test generator to Calibrate 0 dBm and press the age. Never touch any terminal car-
calibrate and test with, put a normal resistor select button. rying transmitter output power.
pin in the BNC input plug, and transmit with The 0 dBm signal strength is The AD8307 can not survive +5
your VHF, UHF rig or whatever (PMR) radio saved in the meters internal mem- V erroneously applied to its output
you have available, the closer you take the ory. From now on, it will measure pin, so be extra careful to double
radio to the wattmeter, while transmitting of within 0.2 dB in that frequency check your wires from the main
course, the higher the readings on the instru- band. This is repeated for all the board.
ment will become. other bands you need. There are five Be aware of the fact that the
With this initial test completed okay, use, band memories called LF, HF, VHF, input board is designed for input
lend, or get access to a good RF signal gen- UHF and SHF. Remember, you can power levels not exceeding 1 watt.
erator. This will enable you to calibrate your calibrate at any frequency you need, If you apply more power, the reading
new digital wattmeter and use it to for accu- at any time, over and over again. on the display actually goes down! If
rate measurements in your own shack. But The DC voltmeter is calibrated in you are careless and apply more
first you need to build the electronics into a hardware. You need to fine tune the than 1 watt to the instrument, then
properly shielded cabinet. The calibration will voltage divider top resistor R15 in you might blow up your AD8307.
be done later. parallel with R17 and the bottom Never rely on the input resistors to
resistor R16. Youll find that an accu- burn out first, because they can han-
rate DC digital voltmeter is needed dle much more than specified (even
Cabinet? Home made or.. besides a variable DC power supply. for several minutes, and by that time
Sure, you want the cabinet to fit exactly to the Change the wattmeter display your AD8307 will have given up the
LCD display, BNC, switches, DC connector screen to DC Voltmeter mode using ghost). So there is no input over-
and so on. So why not try to make a cabinet Menu -> Dial -> Select. load protection!
of unetched single-sided copper clad board? Apply 20.00 volts to the DC input If you want to test a transmitter,
This material is cheap, easy to cut and drill. and look at the LCD reading. If it dis- use an attenuator pad, directional
coupler or a power tap. The author
has a homemade 30 dB attenuator
capable of handling 50 watts con-
tinuous RF power. Its frequency
response is flat from DC to 700 MHz.
None of his VHF or UHF transmitters
can output more than 50 watts so no
problem. However, an HF rig will
require the use of a 50 dB tap type
attenuator which is also home made.
This one allows measurements up to
one kilowatt with no problems. More
details may be gleaned from authors
website.
Figure 6. As a suggestion, a screened housing for the instrument may be made from pieces
of one-sided copper clad board soldered together along the edges. This method of
construction, popular among radio amateurs, even allows securing nuts to be provided for Conclusion
mounting the assembly onto a larger case.
The author has been using this
wattmeter for over a year and found
it usable for many purposes involv-
Some extra care and time was spent on the plays a value smaller than 20.00, ing radio signals.
rectangular clearance for the display. The mount a 10 megohm resistor in par- The marginally higher accuracy,
sides of the case can easily be attached using allel with the top resistor R17; if it larger frequency range and dynamic
soldering. The completed case may be reads more than 20.00, just mount it range of professional RF wattmeters
painted black with spray paint, with white to the bottom resistor R16. Remem- comes at a cost of 20-40 times that of
lettering added later using Seno transfer ber to disconnect the 20 volts source the instrument described here.
symbols. A coat of clear lacquer spray was and the wattmeter power supply As a future extension, two input
used to secure the fragile lettering. Such a while soldering inside the instru- boards could be mounted with a
cabinet costs nothing except time and paint. ment. If you short out R15 or R17 software routine subtracting input B
The authors version is shown in Figure 6. while 20 V is applied to the input from input A, to display the forward
DC terminal, you will need a new and reflected power along with the
micro controller! calculated SWR value. This is just an
Calibration of RF input and DC idea, however, and actually the rea-
input Caveats
son for the presence of two input
The RF meter is calibrated in software, by BNC plugs called input A and B on
applying 0 dBm to the input terminal. First RF voltages of a couple of volts, the cabinet of the authors RF
select the corresponding band memory using especially from UHF transmitters, wattmeter.
the dial encoder, then press Menu, choose can cause burns and other skin dam- (020026-1)

22 Elektor Electronics 10/2002

You might also like