Arduino Keyer for QRP CW Radio

Posted: September 7, 2016 in Amateur Radio, News
Tags: , , , , , , , , ,

Test Setup

This past summer my brother and I ventured to the Bahamas for a short vacation. As amateur radio operators, we thought it might be fun to work from a different country. Several weeks before our trip, we received our reciprocal licenses from the Bahamas. Assigned the suffix “/C6A”, it was then time to figure out my rig.

Traveling with a radio is hard. Antennas for HF typically require lots of area, and people ask lots of questions.I wanted to have a small radio that I could operate from the beach. My brother brought his Elecraft KX2, but my Icom 706MKII would be too bulky. Follow me after the break to learn more about my solution.

frogI ventured on to ebay  and found the “frog” 40 meter Morse code (CW) transceiver. The cost was all of $9 for a kit. I soldered the board together in an hour and spent a couple debugging it. Since the radio is QRP, only putting out 1 watt, I was able to power it off of a 9 volt battery. For an antenna, I used a couple random lengths of wire that I have lying around. They were too short for the 40 meter (7 MHz) band, but at this power level, Standing Wave Ratio (SWR) was not a concern. The radio is fixed at 7.023 MHz. With my CW skills at about 10 words per minute, I figured I might be able to make a few contacts, but also wanted to have a plan if I proved to be popular.

I needed to make an auto-keyer to handle higher speeds (or if I just got lazy and wanted my laptop to send and decode the QSO). Decoding CW is easy with the microphone-in jack on my computer and some software. Sending is a bit more difficult as this radio is setup to use a switch.

IRF510This started the classic analog verses digital debate between me and my brother. I initially thought about using an Arduino and a FET (my eventual solution) to act as a high-speed switch. My brother suggested a diode and small bias network to work with the digital out of the Arduino. Both solutions could have worked in the end, but I decided to stick with the tried and true FET transistor (and before any analog engineers freak out: yes, I know it can be used in its linear region as an amplifier, but the saturated region makes a quick, simple switch). Digging through my box of spare parts, I came across an IRF510 FET transistor. It could certainly work with the radio power (9 volts) and the gate voltage was well below the logic level of the Arduino (3.3 volts). I quickly soldered the source and the drain to the radio. I used some prototyping wire from my breadboard kit as jumpers and soldered one to the gate of the FET and the other to ground.

ardintConnecting they radio to the Arduino was quick and easy. I just had to plug in the gate wire to a digital I/O pin and then connect the grounds. I used the USB connector to communicate with the computer. When an Arduino is connected to a computer, it communicates over a virtual com port. I used the virtual com port over and a serial console to enter the text. As for the Arduino sketch, there are tons of CW libraries online for the Arduino and I explored a couple. I wrote a simple sketch based on the Serial Event example to send the message typed in serial console. The loop function of my code is below. If you try to replicate this project, you might need to tweak your sketch based on the CW library you use. As you can, it took just a few lines of code to make the auto-keyer and you can use this code as a starting point.

void loop() {
 // print the string when a newline arrives:
 if (stringComplete) {
 // clear the string:
 inputString = "";
 stringComplete = false;

With the system working in my lab, it was time for my trip to the Caribbean. The good news is that the system mostly worked. In my lab I tested up to 10 words per minute. In the field, I discovered the capacitance in the keyer circuit was too much to go any faster. I programmed the Arduino for 20 words per minute. The CW signal was far from clean, and sent unintelligible characters. The poor CW signal , coupled with a low antenna height and poor band conditions, led to no contacts. We tried for a couple of hours and neither my brother on his KX2 nor my maker radio were successful. While this DXpedition might not have been a huge success in terms of contacts, it was a huge success in making and a ton of fun!


  1. […] works beyond LEGO sets. Remember that radio I took with me to the Caribbean? I modified the schematic to add in the transistor. I could have […]

Leave a Reply to Maker Tip: RTFM – Read The Fine Manual | Milluzzi Labs Cancel reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s