Morse code beacon using Arduino

Arduino

Any hams out there that need a quick-and-dirty morse code beacon? Then you might be interested in Mark VandeWettering’s Arduino Based Morse Beacon. I really like the clever way that he stores the code sequences for each character:

It’s a little bit clever (a very little bit) but I guess it does require some explanation. Morse code characters are all length six or less, and each element is either a dot or a dash, so it would seem that we can store the pattern in six bits. Let’s say that dits are zero and dahs are one. Lets store them so the first element gets stored in the least significant bit, and the next in the second most, and so on. The only trick is knowing when there are no elements left, because otherwise we can’t tell (for example) K (-.-) from C (-.-.) To do that, we store a single extra one after all the other elements are taken care of. Then, when we are looping, we do the following. If the pattern is equal to one, we are done (that’s our guard bit). If not, we look at the least significant digit. If it is a zero, we have a dit, if we have a one, it’s a dah. We then get rid of that element (by dividing by two, or shifting right if that floats your boat) and repeat. Voila. Each character takes only a single byte to store its pattern, and decoding is just done in a few instructions.

Mark admits that using an Arduino for this is a bit of overkill, however I think that convenience trumps component cost for one-of projects like this. If you are up for the challenge, however, you could probably build one with more esoteric components, such as an EEPROM+counter, or even a music-box type mechanical system. Anyone create something crazy cool like that?

In the Maker Shed:

Makershedsmall

Arduino Family

Make: Arduino

18 thoughts on “Morse code beacon using Arduino

  1. JC Wren says:

    I used this same technique back in 1991 for an 8051-based project called ‘Morse Drone’. It would speak random characters or character groups using an SP0256 phoneme synthesizer and the send them in Morse code. The speed, frequency, etc were all alterable from a couple push buttons.

    I think I actually used the technique before that on a Z80 program that drove a speaker using one of the serial control lines on an IMSAI 8080 system (it had a Z80 CPU card in it) I had (and still have!).

    1. JC Wren says:

      I’ve posted the code at http://tinymicros.com/websvn/listing.php?repname=Public.8051&path=%2Fmorse_drone%2F#_morse_drone_

      The username is ‘guest’, with an empty password.

  2. Chad says:

    I like this concept and looks fun to do — i have been wanting a easy diy decoder with lcd screen ( maybe use an arduino for the decode with mic and output to lcd with a variable wpm function ) any suggestions

    1. david says:

      I’m working on a decoder on an arduino at this time….if interested we can maybe collaborate ? drop me an email at dmaugis hotmail com

  3. aladaris says:

    I’ve made something similar to this (Open source, of course), hehehe:

    * Read the description (available in englihs)

  4. Tony says:

    Among the projects in my backlog of things to do is a set of beacons for the 10, 24 and 47 GHz bands and having a good CWIDer is necessary. Additionally though it is important to have a way to turn a beacon on and off remotely, and the Arduino would be able to handle this as well. Commonly this is done with DTMF tones on a VHF or UHF channel, but could also be done over the internet, or cell phone, etc.

  5. AC0KG says:

    Nice work. You could put it on a $20 AVR Butterfly and use the Butteruino library to get support for the various bits of Butterfly hardware under Arduino. The speaker, for example :) I mention it because I wrote some very similar morse code (ha, a pun!) to run on the Butterfly.

  6. anachrocomputer says:

    There used to be a morse-code beacon at the top of the Cabot Tower in Bristol http://en.wikipedia.org/wiki/Cabot_Tower_(Bristol) . I haven’t looked closely at it for a while, so I’m not sure it it’s still there and working. Nor do I know how it was implemented, but it may have been purely mechanical.

  7. Jeremy Denslinger says:

    Is it possible to use a USB, PS2 or other serial keyboard as one input, and an audio or electric signal from a morse key as a second input, with the key input as one output and an LCD (or VGA out) as a second output? It would be neat to build a morse code/ CW translator that could be used without a standard PC, only reuiring a keyboard (and monitor)

    I have found a 64 button input, an LCD, and an audio converter board… even using the 64 button input could be used instead of a keyboard. A device like this could be handy as a HAM radio “TTY” device, or for emergencies… As with all Arduino projects, this too is limitless in possibilities for use.

    I actually found the makezine video blog post while looking up a device to do this and instructions for Arduino boards.

Comments are closed.

Discuss this article with the rest of the community on our Discord server!
Tagged

ADVERTISEMENT

Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).

FEEDBACK