A Digital PSK31 Meter

.pdf. It's a snapshot of the page taken as our search engine crawled the Web.
The web site itself may have changed. You can check the current page or check for previous versions at the Internet Archive. Yahoo! is not affiliated with the authors of this page or responsible for its content.
A Digital PSK31 Meter A Digital PSK31 Meter
Building a digital field strength meter for your PSK31 station
by
George Rothbart, KF6VSG
Presentation to
PACIFICON 2002
The 11th Annual ARRL Pacific Division Meeting and Convention
October 18, 19, and 20st, 2002, at the Sheraton Concord (Airport)
Hotel,
Concord, California.
October 18
th
, 2002
No need to take notes! This entire
presentation is available at
www.ssiserver.com/info/pskmeter
No need to take notes! This entire
presentation is available at
www.ssiserver.com/info/pskmeter Digital Modes (char- based data):

CW

RTTY

Packet

APRS

SSTV

PSK-31 Phase shift keyingthe basics
Zero bits are signaled by 180
o
phase reversals:
To avoid harmonics, the amplitude passes through
zero at the instant of the reversal of phase. There is no
need to change the amplitude when we dont change
phase. Thus, we might see a signal amplitude like this:
Example of a
phase
reversal PSK31 signaling
These phase changes occur every 32 milliseconds
(31.25 Hz). Why this rate? Because:
n
It can be easily derived from the 8KHz signal
generated by your sound card (8000 Hz divided
by 256 = 31.25 Hz), and
n
30 or so bits per second translates to about 50
wpm, the fastest you can type.
A zero (space) is defined as a 180 degree phase
reversal from the prior sample,
A one (mark) is defined as no phase change from
the prior sample. PSK31 signaling
Phase
shift by
180, bit is
a 0
Phase
shift by
180, bit is
a 0
Phase
shift by
180, bit is
a 0
Phase
shift by
180, bit is
a 0
Phase
unchanged,
bit a a 1
Therefore, this signal is detected as 00100, which we
will soon see is the representation of the character
SPACE. PSK31 signaling
Lets look at PSK31 in the real world on an oscilloscope:
PSK31
sequence
of zero
bits
Same
signal
shifted 1
bit (32
msec)
Notice that when we shift the signal one bit width (32
msec), and compare, the phase shift of 180 degrees is
clear. This also gives us a clue for how PSK-31 is
detected and converted back to the digital world. The PSK-31 Station
Sound Card
PSK-31
Application
COM Port
DTR or
RTS of,
COMn*
Computer
HF
Transceiver
Antenna
Mic
Input*
Speaker
Out
a
b*
a=Line In
b=Line Out
*=not
needed to
monitor
RF
Out Tuning up in PSK-31
n
Improperly tuned PSK-31 can
result in
u
Undermodulationyour signal will
be too weak to be received or
copied
u
Overmodulationyour signal will
have high Intermodulation
Distortion (IMD) and splatter, and
possibly will have poor copy also. Tuning up in PSK-31
n
Tuning up involves setting
u
Transceiver RF frequency
u
Transceiver microphone gain
u
Transceiver power setting
u
Turning off the speech processor
u
Turning off AGC
u
Sound card line out audio level Setting Audio Levels
n
Its all in the Windows mixer.
n
At the mixers main display
n
De-select everything but Wave
(thats your line out).
n
Set the Wave volume to maximum.
n
Now you can adjust the sound
level by the Volume Control slider. Setting the audio level
n
Click TX button of your PSK-31
software, so that you are sending
an idle PSK signal to the
transceiver.
n
Starting with the maximum sound
level, observe the transmitters
power output and back off the
mixers audio level until the power
level is at about 50%.
n
You should observe an S-shaped
curve like the one I measured at
1500 Hz.
n
The proper audio level in this case
would be about 50% of maximum.
0
10
20
30
40
50
60
70
80
90
0
20
40
60
80
100
120
Sound Level (% of Max)
Power Output Setting the audio level
n
Avoid the temptation to crank up
the audio level to get more power!
n
You will only produce horrendous
splatter, have very poor IMD, and
be less copiable!
n
Properly tuned, you will have a low
IMD figure (-25 to 30 dB), and a
clean spectrum with maximum
copya signal you can be proud
of. Setting the Audio Level
is
not a one-time
Adjustment!
n
The ideal audio level is a function
of audio frequency. What works at
1500 Hz will not be a good setting
at 300 Hz or 2500 Hz.
n
Audio levels set by your Windows
mixer will change as you use other
applications. The Oscilloscope Solution
Sound Card
PSK-31
Application
COM Port
DTR or
RTS of,
COMn*
Computer
HF
Transceiver
Antenna
Mic
Input*
Speaker
Out
a
b*
a=Line In
b=Line Out
*=not
needed to
monitor
RF
Out
Scope
Feed line
Td to
scope

input Whats the downside?
n
Poor use of a costly resource
n
Bulky, power consumptive (not a
good solution for a portable PSK-
31 station)
n
No place to get a good trigger
signal
n
Still a manual operation (you fiddle
with the volume control slider). An alternate solution: let your
computer be your scope
n
A computer with display is
guaranteed to be available
n
Automatic graphical interface (if
running a Windows OS)
n
Only need to add an Analog to
Digital Converter (ADC)
n
Can do more than monitor RF
can dynamically set your audio for
perfect output! Adding an ADC
n
Lets use a PIC microcontroller as an
inexpensive way to add a 10-bit ADC to
your computer.
n
The PIC 16F876 comes with a built-in
UART that can communicate with your
computers COM port
n
Has a built in I
2
C (2 wire) bus interface,
so you can
u
Add more memory
u
Interface to a USB chip that can
communicate with your computers USB
port PIC
16F876
Component
Block Diagram
Signal
Conditioning
ADC
HF
Transceiver
UART
USB Driver
Computer
CPU
RAM
ROM
Power
Regulation
Antenna
I
2
C Driver
Com
Port
USB
Port
PCB PIC
16F876
Signal Processing-Step 1
Signal
Conditioning
ADC
HF
Transceiver
UART
USB Driver
Computer
CPU
RAM
ROM
Power
Regulation
Antenna
I2C Driver
Com
Port
USB
Port
PCB
Signal peak voltage on the feedline
exceeds the 5 volt limitation of the ADC
input:
P= E
2
/2R. For a 50 ohm load:
E = 10P

. So a 1 watt signal has a peak-
to-peak voltage at the maximum ADC
input!
This calls for a resistive voltage divider at
the front end and maybe even a Zener
diode to protect the ADC. Signal Processing-Step 1 Peak RF voltage is given
by V
0
= (2R
A
P)
1/2 =
10P
1/2
where R
A
=50 , the
antenna impedance Voltage applied to the
ADC will be V = V
0
R
2
/(R
1
+R
2
) Setting V=5 (the ADC
limit), substituting for V
0
and solving for R
2
/ R
1
gives: R
1
/ R
2
= 2P
1/2
1 Example: if R
2
= 2 K then
P = 4 watts, R
1
= 6K P = 100 watts, R
1
= 38K R
1
R
2 PIC
16F876
Signal Processing-Step 2
Signal
Conditioning
ADC
HF
Transceiver
UART
USB Driver
Computer
CPU
RAM
ROM
Power
Regulation
Antenna
I2C Driver
Com
Port
USB
Port
PCB
Signal is AC. ADC sampling will not
occur in any definite phase, so we
will get an undesirable mix of both
positive and negative samples.
Solution: half-wave rectify the signal
prior to sampling using a germanium
diode. Why half-wave and not full-
wave? Why germanium and not
silicon? PIC
16F876
Signal Processing-Step 3
Signal
Conditioning
ADC
HF
Transceiver
UART
USB Driver
Computer
CPU
RAM
ROM
Power
Regulation
Antenna
I2C Driver
Com
Port
USB
Port
PCB
We are trying to measure the RF envelope. The
signal at 14 MHz is changing 1% every 0.1
nano</i>seconds! We need to filter out the bumps to
approximate the envelope.
We want to implement a low-pass filter using just a
resistor and capacitor, with an RC time constant that
allows the 31 Hz signal to pass, but blocks the RF.
The PICs ADC has an internal input capacitance of
5 pf. So the question is: how to determine the value
of the resistor? Signal Processing-Step 3
The cutoff frequency in this low pass
filter is
f
c
= 1/(2 RC)
And the gain of the filter is given by
G = 1/(1 + (f/f
c
)
2
)
1/2
A good cutoff to choose would be the
geometric mean between 31 Hz (the
signaling envelope) and 14 MHz (the
carrier frequency). This works out to
be 21 KHz.
Then G for the RF component is 1.5 x
10
-3
and for the PSK31 component is
1 10
-6
.
Since C=5pf, the value of R works out
to be
R = 1/(2 f
c
C) = 1.5M
PIC
16F876
Signal Processing-Step 4
Signal
Conditioning
ADC
HF
Transceiver
UART
USB Driver
Computer
CPU
RAM
ROM
Power
Regulation
Antenna
I2C Driver
Com
Port
USB
Port
PCB
The firmware now waits for a request from
the computer, then instructs the ADC to
sample the signal, stores the digital result in