Spider Keyer (Arduino Nano CW Keyer)

Why "Spider" Keyer? If you do contesting you know that there is never enough place on the table. This keyer was designed so small and lightweight that it can hang on the cables somewhere behind the table. In the same way as a spider hangs on its web. For the small size it is suitable for SOTA and similar activities as well.

Spider Keyer was mainly developed as a companion to HamRacer logging software.

The code was inspired by the work of Anthony, K3NG. If you wish to have a full-flesh keyer with a list of features several pages long then go to his page:

On the contrary, I wished to develop something very simple that (almost) anyone can understand and modify. Spider Keyer can only:

Spider Keyer sketch (source code for Arduino Nano)

Compared with Anthony's code it brings enhancements:

Manufacturing PCB.

Manufacturing the front and rear labels.

PCB, top view, with Arduino Nano attached.

PCB, bottom view.

Front view.

Rear view.

Connected to PC.

Used stand-alone. To source the keyer use any
mobile charger (5V via USB).

PCB - parts side, x-ray view   PCB - cuprum side   

SprintLayout files: PCB   Front and rear labels

Schematics   Sketch (source code for Arduino Nano)

To burn the above source code (the sketch) into your Arduino Nano, download and install freeware Arduino editor from here:

The aluminium box is: HAMMOND HA1455C802.

Commands that can be sent from a controlling PC application

To communicate with Spider Keyer set a COM port to: speed 57600 bps, no parity, 8 data bits, 2 stop bits.
Each command consists of two consecutive bytes. Byte1 determinates the command, Byte2 carries optional data.

Buffered and immediate commands

The unit stores the command into an internal buffer when it is received. It is the same buffer where it stores characters to send. It is executed when it is its turn while playing the buffer.
If the command is preceeded with byte with the value 27 (Esc) then the command is not stored into the buffer but it is executed immediately when it arrives.

For example, the command CMD_SPEED_CHANGE can be used in the two ways:

Startup commands

Some of the commands change values that the keyer will use until it is changed again or the keyer is restarted (typically the lead time). You will probably send a sequence of these commands once right after connecting to the keyer.
Hint: after connecting to Spider Keyer you may first send a sequence of startup command and, as a last item, you enable sending the reporting bytes (see further).

Implemented commands to be sent from PC
Byte1 Byte2 Meaning Referenced as To be used Default
1 0: PTT OFF
>0: PTT ON
Switch PTT on and off.
Low level function, you will use rarely, if ever
CMD_SET_PTT Immediate 0
2 0: Key up
1: Key down, don't toggle PTT
2: Key down and toggle PTT (incl. lead time)
Push the key or release it.
Low level function, you will use it rarely (such as tuning PA function)
CMD_SET_KEY Immediate 0
3 CW speed in WPM
0: clear the buffered speed change
255: set to speed determined by potentiometer
Used in range 15...40. The range can be changed in the sketch. CMD_SPEED_CHANGE Immediate
determined by
4 Lead time in 5 mSec steps Time between PTT is set on and the first dot/dash is transmitted CMD_SET_LEAD_TIME Immediate
30 mSec
5 Tail time in 5 mSec steps Time between last dot/dash is ended and PTT returns to off CMD_SET_TAIL_TIME Immediate
5 mSec
6 Hang time in word lengths Time, in percent, of a word length before it is switched to RX
when sending by hand
7 Weighting 50 means normal weighting. Set to slighly higher value (e.g. 55) to make the dots/dashes bolder, and vice versa CMD_SET_WEIGHTING Immediate
9 0: paddles don't trigger PTT
>0: paddles do trigger PTT
Determines whether manual sending will trigger PTT.
For extremely long lead times you may need to switch this off.
1 (on)
10 Pitch of the side-tone for automatic
sending, in 10 Hz steps.
0: side-tone is switched off
This is the sound emitted by the buzzer on the PCB CMD_SET_SIDETONE_AUTOMATIC Immediate
11 Pitch of the side-tone for manual
sending, in 10 Hz steps.
0: side-tone is switched off
This is the sound emitted by the buzzer on the PCB CMD_SET_SIDETONE_MANUAL Immediate
12 0: Curtis-A (no dit/dash buffers)
1: Curtis-B (paddles buffered)
1 (Curtis-B)
14 Any Breaks automatic transmission CMD_BREAK_IMMY Immediate n/a
15 Any Software reset of the unit. All values return to "factory defaults" CMD_RESET Immediate n/a
16 Any Retrieves two status reporting bytes from the unit CMD_PING Immediate
17 Any Retrieves a short textual information from Spider Keyer.
Serves as a confirmation that the proper sketch was burned
into the unit (Arduino Nano).
18 Any Emits a short high-pitched beep by the buzzer on the PCB.
Can be used as a confirmation that serial communication works both ways.
CMD_BEEP Immediate
19 0: don't send the status bytes
>0: do send the status bytes
Determines whether the unit will send the two status reporting bytes or not. For example, the unit sends these bytes when the user rotates the Speed potentiometer. CMD_SET_FEEDBACK Immediate
0 (off)

Reporting bytes

The keyer can send back reporting bytes. This way the unit can inform the controlling PC application of some events. For example, the user changed the speed by rotating the speed potentiometer. For each event it sends two consecutive bytes. The sending reporting bytes must be enabled first by the command CMD_SET_FEEDBACK. The command CMD_PING retrieves the reporting bytes unconditionally.

For example, if the controlling PC application needs to learn when the sending is over it must trap bytes with bit 7 set (which indicates that it is the first reporting byte). If both bits 4 and 5 are cleared in this byte it can be reliably assumed that no transmission happens any longer.

Reporting bytes
Byte Bits Meaning
bit 7 (MSB) always 1
bit 6 not used (reserved)
bit 5 0: no characters in the buffer
1: one or more characteres buffered
bit 4 0: PTT is currently OFF
1: PTT is currently ON
bit 3 0: Key is currently up
1: Key is currently down
(to reduce number of reporting bytes this works only for
the command CMD_SET_KEY)
bit 2 not used (reserved)
bit 1 not used (reserved)
bit 0 (LSB) not used (reserved)
bit 7 (MSB) always 0
bit 0 ... 6 0: the speed was changed by immedate command CMD_SPEED_CHANGE
>0: the current speed in wpm if it was set by rotating the potentiometer


< Other Projects
<< Return to Main Page