The K3NG Arduino CW Keyer

Updated 2023-04-22


This is an open source Arduino based CW (Morse Code) keyer with a lot of features and flexibility, rivaling commercial keyers which often cost significantly more.  The code can be used with a full blown Arduino board or an AVR microcontroller chip can be programmed and used directly in a circuit.  This keyer is suitable as a standalone keyer or for use permanently installed inside a rig, especially homebrew QRP rigs.  It’s open source code so you can fully customize it to fit your needs and also perhaps learn from it or find coding ideas for other projects.  A circuit board and parts kits called the nanoKeyer is available from DJ0MY, Hamshop offers a kit called Open CW Keyer , RemoteQTH offers the Open InterfaceThe Mortty and the YCCC SO2R Mini also run this software.  Please do not directly email the software author for support.  Consult this page for code support information.

Various tutorials, demonstrations, and development news updates can be found on the Radio Artisan YouTube channel and numerous implementation demonstrations and how-to videos are on The YouTube.

Main Features

 Some videos featuring the keyer:

k3ng keyer

Basic Schematic 

A Fritzing breadboard plan of the keyer

KF4BZT Article – Good information for new builders!

DL1SMF Keyer Project (English Deutsch)- Stefan has details on his hardware which is pin compatible with this software and his own software.

Jeff, AC0C, wrote of his efforts to find a CW keyer with an “Old School Feel”.

Barry, ZS2EZ, published a web page on his K3NG CW Keyer build, including a schematic and PC board artwork.


Authoritative documentation is located in the Github Wiki.

Numerous helpful videos can be found on YouTube.

The Code

Source code is located on GitHub .  Click the Download Zip button on the lower right to get all the code in a ZIP file.)

Older code versions can be found here.  Click the commit you’re interested in, click Browse Files and you will find a Download ZIP button that you can use to download that particular git commit / version.

370 thoughts on “The K3NG Arduino CW Keyer

      1. Hello all
        Just completed a nanokeyer but can’t seem to download the “Firmware Upload Guide”.
        Any known issues or suggestions for an alternate source?

      2. Hi Robin. Where are you attempting to download it from? Upgrading the firmware isn’t too difficult, it’s the same way you would upload a new sketch to an Arduino. You have to select the appropriate features and options in the source code, per the instructions on this page.

      3. Oh I am trying to download from k3ng

  1. Can you put the source in a zip file. I can’t copy/paste the source correctly.


  2. This is AWESOME!. Many thanks for sharing! I never knew how much you can pack into this little Arduino!
    I copied the code and it works perfect.

    vy 73 de Hermann AJ4ZS / DL8MCP

  3. Great project. Looking forward for the first experimental Winkeyer emulation mode :-) 73 de DJ0MY

  4. At last !
    Any useful ham application for Ham Radio for the Arduino. Been doing some tries myself but your code rock… Great job… Also looking fwd to the Winkeyer “mode”.. Have a Winkeyer thru my microHam today but I like to run things remote some times.
    Keep up the good work

    73’s de Mats

  5. If I were to run this as a USB-only keyboard keyer – apart from not connecting all the other paddles and paraphernalia – you wouldn’t see any problems running this just as a cut-down keyboard only device?

    1. You can’t connect just a keyboard to it (you still need a computer with a terminal program connecting to the COM port), but yes, it will function fine without a paddle as all the commands needed to control it are available in the command line interface.

      If you’re looking to just connect up a keyboard directly to the Arduino (computer), I can probably have that functionality in the code in pretty short order. Let me know if that’s what you’re looking for and work something up :-)


      1. Thanks — I thought as much, but wanted to check. And no, I’m not interested in connecting a USB keyboard directly, even if the Uno’s potential for HID is there.

        73 de VA3PID

  6. Hi Anthony, is there any progress on the Winkeyer “emulation” – are you still intending to work on it?

    1. Hi Oscar. Unfortunately there is no new progress to report. I’m still going to try to get the emulation working, but I have submitted a feature request to N1MM for functionality to support “generic” external keyers.

  7. Tony —

    Just finished assembling my version of your arduino keyer.

    It is amazing, thanks for the leads, I’ve made a few changes that better suit my needs, not sure
    if they are improvements as much as tailoring… like a custom suit of clothes. Still it all came
    from your base, thanks. I’ll send you my minimal changes as well as photos of completed unit
    once it is mounted.

    Thanks again!



    1. Hi Art. Good deal! Please do send me your customizations. If you see a need for them, undoubtedly someone else will as well and I may be able to incorporate them in as options. That’s the great thing about define statements and modular code; you can add and remove options easily at compile time.

      Thanks for dropping me a note. I like it when people can benefit from the code!! :-)


  8. Please take a look at the K1EL “OpenQRP” project. Steve has created a complete 40M transceiver using an Arduino CPU with all his famous K1EL WinUSB keyer features and system control functions.

    dit dit
    72/73 de Ken N9VV
    CFO #287

    1. Hi Ken. When you mentioned the OpenQRP project to me back in March I joined the site and also offered to volunteer some coding time to the project. No one has taken me up on my offer, but my offer still stands. It looks like a good project.

      I should mention that it’s not my goal here to compete with the Winkey or any other keyer project. I just like the Arduino and coding, and I wanted to implement my PIC keyer on the Arduino platform. The project took on a life of its own and it does much more than my PIC keyer project did. Admittedly I think I’ve become addicted to the Arduino.


  9. Hi Ken and Goody,

    from what I can read on his site K1EL has so far only implemented his keyer code (from his stand alone keyers like the K12) into the QRP-Radio firmware…not the Winkeyer.

    The reason is simply because his current QRP hardware does not forsee a RS232 serial port or USB port for external connection to computers (would be a nice addon, though).

    73 Oscar

    1. I’ve been too busy coding software to lay out any hardware :-) Since the Winkey interface emulation is pretty much done, I’m going to focus on the PS2 keyboard feature for a bit and after that I think I’ll design a keyer shield.

  10. Goody and team,

    I used ugly construction on a proto-shield for my effort and plugged that into a Arduino Uno board, when I get sometime, I may try a custom layout from PCB express.

    I did order a box from Mouser p/n: 546-1455N1602BK Hammond Enclosures, Boxes, & Cases 6.3 x 4.06 x 2.09 This is an aluminum box with plastic end pieces and works very well.

    Since I only have a single rig, I only connected up a single transceiver line. Also, later I’ll either post a link to the mouser bom or paste a copy of it here.

    Wow the keyer works great!

    Goody, thanks for putting this out there.



  11. Can you post some pics when you get it cut? Some people fret over the circuit and what is inside. I’m one of those that will use ugly, dead bug, etc and not care but fret for hours over the perfect enclosure. I’m planning on building two of these for 2 CW stations for use at a special event in October.

    Chris k4fh

  12. Thanks all for your kind words :-)

    This weekend I have another update coming out. The Winkey interface emulation is now 99% complete and I’m making major updates to the PS2 keyboard feature would should get it to the 95% completion level with CTRL key combinations to set most parameters and memory programming. Also with this update the number of memories can be easily changed at compile time and the PS2 keyboard will support up to 12 memories and the CLI will support 9. If anyone wants more memories supported with the buttons, let me know and I’ll work on a button MUXing scheme. I’m also going to find a way to support more transmitter lines and have it easier to configure at compile time. I want to be able to switch between multiple rigs in the shack without swapping cables.

    After this update I think I may work on the I2C and LCD display functionality I’ve been thinking about.


    1. Okay, is there enough room for all those enhancements :) I enabled the the practice feature last night and the IDE had an issue uploading. After sending some of the stuff it complained that the UNO had stopped responding. I think the compiled code was about 30k. Probably just an issue on my Ubuntu machine.

      I’ll have to merge your updates with some of my minor changes. In lieu of the practice feature you may want to add a command that will set key_tx = 0. This will allow folks to use the keyer as a practice oscillator. I guess the non-lazy person could just unplug the tx cable from their radio instead :). The result would be the same.

      On the muxing you could use one analog port and then use resistors. You could also use a 4051 multiplexor. I thought about changing the code to get more memories by adding buttons but the reality is that my case is going to be packed if I any more! At home I use a serial interface I built and CWType. In the field I use AA0ZZ. The AA0ZZ has 3 memories and I’ve never ran into an issue where that had not been enough. It is still good you are thinking of it so for others who want 20 buttons on a case they can have those.

      I’ve been enjoying playing with this thing and it is consuming much of my time.

      If you are using agle Cad and would like to share the file for the version that is on this page I would be interested in laying out a PCB for it.

      Chris k4fh

  13. New code posted. Note that the modified PS2Keyboard library files are posted here now, instead of just the code modifications. The modifications to add support for CTRL key combinations were getting too extensive to just list the changes.

    1. I’ve not plugged in my power supply in the UNO so this may be relieved. Everytime in Linux the port is opened it resets the Arduino. I’ve got WINKEYER mode set to default and I had to not say HI when using CWType. Could be related to timing and WINE but if it did say HI CWType would error that there was no response.

      I’ve almost got my enclosure complete and it looks good. I only had room for 5 buttons. Paid $2 for the case at a hamfest. Plastic so I hope this does not cause issues with lack of shielding. So far I’m able to TX at 20w in my shack.


  14. Hi Goody,

    I have not found the updated PS2Keyboard Libraries on your site.

    Looking forward to trying this version out. I still had issues with the last version and spacing in CW (very very long delay between words with the keyboard).


  15. Updated code and schematic posted. Multi-transmitter capability is now implemented using multiple PTT lines rather than multiple TX key lines, and the PTT line (now PTT line for transmitter 1) moved to pin 13.

    I’m currently working on button multiplexing using an analog pin and voltage divider resistors in order to free up pins for the upcoming LCD display functionality. This will also allow the number of buttons to increase. I’m thinking of up to 19 buttons total (one command button, 12 memory buttons, 6 LCD soft keys). The number of buttons would be optional, as would the LCD display functionality.

    Thanks to Oscar and Chris for ongoing bug reports and code improvement ideas. :-)

  16. I am seeing some issues with character sending on both paddle input and keyboard. I see that the cw speed starts out slow and speeds up slightly but noticeable, +2, 3 wpm. I am not sure what’s going on. Do others see this symptom? I’ll upload the new code later this weekend and see if it makes any differences.

    On another note, the issue with the “space” timing being so long (previous note able) was a result of the ATMEL chip being bad. I replaced the processor and the space timing issue went away.

    Also, I’ve added a simple serial LCD display to prior to the latest code. Seemed to work ok, just needed some additional formatting/scroll code. (By the way, I am using unmodified code during my testing with the timing issues stated above.)

    73, Chris

  17. Hi Chris,

    I had a similar problem with changing code speed. In my case it was related to a missing speedpot.
    I compiled the speedpot part although I had no speeedpot on my breadboard.

    After removing the speedpot option and re-compiling everything was fine.

    The latest keyer code works mostly fine here (but I do not use the keyboard – only winkeyer mode and paddles).

    73, Oscar

  18. Updated code posted. This code introduces analog line multiplexed buttons, so now up to 16 buttons (maybe more) are supported. This is to free up some pins for the upcoming LCD functionality and also provide more buttons for LCD display “soft keys”. Memory repeat can now be done without a memory macros (CLI: \! , PS2 Keyboard: ALT-Fx , or button hold + left paddle).

    If you want to continue to use the old buttons (one button per pin) uncomment #define FEATURE_LEGACY_BUTTONS . I don’t know how long I’ll continue to keep the old code in there.

    1. Wow, where are you finding the program space on the chip? Have you upgraded?

      I have purchased about $50 worth of goodies from Evil Mad Scientist. I’m going to build one out on one of their proto PCBs and then put it in an enclosure. I use CWType with winkey support but after reading a Winkey vs cwdaemon email on QRP-L I’m debating about modifying the circuit to support RTS keying. This would make the AVR chip functionally worthless but I’m thinking more on the lines of the RTS in the circuit being an option and not standard. The RTS line would key TX1. Of course it could be used on a digital input pin and then the AVR could key. Like a pass thru.


  19. I can’t fit everything into an Uno. However, I suspect most folks won’t want or need all features in one box. I still haven’t gotten a Mega, but now that I’ve freed up a bunch of pins for the LCD I’ll probably hold off a bit. But it will be cool to compile the whole nine yards sometime and upload it to a Mega…

  20. Mouser is having an on line sale of the Arduino Mega board. $46.55 Not a bad price.

    I have running a Arduino Mega Icom CI-V router / USB Interface / band decoder that cures problems for those who are running the ICOM PW-1 and a XCVR with a computer interface. Contact K9JM for Info

  21. Just got the keyer built as a simple USB serial TTY-to-CW unit. With careful wiring (and brute force and ignorance) I fit a speed control pot, two buttons and a simple piezo as a sounder into the standard Arduino project box – – with the wiring on a protoshield. Worked first time! Made a nice QSO with an operator in TN with Fldigi decoding his CW. Thanks!

    (Also: as an avid Hellschreiber user, we *have* to do something about that font you used …)

    73 de VA3PID

  22. This little section of the documentation is very important –

    Code Compilation

    All of the features will not fit on an Arduino Uno simultaneously. I find that when the compiled code goes over about 29K, the upload to the Uno will fail.

    Ran into this with a code size of 29004K and the error message is not very helpful…

    Changed my options and it works great.

  23. I was told by someone that the Uno bootloader has a bug that causes it be unable to receive a software load that’s larger that 28K or 29K, and there is a hacked/fixed bootloader that you can write onto your Uno to upload these larger loads. I have not researched this, your mileage may vary.

  24. Ah, yes, it was Chris who told me. Thanks, Chris. One of these days I have to download that and try it.

  25. Anthony,

    I am almost done with my own build using the EvilMad Scientist boards and Hammond enclosure. I think I’ve found a bug in your schematic. I’m using the July schematic and code. In Winkeyer mode when I use a paddle it seems to behave erratically. It works when I key but seems to lock up or shut down. I’ve added 1K resistors on D2 and D5 and this seems to fix the problem. I’m going to close the box up and try it out during a QSO. This is all new to me so I’m not sure what may be going on but I have an idea that too much current is being pulled and the low voltage protection that I’ve enabled in the fuses is kicking in and the chip is shutting down. You may want to modify the new schematic.

    Chris k4fh

    1. Are you powering this via USB or the coaxial jack? Does this occur when connected to a rig or just when using it “dry”? The D2 and D5 lines shouldn’t be able to load down the power supply as they’re just being pulled up with internal pullup resistors, probably on the order of 1K or more. Do you indeed see the V+ line getting loaded down with a voltmeter?

      1. I am powering via a DC coaxial check using power off the USB bus. What I have seen a voltage drop after this occurs. So far with the 1Ks I can’t seem to recreate this. I will also try with a straight key. I could also have a chip issue since this is one I built from the ground up. I can easily order another chip and program it.

  26. I have a question for all the users.

    What mode are you using your keyer in when operating on the PC? Currently I’ve programmed mine for WinKey. I have 2 computer keyers. I have a homebrew that uses DTR/RTS. Standard circuit. I have this one that I’ve programmed to do WinKey. I run Linux and use CWType. It can use either keyer. I’m curious if anyone is using the CLI method on their computer. I used it as I was experimenting with this and made a QSO, but my terminal program sends and erads in raw mode so it was cumbersome to use this way. I suppose if I modify my terminal program to send in line mode the keyer would not confuse me so much.

    I even debated about interfacing the RTS or DTR method with a digital pin so that if that method was required, for a program that did not support WinKey, it could be used.

    Just looking for usage comments.

    Chris k4fh

    1. I will add a feature tonight to toggle the CLI CW sending behavior between the current way (send characters immediately) and “wait for a carriage return” mode. It shouldn’t be too hard to do as I already have pause sending capability in the send buffer code.

      1. Is should probably send pic of my enclosed keyer

        Right to left:
        DC 5V

        The blue tack is holding the light pipe in place on the front.

        This has no buttons. I built this to be a computer keyer only. It does have paddle input so you could use as stand-alone but you would have no way via the paddle to program the memories. There is no side tone since all my rigs have a ST. but you could not get audio feedback from command mode if you were to somehow invoke it.

        I wanted to put a MAX232 on the PCB but there were not enough holes. I have plenty of USB PL2303 to TTL cables so I decide to use TTL as the interface to the device. Since I’m not using a boot loader I have no issues loading the whole code.

        I may add male headers that will allow me to use a jumper to go from CLI to WinKey. This would require a code modification and you would have to open up the Hammond enclosure to change modes.

        I spent more money and time than if I would have just bought a MasterKeyer but the ROI was education. I can quickly build specific keyers based on the code. In smaller enclosures.


  27. Well, while we’re sharing pictures:

    I may need to add a way of accessing the reset button, as from boot, neither my Linux box or Mac can create a TTY (= serial port) for the device.

    One weird thing is that the Memory #1 button seems to randomly cycle between any of the programmed memories. Dunno if it’s how I’ve wired it. The Command button mode works fine, if a little bouncy.

    Cheers for this design. Using fldigi to copy the incoming code, I’ve made several DX QSOs.

    73 de VA3PID

    1. The reset problem was because I was using a Duemilanove. When I swapped in an Uno, all has been sweetness and light.

  28. Hi Anthony, I’ve had two reports that my Hellschreiber output is illegible using your keyer. Both were used mid-QSO with experienced Hellschreiber operators. I thought at first it was the capacitor in the keyer circuit, but replacing that with a tiny ceramic made no difference. I’d be happy to help out testing, ‘cos I’ve intrigued several people with the idea of a Hellschreiber keyer.

    1. How are you keying the transmitter? Are you using the sidetone output going into the audio input of the rig (in SSB mode) or using the CW key line with the transmitter in CW mode? I could see where the squarewave output might not play well. Did the people who provided the reception reports take a screen shot of what the received signal looked like?

      1. I’m using the CW key line with the transmitter in CW mode. I got no screen shots from the contacts, but descriptions like slanted, smeared, timing off, and illegible. I had to switch back to Fldigi’s SSB Hellschreiber mode to maintain a conversation. I’ll try a screen shot request next time; there’s a QRO operator in Louisiana with whom I’ve traded screenshots before, and I can ask again.

      2. Sounds like a timing issue. I had to play with the timing a bit to get it to display correctly for me. For some reason the original values I calculated for the code didn’t work. I’m not sure why.

        If you fire up your Hell program and use your computer microphone to copy the hellschreiber from the keyer sidetone output, you should be able to see what it looks like and adjust the timing. Change the number in this line in the transmit_hell_pixel function:


  29. Why does WinKey need to do EEPROM writes. I saw a feature to disable that and mine is still disabled. At K4L I ran into an issue where N1MM would not work with ESM on my keyer. With ESM turned on you simply hit enter to send the macros. If you hit F1 to do CQ and get no returns you simply hit ENTER again. On my keyer I had to hit F1. We then installed the K1EL keyer and it worked fine. I’m thinking this has something to do with that feature, but I’m also wondering why it is even required and why it is so darn complicated. Why can’t N1MM simply send macros instead of putting the keyer in some form of state. I am back from St. George Island and need to do some more testing. I’m new at N1MM and do not use it regularly.


    1. Winkey changes some settings that are non-volatile settings, most notably the CW speed. By default the code doesn’t write to EEPROM, but if you enable strict writes it does. I’m not sure why anyone would want to do this, but the option is there. N1MM does a setup routine after initially connecting to the Winkey and each time you send a memory or activate the CW keyboard it sets a few parameters. So there isn’t really much of a need to store any settings when using Winkey.

      I’m not sure why N1MM ESM wouldn’t work. I would expect it does the same commands it does for memory sending and CW keyboard (CTRL-K). Can you get a capture of the serial port when doing N1MM ESM?

      1. In ESM mode you would hit F1 or enter to send CQ. This worked. What was strange was that after no caller hitting enter would no send CQ. I need to keep doing some testing.

    1. Do you have ASR (automatic software reset) disabled? I had problems with HRD and ASR activated. Does the keyer send random / errant characters upon connection? That tends to point to ASR screwing things up.

  30. Hi folks,

    I could replicate Chri’s problem, when ASR is enabled (= default Arduino config)

    I noticed that the keyer code would not send back a version number to N1MM during initialization and each macro (no matter if sent via the PC function keys or via ESM mode hitting return) is not terminated by a C0 status byte and therefore N1MM hangs because it is waiting for the transmission to end forever….

    As Goody ponted out you need to disable ASR, otherwiese the serial port communication is creating trouble…

    I tested ESM mode (with ASR disabled on the Arduino) with N1MM and it works perfectly well with the latest keyer sketch version….

    One easy way to disable the hardware based ASR (automatic software reset) is to put a 100-200uF electrolytic cap between the Reset and GND pins. This keeps the voltage up and doesn’t allow the serial port anymore to pull the line briefly down to reset the microcontroller. This way you do not need to cut PCB traces… ;-)

    This mod is also essential for using the keyer with other software such as HRD, etc.

    Only drawback of disabeling ASR is that when you upload a new modified sketch to the Arduino you need to reset it manually just within a second or so when the RXD/TXD LEDs start to flicker.

    73 de Oscar DJ0MY

    1. Oscar,

      I have abandoned using UNO for my keyer. I use the chip, 16mhz rock, caps, and a few other discrete components. My setup does not support ASR. My USB->TTL adapter is only using TX,RX, and GND. There is no way I could reset the keyer when I connect to the port.

      ESM works for me but this is what fails.

      Hit enter to send F1. This works
      Hit enter to send F1 Again. This does not work.

      If I replace this keyer with the K1EL WinKeyer USB then the above DOES work. I have not been able tro track down what is causing this behavior. This keyer works fine for CWType. It will not work with CQRLog.

      I have an ATmel ISP serial programmer that I use on my build.

      This is what I’m using

      #define CODE_VERSION “2011080501”

      Chris k4fh

      1. Oscar and Chris, when the problem is present, when the program attempts to connect to Winkey, do you hear a “boop beep” from the keyer? That indicates that it received a connect request and it has initiated the connection. If it doesn’t think the connection is up (no boop-beep), it won’t send the version number or C0 bytes. If you’re having connect problems or it is connecting but you’re still experiencing issues, and serial port capture would help me troubleshoot it.

        BTW, I posted updated code. There haven’t been major changes, just little items here and there.

  31. Chris,

    my ESM works as it should with the latest sketch (not the one that Goody just uploaded, but the previous revision). I only need to disable ASR….

    If I hit enter, the F1 text is triggered (CQ)
    I leave the call sign box empty and hit enter again and CQ is triggered again….
    This goes on again and again every time I hit enter……….
    When I then type a call signt into the call box and hit enter the call + rst is sent….etc.
    (just as the ESM mode should be…)

    If your homemade board doesn’t support ASR this clearly can’t be the issue…
    I would try to re-program with the newest sketch and do some serial port sniffing if the problem persists.

    I suggest to use the Freeware Serial Port Monitor and monitor the data streams. This helps Goody a lot with debugging…

    73, Oscar DJ0MY

    1. I was afraid of that. I’ll do some more work. Using the latest sketch may require me to make a few changes to the code. I’ll check and see.

  32. Is there anyone here that is building a keyer “in the raw” using this code? If so, I would like to team up so we can discuss ideas without bothering Anthony. If interested please send me a message.

    Chris k4fh

  33. I was able to test N1MM ESM successfully this evening. I haven’t had a serial monitor for awhile as the free trial one I was using ran out of time and disabled itself. So, I fired up a virtual machine running XP and installed the serial port monitor Oscar recommended (unfortunately it won’t run in Windows 7, so I had to get an XP box somehow). Any ESM works fine for me. Looking at the serial port conversation, N1MM sends the same bytes as if you were hitting the keys without ESM.

    Perhaps soon I can breadboard a “bare chip” circuit to test that out.

  34. Hi Goody, *PLEASE* *PLEASE* work with Steve K1EL to incorporate your keyer in his new kit. I just finished my Beta kit and it is simply a wonderful rig. *BUT* It really needs the WinKey style keying with features and adjustments that you have created. Please contact Steve and work out some schedule for incorporating your amazing new code in his Arduino.
    thank you,
    72/73 de Ken N9VV

    1. I’ve already been in contact with him; I’m half of the way through building my beta kit and should have it completed this weekend.

  35. Hi there,

    just a quick photo of my perfo-board version of the keyer based on Arduino Nano:


    This is a “PC-Keyer Only” version to replace my old LPT port keying cable with N1MM winkeyer mode….

    I am still waiting for my PCB’s to arrive from China to make a decent keyer, hi hi…

    Oscar, DJ0MY

    1. Oscar,

      I can not see the photo. I think a login is required on that site.

      I’m interested in what you’ve done. Would also like to know where you had your boards made. I laid out a PCB in Eagle CAD, but have not sent them off to be fabricated. I stumbled upon a vendor named ‘Evil Mad Scientist’ that sells proto PCBs for $3/ea. You see an example in the pic I posted of mine. I like their board, but it can get populated fast. On both sides of the chip are areas that you could install an IC. I wanted to install a MAX232 but there was not enough holes. I ended up just using TTL directly. TTL, Serial or USB, it is all the same to me :)

      I’ve been thinking about creating a “portable only” version of this keyer. The only issue I can see is that it is not possible to set memories from the paddle. I’ve been thinking about implementing the method the AA0ZZ keyer uses. That keyer goes into a record mode where you have 1s to send a letetr from the paddle. It beeps between those seconds. If you want a space you simply do not send for that byte. To stop recording you hit the command button. Seems to be a good method.

      If you want to contact me directly you can look me up on and my email is in my profile.

      Chris k4fh

      1. You can set memories using the paddle in command mode with the P command (not command line, but command mode where you hit button 0).

  36. Chris,

    I used ITeadstudio from China for the PCBs….I will post some pics after thez have arrived (I just got the shipping notification mail from them)

    Try this new photo link:

    Nothing spectacular…

    On the upper part you can see the electrolytic cap to deactivate ASR mode on the Arduino.
    I love the Arduino Nano’s – they are soooo tiny.


  37. This is amazing work!

    Not being an EE, and having limited building experience, please allow me to post a question or two and expose my noob-ness :) .

    I’m not sure I understand the buttons – from what I can see, they don’t link to any particular analog pin. If I see this correctly, I have a 10k resistor (R7) that links to the 5v rail. On the other side of that resistor (between S1 & R7) I see a linkage to Analog1. The buttons run between the resistor stack (R7-R12) and ground. I can see how AN1 would see how S1 is pushed, but how does the Arduino know if any other buttons are pushed?

    Also, I see R7, but do not see Q5 or C7 on the diagram, if I wished to build a PS2 keyboard into the unit.

    Do I not have the right schematic? Have there been modifications? (I’m looking at schematic 2011081901)

    Thanks, and sorry!

  38. Scott, the analog buttons work as follows:

    The 5V is via R7 pulled low by the command mode switch (= pulled to 0 Volt level).

    When pressing a Memory switch they create via R7 + R8 (eventually +R9 + R10, series) a voltage divider. This means when pressing S2 you get aroun 450mV at AM1, when pressing S3 you get 850mV and S4 you get 1.1V etc. etc.

    By frequently reading the AN1 voltage (or equivalent ADC value) you can trigger the corresponding evnts. This is how it is implemented into Goody’s sketch.

    Forget about the comments above the PS2 lines in the schematic – its “leftovers”from previous revision, where Q5/C7 still existed…

    Oscar DJ0MY

    1. Oscar, thanks for posting an answer! I was on vacation the past few days and away from blogging…. 73

    2. Thanks for the great answer! I had to hook it all up to a multimeter, and was immediately able to see what you meant.

  39. Hi guys,

    just uploaded this YouTube video featuring my professionally made PCB based keyer hardware variant based on an Arduiono Nano plugin module and running the K3NG firmware….

    73 de Oscar DJ0MY

    1. Beautiful job Oscar!! just amazing use of the nano-Arduino board.
      I hope you will develop a webpage telling more details about your
      outstanding new creation.
      many thanks,
      73 de Ken N9VV

      1. Dean, see my reply posted further below (somehow it got at the end of the blog rather then listed as reply to this comment….

        Oscar DJ0MY

  40. I am too busy with work and family the next weeks, but if I find some free time (latest around Xmas) I will try to put some info together on a website…

    73 de Oscar

    1. You have done a remarkable job with your very professional PCB for the Arduino keyer. It is a wonderful combination of the Nano board, your board, and the open source Arduino code.

      I would like to design and fabricate an aluminum enclosure for your version of the Arduino keyer and make it available at my cost to the ham community. I’ll publish the CAD files too. Call it open source sheet metal! hi hi I believe that your PCB makes the keyer a very attractive home brew project and a nicely painted and labeled case would be the finishing touch. So, if you are willing to share in the dimensions of your board and the location of parts that must go through the cabinet, I can then design the enclosure and have 50 or so made.

      Do you plan on making the PCB itself or the artwork available to the ham community? Are the parts your chose readily available from DigiKey or Mouser, especially parts like the switches and connectors?

      72 and 73

      Steve Silverman

  41. Just wondering, should the resistors for the button selection be connected to ground at the bottom end?

    Regards, Joop PG4I

    1. No. That would drop the voltage on analog pin 1 and make the Arduino “think” there is a key depressed. R7 + R8, R9… act as a voltage divider. The voltage divider is activated whenever a button is depressed. Each button has a different voltage corresponding to it. This technique is used to “multiplex” multiple buttons on one line, saving lines for other purposes.

      1. Thanks for explaining. Will have a go at the new schematic and version in the near future. I am using the keyer right now in the CQWW CW. It is great fun!

  42. Also using the prototype from the youtube video above in the CQ WW CW contest right now as some sort of “real life test”… very nice with N1MM logger. Back to the contest now….(only casual style participation). The keyer is real fun, as Joop already points out.

  43. Not yet – still in beta testing phase with a few test builders and already found some potential improvements and bugs in the current PCB REV B, so very soon I would need to make a PCB REV C, hi !
    I will keep folks posted here, please be patient with me, as my free time besides my dayjob and family is very limited…

  44. I’m getting dozens of warnings at compile time with the code at:

    These are compiler warning so maybe I’m supposed to ignore them? Is this normal or am I screwing up? I’m an experienced embedded hardware/software guy with the 8051 and PIC but this is my first time using Arduino. I mean, it’s fairly idiot-proof: set board type (Uno), paste code, compile. Right?

    Here is some compiler output showing the crabbing it’s doing:

    Keyer.cpp:819:8: warning: extra tokens at end of #endif directive
    Keyer.cpp:1015:10: warning: extra tokens at end of #endif directive
    Keyer.cpp:2021:10: warning: extra tokens at end of #endif directive
    Keyer.cpp:641: warning: only initialized variables can be placed into program memory area
    Keyer.cpp:642: warning: only initialized variables can be placed into program memory area
    Keyer.cpp:643: warning: only initialized variables can be placed into program memory area
    Keyer.cpp:644: warning: only initialized variables can be placed into program memory area
    Keyer.cpp:645: warning: only initialized variables can be placed into program memory area
    Keyer.cpp:646: warning: only initialized variables can be placed into program memory area
    Keyer.cpp: In function ‘void check_memory_repeat()’:
    Keyer.cpp:1186: warning: comparison between signed and unsigned integer expressions
    Keyer.cpp: In function ‘void loop_element_lengths(float, float, int, byte)’:
    Keyer.cpp:2464: warning: comparison between signed and unsigned integer expressions
    Keyer.cpp: In function ‘void service_send_buffer()’:
    Keyer.cpp:3607: warning: comparison between signed and unsigned integer expressions
    Keyer.cpp:3613: warning: comparison between signed and unsigned integer expressions
    Keyer.cpp: In function ‘void service_serial_paddle_echo()’:
    Keyer.cpp:4892: warning: comparison between signed and unsigned integer expressions
    Keyer.cpp: In function ‘byte memory_nonblocking_delay(long int)’:
    Keyer.cpp:5639: warning: comparison between signed and unsigned integer expressions
    Keyer.cpp: In function ‘void play_memory(int)’:
    Keyer.cpp:5881: warning: comparison between signed and unsigned integer expressions
    Keyer.cpp:5927: warning: comparison between signed and unsigned integer expressions
    Keyer.cpp: In function ‘void program_memory(int)’:
    Keyer.cpp:6169: warning: ‘last_element_time’ may be used uninitialized in this function
    Keyer.cpp: In function ‘int get_cw_input_from_user()’:
    Keyer.cpp:2516: warning: ‘last_element_time’ may be used uninitialized in this function

    1. That’s not normal. What version of Arduino software are you using (click Help – About Arduino)?

    2. “warning: extra tokens at end of #endif directive”
      is resoned by the macro name that added the “#endif” directive. I.E.
      #ifdef NAME

      #endif NAME <– this is not allowed. Remove NAME that followed the #endif directive.

      "warning: comparison between signed and unsigned integer".
      A forced type casting should solve that message. The compiler does'nt know what kinda type of Variale (integer or unsigned integer) should be used.

      warning: only initialized variables can be placed into program.
      The compiler/linker must know how many memory should reserved in ROM section because a variable in ROM code area is not "variable". The compiler and linker will determine the memory consumption of the variable. This is impossible if the variable is declared but not initialized. The start address is known, but the end address of the variable is unknown at compilation time. So this is just a warning. I don#t understand why the copiler response with this warning in this case. I will try to fix them later but does'nt matters further.

      The GNU-Compiler don't like uninitialized variables. Most of the messages are resoned by this circumstance, but this is a code cleaning task, not more. N3KG wrote a nice formated and clean code. Many thanks to him to made this avaliable for all.That's not to be taken for granted.

      vy 73 de Gerd, DD4DA

      1. The next version of code I post will take care of most of the compiler warnings. One of these warnings is actually due to a gcc bug, however I’ve implemented a workaround to make the warnings disappear.

      2. The warnings are not so important – it looks just a little bit better at compilation time – not more.

        vy 73

  45. My Arduino install must be corrupt. I downloaded and installed the Arduino software again on a clean Windows 2000 virtual machine under VirtualPC 2007 and your sketch compiles perfectly without warnings. Sorry to bother you. (I keep these VirtualPC images just for such testing purposes.)

    Now I’m off to see if I can get the circuit to simulate under Proteus VSM.

  46. OK, I have my problem sorted out. It *is* your code throwing all those warnings from the compiler. In Arduino v1.0 go to File–>Preferences, and check the “Show Verbose Output During Compilation”. You’ll see all the compiler warnings the Arduino IDE has been suppressing. In my book, “Non-Verbose Mode” does NOT imply “suppress all pre-processor/compiler/linker warnings”! The IDE has the “Show Verbose Output During Compilation” unchecked by default. (So as not to intimidate the noobs with a bunch of scary compiler output, I suppose.) Anyway, you now know there is minor code clean-up to be done. Thanks for making your project available. I found my clone Duemilanove and will give your Sketch a spin tomorrow on real hardware.

    FYI, others have had issues with the IDE in this regards, see:

  47. Pessoal,
    Acesse o site da EMPRETECNET, eles fabricam um KIT com uma placa compatível com arduino duemilanove, uma placa de rele, de potenciômetro, de sensor de luz, de sensor de luminosidade, de buzzer, de botão e demais componentes que podem ser realizados vários experimentos sem a necessidade de solda. Qualidade excelente!!

  48. I’m wondering how you calculate your delays for automatic sending for Farnsworth spacing. They seem to be a bit fast…

    Do you calculate this using the ARRL calculations?

      1. For Farnsworth I basically have two WPM/speed registers rather than the normal one. For sending characters, the Farnworth WPM register is used for timing and for spacing timing the regular WPM register is used. If the Farnsworth WPM register is less than the regular WPM register, Farnsworth mode is disabled. With both timings normal unit ratios apply, and unit timing in mS is WPM/1200.

  49. Hi there!!

    I am a radio amateur, VE1HMY.

    I love you circuit. I have the arduino duemilanove. I am going to build this circuit myself, just to see how it works on my PC. I also want to start using paddles. This would give me a perfect opportunity to tray this out.

    I have a couple questions.

    When it comes to resistors 1, 2, 3, 5, and 6, I am assuming these values are in Ohms, not KOhms. Could you please verify?

    In regards to Capacitors 1, 2, 3, 4, and 6 are “.01” while C5 is “100”. Could you verify whether they are in milli/micro/nano?

    I am a Computer Electronics Technician, however my CAD skills are slightly rusty.

    I have a chance to pick the parts up over the next few days. Then I can build this beast!!!! I’m SOOOO looking forward to building a keyer!!!!

    1. Hello! Yes, R1, R2, R3, R5, and R6 are all in ohms. All the capacitors are microfarads (uF).

      1. Thanks so much for getting back to me. I kinda felt like it was a stupid question, yet, at the same time, I did not want to buy the parts to find that I blew up the board!

        Also, are your capacitors all Electrolytic?

      2. Are the switches all momentary in the open position when NOT depressed? Also, I’m guessing that the pot on R4 is linear.

        Again, I feel like I’m asking elementary questions, but getting the parts while I am where I am for a few days is imperative.

        I also attempted to read your source code…. AMAZING WORK!!!!!

      3. The capacitor types aren’t critical, however typically the 100 uF cap is electrolytic, and the .01 uF caps are disc ceramic. All switches are momentary and normally open. Linear would be a better choice for the pot, though it’s not critical.

  50. Have been using this for about a month on a large breadboard, and I LOVE it!

    However, I really want to put this onto a circuit board & into a box…but I lack the skills to do that at this point. Oscar – how is that board working for you? Any possibility of posting the eagle files, or similar?

    1. Hi Scott,

      the board is working fantastic.

      You may have missed this announcement by Goody?

      The CAM gerber files for making 100% identical copies of my PCB are on my site.
      Eagle files are not made available because I use custom part libraries.

      Here is a photo of my keyer built into enclosure:

      I am currently working on REV D of the PCB.

      73, Oscar

  51. Excellent!!! My Arduino Duemilenove is primed with the code!!! Now, once I get the parts, I’ll build this baby!!!! (and the iambic key to go with it….)

  52. Hi Michael,

    You can also use a non-iambic single lever paddle with this great keyer. You won’t get the squeeze modes, but single lever paddles work fine too and are a little less error-prone. Check out N0SA’s SL-2 for an excellent paddle. He also has an iambic model. For a kit single lever paddle, look at the American Morse Bushwacker.
    Steve Silverman

  53. Great stuff there !!!
    I have been looking out for a CW-keyer on ARDUINO that I can use for QRSS…. Here we go.

    Thank you so very much / SM0JZT / Tilman

  54. I have finally switched to the analog buttons interface. Voltages look okay, 0.454 with button1 pressed, 0.832 with button2 pressed, etc. However, can’t get any memory messages out of the keyer when pressing a button.

    I came across this bit of code:

    #define analog_buttons_number_of_buttons 4 //16
    #define analog_buttons_r1 10
    #define analog_buttons_r2 1

    I have 5 buttons next to the command button. So analog_buttons_number_of_buttons needs to be 5, but what about the other 2 variables?

    Thanks, Joop PG4I

    1. Hello, Joop. You are correct about analog_buttons_number_of_buttons needing to be 5. The other two constants are the values of the button voltage divider resistors in K (kilo ohms). analog_buttons_r1 is the value of R7 in the schematic, and analog_buttons_r2 is the value of the remaining resistors (R8, R9, R10, R11, R12, etc.) The code calculates the voltage values for each button at runtime based on the three settings.


      1. Thanks Goody,

        grabbed the newest code and replaced the 4 with a 5. Still a no go. It is weird… I can program memories okay. When using the command button and sending ‘P1’ plus text, I can recall the programmed memory by using the command button and sending ‘1’. Also, pushing the first button and holding it for a while it will say ‘TX1’, second button will say ‘TX2’. So this is correct. However, I can’t use the buttons for recalling the memory content.

        Will try and use #ifdef DEBUG next. It may be a fault on my side.

  55. Updated code posted. Command mode memory programming wordspace detection was improved and I added a feature to trim trailing spaces. I also updated the page with an explanation of the analog button settings.

  56. Hi Anthony,
    I like your code. It is an excellent piece of software. Thank you for sharing with us.
    I combine it with an Arduino Pro Mini (very small) and a P3 touch keyer electronic. This gives me a very effective small keyer with a maximum of features at a minimum of investment.
    Thank you your great work.

  57. Hi there,

    DL2SBA came up with some nice modifications for the keyer circuit.
    Among other things he found a clever waz to switch memory banks with using only few memory buttons.

    See his blog with schematics here (unfortunately only in German language, but the schematics speak for themselves)

    He also started modifying the sketch with some personal improvements and expresses ideas on how the code could be improved to probably result in a smaller compiled size which would allow more features at the same time….(again – just in German on his blog – no English)

    73 de Oscar DJ0MY

    1. Hi dear Oscar,
      i have checked up your nanokeyer project and would give you some notice about it. The Keyer code ist a great peace of source – i guess you aggree with me. did some local qso’s and talked about my work around it and some hams would like to get a keyer like this. We found out that your assembly contains not an Arduno-Nano,just the stuff around it .It’s would be a good idea to get some of them an put them preprogrammed into a package. remember, not all the cw operators are familar with microcontroller handling, programmung and got the knowledge of the processes they need to them running. Your keyer kit is a great thing – specialy the opto isolated keyer frontend. This would helpful.
      I would prefered to use a single chip instead the arduino-nano – this is cheaper and the advantages of ARDUINO concept is unimportant for a fix application. I also don’t use the USB adapter in my single chip release because an USB–RS232 converter is quite cheaper as an FT232RL implementation and gives me the possibility to use them on both interfaces.
      vy 73

      1. Hi Tom,

        thanks a lot for your kind comments and suggestions.

        I fully agree that the most convenient way would be to deliver already a preprogrammed Arduino Nano together with the keyer parts.

        However, the nanoKeyer was designed as an “add-on board” for Arduino nano (in the Arduino nomenclature a socalled “Shield”- just that this one is for Arduino Nano rather than a standard Arduino)

        The problem is that if I would offer such preprogrammed Nano’s I would have to prefinance them and import a larger amount from the Chinese manufacturers. While ordering 1-2 Nano’s as a homebrewer you usually can import them duty-free due to the low value. But if I would order Nano’s for e.g. one batch run of keyer kits (lets say 20-30 kits) the total value would trigger importation duties of 20% on top of the import value incl. shipping.

        This would make the preprogrammed Nano’s not attractive to the buyer anymore specially if they compare it to the cheap bargain prices the direct importing ham gets on ebay from the flood of Chinese sellers there.

        What I rather more consider (already started some thoughts and initial CAD work) is to have the Nano substituted by an on-board ATMEGA 328 (through hole versino – not SMD) and supply a preprogrammed ATMEGA328 instead (with Arduino Bootloader on it too, for future USB updates without the need of a programer)….

        Technically speaking you are fully right with the RS232 port suggestion….those RS232-USB converters are so cheap and available as mass ware everywhere that it would make sense.

        However, in my dayjob in a leadership sales&marketing position I know how important eye-candy and the consumer expectations are. I think nowadays the users simply expect a new device to have an USB port by default…

        The problem is that then you would need to use again a FT232RL design which means SMT soldering, which is also not ideal for the users not familiar with SMT soldering and more comfortable with through hole soldering only.

        So you see, no matter what you do you always end up in a Catch 22 situation, hi hi!

        Anyway thanks for your comments Tom and I will certainly consider a few things.

        Vy 73 de Oscar DJ0MY

    1. Thanks for the translation. I like your memory bank idea, it’s very clever. I’m going to integrate your code into the main code and update the schematic for this as an option, if you don’t mind (I’ll give you credit).

  58. Great Dietmar, now also in English, thanks… :-)

    One comment to your blog remark regarding code size optimization:
    “This would also help to reduce the core size of the code, so that some more features like Keyboard and WINKEY can be compiled into one sketch.”

    It is actually possible to have PS2 Keyboard and Winkeyer at the same time compiled.
    For this you need to remove the Serial Command Interface Function.

    My used code options with Winkeyer and PS2 (this way you can still command via paddle commands and Winkeyer commands) compiles just to around 28kByte….this just fits into the Atmel328.

    While in the field I would not use CLI anyway and while in the shack I prefer the Winkeyer mode, hi!

    73, Oscar

  59. I have found out a compile problem in String class operations like trim(), toUppercase(), toOwercase() that also touches the keyer source code. The line:” user_entered_callsign = user_entered_callsign.toUpperCase(); ” should convert the content of the string variable user_entered_callsign to uppercase. The compiler response this formula with an “error: no match for ‘operator=’ in… ” error and stops immediate.
    A quote : Changing trim(), replace(), toUpperCase(), and toLowerCase() to not return the string after they modify it. This makes it clearer that they operate on the string they’re called on, rather than returning a
    new string and leaving the original unchanged. It means that prior code that used these functions will get a compiler error, which I prefer to silently changing the behavior of a program.
    Well – change the line just to user_entered_callsign.toUpperCase(); The arduino examples seems not be actually modified to the Arduino V 1.0 environment usage.
    vy 73

  60. New code posted.

    Tom, thanks for your tips. Ironically, just this morning I stumbled upon the error you mentioned about toUpperCase(). I did more compilation testing and everything should be OK now with Arduino 1.0. Thanks again for your help.

    Hajo and Karl-Heinz, thanks for your kind words!

    Hello to Joop!

    All, I’m working on a schematic to show how to do multiple transmitters using the PTT lines. I’m also working on integrating the button bank feature from Dietmar, DL2SBA.


  61. @K3NG:
    In function “void check_ps2_keyboard() ” the compiler response that the variable “keystroke” (defined as char) is to small for an integer 129.

    // read the next key
    char keystroke =;
    Your definition PS2_HOME and the definitions of the keytroke greater that 128 will not fit into a char variable. Just declare them as uint8_t – an unsigned char type.

    void check_ps2_keyboard()
    static byte keyboard_tune_on = 0;
    static byte ps2_prosign_flag = 0;
    int work_int = 0;
    uint8_t keystroke = 0; // <———– That's my modification

    while ( (keyboard.available() ) && (play_memory_prempt == 0) )

    while ( keyboard.available() )

    keystroke =; // <— i removed the int declaration here

    In addition, i found some semicolon that follow a directive definition – this don't like the compiler too.
    as example : #ifnef JOOOUUUPP ; <—— This must be removed.

    I am now finished with the portion of your keyer code to use them in an AVRSTUDIO 5.1 and AVR-Studio 6beta. This environment is a little easier in edition and "JTAG" supported debugging, that's now possible.
    My processor plateform is now a single ATmega1284p on a prototyping board. Works fine – just the linker of the internal GNU-Compiler of AVR-Studio6 beta is rubbished so i decide me to use winavr 10102010. In Avr-Studio, this is just a simple click to change them.

    vy 73 de DD4DA, Gerd

    1. Gerd, thanks for the tip and code improvement. I wasn’t aware the char type was signed and therefore could only go up to 127 ( That’s strange; I’m not sure what purpose a negative number in a char type would serve.

      Thanks again and 73

  62. Just a notice around the compiler warning :” warning: only initialized variables can be placed into program memory area”.
    This seems to be a Bug in the prototype definition of PROGMEN declaration in the header files of the C++ GNU compiler. I have found some notices about this. The C GNU-Compiler doesn’t matter. The code is still ok, just a warning will be shown at cpp file compilation process. It’s a very old bug that seems remain since 2007 and is not fixed yet. I guess that C++ on an AVR 8-Bit is not often used, so nobody has seen the requirement to do that job.
    The implementation of ARDUINO, that’s uses C++ and the extensive usage of them will hopefully change that.

    vy 73 de Gerd, DD4DA

  63. @K3NG:

    If you like, i would upload the translated manual in german language and your Keyer code that’s now migrated to AVR-Studio 5.x / 6beta and Winavr-20100110 (AVR-Studio 4 comes later, too) for JTAG debugging, ISP-Upload and development without the Arduino environment. I also plan to build a PCB of my version of Keyer hardware for me. If you wanna like to have that, let me know an Email address.

    vy 73 de Gerd, DD4DA

  64. Talking about eye-candy:

    Here is the K3NG software at work….
    My latest enclosure prototype in a short video descrition. I used a professional CNC milling service for producing the face and rear plates and combined it with an slightly flatter enclosure than my previous prototype:

    73 de Oscar DJ0MY

  65. @DJ0MY:
    Nice keyer, looks pretty.
    Did you calculate the estimated costs for complete Kit inclusive Arduino-Board and the enclosure?
    I assume that this will be less then MFJ wanna have for there Keyer – that’s not winkey compatible.
    That peace of software is amazing and make somthing possible for that you need to pay mutch more, if you wanna buy them on the commercial market.

    vy 73 de Gerd

    1. Well,

      as you may guess the most expensive parts are the front and rear plates :-)

      I had them made by this famous German fabricating house (well known to German hams).
      Their face plate CAD design software is easy to use too…

      I think total cost “as on the video” is close to 100EUR (out of which 60 EUR is just for the front / rear CNC milled plates !!!)

      But still way better then MFJ, hi !

      To Hajo:
      Yes I will post my next viedo with “full light show” very soon :-)

      I am using ultrabright LED’s with high current limiting resistors (depending on the colour they run at 2-6 mA only) to avoid overloading the digital pin maximum rating. Even at this low current they are still extremely bright…perhaps I will even use higher value resistors if the shack is illuminated too much, hi…

      73 de Oscar, DJ0MY

  66. Oscar, that nanoKeyer looks really nice: Well Done! Perhaps you should add a little video with all the lights blinking and the Keyer whistling for another cup of coffee ;-)

    I will stick to my idea integrating a LCD shield. At at the end of May I will get a Mega and a new shield fom Adafruit: RGB LCD Shield Kit w/ 16×2 Character Display – Only 2 pins used! and 5 buttons integrated. Signals are send via I2C-Bus. So I will have lots of ram and a shield which is less pin-hungry. I already had a look at the libraries and they look good. So there seems to be no development needed to adapt the display.

    We will see how far I get and if all works out well we can integrate a db on a smartcard for the call signs ;———–)

    And if everything works within this century, Oscar I will give you a call and you are invited to construct an enclosure.

    72 de Hajo

  67. Folks…

    Further above I replied to Tom regarding a potential keyer design running this firmware, but not Arduino based.

    A simple ATMEGA standard circuit should do the job instead of a fully blown Arduino (and would be much cheaper and fun to build, too)…

    The only problem would be how to equip it with an USB port, without having to solder SMT devices (such as the common FT232RL chip) or without having to use an external serial to USB converter…?

    Now – it seems there is a potential solution for a simple non-Arduino based keyer – fully USB port featured – without need of SMT soldering:

    The trick would be to connect the USB port diretly to the ATMEGA and let it manage the USB communication :-)

    There is a project called V-USB which creates such virtual USB port for ATMEGA´s:

    The same code is used e.g. in the Softrock SDR firmware, which is running also on an AVR microcontroller and has the USB port directly connected to the chip…(running great here in my shack by the way)

    Well, there even seem to be folks out there who have ported this already to the Arduino world:

    The external parts needed (other than USB jack) are minimal….

    Only thing needed: A brave programming genious who would like to implement it … :-)

    73 de Oscar DJ0MY

    1. I did this to in an older USBASP programmer with an ATMEGA8 and a few resistors and shottky diodes.
      Well, i decide me to use an old school RS232 converter instead to use an USB directly. The reason is, thats’s an RS232 to USB converter is quite cheap and you don’t need to solder SMT devices like the FTDI FT232RL , even this is not a great deal to solder this chip. It’s also possible to get the chip mounted on a breakout board that’s save the MAX2233 on the PCB. However, all the are possible. There are many ways possiible.
      The key is the programm memory that’s will be rare, if you don’t use an ATmega 1284p.
      vy 73 de Gerd, DD4DA

  68. Very cool!
    I’m Waiting for the continuation of this project

    73 !

  69. @K3NG:
    I have found some bugs in the winkey support functions. Here the info about the code.
    In function void check_serial () find the following expression: for ( byte x = incoming_serial_byte; x–; x > 0)
    The compiler response: Warning 25 3rd expression in for has no effect D:\1_AVR-Projekte_keyer\working copy keyercpp\KeyerCPP\keyer.cpp 5887 1 KEYERCPP

    Exchange them with:
    byte x = 0;
    for ( x = incoming_serial_byte; x > 0; x–) // modify dd4da

    Similar in WINKEY status dispatcher routine if (winkey_status == WINKEY_ADMIN_COMMAND).
    Search for:
    (int x = 0; x++; x < 255)
    compiler response with: Warning 25 3rd expression in for has no effect D:\1_AVR-Projekte_keyer\working copy keyercpp\KeyerCPP\keyer.cpp 5972 1 KEYERCPP
    just exchange them with:
    for (int x = 0; x < 255; x++)

    That's all.

    The compiler i actualy use is the GCC that is now build-in Atmel AVR-Studio 6 RC. In Adruino environment there is an older WinAVR 20100110 used and they does'nt response any
    warnings like this – even thats used in AVR-Studio 6RC, thats alternativly usable. In addition, the compiler stops if a numeric variables are not initialized – well, we discussed them
    a couple of weeks before.
    It's recommended that local variable declarations are defined in the top of the function instead in expressions.

    My PCB design is near finished and will be published quite soon. The feeling of the keyer at operation is great. I have checked them out in combination with a Schurr Profi2 key and an older
    HI-MOUNT MK-706 key. The keying feels quit similar as the IDIOM-Press CMOS keyer that's in germany published by ETM (ETM9COG-X3) – my prefered keyer.
    vy 73 de Gerd, DD4DA

    1. Hello Gerd. Which version of code are you using? I fixed the issues you mention in the last code version I posted. (Thanks to your advice, I now run my compiler in verbose mode so I see these warnings, unlike before when I just saw fatal errors.)

    1. Get the actual code now – need to find out what kinda changes are u did.I did some modifications and could’nt use your code directly.

      vy 73 de Gerd, DD4DA

  70. Could some of you check the paddle command P1, P2, etc. (programming of memory messages) in this latest code revision?

    I am getting only a ? back from the keyer and I can program therefore the memories (= command not understood)… this only an issue I have or can you confirm you also have it and its code related?

    It seems it was OK with the previous versions…

    73, Oscar

    1. Unfortunately I’m not experiencing the error here. Are you sure you’re doing enough spacing between the P and the number?

      1. Hi,

        I just did a bit more testing. It seems to me that the letter space detection is the problem.
        If I increase the spacing between P and the number the command gets recognized correctly.

        But what follows then is the same problem while programming the message: I need to insert too long letterspacing in order for the CW characters to be recognized. It seems at least to me too long….how about anyone out there?

        Could this be related to the wordspacing that you corrected in the previous revision of your code?
        I do not remember this problems with letterspace detection (or my CW has become a bit lousy, hi)

        73, Oscar

  71. Goody,

    today I noticed a small issue in Winkeyer emulation mode when used for serious contesting… :-)

    Most contest loggers allow entry of partial callsigns and then it is a common practice by the operator to press e.g. F5 (Call of calling station) + followed by an immediate F7 (?) based on the standard function key messages in N1MM and other loggers……normally this is then sent just as one series of text….

    Now your code always waits around 1s after terminating a sent Winkeyer message before it sends the C0 winkeyer status byte back to the logger and therefore the logger waits before sending the F7 (?) text part….this results in a strange/too long break inbetween the two messages…especially at fast contest CW speeds.

    Is there a possibility to send the C0 status byte immediatelly after the last cw sign has been keyed without any delay?

    73 de Oscar DJ0MY

  72. Hi Oscar. You can adjust the time the C0 byte is delayed by changing this line:

    #define winkey_c0_wait_time 2000

    The wait time is in milliseconds. I can’t recall exactly why I coded wait time in there, but I seem to think it was something with HRD.

  73. Great job you’ve done. Thanks for sharing it with the community. In order to disable the auto-reset, you also can just add a resistor (100-300 ohm) from +5V to RESET and an electrolytic cap (at least 10µF) between GND and RESET.

    1. An external /RESET hardware is not needed in this keyer design because the ATmega MPU support POR internaly.The scound method is to use the Brown-Out detection fuse, that’s also power level triggered and resets the mcu if the level is reached that’s programmed in the BOD-Fuse bits.
      vy 73 de Gerd

      1. Gerd,

        what Yan was referring to is a trick (simpler than the one discribed by Goody in his documentation above) on a standard Arduino Board to disable the Auto-Reset via Serial Port.

        To disable ASR feature of Arduino is required to get the Winkeyer emulation mode running OK….
        (see also my nanoKeyer circuit – I just use a electrolytic cap instead without resistor)

        Oscar DJ0MY

    2. Hi Gerd, Oscar,

      Oscar, thanks for your comment. I knew your design but did not check what you have done before.
      By the way, I am not able to have a consistent functioning of the keyer with N1MM in Winkey emulation. The keyer works ok for 5 minutes but then send incoherent code with choppy keying. I have to do more tests but I am disappointed since I hope it would be working easy.


      1. Yan, if you can install a serial port sniffer on your computer and capture the data going between N1MM and the keyer and send it to me, I may be able to track down the problem. 73 Goody

      2. Yan,

        please do as Goody suggests. A good free serial port sniffer that I also use is this one:

        I was running the keyer during a contest today for around one hour and made around 40 QSOs. I never experienced any problems with choppy CW in Winkeyer mode and N1MM logger with Goody’s code.

        Could it be that you use the simple transistor keying and you are suffering some HF feedback from your radio into the keyer?

        Maybe you can try some RF chokes or ferrites on the keying line and/or optical isolation of the keying line?

        Oscar DJ0MY

      3. Hi,

        Yes, I will try to make some captures later, with both the old code and the newer one you just released.
        I am not keying the TRX yet, just testing with the tone output.

        Thanks for your help.

  74. Hi !

    Yes Great job.. I’m using the “ardu-keyer” to control my ordinary winkeyer via WKRemote. Works great.
    Get two of these and you can sit in the “soffa” and make QSOs …

    Yan ! You don’t need the electrolytic cap at all. I’m using a 100 ohm resistor only, works lika a charm.



  75. VIN Pin usage in Keyer software design. Take care about the Pin usage !!
    The purpose of the VIN Pin is to put the extern stabilized voltage reference into the build-in ADC of MPU. In the case of Arduino-Environment, the developer don’t setup the adc’s voltage reference to internal because in this mode, the intern generated voltage will be available at the VIN Pin of the MPU. The reference voltage level is lower that VCC 5V+. If you put the pin to VCC 5V+ or GND, the internal resistor will failquite soon and the ADC will unusable. There is a notice in the arduino adc support source code that will describe why you should take care about that VIN pin in every design.
    vy 73 de Gerd, DD4DA

  76. @K3NG:
    Does you plan to use the LCD ?? I am in testing an 24char 2 Lines lcd. The usage of the /RW line of the display to read the busy-flag instead a fix time delay,is recommended. I will put the characters in line 0 out and the did-dash combination in line 1. This looks fun.

    vy 73 de Gerd

    1. I was going to add LCD support but it hasn’t been high on my priority list and no one has really expressed interest in it. An LCD uses a lot of I/O lines. If there are I2C LCD displays, I was thinking one of those might be easier to use and leave I/O lines available for the PS2 keyboard and multiple transmitter lines.

      1. An LCD is quite helpfull in combination of the PS2 Keyboard usage. OK, you need near a full I/O port avaliable to use the classic HD44780 display. But the avalibility of I/O Pins should not be the limit. If you need more that 32kbyte flash memory, you got them because all of the ATmega’s with more that 32 kbyte will ave enought of i/o pins. i.e. m664 or m1284p. I have build one pcb thats support a full configuration and need 78kbyte flash mem.The HELL support consume much of them. If you wanna save some pin’s i can imagine that the 44780 display can used with a8-bit shift register – you need just 3 Pin’s – i don’t prefere this – the cpu load will raise. I will do some test with the lcd stuff and the support routines and will write you my experiences.

  77. Every time i restart the keyer, the keyer speed is set on default speed – even the Poti has moved on different speed. If you move the poti just a tick. the keyer speed is changed to the poti value. Unfortunatly, after a restart of the keyer, you must move the poti to get the tuned speed. To fix’em, it’s just a simple hack.
    There are two fixes needs to do. In the Setup() function – the setup defaults will be loaded in a variable called wpm. wpm = initial_speed_wpm // setup current wpm to default wpm
    This load the startup speed with the previously defined speed instead reading the poti value if this feature is enabled and activated.
    I replaced the line with:

    wpm = initial_speed_wpm; // setup current wpm to default wpm if poti not installed.

    pinMode (potentiometer, INPUT;
    pot_wpm_low_value = initial_pot_wpm_low_value;
    pot_wpm_high_value = initial_pot_wpm_high_val;
    last_pot_wpm_read = pot_value_wpm (); // read the Poti value
    wpm = last_pot_wpm_read ; // <<<<< actual speed will set to poti value
    pot_activated = 1;

    The function "int read_settings_from_eeprom()" needs to be repaced with the following code:

    ————— snippy —————————————————————————————————-

    int read_settings_from_eeprom ()
    if ( (0) == eeprom_magic_number) // returns 0 if EEPROM had VALID settings, returns 1 if EEPROM needs initialized
    paddle_mode = (EEPROM_paddle_mode);
    keyer_mode = (EEPROM_keyer_mode);
    sidetone_mode = (EEPROM_sidetone_mode);
    hz_sidetone = word ( (EEPROM_hz_sidetone_high), (EEPROM_hz_sidetone_low));
    dah_to_dit_ratio = word ( (EEPROM_dah_to_dit_ratio_high), (EEPROM_dah_to_dit_ratio_low));
    length_wordspace = (EEPROM_length_wordspace);

    #ifdef FEATURE_POTENTIOMETER // if a Poti is installed, use the analog value from the ADC
    pot_activated = (EEPROM_potentiometer_activated); // is the Poti activated ????
    if (pot_activated != 1) // if a Poti is activated, CW speed value will read from Poti ADC
    wpm = word ( (EEPROM_wpm_high), (EEPROM_wpm_low));
    #else // If the Poti is not installed, use the EEPROM value for CW-Speed setup
    wpm = word ( (EEPROM_wpm_high), (EEPROM_wpm_low));

    autospace_active = (EEPROM_autospace_active);
    config_dirty = 0;
    return 0;
    return 1; // Magic number is wrong – nothing is readed from eeprom – return error code 1

    ——————— SNIPPY ——————————————————————————————————-

    if the poti is installed and active, the poti value ist used to initialisized – otherwise, the eeprom value will use to set the speed.

    vy 73 de Gerd, DD4DA

    1. Thanks for the tips, Gerd. I will incorporate into the next update which should be in a few days. I’m working on K1EL Winkey 2 support and I also have multiple TX lines in the code now. Instead of having to multiplex the one TX key line with the multiple PTT lines for multiple transmitters, you can have up to six TX key lines and the PTT lines can be totally disabled if they are not needed.

      I think after this update I’m going to look into I2C LCD functionality.

      1. The LCD support library of arduino is limited so i decide me to move to the lcd support libraries from peter flury. That’s just need to move to c++ / Arduino. The reason is that this routines are not reentrant.
        If you wanna support I2C, try to use the TWI instead bitbang routines that ARDUNIO uses. An alternative for serial hd44780 support ist using an 8bit shift register. Check em out here: . An Arduino support is written quite fast.Using SPI capabilities needs just some tests.

  78. Updated code posted. K1EL Winkey 2 is now supported and multiple transmitter keying lines can be defined. You no longer need to use PTT lines for multiple transmitters, they are totally optional. I also incorporated DL2SBA’s banked memory button code. Sorry, Gerd, I didn’t get your potentiometer fixes in yet.

    NanoKeyer users, note that you can use the PTT output as a second TX output if you like. Oscar, DJ0MY, has tested SO2R with the N1MM program successfully.


    1. Compiling but not running ok here.
      Whatever option I define it goes to what seems an infinite loop of starts up (doing boop than the beginning of the HI).


      1. It sounds like you have a hardware problem. Do you have another Arduino board you can try?

      2. Hi,
        I have only one Arduino Nano 3.0.
        I will do further testing unplugging the Arduino from the breadboard.
        I had tested commenting the software options so to leave the minimum but it was unsuccessful…


      3. Well, now even with the old version it does not work well. I’ve tried to use the arduino unplugged or powered from batteries without success. I hope my board is not toasted…

      4. Hi Yan,

        I just heard you one hour ago on 15m CW from my mobile station (539 here) and called you a few times UP 2-3….but the EU wall was too difficult to break from my mobile station, hi hi!

        I indeed think that something is wrong with your Arduino Nano. I have ordered in total around 10 Nanos from different vendors from China spread over several months the past half year….

        Out of those 10 there was one erratic with symptomps like yours…..not responding properly, chopping the audio output etc. I got it replaced by the vendor….

        Otherwise never experienced any problems. Just give it a try on a different one.

        73 de Oscar DJ0MY

  79. I had the same problem. It was kind of a hardware problem. The Arduino can only load round about 28 Kb of code. Try to comment some code so that you get under the magic number. At least it worked for me. And that was one of the reasons I still consider using the cw-keyer with the LCD-Shield with a Mega-Arduino.
    My Adafuit shield arrived today. I will assemble it and give it a try with the Arduino Uno. I will report.


  80. Currently working some casual S&P QSOs during this weekends CQ WPX CW 2012 and using the latest K3NG code revision in “Winkeyer 2” mode connected via USB with the N1MM logger and my Kenwood TS-590.

    See a short snapshot video here:

    Unfortunately I have no time to participate the full 48h, so just a few hours must keep me happy…

    73, Oscar DJ0MY

    1. Last night I worked the contest casually using N1MM and the keyer in Winkey mode. It’s working quite well. I discovered one minor bug at startup if you don’t have the potentiometer feature activated. The logging program will have the wrong speed reported to it on start up, however the speed can be set by the program after that. I’ll have an update posted soon.

  81. I have worked a couple of hours in WPX with the keyer in Winkey mode and N1MM logger. This works great – it was’nt required to use the backup keyer Winkey2. I will now move them into an enclosure for final using. I decide me to use the MCP23017 based LCD and Keys later. My 4bit interfaced LCD works pretty nice and i got a bunch of I/O pin’s left for options. I got some experiences with the IIC-Expander – i use 2 of them in my remote symmetric antenna coupler to switch the L,C and low/hi-Pass filter mode.
    The MCP23017 is just a little bit tricky in programming but works great if the programmin work is done.
    Is a schematic of the I2C-Display available ? Does they use 8 Bit or the 4 Bit Display mode? I/O Pins should not be problem – it’s support 1 x 16Bit or 2x8Bit Bank of I/O pins.
    @K3NG: can you imagine to move the source code to sourceforge SVN system ?

    1. There is a schematic of the Adafruit I2C RGB display here: . It uses 4 bit display mode.

      I created a SourceForge project for code here: . I’m not doing SVN yet; I just dropped the latest ino file up there. I have to admit I don’t have any experience with source code systems and need to do some research and educate myself. Any recommendations for clients would be appreciated.

  82. Hi Anthony, would you let me permission to translate some of your articles to make it available for Russian “segment” of WWW? Sure your copyright will not be affected. Thanks and 73, Victor

  83. @k3ng
    Did you already try to connect the cw-keyer with the RGB-shield on an UNO or did you switch to the Mega Arduino. I tried it several times but without success. Compiling was not the problem but the upload was not possible due to the 28 KB restriction.
    73 de Hajo

    1. I have it connected to an Uno and it is working quite well. I have the display integrated with the command buttons and the PS2 keyboard functionality. If you go up on SourceForge ( ) you’ll see a directory called “in development”. I dropped the latest code in there. I hope to get the documentation updated today or tomorrow with how to compile the LCD functionality, but for people like you who already know the code, it’s pretty easy.

      You are correct about the RGB shield code taking a lot of memory. With the PS2 keyboard and RGB display libraries compiled in, I’m up to the limit of an Uno (with the standard boot loader).

      Note that this code supports both the I2C RGB LCD and a standard LCD display in 4 bit mode.

  84. I am using Atmel Visual Studio 6.0 and when I “Build” the solution, I get an error “EEPROM.h : No such file or directory.” Where can I find this file and other include files that I may need. I’m using the Arduino Duemilanova with Atmel 328P.

    1. I’m not familiar with Atmel Visual Studio, but eeprom.h and the other standard libraries are included in the Arduino IDE directory structure (i.e. \arduino-1.0.1\libraries\EEPROM\ ). You can download the Arduino software here: .

  85. Thanks! I knew it was something simple…and I just didn’t see it. :)

  86. I have ported the actual version to Visual-Studio6 and the entire project is available at ”“.
    To compile the project successfully, the WinAVR-20100110 toolchain must be installed.
    Atmel uses a newer Compiler Toolchain as Arduino. All flash memory access macros are removed in the newer toolchain. This is not a great deal – just install the winavr and select the alternative compiler toolchain in the project properties. The winrar-archive that i uploaded at sourceforge predefined to use winavr instead AVR-Studio6 Toolchain. I had no warnings at compilation time. The code works great.

    1. Not that I have lots of spare time, but should I give Visual Studio a try? I assume it does emulation of hardware?

      1. With this IDE, it’s possible to do a on-chip-debug. You can see what’s going on in the variables, registers, timers, IRQ’s and more. You need a cheap AVR-DRAGON or an AVR-JTAG-ICE3.Don’t use a clone of them. They often got problems and a protection for the hardware is missing. Check-out the MCU’s you wanna use and decide what kinda debugger u need. Bye the way, AVR-JTAG-MK1 does’nt support most of the modern MCU’s and is not supported by AVR-STUDIO 5 and newer.
        Developing with an OCD-Feature is a different world like “printf(….)” or ever. IT’s in-system and realtime.Manipulation variables, memory, registers are possible at runtime.
        I don’t wanna missing them.
        vy 73 de DD4DA, Gerd

    1. I guess that you must change the used MCU in the Project properties if you are using a different MCU as ATmega1284p – that i have pre-defined in the project file. In addition, the I/O Pins have to be changed to your Pin-mapping in the source file header, of course. And at last, the file pins_adruino.h must exchanged to the similar named file from arduino project, who support your MCU.The used pin-mapping is further descripted in the pdf-file.
      I decide me to write a handout how to change the mcu in the AVR-Studio6 environment. There are some small steps to do, but a compilation of them would be made this job to 20 secound task.
      I do the project file to the svn system today. It’s easier to handle updates.

  87. Yes, I’m using a Atmega2560 and maybe even try a 328P. So, I’ll be careful of that or watch for your updates. Thanks, again!

    1. I have uploaded the stuff for ATmega2560, ATmega1284p, ATmega664p. Thats tested, others are possible. I have added the new ARDUNIO 1.0.1 support files and hardware driver too.
      The ATmega328P needs just a different pinout description file “pins_adruino.h”. Don’t forget to change the device in AVR-Studio6 project properties.
      I have not tested the I2C-Bus support routines, need to spend more time to do that. It’s also possible to use a hombrewed LCD with the MCP23017 and HD44780 – isn’t a mysterious, just a simple task.
      The RGB-LCD files are missing yet. If the I2C-Bus support is enabled, take care about the TWI-lines of the MCU. THis schould be not used otherwise, if the driver support is activated.!!!!

      vy 73 de DD4DA, Gerd

  88. From what you are telling me, I’ll stick with the 2560 and maybe just use the Arduino 1.0.1. I’m a newbie at this, so, I don’t want to get in over my head!


  89. Visual Studio 6.0 does have limited Arduino support. There is nothing much for the ATmega2560.


    1. Arduino have limited support of everything. They use the GNU-Toolchain similar as AVR-Studio. I have added a 3party mapping file who supports the 2560. That’s the reason why you need to replace the mapping file to get the support of that kinda mcu. In normal circumstance, it’s enought to change the device in the Project properies. Ardunio developers decided that they uses just one file to map the mcu / Hardware platform. They does’nt resolve the macros of used mcu so you must replace the mapping file.
      In Arduino environment, you need to somthing more if you wanna use a different hardware as they promote. I use a naked ATmega1284p for my keyer. This is not supported directly by Arduino.
      You don’t have to do much more that just download the project from sourceforge and compile them.
      I have predefined all you need. Just set the Pin-Out for your Pin’s – i don’t know what PIN you use for.vy 73 de DD4DA

  90. I have the MarkII and it’s always worked great for me. I’ve tried direct USB to the Arduino and I always got an error message. And, no one seems to have the answer for the error message, so, I’ll stick with the AVRISP MarkII.

  91. Hey Goody – Just a belated note to say thanks for all your outstanding work on this great code. I’ve homebrewed 2 standalone keyers thus far and both work flawlessly. Using barebones ATMega 328’s on both with PS2 and command line functions enabled and my K8RA non-iambic paddle – I’m in smooth CW heaven.

    I’m currently using version 2011100601 & the only issue I had was the keyer beep-booping 3 times at power-up on its own and clearing memory which I note that you’ve fixed in more recent code. I figured it was related to timing around the paddle bypass caps & just remarked out the related reset code as a workaround on the earlier version.

    The 1st keyer is dedicated to my homebrew CW station & includes a 2nd 2n7000 keyed output to drive a pin diode QSK box & I use a PTT line with lead & tails adjusted for receiver mute. The 2nd keyer includes a neat grid-block keying circuit – designed by Art Boyars K3KU – which works flawlessly with my Drake 4-line BoatAnchor setup. I use an APS-92 PNP (cheap on ebay) & it’s good to -200V or more.

    And finally – I’m REAL anxious to see what you come up with on your Arduino antenna tuner. This has been high on my list for years and what you’ve got under development looks terrific.

    73, Bob N9KR

    1. Hi Bob. Thanks for your kind words. Sorry about that bug that involved the bypass caps. Although I’ve always had these caps on the schematics, my test jig unit didn’t have them until recently. I hope others didn’t get bit by this bug. But I digress. The tuner is a very challenging project. I haven’t seen anyone publish a relay-switched unit like this yet. I’m working on the relay board as we speak. The I2C I/O expander code has been written and tested. I’m really eager to get to the actual tuning logic as I think there could be multiple tuning strategies and a lot of potential for optimizing the tuning code to reduce tune times. I’m probably going to have to build a test jig with various impedance loads to test and benchmark tune times. It’s going to be fun.

      But back to the keyer, last night I wrote a subroutine for CW decoding and it’s working nearly perfectly with machine-generated CW (I have one keyer going into another to test). I want to test with sloppy straightkey generated code tonight. I have some ideas for the circuitry to convert analog receiver audio into the digital logic levels the keyer input needs. I should have some beta code up in the development folder tonight if anyone is interested in playing with it.

      Anyway, thanks again. Dit dit. 73 Goody

      1. Sounds great – on both fronts. On the relay switched tuner – I agree — I’ve been looking for a couple years & have found nothing published. You da’ man! I’ll stay tuned. Thanks again.

      2. The relay switched tuner is finished since a couple of week. I also used two atmega’s to control them and network cable to link the remote controller and switch controller for the relay’s. The I/O unit for relay switching is linked to an ATmega88 using I2C-Bus and MCP23017. The ULN2803 will do the switching job. Each of the relays are sepperatly controlled – (symetric tuner) so it’s possible to adjust the balance on the feedline of the antenna.
        The Tuner is based on a german unit called “christian Koppler” developed by dl3lac – a very popular unit, published a couple of years ago.
        i have modifies the controller part and use RS422 instead 24 lines (awg14 wire) controller cable, to link both controller. My antenna tuner is capable to handle 1000W-PEP and actually, the G5RV 10m-80m is used with them. The limitation in power resistance are just the “C’s” and Relays. The firmware is written in AVR-Studio and actually, i will move the project from “C” to “C++” Language.
        I am looking for a pair of roller “L” and vac-“C”‘s for build a symetric antenna tuner that’s robust to handle 2KW PEP. Switching relays are to expensive in this range of power and voltage.
        At the weekend, i will upload the complete project with source and PCB to sourceforge too.
        At “” you can see what i talking about.

        vy 73 de DD4DA, Gerd

    2. Bob,

      I stumbled across your July 4 post about the keyers. You mention using the (ill-named) K3KU circuit for grid-block keying your Drake 4-Line. (That’s the rig I was using when I “invented” the circuit.) Did you realize that the circuit will also key your +12V rig, with no modification? That’s it’s beauty. 73, Art K3KU

  92. I’m using the MCP23008. I like that ULN2803 chip for driving the relays. Thanks for the design idea.

    I hadn’t thought about the possibility of doing asymmetrical tuning. Does your unit have current sensors on the two balanced line conductors? I thought of putting current sensors just to measure the current for fun.

    1. I decided me to use an MCP23017 and ULN2803 for driving relays, because the other good available chip was an Phillips PCF8574(A) who’s drive current limit was 1mA each line.This is less than you need for just one LED. The ULN has a limit at 500mA each line, if you switch to GND (low-side). This should be enought fór 24V relay’s that i would recommend you to use. You must know that the Hi-Pass/Low-Pass switch needs min 4 relay’s and 2 needs to switch as tandem. You get a little bit more that the doubled current that’s needed to swich and “HOLD” a longer time.
      If the antenna tuner is switched off, the relay’s should be release to bye-pass the load to the feeder line.
      The problem that i have not solved is the tranformer who balanced and phase shift (180°) for the symmetric L-C lines. The available core materials does’nt works optimal from1.8Mhz to 30Mhz. I belive that the Guanella-BaLun is the best solution to do that job, but i did’nt checked them out, yet.
      Mabye, i can imagine a construction of two balun tranformers – one for the lower bands, one for the higher bands. This is a project until the summer.

  93. Hi guys,
    I could use a little help, please. I went through and compiled code rev ‘2012070201″ (w/Arduino 1.01) in several stages, progressively toward the feature set I wanted. First as downloaded – compiled fine. Second, I changed several values to get to my personal preferences (sidetone freq, etc – nothing major) – it compiled fine. Third, I tried to enable the PS2 keyboard (created sub-directory [PS2Keyboard] in my sketchbook directory, un-commented the include stmt, #define FEATURE_PS2_KEYBOARD, and PS2Keyboard keyboard; etc) when I try to compile this, it halts on the last stmt (PS2Keyboard keyboard;) and says:” ‘PS2Keyboard’ does not name a type”.
    I have rechecked several times to make sure I have all the steps correct but its pretty simple (famous last words!). what else do I need to do or what have I done wrong?? All I’m trying to do at this stage is enable the PS2 KeyBD. Thanks!
    Archie KX5X

    1. Hi Archie. Have you uncommented the following line towards the top of the code:



      1. Yes, I uncommented 4 stterments including the ‘#include’, I then created the PS2Keyboard subdir in the sketch directory and copied files into it. Does it go here or ‘up one level’?
        I tried to follow your instructions, then I did a search on PS2Keyboard to see if I missed anything.

        Thanks for the help!!
        Archie / KX5X

      2. Did you create a \libraries\ directory within your sketchbook directory, and then within that a \PS2Keyboard\ directory?

  94. Goody,
    The following is what I did(exactly) :
    my sketchbook is here:
    PS2Keyboard dir:
    lines un-commented:
    PS2Keyboard keyboard;

    error message:
    compiler stops at the last statement and says
    ‘PS2Keyboard’ does not name a type

    I’m not sure but I’m guessing its where I put the subdir. Is it in the rite place?

    Archie / KX5X

    1. we crossed each other –
      to answer your question – NO. I’ll try that



      1. Roger that. Yea, I’m thinking you need to put the files in this directory:


      2. This is getting really frustrating. (I’m frustrated with me – I know its something (relatively) simple in the set up).

        putting the library in my sketchbook directory didn’t help. I ended up putting it in the ‘Libraries’ subdir in my arduino setup and the compile at least went further.

        The compile stopped at line 1343: the error was ‘duplicate case value’
        —> case PS2_SCROLL : // Prosign next two characters
        ps2_prosign_flag = 1;
        #ifdef FEATURE_DISPLAY
        lcd_center_print_timed(“Prosign”, 0, default_display_msg_delay);

        I’m gonna walk away for tonite – I’m too frustrated to see much at all.

        I’ll come back fresh and let you know if I have questions then. Thanks Goody!

        I really like your design – its exactly what I need / want!


        Archie / KX5X

  95. OK, its morning, I’m fresh – – –
    I checked a bunch of things. I had a mess, trying to find where the compiler wanted my (your) library, I scrambled things good! Its simple, put it in the “Libraries” directory in the Arduino install and it shows up in the sketch pull down for “import library”. Might find it elsewhere but this is where I put it.

    I ‘UNcommented 3 lines:
    #include (actually I imported the library to make sure it would find it)
    PS2Keyboard keyboard;

    I compiled the sketch:
    it made it down into the “check_ps2_keyboard()” subroutine to line 1343:

    —> case PS2_SCROLL : // Prosign next two characters

    and reported the error:
    “duplicate case value”

    Maybe I don’t need the PS2 keyboard option (:-(

    Thoughts?? (I’m still guessing its my setup – I compiled the “simple_test” sketch in the examples for the PS2keyboard library to verify that the library I had compiled. It compiled fine.)

    Thanks Goody

    Archie / KX5X

    1. That’s very strange. Could you email your .ino file and the PS2 library files you’re using to anthony dot good at gmail dot com?

      1. on its way!
        Thanks! – sorry for being such a noob / pita

        Archie / KX5X

      2. No worries. I sent you a private email. I think I figured it out. Let me know.

  96. Is this project in CLI mode or Winkey emulation, suited to connection by a physical RS232 port, and at what speed(s). I have a facility for delivering RS232 ports to the remote radio site, independent of a computer at that site.


    1. Hello Owen. You have several options. If you are using an Uno or Nano or similar Arduino unit, you can compile either the K1EL Winkey emulation or the CLI, but not both simultaneously due to memory limitations in these model Arduinos. If you have an Arduino with a larger memory footprint (i.e. the Mega), you can compile and upload both the K1EL Winkey emulation and the CLI into the unit. You can then switch between the two modes at boot up (power on or reset). If you have #define OPTION_SERIAL_PORT_DEFAULT_WINKEY_EMULATION uncommented, the unit will default to K1EL Winkey emulation upon reset and if you hold the command button at power up it will switch to CLI mode. If you comment out this define, the behavior will be reversed.

      If you would like two RS232 ports, one operating K1EL Winkey and the other operating CLI, I can work on that feature. The second port would be software based and would be on normal pins at 0/+5V levels and not true RS232 voltage levels. You could easily convert this with transistors or a TTL-to-USB chip or module that is readily available from several sources.

      The CLI port speed is configured with this line: #define default_serial_baud_rate 115200

      In K1EL Winkey mode the keyer complies with the K1EL standard by starting up in 1200 baud. If the client invokes Winkey 2 mode, the keyer switches to 9600 baud. These speeds can obviously be changed in code, but the client program needs to be able to switch port speed as well, however if you needed some special baud rate I’m sure with back-to-back Arduinos acting as baud converters we could make anything work. Let me know if you need anything special for your remote radio site project. I like coding new features and I find remote control and remote site stuff interesting.


      1. G’day,

        I was not thinking of trying to use both CLI and Winkey in parallel through separate ports, one or the other is fine and the flexibility to offer to change the power on default at boot up is quite adequate for my purposes.

        I am not very Arduino savvy… but quite experienced in AVR, so excuse the questions…

        So, ‘out of the box’ this will run on the larger Arduinos (I have a Arduino clone with a Atmega168 and a TTL serial port). I expect to adapt the TTL serial to the RS232 interface, I assume it uses only TxD and RxD.

        I should also have a Pro 328 somewhere if it needs more memory, or I may have a 328 chip to put on the MHV clone board.

        1200/9600 is fine. The ports are delivered by a TS4 four port Ethernet terminal server. Concept is one port to control the TS2000, another port to feed the keyer. My expectation here is that the keyer provides perfectly formed Morse code, less affected by network jitter than sending dits and dahs across the network.

        I have downloaded the keyer distribution, and it failed compile… I need to chase down some libraries.


      2. OK, I have found a Pro328 16MHz 5V board, and verified that I can compile either CLI or Winkey (with or w/o 2) and it fits in the board. (My compile error was due to wrong board selected.)

        So, I will give this a whirl, might try Winkey(2) as I am using HRD to control the radio on the other port.


      3. As far as I’m aware the Arduino code and hardware supplies only TxD and RxD. Unfortunately I’m not experienced in the AVR environment, but I can tell this is something I should explore in the future.

        I think this keyer will work well for your application. As you surmise, it will send good CW regardless of network jitter. At 1200 baud it works flawlessly, however it should be noted that HRD has some minor bugs in the Winkey GUI. I’ve used the keyer with N1MM quite a bit with no problem.

        If you’re primarily interested in interfacing with existing logging and contest software, K1EL Winkey emulation is the obvious choice. However, the CLI has more flexibility and is more extensible as it isn’t encumbered by the Winkey standard. But awhile ago I started to code an extension to the Winkey emulation where you could send a $ sign as an “escape” and send commands to the keyer. This could be used for controlling digital lines to control relays and do other things that the Winkey protocol wasn’t intended to do. Let me know if you have any interest in that.

      4. It’s not an advantage to sepperate the CLI and WINKEY interface. You have more cables and more hardware that makes the keyer not cheaper and the wiring more complex. I like the On-Boot-Reset decision – Winkey or CLI. You should remember – this is a keyer electronic to doing morse code, not a general purpose MCU-Board that know’s morse code. This schould it be. Mybe expand the command set of Winkey to switch back to cli and extend the cli to switch to WINKEY – but, i don’t think that this is useful.

        vy 73 de DD4DA, Gerd

  97. Well, I have loaded a Sparkfun Arduino Pro 328P with either CLI or Winkeyer2 successfully. I have talked to the CLI from a serial prog, and tried the Winkeyer2 with DM780 and it seemed to work fine (KEY and PTT).

    I am thinking that the production version might be more reliable without the bootloader, so in looking for proto boards that have the ISP connector, the one I have used looks good, or Sparkfun’s Mega Pro 5V/16MHz.

    I have ordered a little RS232-TTL interface from Chine, about $4 I think, and it will wire in place of the USB/Serial module I am currently using to talk to the board.

    Anthony, this looks a very practical functional replacement for the Winkeyer RS232.

    Yes, a great opportunity for some additional bitswitching of relays etc… but as you say, that has to be built into the client software and commercial interests might impede that. Perhaps we need a Good protocol OM!!!


    1. I have always had a concern that the Arduino boot loader might be falsely trapped by serial traffic during the initial timeout, and I think I saw mention of workarounds above.

      A workaround I mentioned was to not use a bootloader.

      However, I have downloaded the bootloader source and compiled it with WATCHDOG_MODS defined, which prevents the bootloader kicking in on a power up.

      I have loaded the new bootloader, and reloaded the keyer just fine, and it works ok with HRD in Winkeyer2 mode.

      So, I may get the smaller 328 Pro-mini board to try out.


    2. I used a native ATmega1284p and a MAx232 for Winkey purposes. If USB is avalable only, that’s a job for a simple converter. This is cheaper than a single FTDI chip. I addition, i have replaced the PTT an keying transistors with a quad Opto-coupler like TIL196. The other parts are just socket for Plugs. It’s not required to buid a printed pcb. The used 1284p comes in DIP40. vy 73 de DD4DA, Gerd

      1. Indeed Gerd, another option I am considering for this reduced function set (RS232/Winkeyer2/PTT+KEY) is to put a regulator, MAX232, Atmega328P and a couple of 2n7000 FETs as PTT and KEY switches, all on a piece of veroboard. I nearly did it this morning, but I couldn’t find any MAX232 in stock.

        Cheers, Owen (VK1OD).

  98. @DL2SBA: Why the complete code is in just one file instead in more, ask k3ng – in english, of cource. I agree in the point of float variable usage. The ATMega is not the best choice for floating point usage. The library is quite big. To convert the float routine into a an integer is just a job that’s needed to do. K3NG has release the source code. This makes it possible to to the job – just do it and send it him. The advantage will be in saving programm memory for optional hardware support that’s fit in smaller arduino’s.
    IT’s not helpfull to publish your questions about the keyer software on YOUR webpage and in german language. Just do it here – nobody will blame you.
    vy 73 de DD4DA, Gerd

  99. Hi Folks,

    its time for a new video. I just returned from EA6 (Mallorca Island) summer holidays were I participated in the IOTA 2012 contest in Mixed mode QRP for 4h with my backpack station. The CW keying was done with N1MM logger and an Arduino Nano running Goody’s code (ultralight travel version on a perfo-board, hi hi)… Enjoy…

    73 de Oscar DJ0MY

  100. Gerd, I am not sure what you are asking me.

    I have built and tested a prototype using a Pro 5V/16MHz board with custom bootloader, RS232 TTL module, and FET KEY/PTT drivers, and it works fine.

    I am awaiting parts for a final job, and that will take a few weeks.


    1. Some delay in getting parts, Sparkfun messed up my order. Anyway, so Metaboards arrived in the mail today, so they will be ideal for the job,

      The project is basically a functional replacement for an RS232 Winkey (which are now unavailable, but I am sure not as much fun as this project).

      I have commenced documenting the project at … commenced is the key word! I do expect to put the PCB together tomorrow and should have it working by end of day.

      Anthony, I am thinking of using an 18.432MHz crystal. This suits high RS232 speeds down to the ground, do you foresee any issues with the Morse code side (provided of course that I create the appropriate board definition in the Arduino IDE?


  101. Hi

    Tnks for this nice Arduino hack… on a Mega board, there is still plenty of ram and I/O to do other things :- ))))

    We have written a small Wiki page dedicated to French Ham/hackers who intend to build their own shield

    Kicad’s files will be online at the end of this month (August 2012). We also have patched the PS2Keyboard.ccp to deal with localized keyboard (I’ll be glad to send it to you if you find any interest)

    Marc f6itu

    1. Hello Marc,

      Nice Wiki page! It’s great to see my code in action. Please send me the link to the patched PS2 library and I’ll link to it from here.

      Merci et 73

      1. I’d be happy to add the additional characters. I took four years of French in high school but unfortunately I forgot most of it. One of these days I’m going to learn it again.

  102. Hi I have an urgent problem. The keyer version K3NG_Arduino_Keyer_2012090501.ino works OK in Ham Radio Deluxe it seems. The board is an Arduino UNO. However in N1MM it sounds like it is reset. It sends “hi” several times when N1MM is started. It suddenly says “winkey not detected” even if I can send to it. Some times it sounds like it resets because it suddenly says “hi”. Do you know what can cause this? I need it for a dxpedition so its urgent. Hope you can help if you have experiences something similar.

    1. Hi Mike. Do you have OPTION_WATCHDOG_TIMER activated? If so, deactivate it in the code and recompile. Do you have the Arduino Automatic Software Reset disabled (which is done by cutting a trace on the Uno PC board)? I highly recommend doing that. Does it make a difference if you deactivate Winkey 2 support( OPTION_WINKEY_2_SUPPORT )?


  103. Hi. I tried to turn off watchdog went back to Winkey 1 mode, turned off boot message, turned on the “Winkey TAB bug workaround”, turned on the “discard bytes at startup”. This seemed to fix it. I think the problem was that N1MM didnt get proper feedback after message was finished. I still get some “hi” “hi” messages when I first starts N1MM but thats problably due to the handshake lines toggling. Here are my options (sorry for positing long info here):

    // compile time features and options – comment or uncomment to add or delete features
    // FEATURES add more bytes to the compiled binary, OPTIONS change code behavior
    #define FEATURE_SERIAL
    #define FEATURE_COMMAND_BUTTONS // this is now required for the regular buttons and command mode (added in version 2012061601)
    #define FEATURE_SAY_HI
    #define FEATURE_WINKEY_EMULATION // this requires FEATURE_SERIAL – disabling Automatic Software Reset is recommended (see documentation)
    //#define FEATURE_BEACON
    #define FEATURE_POTENTIOMETER // do not enable unless you have a potentiometer connected, otherwise noise will falsely trigger wpm changes
    //#define FEATURE_HELL
    //#define FEATURE_PS2_KEYBOARD // also uncomment PS2Keyboard line below and PS2Keyboard.h include at the top (requires FEATURE_SERIAL)
    //#define FEATURE_DL2SBA_BANKSWITCH // Switch memory banks feature as described here:
    //#define FEATURE_DISPLAY // LCD display support (include one of the hardware options below)
    //#define FEATURE_LCD_4BIT // classic LCD display using 4 I/O lines
    //#define FEATURE_LCD_I2C // I2C LCD display using MCP23017 at addr 0x20 (Adafruit)
    //#define FEATURE_CW_DECODER

    #define OPTION_SERIAL_PORT_DEFAULT_WINKEY_EMULATION // this will make Winkey emulation be the default at boot up; hold command button down at boot up to activate CLI mode
    #define OPTION_WINKEY_DISCARD_BYTES_AT_STARTUP // if ASR is not disabled, you may need this to discard errant serial port bytes at startup
    //#define OPTION_WINKEY_STRICT_EEPROM_WRITES_MAY_WEAR_OUT_EEPROM // with this activated the unit will write non-volatile settings to EEPROM when set by Winkey commands
    //#define OPTION_WINKEY_EXTENDED_COMMANDS // in development
    //#define OPTION_REVERSE_BUTTON_ORDER // This is mainly for the DJ0MY NanoKeyer
    #define OPTION_PROG_MEM_TRIM_TRAILING_SPACES // trim trailing spaces from memory when programming in command mode
    //#define OPTION_MORE_DISPLAY_MSGS // additional optional display messages – comment out to save memory
    #define OPTION_N1MM_WINKEY_TAB_BUG_WORKAROUND // enable this to ignore the TAB key in the Send CW window (this breaks SO2R functionality in N1MM)

    1. If you’re getting multiple HIs when N1MM starts up and if you have ASR enabled on the Uno (the default configuration), I think you’re right about the handshaking lines. I found interfacing in general works better if you disable ASR. The “disable bytes at startup” was a bit of a hack, and as I mention in the documentation, you may have to play with the number of bytes that are discarded to get reliable operation. Having a serial sniffer greatly helps, though you have to dig into the Winkey protocol a bit to know what’s going on. One of these days I may write up some documentation on this, but disabling ASR cures a lot of USB port ills.

      The N1MM TAB bug workaround probably won’t affect this issue. Note that the TAB bug workaround breaks SO2R operation in N1MM.

      I loaded up the latest version of N1MM and I’m not experiencing any issues. I have it running on a repeating CQ and messed around with CTRL-T and CTRL-K a bit and can’t reproduce the issue, so I don’t think an N1MM code update is the cause.

      Just to rule another item out, I would try powering the Uno from the coaxial connector. This shouldn’t be an issue because you note that HRD works fine, but stranger things have happened. :-)

  104. Hi, disregard the above. I fooled myself. It didn’t work after all. I run N1MM V12.9.2. I have this version that i grabbed from the sourceforge rep : K3NG_Arduino_Keyer_2012090501 – There is a cw message sent but the red tx lamp in N1MM fails to come off after pressing F1 (CQ) and the cw message has been transmitted to the end. The red tx “lamp” stays on for ever until i press ESC. After I press ESC the keyer is able to take commands again. It seems like the keyer is not notifying N1MM that it has finished transmitting? Would you be able to send the code you have that works?

    1. Hi Mike,

      what you describe are exactly the symtomps you get, when ASR is not disabled (I know this from my very own experience very well)…I have this problem occasionally when I forget to disable ASR in my nanoKeyer (the nanoKeyer uses an external Jumper to conveniently switch ASR on/off)

      If you do not like to cut traces as Goddy suggests alternatively you can put a 10uF electrolytic cap between the Reset pin and GND. This will keep the reset line on logic high level and avoid the resetting via the serial port (aka ASR).

      This is a fairly easy mod. But do not forget to remove the cap again before you upload the next sketch…since the Arduino will not automatically enter the bootloader anymore with ASR disabled.

      73 de Oscar DJ0MY

      1. Excellent. Tnx for the pointer. I work on a smaller version with a Arduino Mini Pro (Mega 328).

  105. By the way what is “ASR” and how do I turn it off? I would like to not do hardware mods as I use the board for other things and I dont have access to the reset button. (I have built it into a small chassis already … :) )

    1. Search for “Automatic Software Reset” on this page and you’ll find the section on it above. Follow the link and you can read what it does. Cutting the trace labeled RESET-EN disables ASR. You could put a reset button on the chassis. I’ll email you a configured code file, but again, ASR is likely the problem.

  106. OK, found it now. Will switch to a non UNO based board. This way I will get the keyer smaller as well. I think ASR was the issue. Thanks.

    1. Mike,

      the ASR issue is not specific for the UNO. It is a general problem on all standard Arduino designs.
      For convenience (programming) reasons they all have the ASR feature built in.

      Switching to the Mini Pro will make your unit smaller, but not fix automatically the ASR problem.

      As soon as you connect the Mini Pro with a serial port (e.g. direclty to a RS232 COM port or via the external FTDI Interface) you will have the ASR functionality back again, which you need to disable in order to run the keyer in conjunction with an contest logger such as N1MM via Winkeyer mode.
      As written above – simplest solution is to put a 10uF cap across RST and GND pins…
      73 de Oscar DJ0MY

  107. Oscar: What case do you use for your builds? I have one of your Rev C kits, and would love to have a nice enclosure / case for it. Would love any input that you have!


    1. Hi Scott,

      the extruded aluminum enclosure I use for my nanoKeyer prototypes (the photos on my website) are made by a german manufacturer called Fischer Elektronik (a manufacturer of heat sinks and enclosures).The dimensions are such as to fit exactly an 10x10cm PCB inside. It is basically a shortened version of the typical standard Packet Radio TNC enclosures of the good old times when packet was still popular (most TNCs were based on 10x16cm PCB’s or aka Euro-Size PCB).

      I saw that there is one model from Hammond Manufacturing in the USA that comes very close, but is a bit longer, so that eventually the front LED leads as well as potentiometer axis may need to be extended.

      I once found on the internet a enclosure for 10x10cm PCBs (I think outer dimensions are then 4.06 x 4.06 Inch roughly). But the company doesnt seem to be in bsiness anymore or at least the website looked very old.

      73 de Oscar DJ0MY

      1. I’ll have to check at Fry’s electronics when I get an afternoon to head over there…


  108. Has anyone had issues with their arduino (nano, in the nanokeyer kit from Oscar) locking up? I have a replicable lockup occurring when I change the sidetone frequency either above or below a certain amount.

    I will be bringing this in to load a new version of the code onto it, but wanted to see if anyone’d run into this issue.

    1. Never changed the sidetone in my keyer, since I mostly have it disabled anyway and listen to the radios own side tone…thats why I never experienced this behaviour.
      Since you say it is replicable – can you tell at which sidetone frequency it starts to hang?

    2. I’m not able to reproduce the bug with my Nanokeyer, however I may not be doing exactly the same steps or have the same features compiled. If you send me a more detailed process and a copy-and-paste of your features and options, I’ll see if I can reproduce it.

  109. It most likely cannot be an ASR issue, because Owen’s board (according to the website schematic) does not make use of ASR feature. It is all manual reset.
    So I assume the bootloader is activated manually and not via the RS232 port automatically, right?


  110. Some further testing…

    I wrote a little script in EZGPIB to send 0x00 0x04 ‘Z’ to the keyer. It echos fine on real COM1, EZGPIB cannot open the Portserver port,

    I tried the same script on a FTDI port on COM28 and it worked fine.

    So, it looks like the Portserver ports are not 100% compatible. Whilst HRD uses such a port for rig control just fine, DM780 doesn’t work properly on the same port (though it doesn’t complain about problems opening the port… just the log shows no response to the sent messages).

    I will try another scripting environment.


  111. I have tried a DOS command line to send the echo prompt to the keyer, (\bin\echo -ne 015015000004Z >\\.\com20). This elicits a response from the FTDI port connected keyer, but not from the Portserver one. The Portserver looks deficient.

    BTW, not an ASR issue, and I do have a removable shunt on the board to disable ASR.

  112. Anthony, I have hacked a Winkeyer buffer management / flow control scheme for your consideration.

    Let me know how I can get it to you.


  113. Oh Dear,

    the code has grown (well done)… and I need to dive into it again.

    At least I got an Arduino Mega and connected it with the Adafruit RGB LCD shield and it worked. There is just one annoying thing and I don’t find the relevant code:

    The terminal window is constantly adding a new line so that the text vanishes and
    the LCD-Display is showing in short intervals on line 1 text which could not be read for it changes so fast.

    Any idea where to tweak the lines.

    Thanks for the good work.

    1. Hello Hajo. Do you have these lines set this way:

      #define lcd_columns 16
      #define lcd_rows 2

      1. This was your default line and I did not change it.
        I have not attached the hardware, so this may be the problem.

  114. Hi, thanks for a very nice program.

    I am using a Uno r3 board and trying to load the “K3NG_Arduino_Keyer_2012101701” version.

    It works fine without any modifications to the code.

    Now I have also added the ps2 keyboard by following the instructions above (uncommenting some lines).

    The result is however that I now get “Sketch is too big” message.when trying to upload.

    Is this normal and is there a work around?

    73 de SM5LYM

  115. Hi,
    Could anyone let me know know if this firmware could it work in an Arduino Due board based on the Atmel SAM3X8E ARM Cortex-M3?
    Many thanks in advance
    Jordi Roca

    ?CPU? SAM3X8EARM?Cortex-M3 CPU?

    1. Hi Jordi. Unfortunately I can’t definitely answer your question as I don’t have a Due (yet), however I think it’s supposed to be code compatible with the Uno. Just a note – I’ve moved support and discussions to this Yahoo group: . You may want to join over there and post your question. 73 Goody

    2. The code could’nt run on an ARM based MPU like Cortex M3. The destinated platform is ATMEGA MPU based and need the ARDUNIO C++ derivated IDE. I could not see a quick way to port them.
      In addition, that’s would be a waste of a nice and fast MPU.
      MPU’s like ATMega32 and up will work fine.

  116. Just wanna say good bye – i Don’t wanna register me at social media networks for just to write some comments.
    vy 73 de Gerd, DD4DA

    1. Sorry, Gerd. It’s getting to be difficult to manage the comments here in WordPress. But please correspond with me at anthony dot good at gmail dot com. 73 Goody

  117. Many thanks DD4DA for the information, at this moment i’m playing with freescale K series and for this reason my interest in Arduino cortex M3, I will check the ATMega32

    1. Hiya Jordi,
      well, you mean the Arduino Due board that uses a Cortex-M3 MPU instead an ATMEGA derivate. Well, i get this board in january and waiting for the ordered J-LINK Debugger. If this is arrived, i will take a look whats going on. The Arduino IDE for Cotrex-M3 is in alpha stadium. The Adruino mapping code is’nt finished and it looks like, that the maintainer try to build them like the Atmega IDE. If, and how the code will be portable or not, i can’t confirm or deny them. The code of an ATMEGA looks quite different compared by an ARM Code and the the CPU’s works different too. If a code is abstract enought, this should work. Most of them will be impossible because the ARM is quite faster and all routines that need timed loops or counting loops to waste time, will not work properly. Why you wanna use Arduino for your ARM? The most code you need is available for Cortex-M3, because this is a very popular MPU worldwide. I will use the GNU-CPP compiler Toolchain for the ARM MPU too. Look to Keil or the Open Suurce IDE’s like Eclipse. You got all you need.

      vy 73 de Gerhard, DD4DA

  118. K3NG-Keyer in ATMEL-STUDIO 6.
    I have uploaded the actually keyer source package with some minor fixes in the ps2keyboard interrupt code. I also fixed some minor bugs in Arduino 1.03 support code that handles the static strings in program flash. This is more a problem of the obsolete macro usage of Arduino IDE as the K3NG keyer code. Some minor fixes in the general enummeration of Pin-mapping code are included that be related by usage the ATMega1284P and ATMega664P processors. Some major design related bugs are still remain in the Arduino support code that will be fixed in the next few days. I will attempt to get in contact to th maintainer of Arduino IDE to get the fixed for all users. For all who uses the external INT0 or INT1 line, keep sense about the Falling/Raising edge who sould be triggered. This seems to be not work proper this time. This is reasoned by the older WINAVR Toolchain who is used by Ardunino. This is also used by the PS2Keaboard.Cpp (and h) file in the keyer Project.
    vy 73 de Gerhard, DD4DA

  119. Hi Gerhard, (DD4DA)
    Excuse me for the delay in replay, I have been out, and many thanks for the information.
    I have received my Due and I have tested some elemental programs and with the the Arduino libraries for easy code works OK, an other think is if you want to use other libraries. I’m playing with a freescale K60 cube and I have curiosity to see how the arduino due work. I’m an “old” electronic engineer that begins to play programing MCU and I would like to adapt the K3NG keying program to set the options by means of a touch screen LCD like the freescale cube unit. and other thing that I wan to do is add the hardware to key by , screen, cathode, or greed blocking I have drawn the schematic 2 years ago but I have been very busy and I have not finished the PCB.

  120. Hiya dear Jordi,
    congrads that youre doing the first steps with an K60-100? /120 ? Cube. This are ARM based Cortex-M4 MCU’s and this is running at 100Mhz clock. To port the Keyer on this hardware will not work without extensible modifications – they all reasoned by the timing and differents of variable Typ’s. The Arduino Environment will not help to solve all this hints you will get. In addition, i could not seen the advantage to use a 100Mhz MPU in a CW-Keyer. This MCU has power enought to drive an SDR with an 4096 Point FFT (or more).
    For experimentals with MCU’s, i use the RealView ULINK2 JTAG Interface and the KEIL µVision 4 IDE with the GNU-ARM MDK Toolchain. All This works pretty nice. I use an ST SM32F4-Discovery Cortex-M Development Kit that quite cheap and fast. ($15.-) My experiences with the Arduino IDE is more bad as i expected before.
    This is reasoned by the beta State of the ARM support of Ardunio. The Toolchain (GNU-CPP) is a litte bit older as the ARM-MDK from KEIL or ATMEL. Try to do some experiments with the Keil kit and send me your EMAIL address. I have some extensions for the KEIL IDE available, that will helps you at the beginning with the ARM Cortex MCU’s.
    To get my EMAIL just look at
    vy 73 de Gerhard, DD4DA

  121. This is such a great project thanks so much. I was just getting ready to write keyed code for my Arduino when I found this project and it is 20 times more than I wanted… but now I want all of it. Thanks again

  122. Great project Thank You.
    I made it on ATMEGA evaluation board using ported software on Atmel Studio 6 on ATMEGA1284P processor, wth all the functions included.
    Currently i am working on final hardware implementation: LCD display, PS2 Keyboard, USB connections, 9 memory buttons, 4 transmitters, for each separate kay and PTT output isolated by photomos relays.
    I have just completed PCB’s design using Eagle.
    Testing keyer on evaluation board I found some areas that could be better:
    1. For multi Tx implementation it would be nice to have PTT / key delays timers set up independantly for each transmitter and possible to be changed by kayer commands. Currently key / ptt delays can be set only during compliation and are common for each transmitter.
    I plan to connect IC-7000 (No delays needed), FT290RII ( just short delay) and…. Uniden 2020 (100ms leading and another 100ms trailing delay neccesary). Impossible to find compromise values for this set of radios.
    2. Great feature is to entar macro into macro, however only first macro is transmitted. I.e: \p1 SP5IOU , \p2 CQ CQ DE \1 \1 \1 PSE K.
    When I invoke memory 2 it will transmit: CQ CQ DE SP5IOU
    Remaining content of memory 2 will not be transmitted.
    3. When Autospace is ON, LCD displays kayed characters only when spaces between characters are long enough, even longer than just character space. Text is transmitted correctly, but not displayed or partially displayed on LCD display. When autospace is off – text is displayed correctly.
    4. I prepared hardware to be possible to adjust LCD contrast and LCD light LED adjusted using commands, but it is not implemented in software. It would be nioce to have it controlled by PWM’s.

    There just features mentioned as nice to have. But software is great and ready to use. I didn’t find anything better.
    Great feature is K1EL Winkey emulation. I tried it with Ham Radio Deluxe – works fine toegether with own Adruino Keyer features.

    Congratulations and many thanks for this great project.
    When my hardware implementation will be ready and tested I plan to publish it for everybody.

    Cortex implementation mentioned im post above is a great idea. I though also about it, Keyer with touchscreen display, virtual keyboard etc. I have such Kit.
    Maybe for the next step.

    1. Hello Marcin. Thanks for your email and compliments. Here are my thoughts on the items you mention:

      1. This would be a good feature. I will add it to the list for development.

      2. The macro to call another memory was intended to be a “jump” function whereby the keyer would jump from one memory to another and not return to the memory it was called from. But I will put on the feature request list what you are looking for. I’m not sure, however, how to prevent people from programming endless loops (i.e. memory #1 calls memory #2 and memory #2 calls memory #1).

      3. Thanks for reporting that bug. I will put that on the list for investigation and repair.

      4. That is a good idea as well. I will put that on the list.


  123. @Marcin:

    Hope youre enjoy that AT6 stuff. The evaluation board that you are using make it possible to use a different LCD like 20×4 based hd44780.
    I will integrate the actually source from K3NG quite soon.
    I am now working on a TFT-Based Cross-Needle SWV-Messurement Instrument. The CPU is an STM32F104CV @72Mhz. (ARM Cortex-M3) If this is finished i turn me to the keyer again.

  124. Hi Goody and Gerhard
    I am finishing prototype based on ported firmware to atmega 1284P.
    Designed and issued processor / display and interconnect board which feets toegether as “sandwitch” to typical box approx 120x90x50 mm, keyboard connector, USB connector, jacks for paddles and 4 transmitters – (key + PTT) separatated by double opthomos relays.
    I am still awaiting for 19mm high micro pushbuttons from supplier (TME) to complete prototype.
    Also predicted place for encoder to replace potentiometer, but i do not know which processor pin will be suitable for ported software.
    Also hardware for adjusting contrast and ilumination leds by keyer commands, to have it ready when those will be implemented in software.
    As soon as I complete prototype I plan to publish diagrams and PCB’s design here and / or Yahoo.

    So I kindly ask You Goody You to continue code development and implementation of features I mentioned in post before. Also porting final version to atmega 1284p will be neccessary – Gerhard please.
    I have advertised this hobby – no profit project as “All features having kayer” (Wszystko mający klucz) and some Hams are interested to buid it.

    73’s Marcin SP5IOU

  125. Hi Marcin,
    welcome to the community of the arduino keyer. I will do the portation of the actual code quite soon. I did’nt see the newer code of the keyer implementation but i have read about it somthing last week.
    I will hope that you have used opto-coupler for keying and PTT as replacement of the Transistors. In my Hardware layout i have used a TIL196
    that contains 4 Units with AC Outputs. This makes it possible to handle negative or positiv keying / PTT withouit Keep sensing the wiring / polarity.
    I will leave a notice here if the actual code is ported.
    vy 73 de Gerhard, DD4DA

  126. Hiya Marcin,

    the code is now ported and available at
    vy 73 de Gerhhard, DD4DA

    Have fun

  127. Hi to all,
    first to all I want to thanks the collaboration, help and advises of K3NG (Goody) and DD4DA (Gerhard).
    I’m finishing the hardware design for a new version of the K3NG Arduino keyer and I want to post it in order to know opinions and suggestions to add more features, improve or correct this non profit version.
    External 12 battery, or main AC supply.
    Hi Voltage key operation 4200V. this feature will give the possibility to work with HI power tube TX, in grid, cathode or screen modes. The switch is a discrete IGBT opto-drived gate controlled that permits to key the TX fully isolated.
    Wire Less key operation. By means of a tree channels IR receptor, could be possible to work in standard iambic mode or paddle squeeze. (I have designed too the TX module to adapt to the paddle ).
    Possible use of 3.2″ LCD TFT + touch screen (for example SaintSmart) or the I2C model.
    Contrast LCD potentiometer Control.
    Capability of Headphone or Speaker with volume control pot.
    All TX-RX signal optocoupled, allowing negative or positive keying.
    Speed potentiometer control.
    Key board entry.
    6 or 12 memory selected by means of a miniature rotary switch.
    Set-UP button control.
    3 TX-RX outputs for standard TX an 1 for HV Tube TX.
    And the fully features that the K3NG and collaborators have introduced until today, and I know.
    Modular concept: This construction mode permits not only to assembly the modules that fits your today work mode exigences and after will give the possible updates for the future needs, it make possible too design or adapt a different CPU platform or any custom hardware module modification that the user wants, without to change the fully keyer.
    Modular construction.
    A base board to plug on:
    CPU module for the version Mega 2560.
    IGBT driver and protections (all the signals opto-isolated).
    IR 3 channels receptor
    The base board build in circuits:-
    VCC supply -12, +12, +20, +3.3, +5 (+3.3 and 5 could be used of the Arduino board, but are preview for future CPU modules versions without VCC supplies).
    Square to sine converter and audio amplifier (to use with earphones or speaker).
    Signal decoder (new feature from K3NG).
    Frequency Counter (new feature from K3NG)
    Project situation:
    At this moment the electronic design (schematics) are finished only waiting for a first test to adjust values and retouches the possible mistakes.
    PCB design I have only finished pending to retouch (overlapping, angles out of greed etc. ) the IGBT driver and protection module.
    I wait for your feedback.
    When finished I will post the full information

    Note the schematics are too big to be inserted, if there are any people that are interested in, please ask me and I will email it to you

  128. Hi Jordi, it’s sounds very interessting into your keyer design. What does it mean with the various VCC supplies? Does it need that for operation ?
    Would you send me the schematics?

  129. Hi Gerhard,
    The IGBT driver could use a negative gate blocking, normally only used to drive IGBT modules but in a HV-Hpower tube keying I prefer use this driving mode. then for IGBT driving I need 5Vcc for entry logic, +15VCX for isolated logic and IGBT ON gate, -15VCX for IGBT OFF gate. The Inverting circuit to generate -VCX employ +20VCI. the 5V and 3.3V are for CPU and general keyer logic and the -12/+12 is used for UAF42 square to sine converter (head phone) and audio amplifier (speaker).
    I immediately will email you the schematic.

  130. Hi there,
    a nice project!!! I like it. I am familiar with the IDIOMPRESS timing (or ETM9COG in DL).
    Is this special timing implemented, or can it be?
    There is an project, called OPEN keyer. There are 2 commands in it to controll the CMOS-SUPER-KEYER timing:
    BC – Cmos Super Keyer timing oN/oFf [N]
    Query or set iambic mode B emulation of the Cmos Super Keyer III. This setting is only relevant if mode A is
    turned off using command “AF”. See section “Keyer modes” for details.
    BR – Cmos Super Keyer ratio [33]
    This setting can be used to adjust the Cmos Super Keyer timing. This allows a continuous setting between 0%
    (normal mode B) and 99% (similar to mode A).
    Thanks for reading. Is something like this implemented in the code?
    I am not familiar with programming, so please excuse my question.

    73, Andy, DL1AKP

    1. Hi Andy,

      Thanks for your question. This can be implemented in code. I think I see a way to do it and I will put this on the list for development. I may be able to add this feature in the next week or so.


      1. Hi Andy,

        I have some code written to do this. Currently it’s hard coded at compile time, but I’m going to add a command line command to set it. Would you prefer to have a command line command or another way to set the percentage?


      2. Hi Goody, I left the percentage at 33% default.
        Do you know the timing and meaning of this value?

        73, Andy

  131. Hiya Andi,

    i am also familar with the Idiom press K3 CMOS Keyer that based upon an 68HC708 MPU and this is my prefered keyer. The Timing that this keyer has got, quite handier as the most i ever taste and owned. In consequence, i got a spare keyer if one will fail. Well, it is not an easy job to analyze and program the timing and behavior charactaristics of the K3-Keyer. I did’nt find a replacement of them since a couple of years, but the Winkey2 and the K3NG keyer are close to the K3 if IAMBIC mode B is selected. The most build-in keyer in the rigs are uses iambic mode B. The K3 uses an ultimatic mode thats a variant of mode b. The ultimate mode is more tolerant if your key-timing is not exact. For beginners of doing CW this is quite helpfull.

    1. The OPENKEYER project keyer is very similar. But seems not be maintained any longer…

  132. Hi Goody,
    thanks for trying implementing this. Yes, the timing is really good. I have the real CMOS-SUPER KEYER-III and the OPENKEYER. OPENKEYER is good too, but has no contest number feature and the seidetone is allways on. It can’t be switched of with the command… No idea why.
    But your arduino keyer is really nice – so much features.
    I have the Winkeyer USB, too. That’s what I use especially for contesting. But it’s not comparable with the CMOS-3!! The CMOS-3 is MUCH BETTER!! The Winkeyer-USB even has stalls (delays) while comunicating with pc… The CW stops for a small while and that’s really disturbing.
    I have a timing chart what that command **BR – Cmos Super Keyer ratio** is used for. If that can help??

    I would help programming, but I use only BASCOM-AVR for small projects.
    I like the idea of having an LCD… and the WINKEYER AND CMOS-3 features in ONE thing, HI.

    73, Andy

    1. Hi Andy,

      I have posted beta code here: . This implements a basic CMOS Super Keyer Timing setting that can be set at compile time. I’m going to later make it that you can configure the setting at run time using a command line interface command or a command mode command.

      To enable the feature, uncomment this line:


      To configure the setting, change this line:

      #define cmos_super_keyer_iambic_b_timing_percent 0

      The setting can be from 0 to 100.

      According to what I read (and how I have implemented this feature), the setting is used during iambic operation when both paddles are squeezed. In normal iambic B, an opposite element is queued immediately when an element is being sent (i.e. a dit is queued if dah is being sent, a dah is queued if dit is being sent.) In iambic b, this queuing happens immediately. In pure iambic A, the queuing of the opposite element does not occur until the element is sent. The dit or dah must complete prior to the queuing to occur. CMOS Super Keyer timing is a hybrid between iambic A and B. A 0 (zero) setting makes it pure iambic B, while 100 makes it pure iambic A. The setting changes the amount of time the keyer waits to queue the opposite element, with the number setting representing the percent of time of the element. So if you set it for 25, the keyer will wait for 25% of the dit or dah being sent to complete before it will queue an opposite element. I hope this makes sense :-)


      1. I should add that this CMOS Super Keyer setting only takes effect if you’re in iambic B mode. It has no affect in iambic A or Ultimatic modes.

      2. Hi Goody,

        yes, that absolutely makes sense and I understand it. Its correct, that is the way it is in CMOS SUPER KEYER.
        Thanks a lot for that work. To control the function with an command-mode command would sure be the more comfortable way. But after finding the best setting for themselves – I think it is not neccessary to change it anymore.
        If the keyer should be used for more than one operator, e.g. in club stations, than changing it can be an advantage.

        Now I have to find the arduino kit of my work colleague. He is in parents vacation (3months) until August. SRI :-((
        Maybe I can get a nanokeyer kit or a arduino by myself if not succesfull.

        73, Andy.

      3. Hi Goody again,
        I just tried to take a look at the code. But checking the code ends up in a bunch of error messages about PS2Keyboard I don’t understand…
        I didn’ change anything. Like in your page, I installed the two Librarys, but no effect.
        What I am doing wrong? Maybe I am just stupid, then I am sorry for this question.
        73, Andy

  133. Hi Andy,

    please note that the primary “support”media was moved away from this blog into a dedicated Yahoo group (see info further above).

    I suggest that you use the libraryinstall instructions provided in the nanoKeyer package. This was for me the only way of using the library. If following Goodies way it also did not work for me and I was getting lots of errors….

    73 de Oscar DJ0MY

    1. Hi Oscar. I see an error in my instructions. I will fix. Thanks

  134. Hi OScar, Hi Goody,
    I used the instructions on Oscars nanokeyer infos. It workes well now without errors.
    Will now going forward to test the SUPER-KEYER feature at the breadborard next days.
    73, Andy, DL1AKP

  135. I’m not aware of anyone attempting it, but the technique looks pretty simple. Do you know how well it works in a high RF environment?

  136. I have have designed and built my hardware implementation. Tested with 300W amplifier, Keyer currentlu has no cabinet. No rf problems, However I proactively secured all input cables by ferrite rings.
    Very important to block all the inputs with 10nF capacitors. I used smd ones.

    Marcin SP5IOU

    1. Oooh sorry. I didn’t notice that question related to capacitve touch.
      Yes I RF could be a problem, however there are some working projects of touch paddles on the web.

  137. Hi All! I got Arduino mega some day ago. I wanted check CLI first as I have no hardware around yet. Uploaded default source + serial help, I could see FW version and msg how call for help. But, no response for any my command with proper serial console setting, arduino led blinked. Finally, I left SERIAL + CLI + SERIAL_HELP features only and suddenly it started work. Seems like COMMAND_BUTTONS feature without HW blocks serial RX.

    73, Tomas ok4bx

  138. Hi Tomas. The command buttons will do this if you don’t have +5 volts on the button line because the Arduino thinks there is a button depression and it’s waiting for it to complete. 73 Goody

    1. Thanks Goody for description! Could be there short note by plugin #define similar like it is by potentiometer feature that hw is needed? You know, I read all manual information about serial port as it first appeared like error with it. Tomas

      1. Thanks for the suggestion. I’ve updated the code and it will be in the next release. Thanks and 73!

  139. Hi, I would like to know if when the keyer is sending from a memory and one touches the paddle (either way) does the transmission stop. If so is a dit or a dah sent or does it just stop. I believe this is a feature of K1EL v23.Thanks in advance Glen

    1. If you hit the dit paddle it stops and does not send a dit, it just stops.

  140. What means: “Enhanced LCD Menu System” ?
    Do I need additional buttons on the front or even a rotary encoder? Can I put in settings using these buttons instead of keyboard or paddle?
    I plan to make a housing and want to have all in to get ready for all the cool features planned! Great project, I love it!!

    1. Currently the LCD display shows some basic things, like paddle echo. You can’t change settings with it. I’m planning to write a menu system that could control all of the settings using front panel buttons. I intend on using the same analog button scheme that is used for the command buttons today. You may still want to put a rotary encoder on the front panel so you can adjust the speed quickly without having to navigate menus on the display. I often need to turn my speed up or down quickly when operating.

    2. Thanks for the link to the menu library. It’s the best one I have seen yet. I’m attempting to determine if it’s the one I would like to use. I was hoping to have something with soft keys, where labels on the screen would correspond with six buttons on the sides of the screen, rather than the up/down/left/right/enter/exit methodology this library appears to use. But considering how much time it would take to develop from the beginning, a library like this is probably the way to go.

  141. Hi Goody
    In the the schematic there is a 10K pot for speed control, is the encoder a substitution of this potentiometer to enhance the features or is an additional control?
    Many thanks for your constant support.

    1. Hi Jordi. It performs the same function, so it’s a substitution. Since an encoder doesn’t have minimum and maximum rotation stops it does provide some advantages over a potentiometer. There wouldn’t be any reason to include both a potentiometer and an encoder on a unit, and on a new keyer I would build it with the encoder. I am going to continue supporting potentiometers in the code for the foreseeable future.

  142. Thanks Goody, I will change the potentiometer by the encoder in my main board, at this moment is possible yet because I have not closed the PCB desing.

  143. Would you consider interesting to add with the encoder a Rotary Encoder LED Ring to visualize de encoder position?

  144. I would consider that for a feature. What would it take to interface with it? The challenge may be finding enough I/O pins.

  145. I have choosed the Mayhew Labs rotary encoder LED ring that use the TLC5925 interface ( plus an Alps encoder EC11K1524402 operating life of 100k cicles.
    I have in my board the K ports not used, K ports are ADC and too I/O with selectable Pull-Up. I have distributed, for components distribution reasons as follow:-
    Arduino Mega2560 board
    Pin9 => ENCDR_OE
    Pin10=> ENCDR_LE
    Pin11=> ENCDR_CLK
    Pin12=> ENCDR_SDI
    Pin13=> ENCDR_A
    Pin14=> ENCDR_B
    Pin15=> ENCDR_SW

    1. I have a request when asked to develop to specific devices, please send me a device for free so I can test with it and use it. This speeds up development greatly as it’s very difficult to troubleshoot problems when you don’t have the device. Also, it saves me the expense of buying a device, one that I may not necessarily have bought for my own use. And it gives me another toy to play with :-)

      1. I’m absolutely agree, but at this moment I have not finished yet the design of main board and the TX, basically for mechanics questions. if you meanwhile prefer that I send to you the LED ring and the Alps encoder please email me your address and when I receive this components I will ship to you.
        In the TX I have added the posibility to use one centered IR LED or two in the sides and one standar red led in the center also I have added the options of duty cicle control and modulation, but the main question to get the definitive design, is that I have to order a Begali Sculpture paddle to have the exact shape for the PCB and I’m not decided yet.

  146. I had used a simple PCF8574 Expander to decode two incremental Encoder, switched two LED’s and decode two Switches (like the button of the Encoder or just 2 button switches)
    This works great but needs to be handled by an IRQ Service Routine and the clock Speed of the IIC Bus must be raised upto 800khz.
    Also a choice would be use an mcp23s17 as SPI variant. That’s fast enough and is expandable.
    Well, all this is possible, but this is just a keyer and this should be usable in portable Environment. Current consumption is also an importand Point of view – this should allways be in mind, if an extension of functionality is planed.
    To use an incremental Encoder combined by the lcd Display is a consequent stepp but should be an optional possibillity, not an requirement.
    Instead using the LED bar / ring, use the lcd-bar instead. This Needs just more code and does’nt consume more current and a Hardware Expansion that would i recommend.

    vy 73 de Gerhard, DD4DA

  147. Hi Gerhard,
    I’m agree, all the functions that aren’t basic, have been designed software or hardware selectable and the user have the non mounting option without any consequence for the main functions of the keyer. By the other hand I have been looking for the right angle rotary encoders endurance, and all of types that I have found have an operating life lower than the vertical mount (the ALPS vertical type minimum 100k), due that I want to mount the encoder in the front panel I have thought that the LED ring PCB will give me this possibility beyond his main function. Moreover the LCD bar representation is too possible due the encoder is directly connected through the ring PCB to the CPU port. In this way you have two options display by means of the LCD or the LED ring.

  148. Hiya Jordi,
    everyone should decide what kinda functionality the keyer who owns, got in. I cannot describe how i feel, if i follow the keyer thread and the developing of them. It’s amazing to see how many fellows interessting into the project, but the main function – to be an alternative and homebrew keyer, is slowly move away from there destination. The main Advantage of the K34NG keyer is, that this is not so komplex, can fit into nearly every Radio and do many more things as everyone would expect who attempt to find a keyer unit.
    A big point is the tunable timing charactaritics and the winkey emulation who makes it very usable for any contest or other Stations.
    This should be the final destination of the keyer and the basement of every extensions was made by K3NG by Publishing the schematic and source code of them. This is a good playground for everyone. This seems to be lost by overloading the project. The size of code and the consume of RAM limit’s the usable MCU and the keyer will not be implementable on cheaper platforms. Keep in mind, that sometimes is less getting more.
    Jordi, catch the code as a base Fundament for your keyer and implement the Incremental Encoder with the LED ring – this Looks quite nice and i am sure, there are some HAM’s out here, who wanna build it – trust me. I would recoment to fix the keyer development and move to a new one.
    A good and nice tool where a digital SWR messuring instrument based on arduino board – or something like that. Those things are available on the market but there are not cheap – a good reason to brew them. I would expect that this unit coast are less that $30 and could be used up to 2KW HF.
    Hey Goody, what’s about a digital quadrature decoder to get sense the phase-angle and amplitude to get the XL / XC as a tuning argument for your antenna tuner project?

    vy 73 de Gerhard, DD4DA

    1. Hi Gerhard,
      I fully agree with you, I started my idea only with the target of add the possibility to work with hi power vacuum tubes TX that involve hi voltage keying, later reading different posts in the Radio Artisan I saw the possibility to design a hardware including the suggestions made by the ham people, the main problem is to know the moment to stop the design and produce the definitive PCB.
      In my design actually I have added the following features all of them are modular : an IGBT HI Voltage module that will permit to operate with vacuum tubes TX, in cathode, greed, or screen keying (4000V max), a square to sine circuit plus an audio amplifier to use headphones or speaker, the hardware implementation of the K3NG decoder following his design used in the antenna tuner, the speed control by an incremental decoder with the LED ring, its true that this last device probably could be considered only cosmetic, but why not? I thing could be nice, other possibility is use different types of LCD including a 3.52 TFT touch screen, also you can use all the compatible Arduino modules including the DUE (not compatible with the actual software as you comment me, but in the future?) and finally an IR RX module and the IR TX for the paddle to operate it in a wire less mode. All of this features are plug in modules or independent circuits that everyone can choose to customize his keyer according his preferences or his budged.
      Now I thing that is complete enough (for me) and I will stop this design, now only is pending to decide the final PCB dimensions according the box and the paddle. When I have fully checked the design will post the schematic and PCB in order to get the maximum feed back.

      vy 73

    2. >Hey Goody, what’s about a digital quadrature decoder to get sense the phase-angle and amplitude to get the XL / XC as a tuning argument for your antenna tuner project?

      An amateur in India asked me about this recently and provided some technical information on how to do it. I haven’t had a chance to dig into it yet, but I am interested in including this as an option for the antenna tuner. It would let you use the tuner as an antenna analyzer.

  149. In my last post there is a mistake the K3NG antenna tuner design used in my design, is for the frequency counter, excuse me.
    vy 73

    1. I actually intended to include a frequency counter as my old PIC keyer project included one. That was intended for use in a QRP rig where you didn’t have a frequency readout. The PIC keyer frequency counter actually worked quite well, and I have an 80m homebrew QRP rig that still uses it. But unfortunately the Tone() functions use the same timer that’s need for a frequency counter, and I never got around to writing some sort of workaround. Probably the thing to do would be to have a separate ATMega328 for a frequency counter and interface it to the main unit using I2C. But no other people have inquired about the frequency counter functionality.

  150. Jordi, my last notice should be understood as a vote to stop every development or extension of the keyer – nevertheless, i had the feeling, that the main focus is getting lost of the keyer project.
    The main advantage of an IR wireless key is getting lost if this is not integrate like the PALM’s PK1 Key. The Key must have the wireless link to the keyer but this Need a secound, very “Tiny” device and space. You must join them hidden to the key and this is often impossible reasoned by the key’s “design”. In technical aspect, this is possible without Problems, but it lacks the design.

    vy 73 de Gerhard, DD4DA

  151. Hi Gerhard,
    A digital SWR with arduino is a great idea! I would like that, too. I really had an eye on such a thing often at HAM RADIO, but always was to expensive. At the moment I am a beginner in Arduino but working on it. Just trying to build my Arduino keyer – I love it. And looking forward to see new projects.

    1. Is it intended to make this a keyer project or is the creep of the scope of the project intentional. These other ideas are good but in the keyer box?

      Just a thought, Glen, K1GW

      On Sun, Jun 2, 2013 at 5:11 AM, Radio Artisan wrote:

      > ** > DL1AKP commented: “Hi Gerhard, A digital SWR with arduino is a great > idea! I would like that, too. I really had an eye on such a thing often at > HAM RADIO, but always was to expensive. At the moment I am a beginner in > Arduino but working on it. Just trying to build my Ardui” >

      1. I don’t intend on putting an SWR meter within the keyer project. That’s quite a bit of scope creep :-)

    2. @DL1AKP
      Hi Andy,
      i’m in developing of a cheaper digital SWR messuring Instrument by using a 3.5″ Touch-TFT Display a Cortex-M3 Controller, supported by an reel free RTOS called CoOS . (Free RTOS is not free !!! so this is not my choice.)
      I have decide me to use a Bruene-Bridge that can handles up to 2KW but this can be replaced by a “Tandem Match Coupler” if prefered. The Interface between the Bruene-Bridge and the Controllers ADC need a buffer and impedance conversation stage builded by a simple OP-Amp. The Project can be build by a Vero-Board but need a PCB that contains the MPU. This boards are cheap available i all parts of the world an called ST-Discovery (less than €20.-) and contains the Programmer / Debugger (JTAG SWD) who can sepperate later and use by other Projects.
      Actually, the TFT shows two needles that represents the transmitted and reflected power. The scale that be underlayed under the needles are not finished, but this is the last Job i need to do before this work is done.
      The ADC’s sample rates are to fast to poll them by the MPU (this clock at 72Mhz) so this read-out must be handled by a DMA – an awesome feature, trust me. If the Project is functional finished, i will publish them.
      The greatest hint as now was the 3.3V voltage of all components – i am not very familar with this – all my digital hardware experiences are based up on 5V Technologie. A simple RS232 driver stage must replaced, because my converter stage for a simple rs232 / rs485 / rs488 are all 5V based.
      vy 73 de Gerhard, DD4DA

    1. One other amateur asked about capacitive paddle inputs in the past. I’m not really keen to the idea as I think RF would cause problems, but I’ll put it on the feature request list.

      1. Ah okay, i understand. I was just courious about this, because it seems to be a good feature.
        best regards

      2. I have had a few sensor keys with capacitive input. It allways produced problems with power exceeding 100W out. It works well on low power levels, but I think will be hard with full legal limit power.

  152. Capacitive Input is a nice Feature but it’s very sensible about RF too. I did some checks with them a few years ago to solve my cw Speed Problem, but None of the Units i got and checked where RF reliable enought if 400Wtts power was exceeded. I have seen schematic that uses photoelectric barrier instead the paddle contacts, but i never checked up them, yet. In the meantime, i have lost the skill of faster cw reception, so my morse key Schurr Profi2 is fast enought to do the bunch of qso’s i do in the year.

  153. Hello Goody
    I try to download the files *. Ino Development Site and open all instructions together as a single structure without separating instruction fields. The old files *. Ino that I have not have this problem. I’m interested in the Super CMOS.
    Something is wrong .. in my Explorer?
    José – LU1KAK

    1. Hello José. I’m not sure what you mean by “instructions”. Do you mean you’re trying to combine the library files in the main .ino file?

      1. Well … I could not change the structure of Windows Explorer to download either the *. ino … but Google Chrome is perfect the *. ino. I try now the Super CMOS..
        Thank you .. thank you for your work Goody

      2. What happened with Windows Explorer is that the lines do not drop editing .. everything is one thing .. could not properly edit the *. ino, but already solved with Google Chrome

  154. Using compiler options for Board=Arduino Uno and Programmer=USBTinyISP under IDE 1.0.5,
    I am able to compile and load code version 2013040201 into a bare ATMega328 chip and run it without issues.
    Attempts to do the same with code version 2013051901 result in failure. Key presses do nothing and there is no audio.
    Any thoughts on the subject would be appreciated.
    An attempt to do the same with code version 2013051901 results in failure. The load is apparently successful, key presses do nothing.

    1. Hi Peter. Try compiling with less features and see if you’re able to upload and run it. I get the feeling you’re getting close to the memory limit of the 328. It would help to know what features you’re compiling.


  155. Goody,
    The compiled code size is about 18K in both cases. Features are minimal and identical: Command Buttons, Say Hi, Potentiometer, and Memories. I tweaked the pins to be: Left = 2, Right = 3, Sidetone = 4, TxKey1 = 9, TxKey2 = 0, Pot = A0

  156. Goody,
    Here’s a photo of the breadboard I’ve been using for testing. There isn’t much to it… an Atmel ATMega328P chip and a few
    discrete components are all you need. The programmer, a USBTinyISP, provides power to the keyer after the code is loaded.

    Thanks for your help optimizing your code for this very basic implementation.


    discrete components

Comments are closed.