Morse code beacon using 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


Recent Entries

Comments

Oldest comments listed first.

Posted by: JC Wren on November 18, 2009 at 1:24 PM

1991 technology comes around 18 years later :)

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!).


Posted by: JC Wren on November 18, 2009 at 1:48 PM

Code posted

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.


Posted by: Chad on November 18, 2009 at 2:23 PM

I like this but im looking for a easy diy decoder

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


Posted by: david on November 18, 2009 at 10:41 PM

decoder

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


Posted by: aladaris on November 18, 2009 at 3:18 PM

I made something like this :)

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

http://www.youtube.com/watch?v=o4N5T67BL1g

* Read the description (available in englihs)


Posted by: Tony on November 18, 2009 at 5:57 PM

Excellent!

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.


Posted by: AC0KG on November 18, 2009 at 10:58 PM

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.


Posted by: anachrocomputer on November 19, 2009 at 6:51 AM

Morse beacon in Bristol

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.


Leave a comment


Subscribe to MAKE!Subscribe to MAKE Magazine!

Subscribe today, save 42% and get web access to MAKE free. MAKE Digital Edition is available only to subscribers.

$34.95 / 1 year
(4 Quarterly Issues)

Subscribe now


Void your warranty, violate a user agreement, fry a circuit, blow a fuse, poke an eye out. Make: The risk-takers, the doers, the makers of things... Welcome to Make: Online!


CRAFT Maker Shed Maker Faire MAKE television




Check out more videos from MAKE.

Maker SHED

Connect with MAKE

Be a MAKE fan on Facebook MAKE on Facebook
Visit our Facebook page and become a fan of MAKE!
MAKE on Twitter MAKE on Twitter
Follow our MAKE tweets!
MAKE Flickr Pool MAKE on Flickr
Join our MAKE Flickr Pool!
    make_tips on Twitter



    MAKE Archives

    Make: Money

    Make: Science Room
    Subscribe to MAKE Magazine!

    Make: Online editors and authors!

    Gareth BranwynGareth Branwyn
    Editor-in-Chief


    Phillip TorronePhillip Torrone
    Senior Editor
    | Web | Twitter


    Becky SternBecky Stern
    Associate Editor
    | AIM | Twitter


    Marc de VinckMarc de Vinck
    Contributing Writer
    | AIM | Twitter


    John ParkJohn Park
    Contributing Writer
    | Twitter


    Sean RaganSean Ragan
    Contributing Writer
    | Twitter


    Matt MetsMatt Mets
    Contributing Writer
    | AIM | Twitter


    Dale DoughertyDale Dougherty
    Editor & Publisher
    | Twitter


    Shawn ConnallyShawn Connally
    Managing Editor
    | Twitter


    Goli MohammadiGoli Mohammadi
    Associate Managing Editor

    Kip KayKip Kay
    Weekend Projects
    | AIM | Twitter


    Collin CunninghamCollin Cunningham
    Contributing Writer
    | AIM | Twitter

    Adam FlahertyAdam Flaherty
    Contributing Writer
    | AIM | Twitter


    John BaichtalJohn Baichtal
    Contributing Writer
    | AIM | Twitter



    More contributors: Mark Frauenfelder (Editor-in-Chief, MAKE magazine), Kipp Bradford (Technical Consultant/Writer), Chris Connors (Education), Diana Eng (Guest Author), Peter Horvath (Intern), Brian Jepson (O'Reilly Media), Robert Bruce Thompson (Science Room)

    Suggest a Site!

    Advertise here with FM.

    Why advertise on MAKE?
    Read what folks are saying about us!

    Click here to advertise on MAKE!



    Current Podcast

    itunesdl.gif Behind the Scenes at MAKE and CRAFT In January, many of the remote MAKE/CRAFT team members (myself included) convened at the Maker Media headquarters at O'Reilly Media in Sebastopol, California. Take a look behind the scenes of your favorite DIY publications as Goli Mohammadi gives us... More...

    Get the Make: Online sent via email
    Enter your email to receive Make: Online each day:



    Sign up for the Make: Newsletter

    Our Make: Newsletter covers news from maker Media, has original columns, Shed deals, and more! You can also read the archives of past issues.


     



    MAKE Fascination video series brought to you by Dow

    Make: Education
    MAKE: en EspaƱol MAKE: Japan
    Important please read


    Subscribe to MAKE Magazine!

    Recent Posts from the Craft: Blog