Simple CW Keyer
Description
This is a simple and small CW keyer project. It uses an ATMEL ATtiny 2313
(Atmel's
ATtiny2313 page)
microcontroller, which is a 20pin device with 2k flash memory. The firmware
is written in C and uses less than 1k. The pin count would allow for the use
of a 8 pin device but the 2313 was simply the part at hand...
Four pins of the microcontroller are used as inputs. Pullup resistors are
provided by the microcontroller internally. Two pins are used
by the paddle, the remaining two are connected to a button each, the speed and
the tune button. Pressing the speed button while simultaneously pressing
the right (left) lever of the paddle will increase (decrease) the keying
speed by 1wpm. Each time you change the keying speed the keyer will output
"dit-dah" in the corresponding speed. At 20wpm it will output "dit-dit".
The tune button just keys the transceiver while pressed to facilitate
tuning.
Two pins are used for output. (Use one for e.g. a LED.) Output pins are
high while key is down. Use a transistor (e.g. BC547) or FET (e.g. BS170)
to key the transceiver.
The whole thing is powered by two 1.5V AAA cells. The circuit draws around
350uA when not keyed and about double when keyed. On top of that add the
current drawn by the LED, when you have one connected. A battery capacity of
about 1000mAh and an average current of 500uA leaves us with an operating
time of 2000 hours (more than 80 days). This should last quite some time
provided you don't forget to switch it off after use.
Schematics and Images
The schematics is a very rough sketch. All values given have worked for me.
Direct Keying without Transistor
My first breadboard version actually used no transistor at all. The AVR has the capability of Tristating the input. Therefore it was possible to key the transceiver by switching between output and input. While in output mode the pin is driven low, ie grounded and while in input mode it is tristated. This can be accomplished with writing one bit in the DDR register of the AVR and worked perfectely with my FT-817. In the case of the 817 the keying voltage is 5V and when keyed a current of 500uA will flow. Almost the same conditions where found with my old IC-745. However in favour of robustness I put in the transistor.
Some Pointers
- Atmel's AVR homepage. http://www.atmel.com/products/avr
- WinAVR: GCC toolchain for the Atmel AVR series. WinAVR integrates nicely with Atmel's AVR Studio. http://winavr.sourceforge.net/
Firmware
29-Dec-2007: version 1.0 [C Source] [Intel Hex File] [Source+Hex zipped]
License
The above firmware is licensed under the MIT-License:
Copyright (c) 2007 Michael Wichmann
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.