(C) 2015, G. Forrest Cook
This circuit stores a morse code message as bits in an EPROM chip, the message controls a relay that keys a CW (morse code) transmitter. An Arduino microcontroller version of the beacon controller is also shown, it uses less circuitry than the EPROM version and doesn't require an EPROM programmer.
The EPROM version of the controller can output either a one-shot message such as "CQ CQ CQ DE CALLSIGN", or a repeating message like "[tone] DE CALLSIGN/B GS DM79IX [pause]. A One-shot message can be controlled by pressing the Start button, a repeating message can be sent by turning on the Free Run switch. The Arduino version of the controller is set up for sending a repeating beacon message, it would be easy to modify the code to make a one-shot CQ sender.
EPROMs other than the 2732 can be used if suitable changes are made to the address lines in the circuit. It should also be possible to use and EEPROM chip if you have access to the appropriate programmer. For larger EPROMs, just ground the higher order address input lines on the EPROM chip, and wire the appropriate chip select pins for outputs enabled and chip selected.
The circuit board in the above photo differs from the circuit in the schematic. That device was activated by a digital alarm clock to produce a Morse code wake-up message. It included a 5V regulated power supply and two 555 timers were used for the clock and sidetone oscillator. The keyer relay was not included and the EPROM was a 2716 type.
CMOS NOR gates U1c and U1d form a gated astable clock oscillator, Capacitor C1 sets the oscillator range and the frequency can be adjusted by potentiometer VR1. A value of 2.2uF for C1 will set the Morse code speed to approximately 20 wpm. Gates U1a and U1b form the run/stop flip-flop. In one-shot mode this is activated by pressing the start switch and deactivated either by pressing the stop switch or by the end of message signal that comes from the EPROM d3 line.
The clock oscillator causes U2 to sequence through an 11 bit binary count. This sequence is used to step through the addresses on EPROM U3. Morse code data comes out of the EPROM D0 output. The output is used to turn on and off Q1 and keying relay RL1. At the end of a one-shot message, a single on-bit arrives on the EPROM D3 output, this causes the run/stop flip-flop to turn off and reset the U2 counter to address zero. D1, C2 and R4 cause U2 to reset to address zero when the power is applied. R5 protects the U3 d1 line from being shorted to +5v when the manual stop switch is pressed.
The Osc. Enable signal on the EPROM's D2 output is used to turn a beacon's RF oscillator on and off to support beacons that have separate oscillator and keying signals. The FSCW bit on the EPROM's D1 output is completely optional, it can be used to modulate the frequency of the RF oscillator during dashes for easier weak-signal reception. See this article for more information of Frequency Shifting CW (FSCW).
I have written a C language program called cw2hex that is used to convert a sequence of ASCII characters into an Intel hex file. Most EPROM programmers should be able to read the resulting hex file and program the Morse code data into an EPROM chip.
If your EPROM programmer only reads binary data files, the hex2bin utility can convert a .hex file into a raw binary file. Hex2bin should be run with the -p 00 option to set the correct pad byte value.
Note that the hex file has a Unix-style end-of-line character (carriage return) and not a DOS-style carriage return/newline. If this confuses your programmer, the hex file can be converted to DOS format with the Unix2Dos command, or it can be modified with a text editor.
A simple Arduino beacon sketch is included in the cw2hex source code file, See my 28 Mhz Beacon project for an example of an Arduino beacon controller that runs a 5 Watt CW transmitter on the 10 meter amateur radio band.
To make your own Arduino beacon controller, run cw2hex -c and enter your custom message. The -c option causes cw2hex to produce a comma-separated data (CSV) file called cw.csv instead of the normal cw.hex Intel hex file. Edit the CWBeacon101.ino sketch and change the data in the msgtable array to the hex data from the cw.csv file. The trailing number in cw.csv is the decimal byte count, this should be used to define the size of the msgtable array in the Arduino code. Leave this number out of the msgtable array.
Load the edited CWBeacon101.ino code into the Arduino IDE, compile and upload the code to the Arduino. The Arduino code will output the Morse code and control signals on the Digital 8 through 11 pins. This code has been tested on an Arduino Diecimila and an Arduino Uno and should also work on an Arduino nano.
The C source code, Unix/Linux Makefile and Arduino beacon sketch are included in the cw2hex.tar.gz file below. Under Ubuntu, Linux Mint and other Debian-based Linux distributions, you may need to install the build-essential package to get the gcc C compiler and related utilities. You should then gunzip the tar.gz file and run tar -xvf on the tar file to extract the source code. Once you have extracted the source code, run make to compile the program.
I had some reader feedback regarding the compiling of this code on Windows using Turbo C version 4. Note that this is a very old compiler. Turbo C does not have the unistd.h include file which defines the getopt function. A Turbo C getopt.c file (below) will solve the problem. Change the cw2hex.c line from #include <unistd.h> to #include getopt.c and the code should compile correctly. With that version of getopt, the -c option becomes /c.
My Smooth Tone Clickless CW Sidetone Generator circuit can be used with this circuit, just connect the collector of Q1 to pin 2 of the sidetone generator's 4N35 opto-isolator LED cathode.
Back to FC's Ham Radio Circuits page.