Posts with «morse code» label

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.


Filed under: Arduino Hacks

Morse Decoder’s Lean and Sexy Search Algorithm

Often the Morse Code centered projects that we feature are to help you practice transmitting messages. This one takes a tack and builds an automatic decoder. We think [Nicola Cimmino's] project is well worth featuring simply based on his explanation of the Digital Signal Processing used on the signal coming in from the microphone. Well done. But he’s really just getting warmed up.

What makes this really stand out is a brilliant algorithm that allows conversion from Morse to ASCII using a lookup table of only 64 bytes. This provides enough room for A-Z and 0-9 without chance of collision but could be expanded to allow for more characters. Below is a concise description of how the algorithm works but make sure you take the time to read [Nicola's] project description in its entirety.

The algorithm can be decribed as follows. Have an index inside the lookup string inizialied to zero. Have an initial dash jump size of 64. At every received element (dot or dash) halve the initial dash jump and then increase by 1 the index inside the lookup string if a dot was received and by dash jump size if a dash was received. Repeat until a letter separator is reached, at that point the index inside the lookup string will point to the ASCII corresponding to the decoded morse.

Have you heard of this technique before? If so, tell us about it in the comments below. Before you jump all over this one, realize that Magic Morse uses a different technique.


Filed under: Microcontrollers, radio hacks

City Lights Telling Stories

If you’re walking around town and you see a light suddenly start to switch on and off seemingly at random, don’t discount it as a loose wire so quickly. [René] has been hard at work on a project to use city lights of all shapes and sizes for Morse messages, and a way for anyone to easily decode these messages if they happen upon one while out and about.

The lights can tell any story that is programmed into them. The code on the site is written for an Arduino-style microcontroller but it could be easily exported to any device that can switch power to turn a light on and off. Any light can work, there’s even video of a single headlight on a van blinking out some dots and dashes.

The other part of this project is a smartphone app that can decode the messages using the camera, although any Morse code interpreter can translate the messages, or if you’re a ham radio enthusiast you might recognize the messages without any tools whatsoever!

The great thing about this project is that it uses everyday objects to hide messages in plain sight, but where only some will be able to find them. This is indeed true hacker fashion! If you’re interested in making your own Morse code light, the code is available on the project site.


Filed under: Arduino Hacks
Hack a Day 13 Sep 00:00

Arduino using a straight key for Morse code assistance

For those unfamiliar with Ham Radio, there are lots of fancy tools these days to make it easier for the radio operator. But enthusiasts still like to get back to basics, and one way to do this is to participate in Straight Key Night. This is when you pull out your traditional Morse code keyer and have a chat with others around the world. The most recent event was on New Year’s Eve. The only drag is that it sometimes takes a while to find another Ham who’s listening, and this can mean repetitively keying the letters QC SKN for long periods of time (QC invites listeners to respond, and SKN is to inform them you’re participating in Straight Key Night). Sure, a programmable keyer will do this for you, but that is against the spirit of the event. [Mike Herr] found a grey area by mechanically interfacing an Arduino with a straight key.

You can see the straight key being pressed by a hobby servo in the image above. The servo is driven by the Arduino, which will transmit the series of letters automatically. As you can see in the video after the break, once [Mike] hears back from a fellow operator he switches to a huge wooden straight key for the rest of the conversation.


Filed under: radio hacks
Hack a Day 03 Jan 22:01

Red Bull Creation hardware (Bullduino) arrives

The Bullduino’s are starting to arrive. When [Arclight] received his in the mail the first thing he did was to share the hardware details. Of course this is the hardware that participants in the Red Bull Creation contest will be receiving ahead of this year’s contest.

The board is an ATmega328 Arduino clone. Instead of an FTDI chip for USB this one is sporting an ATmega8u2. That’s not too much of a surprise as it should translate to a cost savings. [Arclight] reports that the stock firmware flashes a message in Morse code. It seems the Hartford HackerSpace got their Bullduino several days ago and already decoded the message. It reads:

“Wouldn’t lou prefer a good game of chess?”

The guys that did the decoding speculate that this could be a type as ‘l’ and ‘y’ are inversions of each other in Morse code; or it could be some kind of clue. At any rate, if you want to do some disassembly and see if there’s anything lurking in the firmware, [Arclight] posted FLASH and EEPROM dumps from both ATmega chips along with his article.


Filed under: arduino hacks

Morse code beacon wins the LayerOne badge hacking contest

Ham skills prevail in this year’s LayerOne badge hacking contest. [Jason] was the winner with this Morse Code beacon hack.He got a head start on the competition after seeing our preview feature on the badge hardware development. It got him thinking and let him gather his tools ahead of arrival.

The hardware is segregated into two parts of the board. The lower portion is a take on the Arduino, and the upper portion is a wireless transmitter meant to control some cheap RC cars. [Jason] figured this was perfect for conversion as a CW beacon (continuous wave is what Morse Code is called if you’re a ham). The first issue he encountered was getting the badge to play nicely with the Arduino IDE. It was setup to run Slowduino firmware which uses the internal oscillator. [Jason] soldered on his own crystal and reflashed the firmware. He found that the transmitter couldn’t be directly keyed because of the shifting used in the RC car protocol. He cut the power to the transmitter, and found that it could be more accurately keyed by injecting power to one of the other pins. Check out the video after the break for a better explanation of his technique.


Filed under: cons
Hack a Day 30 May 21:01
arduino  badge  beacon  cons  cw  layerone  morse code