Digital Wattmeter PDF
Digital Wattmeter PDF
Digital Wattmeter PDF
Digital
RF Wattmeter
with LC Display
for 1 kHz to 1 GHz
Design by Thomas Scherrer OZ2CPU www.webx.dk
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
+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-
+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.
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.
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.