Arduino Teaches Morse Code

You may wonder why anyone would want to learn Morse code. You don’t need it for a ham license anymore. There are, however, at least three reasons you might want to learn it anyway. First, some people actually enjoy it either for the nostalgia or the challenge of it. Another reason is that Morse code can often get through when other human-readable schemes fail. Morse code can be sent using low power, equipment built from simple materials or even using mirrors or flashlights. Finally, Morse code is a very simple way to do covert communications. If you know Morse code, you could privately talk to a concealed computer on just two I/O lines. We’ll let you imagine the uses for that.

In the old days, you usually learned Morse code from an experienced sender, by listening to the radio, or from an audio tape. The state of the art today employs a computer to randomly generate practice text. [M0TGN] wanted a device to generate practice code, so he built it around an Arduino. The device acts like an old commercial model, the Datong D70, although it can optionally accept an LCD screen, something the D70 didn’t have.

You can see the project in operation in the video below. Once you learn how to read Morse code, you might want to teach your Arduino to understand it, too. Or, you can check out some other Morse-based projects.

Continue reading “Arduino Teaches Morse Code”

Hacklet 69 – Morse Code Projects

With over 160 years of history under its belt, Morse code is by far the oldest digital signaling system known to man. Originally developed for telegraph systems, [Samuel Morse’s] code has been sent over wires, via radio, and even with flashes of light. Hackers, makers and engineers have been working with Morse code throughout history. For many years, simple code keys and practice oscillators were the “hello world” of hobby electronics. In fact, a company which started out selling a Morse key has gone on to become one of the largest electronic component distributors in the world. The company still bears the name of that project: Digi-Key. This week’s Hacklet is all about some of the best Morse code projects on!

key1We start with [voxnulla] and Morse key HID + ugly hack. [voxnulla] found an old key at his favorite thrift store. It was dusty, greasy, and for some reason had been painted hospital green. Once the paint and grime were removed, and the original wooden plate restored, the key actually looked pretty good. [Voxnulla] then decided to turn it into a USB Human Interface Device (HID), emulating the keyboard of his computer. An Arduino converts Morse code characters tapped at the key into keystrokes over USB. As [voxnulla] knows, when butterflies aren’t available, real programmers drive vim with a Morse key!

code2Next up is [Voja Antonic] with Daddy, I don’t have the key. If you didn’t read [Voja’s] article about Hacking the Digital and Social System, check it out! Many apartments have an intercom system where you have to “buzz” someone in, activating a solenoid lock in the door. [Voja] inserted a Microchip PIC12 series microcontroller between the speaker and the unlock button. All a user has to do is tap out the right Morse code password on the call button in the lobby. If the code is accepted, the PIC unlocks the door, and you’re in!


morseterminal[kodera2t] took things into the digital age with Stand-alone Tiny Morse code encoder/decoder. This project grew out of his general purpose Portable tiny IoT device project. [kodera2t] rolled his own Arduino-compatible board for this project. The tiny ATmega1284 powered computer allows him to encode and decode Morse code. A smartphone-sized keyboard and a lilliputian OLED display serve as the user interface, while rotary encoder allows for variable code speed. You can even “tap” Morse out on one of the tactile buttons!


morselightFinally, we have [Yannick (Gigawipf)] with Portable (morsing) 100W led flashlight. 100 watt LEDs have gotten quite cheap these days, and they’re perfect when you absolutely, positively have to blind everyone around you. These LEDs can also be switched on and off quickly, which makes them perfect for Morse code. In years past, mechanical shutters had to be used to perform the same feat. [Yannick] used a 5000mAh 5S Zippy Li-Po to supply electrons to this hungry beast, while a 600 Watt constant current boost converter keeps that power under control. An Arduino running Morse code converter software controls the boost convert and LED.  [Yannick] uses his computer to send a message over the Arduino’s serial link, and the light does the rest, flashing out the message for all to see.

If you want more Morse goodness, check out our brand new Morse code project list! My Morse is a bit rusty, so if I wasn’t able to copy your transmission and missed your project, don’t hesitate to drop me a message on That’s it for this week’s Hacklet. As always, see you next week. Same hack time, same hack channel, bringing you the best of!

The Alexanderson Transmitter: Very-low Frequency Radio Rides Again!

Is your ham radio rig made of iron and steel? Is it mechanically driven? Classified as a World Heritage Site? We didn’t think so. But if you’d like to tune in one that is, or if you’re just a ham radio geek in need of a bizarre challenge, don’t miss Alexanderson Day 2015 tomorrow, Sunday, June 28th

The Alexanderson Transmitter design dates back to around 1910, before any of the newfangled tube technology had been invented. Weighing in at around 50 tons, the monster powering the Varberg Radio Station is essentially a high-speed alternator — a generator that puts out 17.2 kHz instead of the 50-60 Hz  that the electric companies give us today.

Most of the challenge in receiving the Alexanderson transmitter broadcasts are due to this very low broadcast frequency; your antenna is not long enough. If you’re in Europe, it’s a lot easier because the station, SAQ, is located in Sweden. But given that the original purpose of these behemoths was transcontinental Morse code transmission, it only seems sporting to try to pick it up in the USA. East Coasters are well situated to give it a shot.

And of course, there’s an app for that. The original SAQrx VLF Receiver and the extended version both use your computer’s sound card and FFTs to extract the probably weak signal from the noise.

We scouted around the net for an antenna design and didn’t come up with anything more concrete than “few hundred turns of wire in a coil” plugged into the mic input.  If anyone has an optimized antenna design for this frequency, post up in the comments?

Thanks [Martin] for the tip!

Blink Thrice To Let Me In

Now here’s a really cool home hack. [Luis Rodrigues] has automated his garage door to open, simply by flashing his headlights at it.

But wait, doesn’t that mean anyone could break into his house? Nope. At first we thought he had just added some photo-sensors and a bit of computer logic in order to turn a pattern of lights into an output to open the garage, but no, it’s actually specific to his car only. Which is awesome because if anyone ever tried to copy him to break in, all they break into is a very confused state of mind.

You see how it actually works is the headlight output is connected to a control box under the hood of his car. A Moteino (RF Arduino variant) reads the input signal of the headlights flashing three times, and then communicates wirelessly to the garage door in order to open it.

But [Luis] also has a gate outside his property — so if you hold the lights on for a second, both the garage door and the external gate will open as well.

Continue reading “Blink Thrice To Let Me In”

Morse Code RF Transmitter from a Micro’s Clock Output

If you’re looking for a simple way to make an RF transmitter, check out [Tomasz]’s Morse code transmitter. His design uses nothing more than a microcontroller and a 16MHz crystal to transmit CW Morse code on 96MHz. We’ve seen some similar designs that work at lower frequencies, but transmitting up at 96MHz is pretty impressive.

[Tomasz] used an STM32L microcontroller for this project, which isn’t specced to run up at the high frequencies he wanted to transmit at. To get around this, [Tomasz] wired a 16Mhz oscillator up to microcontroller’s clock input. The clock input is run into the micro’s PLL which is capable of generating high frequencies. He mentions that you can use the internal oscillator instead of a crystal, but it has a ton of phase noise and splatters all over the spectrum.

[Tomasz] chose to start transmitting at 96MHz, which can be picked up by a standard FM radio. To generate this frequency, he set the PLL to multiply the 16MHz crystal up to 192MHz followed by a clock divide of 2 which brings it down to 96MHz. The microcontroller’s CPU runs on the 16MHz crystal input before it goes into the PLL. Next [Tomasz] enabled the MCO clock output pin which routes the 96MHz signal to the outside world.

Transmitting CW is pretty simple; it just involves turning a fixed-frequency transmitter on and off. [Tomasz] wrote a function that enables and disables the MCO output pin. This has the effect of keying any Morse code string you throw at it. Check out the video after the break to see the transmitter in action.

Continue reading “Morse Code RF Transmitter from a Micro’s Clock Output”

Converting Morse Code to Text with Arduino

Morse code used to be widely used around the globe. Before voice transmissions were possible over radio, Morse code was all the rage. Nowadays, it’s been replaced with more sophisticated technologies that allow us to transmit voice, or data much faster and more efficiently. You don’t even need to know Morse code to get an amateur radio license any more. That doesn’t mean that Morse code is dead, though. There are still plenty of hobbyists out there practicing for the fun of it.

[Dan] decided to take a shortcut and use some modern technology to make it easier to translate Morse code back into readable text. His project log is a good example of the natural progression we all make when we are learning something new. He started out with an Arduino and a simple microphone. He wrote a basic sketch to read the input from the microphone and output the perceived volume over a Serial monitor as a series of asterisks. The more asterisks, the louder the signal. He calibrated the system so that a quiet room would read zero.

He found that while this worked, the Arduino was so fast that it detected very short pulses that the human ear could not detect. This would throw off his readings and needed to be smoothed out. If you are familiar with button debouncing then you get the idea. He ended up just averaging a few samples at a time, which worked out nicely.

The next iteration of the software added the ability to detect each legitimate beep from the Morse code signal. He cleared away anything too short. The result was a series of long and short chains of asterisks, representing long or short beeps. The third iteration translated these chains into dots and dashes. This version could also detect longer pauses between words to make things more readable.

Finally, [Dan] added a sort of lookup table to translate the dots and dashes back into ASCII characters. Now he can rest easy while the Arduino does all of the hard work. If you’re wondering why anyone would want to learn Morse code these days, it’s still a very simple way for humans to communicate long distances without the aid of a computer.

Retrotechtacular: ⋅⋅⋅⋅ ––– ⋅–– – ––– –– ––– ⋅–⋅ ⋅⋅⋅ ⋅ –⋅–⋅ ––– –⋅⋅ ⋅

There’s a lot to learn from this 1966 Army training film about the International Morse Code, but the most crucial component of good keying is rhythm. A young man named [Owens] demonstrates very clean keying, and the instructor points out that skill is the product of sending uniform and short dits, uniform and short dahs, and correct spacing between dits, dahs, letters, and words.

Throughout the film, there are title cards in a typeface that shows the stroke order of military printing. The instructor points this out after a brief interlude about the phonetic alphabet (Alpha, Bravo, Charlie, &c). Right away, we see that the Morse Code for ‘H’ is four dits that gallop with the rhythm of a horse in a hurry to get to the hotel.

big keySuch clever and memorable pictures are painted for a few other letters. We wish he would have covered them all, but that’s not the aim of this film. The Army is more concerned with good, clean rhythm and proper spacing that marks the difference between ‘low’ planes and ‘enemy’ planes. There’s a simple, three-step plan to getting what is called a ‘good fist’, and the Army demonstrates this in the best possible way: a giant J-38 and fake hand descending from the ceiling to match. Yes, really.

The first step is to adjust the key to ensure good contact alignment, proper gap spacing, and ideal spring tension. The second step is to develop good technique by resting one’s elbow on the table and holding the key rather than slapping it. The third step is simply to practice. Learning through imitation is helpful, as is taping one’s practice sessions and playing them back. [Owens] likes to use an RD-60 code recorder, which immortalizes his signals in ink.

Continue reading “Retrotechtacular: ⋅⋅⋅⋅ ––– ⋅–– – ––– –– ––– ⋅–⋅ ⋅⋅⋅ ⋅ –⋅–⋅ ––– –⋅⋅ ⋅”