(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 processor can also be used in place of this circuit, that eliminates the need to build the circuit and program an EPROM.
The EPROM version of the controller can output either a one-shot message such as "CQ CQ CQ DE W0RIO", or a repeating message like "[tone] DE W0RIO/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 only used for sending a repeating beacon message.
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.
Note that the above circuit board photo differs from the circuit in the schematic. That device was activated by a digital clock to produce a Morse code wake-up message. A 5V power supply and a 555 timer sidetone oscillator were added, the keyer relay was removed and the EPROM was changed to 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 output an 11 bit binary count. This sequence is used to step through the addresses on EPROM U3. Morse code data is stored in the EPROM d0 bit, it is used to turn on and off Q1 and RL1, the keying relay. At the end of a one-shot message, a single on-bit arrives on U3 pin d3, causing the run/stop flip-flop to turn off and reset the U2 counter to zero. D1, C2 and R4 cause U2 to reset when the power is applied. R5 protects the U3 d1 line from being shorted to +5v when the stop switch is pressed.
The Osc. Enable signal is used to turn a beacon's oscillator on and off for beacons that have separate oscillator and keying signals. The FSCW bit is optional, it can be used to modulate an 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 (see below). 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 drives a small transmitter on the 10 meter band.
To make your own Arduino beacon controller, run cw2hex -c and enter your custom message. Edit the CWBeacon101.ino file and change the data in the msgtable 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.
Load the edited CWBeacon101.ino code into the Arduino IDE, compile and upload the code to the Arduino. The Arduino code sends the signals out of the Digital 8 through 11 pins. This code has been tested on an Arduino Diecimila and an Arduino Uno.
The C source code, Unix/Linux Makefile and Arduino beacon sketch are included in the 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 unzip 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.