In the May 2023 QST, K1SWL published the article, “A Simple Morse Memory Keyer by Dave Benson, K1SWL. I found it to be an interesting project, mainly because it used the Raspberry Pi Pico microcontroller. I like the Pico because it has more memory and is faster than most Arduinos. I thought to myself that I probably could use the Pico to create a K3NG-like keyer.
Like a lot of my ideas, this one got put on the back burner until a couple of weeks ago. Then, a friend of mine showed me an article in the January 2024 QRP Quarterly, “How Low Can You Go?” by George Herron, N2APB, and Peter Eaton, WB9FLW. In this article, the authors describe a way to implement coherent CW. The kicker is that their implementation uses K1SWL’s keyer, also known as the Pico Mite Keyer (PMK) as the foundation for their coherent CW hardware.
Anyway, this got me interested in the Pico keyer project again, so I purchased a set of boards from Midnight Design Solutions and the parts from Mouser. Since I already had a Pico and some other assorted parts, I figure that this has cost me just a little over $30 so far, and the final cost will be under $40.
The parts arrived on Monday, the boards on Tuesday, and Tuesday evening I completed the assembly. As you can see from the photo above, the board is not densely packed, and the assembly went without a hitch.
Programming in MicroPython
On Wednesday, I started playing with the code. One of my motivations for doing this project was learning MicroPython. K1SWL wrote his keyer program in MMBASIC, but with all due respect, I’m not sure that’s really the best language for this type of unit. It worked for the original project because it had a limited number of features. I wanted to implement nearly all of the features found in the K3NG Keyer software, including accepting WinKeyer commands from the USB port. I’m not a software expert by any means, but I gotta believe that MicroPython is a better choice.
I got a big boost in this direction from Steve Beckman, N3SB. He wrote a MicroPython program for the Pico Mite Keyer, and it was published on the Midnight Design Solutions website. This was just what I needed to get started.
Over the past couple of days, I’ve made some modifications and added some features:
- Eliminated the speed pot. I’ve never liked changing speeds with a pot, so I didn’t even solder one onto my PMK board. My code changes the code speed the way that the K3NG Keyer does, You hold down one of the buttons, that I call the command button, and then hit the dit key to increase speed and the dah key to decrease speed.
- Programming and sending messages from memory. N3SB had set up interrupt handlers for the four message buttons, but hadn’t set up a way to program and store messages. My code now sends messages, but it requires that the operator set up those messages in a file first. See the next bullet point.
- Saving parameters to non-volatile memory. Doing both of the above two things sort of necessitated doing this third thing. If you’re able to change the speed at which the keyer sends, then you’ll want to somehow store that parameter, so that the keyer doesn’t forget that when you turn it off. Ditto for messages.
Implementing these features required a lot of learning on my part. Among other things, I had to learn:
- How to debounce switch inputs in software.
- How to handle interrupts.
- How to use the ujson library (to store and recall data from non-volatile memory).
Working on this project has been a lot of fun so far, and I still have a long way to go. I’ll be documenting my progress along the way. You can find the code at https://codeberg.org/kb6nu/KB6NU_Keyer.
Jason VE3MAL says
Good luck with this! The pico has such an interesting potential as a keyer. It also has the potential to do winkeyer (or winkeyer-like) keying over wireless as well. That could open up some fascinating possibilities with mobile devices.
Dan KB6NU says
I just purchased a couple of Pico Ws to see what I can do with them. I’m going to focus first on communicating via USB and then see about concocting a wireless interface.
Jon Titus, KZ1G says
Hi, Dan.
I have a Pico Memory Keyer, too, but it stayed under a pile of other things until yesterday. Like you and others I had the same idea–use MicroPython to create the type of keyer I want. Good to find some useful code I can use or adapt. Thanks for publishing your information. I’ll look at N3SB’s info, too.