PSK31 Beacon using a PIC
New for 2009 - Feld-Hell Beacon


A Brief History

A new digital mode that's been sweeping ham radio since the 1990's, PSK31 mode was developed by English amateur radio operator Peter Martinez (G3PLX).  Martinez initially called his creation "varicode", because it uses variable length encodings (Huffman codes) to represent characters. Technically, varicode is the encoding, and PSK31 the transmitting method. Varicode was designed so that the more frequently occurring characters had shorter encodings and the rarer characters used the longer encodings, a coding scheme similar to Morse code.

In PSK31 (1's) are represented by a tone with no phase shift compared to the previous bit and (0's) are tone with a 180 degree phase shift relative to the phase of the previous bit. The phase shift occurs during the zero level modulation to minimize bandwidth.  When the modulation level returns, the positions of the sinewave top and bottom are reversed from the previous bit.  Thus the phase changes by 180 degrees while the frequency remains constant.

The purpose of this project is to allow amateur radio operators to transmit PSK31 "canned" messages from a very small device that will run several hours on a 9 volt battery.

A zero bit between ones

PIC Assembly Code

This program is written in assembly language and is loosely based on a beacon program written in C by Remi Bilodeau VE2YAG.
The PIC's timer 0 (TMR0) provides an interrupt every 62.5 uS whereby a new 8 bit value is taken from a lookup table in ROM and sent to PORTB.
The 8 pins of PORTB are connected to a R2R resistor ladder Digital to Analog Converter (DAC).
16 interrupt cycles create a single 1000 Hz sine wave and 32 of these sine waves make one PSK31 bit. The lookup table also has 16 graduated levels of modulation from 100% down to 0%.  To prevent "key clicks" at the phase shift we lower the modulation level briefly to zero prior to swapping phase, then quickly back to 100% modulation level.  On an oscilloscope it looks like an horizontal hourglass figure.
A second lookup table contains the varicode information.  Since the varicode symbol can be as short as 1 bit to as long as 10 bits, I stored the table in the PIC's 14 bit wide flash memory area.  This way, with a little bit of rearranging, I'm able to directly look up an ASCII value as a varicode symbol.

The tone level can be set to the desired volume by adjusting the 20k pot in the output circuit. The PTT circuit should not sink more than 100 mA which shouldn't be a problem with modern radios.

A zero bit close up


Using the PSK31 Beacon
Change the Settings

Programming the beacon is very straightforward.
After connecting it to a computer serial port running a terminal program, apply power to the beacon. A menu will appear which shows the current string and delay. If you wish to change this, pressing any key will tell the program to enter edit mode and display instructions. If not, the menu program will time out in 25 seconds and begin sending the currently stored message.
The serial port settings are 9600,8,1, no parity. The maximum string length is presently 62 characters. If you exceed this, the program will truncate and move on to the beacon interval input. This is any digit between 1 and 9 with a 10 second multiplier, i.e. 3 = 30 seconds.
In the example to the right I've changed the beacon to announce my special event station and set the break between transmissions to 40 seconds.

Configuration screen shot


PSK31 Beacon Schematic


Completed PSK31 Beacon
PCB courtesy of Jerry Kimento WB9JFR
Jerry has printed circuit boards available for this project.

PSK-31 Beacon for the PIC 16F872 or 873
This file package containing ASM and HEX files along with schematic and readme files is written for the PIC 16F872 micro and uses a software serial UART. (1/09) Updated firmware to fix config message bug.
Current version 1.2

This file package containing ASM and HEX files along with schematic and readme files is written for the PIC 16F873 and uses the built in hardware UART. (1/09) Updated firmware to fix config message bug.
Current version 1.2


Feld-Hell Beacon for the PIC 16F873A
Uses the same circuit as the PSK31 beacon
Developed pre WWII, this fax like mode has been making a resurgence as free software makes decoding on a computer sound card easy.
This version is functionally identical to my PSK31 beacon program except the addition of a longer delay (10-990 seconds).
Nino Porcino has a great website about this mode and has written an excellent decoder for Windows XP.
His program is easy to use and will run well on older computers.

GPS tracker beacon for PSK31 mode
With this program, the beacon goes between a GPS and a transmitter.
It sends time stamped position and course info using robust PSK31.


Questions and inquiries can be sent to: Ask Mike

Back to PIC menu page

This page was updated 8-22-09