It is reasonably easy to make a microcontroller spit out some Morse code. What makes [pavlin’s] take on this project interesting is that it resides on a tiny USB board with an ARM processor. The design for the board is available with single-sided artwork suitable for production using simple methods like toner transfer.
The STM device has a built-in USB bootloader. It can also act as a serial port, which makes the project very simple. The only external parts are a speaker and an optoisolator. The program provides a command line interface over the serial port that you can use to program the message and set other options like speed and the delay between messages. The code is available on GitHub.
You might argue that a beacon shouldn’t need a USB port, and we’ve seen an alternative that fits the bill. If you want a much larger Arduino-based keyer, we’ve seen those, too.
16 thoughts on “Tiny USB Morse Code Beacon”
Nifty toy. Could do it with an attiny85 for $0.50 less with v-usb software rather than going for a full ARM. Or even a PIC16F1455 for half the price of the ARM!
Just saying,,,hehe…still nifty.
Did you know, you can make a complete CW transmitter with 0,69$ microcontroller, one or two transistors and few LC elements? I’ve got this idea one night, when my cat decided to use my head as scratching post…
Please do enlighten us, this sounds nifty as hell.
PIC10F322 with build-in numerically controlled oscillator. Add to it a class E amplifier for both amplification and turning square into sine. With some careful programming one could add buttons for changing frequency and for keying. I actually made a simple square wave function generator. One button selected part of register, other incremented that part, LED blinked out the number. It worked, but it was hard to use…
So, you forgot to mention how it got revenge on the cat…
Gotta agree about the choice of ARM for such as a simple task… but you use what you have in your “Plunder Trove”. So no biggie. On one hand makes for a entry level ARM learning experience…. yet a cheap PIC could do it with less battery drain
Just need to add that Al has yet again contributed another great HaD article—he has authored some of the best I have seen to date.
I like Al’s style. He also tends to stay away from buzzword/clickbait style articles
Same Al? http://www.drdobbs.com/author/Al-Williams
Yes, same one. Glad you guys are enjoying them (unless you are just my Mom shilling at which point…. ) ;-)
Ahahahahaaa, no we really do like the stuff you share with us.
That 1 instruction CPU you did for http://www.drdobbs.com/embedded-systems/the-one-instruction-wonder/221800122 is very interesting. When I read the HAD article talking about variable instruction CPUs I thought of your “The One Instruction Wonder” and how all instructions are built on that as function calls or table lookups. Anyway it shows how completely virtualised a CPU can be.
I wonder what is the smallest amount of glue logic needed to have ROM, RAM and I/O buffers act like that, as a self interacting pattern of table lookups?
A good example of how to implement a command controlled device, so it is more widely applicable than just Morse.
Was anyone else hoping to see a usb device that you insert into a computer or a phone and it sends out an sos message with your coordinates from every available port.
That would be a bit tricky to do, without performing configs on the device first. ( A whole lot of security work goes into making sure that a USB device DOESN’T do exactly this.)
I suppose it could work if it identifies as an HID. Look up something called the rubber ducky USB. it is possible to configure it to do just this. (Though for that matter you could just have it plain text “Please help me, I am HERE”)
Would like to know how to order this small little fancy USB bourd and components?
Please be kind and respectful to help make the comments section excellent. (Comment Policy)