The WW2R BEACON KEYER MARK II

Dave Robinson WW2R G4FRE


 

Commercially made PCBs are available for the design from WA5VJB in the USA and G4DDK in the UK. PCB, full kits and programmed chips are still available from WW2R

Introduction

Since publication of the original WW2R PIC keyer PIC technology has advanced to produce better, more flexible devices. The opportunity has now been taken to update the original design and this is presented here.

Instead of the original  PIC16C56 Microcontroller chip by Microchip newer type PIC16C505 has been chosen. This has 72 x 8 registers, 11 I/O pins and 1024 x 12 program area, all contained in a 14 pin DIL package. The chip also has an onboard 4MHz RC oscillator removing the need for any extrnal oscillator components, but this facility is  not used in this application. Initial development was done on a PIC16C505/JW chip which has UV erasable memory allowing the code to be optimized, but the cheaper PIC16C505-04/P one time programmable version, which is cheaper, but less flexible is used in the final version.

Three elements of the keyer design have to be considered:-

1. A method of converting the morse to a bit pattern

2. The microprocessor code for the PIC chip to convert this pattern to a morse output

3. The hardware

Element 1 will vary depending on the message to be sent. Element 2 (the "program") is independent of message. The two elements are generated separately, combined together, converted to a HEX format the chip understands then programmed into the chip.

Morse code pattern generation

Whilst others have developed elegant solutions to store CW as binary bits, the method presented here is based on my original design in Radio Communication. One message pattern is stored serially in each chip with an invalid morse character being used to generate the reset to the start of the message (11001100 binary; CC in hexadecimal) to allow continuous looping as required by beacons.

To start the conversion process first write down the text of the message to be sent. Convert each character in the message to binary representation of the morse. A dah equates to "111", a dit to a "1", a character space "0"a letter space "000" and a word space "0000000". If periods of "key down" are required continuous streams of "1"s are inserted. The bits are then converted to hexadecimal, padding out the message length with extra "0"s to complete a Byte as necessary. The end of message byte (CC) is added to complete the code.

For example suppose the message just consists of the callsign WW2R. The binary listing would be as follows:-

10111011 10001011 10111000 10101110 11101110 00101110 100000

this is converted to hexadecimal:- then the reset sequence added;-

BB 8B B8 AE EE 2E 80 BB 8B B8 AE EE 2E 80 CC

Whilst this process is easy to do for short message it is very tedious and prone to errors for long messages. For this reason a QBASIC program was developed to generate the sequence automatically and generate a text file in a compatible format for the PIC assembler. The program is cwpic.bas available in zipped form as cwpic.zip. The program also allows the simulation of the sound of the keyer to be made so you can make sure it sounds correctly before committing it forever in the chip. As an example of the storage capacity of the chip, the following message typical of a beacon message fits easily:-

WW2R EM13QD 902.380MHZ (10 seconds carrier) WW2R (10 seconds carrier) WW2R (10 seconds carrier) WW2R (10 seconds carrier) WW2R (10 seconds carrier)

Microcontroller code

No claims of code compactness are made for this program, ease of comprehension on how the program works being traded for the niftiest code. It was decided to have two independent keyed outputs from pin 10 to drive a keying transistor and pin 7 to drive an LED. The speed of the keying is controlled by a potentiometer and fixed capacitor. There is a 32768Hz crystal controlled version available, designed for beacons operating in hot Texas roof spaces (where the RC version could drift) further details are available from the author.

The code was originally written for the Parallax Inc. dialect of assembler (1). This was a collection of individual programs that allowed the process to be completed, if care was taken. Recently I transferred to an integrated developed environment (MPLAB IDE) provided by Microchip (2) where all the processes including the chip programmer (PICSTART-PLUS) are linked in a windows environment. The zip file  cw505.zip is the Microchip assembler dialect of the program. There are many other manufacturers producing other tools which do the same process, some cheaper, to each their own choice.

Process overview

 1. Ensure that the file cw.asm does not exist in the directory containing the cw505.asm file

2. Generate the morse code pattern using the QBASIC program. The output file is called cw.asm. Ensure it ends up in the same directory as the cw505.asm file

3. Assemble the file CW505.ASM using the available tools. The cw.asm file will automatically be incorporated into the output file

4 .Program the chip with the hex code generated by step 3 using a suitable programmer. If not using the microchip programmer ensure all the configuration bits are set appropriately.

Hardware

The circuit diagrams is shown in Figure 1. The component overlay is shown in Figure 2.

A small commercially PCB, produced by WA5VJB  is shown in Figure 3.. Note that the IC1 pin which has a square pad on the PCB is PIN 14. (it is usually pin 1).The component list is shown in Table 1 at the end of this article .

The output transistor, 2N2222a is rated at 40V 0.8A, the 2N3904 is rated at 40V 0.2A both of which will probably suit most solid state applications. Those who want to use it for grid block keying will have to design their own interface!

Conclusions

Hopefully this article will remove the obstacle for those building beacons who are unable to identify a small low cost keyer.

Fig 1. RC Controlled Circuit

Fig 2. Component Layout
 

 

Fig 3. Commercial PCB Layout, The components mount on the other side

Table 1. Component Listing


Component Value
C1 100pF Ceramic
C2 0.01uF Ceramic
C3 0.22uF 25V Tantalum (Can be SMT)
C4 2.2uF 25V Tantalum (Can be SMT)
IC1 PIC16C505-04/P
IC2 78L05
R1 47k
R2 2200
R3 820
TR1 2N2222A,2N3904 or equivalent
VR1 20k minature preset