Fork me on GitHub

Project Notes

#567 Random Code Practice

A simple Morse code practice generator that prints the character and sounds the dit-dahs to a speaker. Based on a project by Glen Popiel KW5GP.

Build

Here’s a quick demo..

clip

Notes

Glen Popiel’s Arduino for Ham Radio is a great little collection of ham radio-adjacent projects that not only provides some good project inspiration but also presents them in a way that is easy to follow no matter one’s level of Arduino experience.

This project is an adaptation/enhancement of a simple Morse code practice generator:

  • it selects a random character
  • displays the character on an LCD
  • and sounds the Morse code to a piezo speaker
  • the speed can be adjusted with a variable resistor

I’ve extended and revised the code to add some new features:

  • a switch to select between all character / alpha only / numbers only
  • display the actual dit-dah Morse representation on the screen as well as the character being sounded

Construction

A SPDT Centre Off switch is used as a tri-state toggle for the character select:

  • ON: pulled high (alpha only)
  • CENTRE: VCC/2 voltage divider (all characters)
  • OFF: pulled low (numbers only)

Breadboard

Schematic

First testing the circuit on a breadboard:

Breadboard Build

Code & Libraries

  • Arduino Wire library
  • LiquidCrystal_I2C - LCD over I²C
  • Morse - Morse encoding by Erik Linder SM0RVV and Mark VandeWettering K6HX.
    • I cannot find a link to the original source (Version 0.2), so it is included in the project folder.
    • Includes Glen Popiel KW5GP’s fixes for Morse encoding
    • extended by me to allow dynamic speed adjustment

Putting it in a Box

For a final build, I switched the Uno for an Arduino Nano and mounted it all in a suitably sized chocolate box.

internal_build

RandomCodePractice_build

Credits and References

About LEAP#567 RadioCWArduino
Project Source on GitHub Project Gallery Return to the LEAP Catalog

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

LEAP is my personal collection of electronics projects, usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting (IMHO!).

The projects are usually inspired by things found wild on the net, or ideas from the sources such as:

Feel free to borrow liberally, and if you spot any issues do let me know. See the individual projects for credits where due. There are even now a few projects contributed by others - send your own over in a pull request if you would also like to add to this collection.