Monday, March 15, 2004

Hardware: The K8 Iambic Keyer LARC Amateur Radio Club Project

 

NOTE: The kit mentioned is NO LONGER available, this information is for Reference only.
 
At the Thursday Jan 8th Meeting Eric Pierce VA3EP presented Ham Radio Applications of PIC Single Chip Microcontrollers. At that time Eric proposed a "club project" of the single chip K8 Iambic Keyer.
 
For those who do not know, a keyer is an electronic circuit that hooks up to a morse code Iambic (dual-lever) Paddles (NOT INCLUDED with our parts kit) which automatically creates accurately timed dots when the paddle is pressed to the right, and dashes when the paddle is pressed to the left. When the paddles are squeezed together the keyer sends alternating dits and dashes (this is the iambic part). Using a paddle and electronic keyer, you can send nearly perfect code after a lot of practice. Some hams recommend never using a straight key, but to learn sending from the start with a paddle. Here is a good article on learning to send morse code with a paddle and keyer (PDF).  Read this if you are curious about the difference between Iambic Mode A and Mode B.
 
The K8 keyer that we are building also has a memory preprogrammed with your call for sending CQ, and a bunch of other features. Before going any further, download and read the K8 keyer manual  (needs PDF viewer). You will need this to operate the keyer. Note that the schematic for the keyer for our project uses an 18 pin PIC chip (not 8 pin) so our schematic is different.
 
Here is the K8 PIC 16F628A K8 source code and listing file modified for the 16F628A by Eric Pierce. (Don't worry, this is just for reference only, Eric will be programming the pic for you, so you do not even need to look at this unless you are interested).
 
K1EL 8 Iambic Keyer web page, you can read more about the keyer, for reference only you can get the source code for the keyer for the PIC 12C509A or PIC 16F84A chips.

If you purchased the complete kit, here is what you got in the ziplock bag, make sure you have all your parts before you start. (Eric still has a couple of kits available, email him if you want one):
  • 16F628A PIC chip programmed with the software program, your callsign and other configuration defaults.
  • 0.01 microfarad bypass capacitor
  • 4.7 K ohm resistor
  • 2N2222 transistor
  • piezo speaker
  • push button switch
  • perf board
  • chip socket
  • battery holder and battery clip
  • 1 piece scrap solid wire
  • 8 pieces of scrap stranded wire
 
 
To build the kit, you need a small pair of diagonal cutters, small needle nose pliers, small tip soldering iron and fine solder. If you are not familiar with basic construction techniques and soldering, read the relevant parts of this first and practice soldering on some of your own scrap wire first.

Here is the schematic and parts pinout, top of finished board, bottom of board, details of battery holder modifications and the finished project (click each pic for larger, you probably want to print these out for reference):
 
Step by step of assembly. Note that layout is not critical, but the layout shown above and described below works ok. IF YOU SEE ANY ERRORS please email me so I can correct them.
  • Mount the socket in the rows shown, with some pins bent in and others out as shown on the bottom picture. Note that the small notch in the socket goes to the end facing the holes for the puch button
  • Mount the push button as shown, carefully bending over the tabs to hold it on
  • Using a short piece of bare solid wire, create a "bus" on the left and right edge of the bottom of the board (push a bit of the ends of wire thru the board and bend over at top to hold them on)
  • Mount the 0.01 cap and solder between the 2 busses
  • Solder a bare solid wire from pin 5 to the gnd (right looking at bottom) bus
  • Solder a bare solid wire from pin 14 to the positive (left looking at bottom) bus
  • Solder a bare solid wire from pin 4 to the positive bus, routing as shown
  • Solder an insulated solid wire from pin 13 to the top lead of the push button, routing as shown (do NOT apply too much heat to the push button, as you will melt the plastic and it won't work (yes, I did this once))
  • Solder a bare solid wire from the other lead of the push button to the ground bus
  • Mount the transistor as shown (make sure that it is mounted level with or below the shoulder of the switch bushing, so that it will not hit the surface the switch is mounted through) soldering the emitter to the ground bus (do NOT apply too much heat)
  • Mount the 4.7K resistor as shown (note that the resistor is on the top of the board "straddles" the pin 5 to gnd wire). Solder one end to pin 6 and the other to the base of the transistor
  • Strip and tin 5 short pieces of stranded wire and one at a time push through from the top of the board and solder the ends to pins 8, 10, 11 of the PIC, to the collector of the transistor and to the positive bus
  • Strip and tin 3 more short pieces of stranded wire and one at a time push through from the top of the board and solder to the ground bus as shown
  • Solder the black lead from the battery clip to the ground bus as shown
  • Modify the battery holder by soldering a piece of stranded wire from the spring in one row to the spring in the other row as shown in the picture (NOT the rows where the clips are). This is necessary as the pic runs on 3 AA cells, not 4
  • To easy in checkout, you can use bits of masking tape to mark each wire (ST pin 8, DIT pin 10, DAH pin 11, TX, +, GND, GND, GND)
Checkout:
  • DOUBLE check ALL of your wiring against the layout pictures and the schematic
  • DOUBLE check for shorts between pins and wires
  • Carefully insert the PIC chip into the socket, orienting pin 1 as shown. Make sure that the pins are all lined up first, press very gently to get the legs started in the holes and then press home firmly. Be VERY CAREFUL to line the holes up as if you bend a pin over, you will probably break it off trying to straighten it out
  • Connect the piezo speaker (by twisting the bare wires) to a wire from the ground bus and the wire from pin 8. Be CAREFUL with the wires soldered to the piezo speaker, they break off very easily (yes, I did this. I soldered it back on, but would not want to do that too many times as piezos are heat sensitive)
  • Connect the wire from the positive bus to the red wire on the battery clip (you can solder a switch here during the finishing phase)
  • Insert 3 fresh AA batteries into the holder (not in the slot where the wire jumper is)
  • Connect the battery clip to the battery holder
  • If you have done everything right, the piezo speaker should emit morse code R (di dah di). If this happens, proceed, otherwise unplug the battery and go back to the start of checkout
  • Touching the wire from pin 10 to a wire from the ground bus should send dits
  • Touching the wire from pin 11 to a wire from the ground bus should send dahs
  • If the above step worked, press the push button very briefly, the keyer should send the default CQ message with YOUR callsign.
  • Push and HOLD the push button until it emits and R (di dah dit). This is command mode where you can send commands to the keyer in morse from the paddles (which are not connected). If you wait it will get tired of waiting and send a ? (di di dah dah di di) and return to normal mode
  • When done above, try this. Carefully hold the bared ends of the wires from pins 10 and 11 between your finger and thumb, with the bare ends sticking out a bit. Take the bare end of a wire from ground and place it between (but not touching) the above 2 wires. Now moving it back and forth between the other 2 wires and alternately touching and holding it to them will produce dits and dahs.
  • If you can do the above, try pushing and holding the push button (with your pinky of one hand, or maybe your nose). When the keyer emits and R then send a P with the wires (di dah dah di). If you can successfully do this the keyer will enter practice mode and send random characters until the pin 10 or 11 line is grounded 
  • You can test the transmitter keying circuit by connecting the cathode of an LED to the Key wire (collector of transistor), and the anode of the led to the positive bus through a 330 ohm resistor. The LED should blink when you key (but not in command or practice mode)
Finishing up the project
  • Even with the tabs bent firmly, I found that the switch and circuit board wiggled a bit so I put a couple of drops of super glue around the base of the switch to make it more solid
  • Solder on a mini stereo jack for the keyer to plug into, a ground wire to common, pin 10 wire to the tip (the dot (left) paddle) and pin 11 wire to ring to the dash (right) paddle
  • Solder on a mini mono jack for the keying line to the TX to plug into, common to a ground wire, tip to the Key wire (collector of transistor)
  • Solder a small SPST switch between the positive bus wire and the red wire from the battery holder
  • Find a small METAL project box (for RF shielding) box that everything will fit into (dry fit before drilling holes to be sure)
  • Drill a hole in the top of the box for the pushbutton (and attached board), the on off switch, and the 2 mini jacks
  • Drill holes to let the piezo sound out
  • Mount everything inside, you can mount the piezo speaker inside with small metal clips or glue
  • Optionally, you might want a SPST switch in the line to the piezo speaker (just the hot lead) to turn the tone off when not wanted, or mount another jack for headphones
  • If you are using the keyer with a transmitter and find that the transmitter interferes with the keyer (causes it to send extra characters, go into command mode, reset) then try bypassing the DI, DAH and Xmitter Key lines to ground with 0.01 or 0.1 microfarad capacitors, preferably at the jacks where the leads come into the box
 
Eric Pierce VA3EP - See the Disclaimer in the Introduction

© Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", 1952-2099. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", with appropriate and specific direction to the original content.
 
 
 

4 comments:

  1. Hello .

    My name is Hugo Sergio - PY4BIE .

    I rode the K8 with PIC16F628A but I'm not getting compliar ASM FOR PIC .

    Poe could send e- mail HEX paragraph K8 with PIC16F628A ?

    hugodf@bol.com.br

    tks , 73/51

    ReplyDelete
  2. Thank you for posting this. Also great 73 to K1EL who I believe released the code for K8. I could be wrong.
    I was looking for a source code for Iambic keyer for a friend who still has ETM-3 keyer but does not have a rig to practice his nostalgia :) so I modified his ETM-3 with a oscillator (buzzer).
    Anyway, when I tried to build this code it returned an error in line 802 (label: CONFIG). I guess that is a reserved word in MPLAB so I just changed it to something else. I also changed another occurrence of the label CONFIG at line 1032. I made them both the same and it did compile. I was able to burn the chip.
    This just for someone who stumbles to this code and has a same error as I have. I am by no means a programmer, let alone assembly coder, but it worked.

    ReplyDelete
  3. Thanks for the input, and yes, the original open source code was from K1EL.

    I happened to have a batch of 16F628A so modified it for that, it was originally on an earlier version of the PIC.

    I am not surprised that there were minor issues with the latest version of MPLAB, as I have not touched the source in over 10 years!

    ReplyDelete
  4. Alguém disponibiliza o código em formato hex para o pic12c509?

    ReplyDelete