Play with Morse code using Raspberry Pi

Device I would like to describe a tool which I prepared for amateur radio promotion purposes for SP2PUT radio club.

The device is used for to demonstrate ham radio to people (especially youth) during public events we often participate.


What is it all about?

Briefly talking it’s a device to learn CW made using Raspberry Pi computer. To be honest it’s a toy to familiarize users with CW emission rather than a real learning tool.

Any brave volunteer can try to ‘beep’ her/his name and the results of this struggle appear on the screen and can be loudly heard.

You can what fun it is on the video below:

What’s the purpose?

What do we need and what goals we want to achieve?

  • mobility and simplicity of installation, so called plug&play
  • ability to convert character strings (for example someone’s name) into a Morse code
  • ability to convert input from telegraph key (dash and dots) into a format readable for human
  • ability to play sound for both above types of conversion
  • compatibility with popular telegraphy keys without customizations
  • should be build using open programming environment

After short consideration Raspberry Pi was chosen for device of choice because of its GPIO ports and Linux-based OS – Raspbian (Debian based distribution).
Python was the programming language of choice because of its native RPi GPIO ports support.

Let’s begin

After a short research it realized that Pi Foundation made a great job in Morse code detection.
In the centenary of First World War they founded a project which allows anyone to turn their Raspberry Pi into a simulator of radio communication device used back then.
By the way one can learn something about programming and using the Raspberry Pi platform.

You can find more about the project on GitHub:

The project was a great starting point for me. I didn’t want to reinvent the wheel so I used the solutions of handling tones detection.

Anyway, I still needed basic GUI (I used Tkiner library), processing the input from user (both text strings and Morse dash and dots), playing sounds, handling and other details like handling Polish alphabet letters.
These features was implemented.

How does it work?

It’s time to show you how it actually works.
So basically you should plug a telegraph key (I used traditional straight key) into a jack 6,3mm socket and start the program.

I know the GUI isn’t astonishing but it’s okay for our purposes.

Then you type your name and the program will code it into the Morse code. You can start your ‘transmission’ now.

Results of your ‘beeping’ is showed below.


Conclusions and ideas

The device is already baptised in fire so there’s of course a lot of features ideas and advices for further project development.

For sure tones detection should be improved (it’s a little bit delayed). Then comparision and validation of ‘received characters or maybe introduce different working modes (as ‘free mode’, practise mode, band conditions simulator etc.).

The project could be not only the toy but fully working CW learning device with lessons and progress tracking features.

Actually the device is performing okay and is giving a lot of fun for people on events so I’m not going to develop for now.

That’s it.

If you have any question or want to share an idea for improve the abilities of this device, please let me know!