Home > Projects > Arduino Programmer Projects > Morse-Code Trainer Using Arduino

Morse-Code Trainer Using Arduino

Summary of Morse-Code Trainer Using Arduino


This article describes a DIY Morse code trainer circuit designed to help children learn. The project utilizes an ATtiny85 microcontroller to drive a piezo beeper, powered by a 3-AA battery pack. It uses an Arduino as an ISP programmer for coding and features a custom 6-pin header for easy reprogramming without chip removal. The device plays a hidden message ("SOS the moon rover has broken down...") repeatedly to guide kids to a Lego prize.

Parts used in the Morse Code Trainer:

  • ATtiny85 microcontroller
  • Piezo beeper
  • Strip-board
  • 3-AA-cell battery pack
  • Arduino (used as ISP programmer)
  • 6-pin ISP header
  • Lego moon rover (prize)

My kids are learning Morse code this summer, so I threw together this little circuit to help them learn. And to make it more fun…

It uses an ATtiny85 ($2.26 at digikey.com) to drive a piezo beeper (≈ $3.50 at Radio Shack.) The ATtiny85 takes 5.5V max, so I built the circuit on a piece of strip-board so as to fit onto the back of a 3-AA-cell ($3 or so at Radio Shack) battery pack.

Morse-code trainer

To program it, I used MIT’s “High-Low Tech” ATtiny85 core using an Arduino as an ISP programmer. I actually built a 6-pin ISP header into the board, so I don’t have to pull the chip out to reprogram it as you would with MIT’s instructions, but that’s neither here nor there. Using an Arduino core allows me to  use all the Arduino tools I’m familiar with, but I don’t have to spend $20 or more on a full Arduino when all I really need is one output pin and a couple kb of program space. The ATtiny85 is perfect for this: plenty of memory and dirt cheap. (Actually, an ATtiny25 would work with the amount of memory this program takes, but ATtiny85s are so cheap you don’t save much buying the ATtiny25.)
 Morse-code trainer schematic
Here’s the code. When the device is powered up, it waits 3 seconds then puts out the message at the desired speed. The message repeats until power is removed. Currently the message is “SOS the moon rover has broken down and I am stuck in the trash can in the garden shed.” Once the kids decode it, they’ll find a small Lego moon rover there as a prize.

Quick Solutions to Questions related to Morse Code Trainer:

  • What microcontroller is used in this project?
    The project uses an ATtiny85 microcontroller.
  • How is the device powered?
    The circuit is powered by a 3-AA-cell battery pack.
  • Can I reprogram the chip without removing it?
    Yes, a 6-pin ISP header was built into the board to allow reprogramming without pulling the chip out.
  • What tool is used to program the ATtiny85?
    An Arduino is used as an ISP programmer with MIT's High-Low Tech core.
  • Does the message play continuously?
    Yes, the message repeats until power is removed from the device.
  • What happens when the device is first powered up?
    The device waits 3 seconds before outputting the message at the desired speed.
  • Why was the ATtiny85 chosen over the ATtiny25?
    The ATtiny85 was chosen because it is so cheap that there is little savings in buying the ATtiny25.
  • What is the hidden message played by the device?
    The message is SOS the moon rover has broken down and I am stuck in the trash can in the garden shed.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top