Weather

MARYVILLE, MO KE0SBX QTH

Monday, September 25, 2023

Arduino Morse Code Practice Oscillator: Practice with Computers and Morse Code

Hi fellow hams and electronics gurus!

I hope that you are doing well, and what a start to the fall it's been for me! The Bearcats were off to a rocky start in football but won in a shut-out this weekend and I'm close to leaving the university with Computer Science and Music degrees. I have also re-sparked my interest in IoT things like Arduino and the Raspberry Pi.

Lately, I haven't been on the radio as much as I'd like to be, but that's okay because I've been working on something that may prove to keep me as active in the hobby as I once was.

A few months back, I made a post about my progress with CW and learning Morse Code. I'm slowly getting proficient in it, but I'm not quite ready to make my first QSO with it. I have yet to reach 15 wpm, and as of right now, I'm sitting at an effective 10 wpm. Learning a new language takes time, but that's okay - we all take our own time to learn new things, and my learning journey with Morse Code is going rather well. I just got my Cub out the other day to blow some dust out of the circuitry and it still works great! It's still putting out 1.5 watts of CW.

With that being said, I'm a student by day, and I don't have much time to learn CW while I'm in class, let alone work a QSO. I work a desk job at our university's IT department where we have unpredictable amounts of phone traffic every day. It could be busy one day and dead the next. Also, I have hour-long breaks every so often that I'm sure I could use for productivity. What can I possibly do during my downtime during our dead periods and in between classes? 

Besides, wouldn't you like a better fidget toy that also makes noise and isn't a fidget spinner??? It has a pretty display...

About a week ago, I stumbled upon Mario Gianota's Arduino Morse Code Practice Station on the excellent website, Hackaday. It's a basic Morse Code CPO, but with a twist - it features an OLED screen (I2C protocol) so you can see what you're typing! According to my compilation data, it takes up only 61% of EEPROM space on an Arduino Nano board. Not bad for such a small board! The included alphabet, however, includes alphanumeric characters from A to 0.

I prototyped the board using a breadboard and it didn't work at first. I noticed that the button (or key) would hang on for at least 3 to 5 seconds after I'd release it, which would always result in me sending either E (.) or T (-). This was resolved with a pulldown resistor of around 10k, which pulls the button down to low, or ground when the button is instantly released. In technical terms, it reduces button bounce, or delayed feedback when the button is released. This is why it's important to read schematics as most circuits are not just plug-and-play. 

If you connect the Arduino circuit to the Arduino IDE or serial terminal like PuTTY via USB, you'll be able to see what you type with more detailed information, including how many milliseconds it took to send a dot or dash. This helps in seeing how fast and consistent your keying actually is. Keying speed is adjusted with a dot length in milliseconds. As of right now, my minimum dot length is 40 ms and the maximum is 120 ms. If you're just starting out, I'd change the maximum duration to be a bit longer. Remember, a dash is 3x the length of a dot. If you're using the Farnsworth method, the minimum and maximum dot lengths will be obviously shorter.

As with any ham radio operator, I figured that I had to make this custom to me. To personalize it just for me, the only constraint I had was that this circuit could not emit any noise from a buzzer. I have co-workers and bosses who don't necessarily like ear-piercing piezo buzzer squeaks, and I'm sure I'd get dumb looks from random passersby. In order to resolve this, I made the output go to one of the Arduino's PWM-capable pins instead of a digital high-low signal that would drive a simple buzzer. It now emits a relatively pure square wave - just what I expected from a PWM pin, good enough for CW practice. With just a 100K fixed resistor coming from the PWM pin and a 10K potentiometer on the other side of the said resistor, I am able to adjust the audio output just enough to operate anywhere from a quiet day at work to a band trip on a noisy and crowded bus, all with the added benefit of private practice. Plus, it's even better with noise-cancelling headphones hihi.

I have yet to finalize the CPO and I have a list of things I'd like to implement. The sidetone as of right now is hard-coded, and it currently is 700Hz - you can change this in the code, and personally, I wouldn't go under 400Hz or over 1000Hz. I have also removed the external LED and declared that as pin D13 (the on-board LED). You can add that back if you'd like on pin D13 or whatever pin of your choice, and in the future, I might. I'd also like to add more characters like slashes and question marks, which will require a slight modification to the character array (6 elements instead of 5. The extra character is for a silent space so the code knows when the character ends). I am looking at ways of enclosing it and finalizing part placements. I want it to have a nostalgic enclosure but it needs to be small enough to fit in my pocket. I want it to look similar to the Heathkit HD-1416 CPO shown below. This is the perfect size for my backpack, but it may be a bit big for my pocket...

Another thing you can do besides practicing on your own with this is transmit on air. If you have a few hams in your area that want to practice their CW skills, you should be able to connect the output of this device to your HT or 2m/70cm rig's microphone input and send modulated CW! Just remember that the volume is the gain settings, and hams don't like overmodulated microphones. You'll more than likely need a VOX circuit or you can implement one straight from the board too, or if your radio supports it, you can activate the internal VOX circuitry. That way, you can use CW (albeit frequency-modulated) and FM at the same time for on-air practice sessions. Modulated CW may sound unconventional, which it is in comparison to HF/normally-modulated CW, but it can help you make contacts over a short distance via a VHF/UHF radio. Plus, you'll get your practice in! Again, modulated CW won't get you as far as standard CW but in an emergency, anything is fair use.

I have my Baofeng which is STILL working beyond its expected life expectancy - a huge surprise to me! I must've gotten the only working one in the batch. In the future, though, I'll probably opt for a Yaesu or Kenwood HT, which should last me for life. 

Stand by for an update to this page as I'll hopefully upload some videos of the circuit in action! Until we meet again...

No comments:

Post a Comment