Project showcase
Morse Code Machine

Morse Code Machine © MIT

Type Morse code on Arduino and display it on your computer's monitor.

  • 3,153 views
  • 1 comment
  • 7 respects

Components and supplies

Apps and online services

About this project

Morse code machine, based on Vlada Krsmanovic's project. This version has added potentiometer for long click delay adjustment, pwm on LED for dimming effect, changed to micro limit switch instead of a normal button for added authenticity, putted everything inside of plastic case and made a Windows program that makes it easier to use this device.

Arduino code

I'm only going to explain the changes I made to the code, if you want explanation on how typing works look at the original project.

In setup():

pinMode(buttonPin, INPUT_PULLUP);

Switch now uses internal resistor as opposed to external one in the original project:

digitalWrite(ledPin, HIGH);
tone(buzzer, 1500);
delay(200);
digitalWrite(ledPin, LOW);
noTone(buzzer);

Because of the way the Arduino is encased when you plug it in you cannot see the PCB lights and thus don't know if it's really on. This is a quick "boot completed" feedback.

In loop():

pause_value = map(analogRead(pot), 0, 1023, 70, 300);

Potentiometer is on A0 and map function is used to calculate the delay time for the long clicks.

buttonState = !digitalRead(buttonPin);

Important to invert the reading because of INPUT_PULLUP.

if(Serial.available() > 0) longclick = (Serial.read() == 't') ? true : false;  

Read the serial input and change the longclick bool.

if (signal_length<2*pause_value){
   tone(buzzer, 1500);
   digitalWrite(ledPin, HIGH);
   }
   else if(longclick){
     tone(buzzer, 1000);
     analogWrite(ledPin, 50);
     }
 }

Note since the tone function is used, most of the pwm pins are not going to work. In this case, the buzzer is on pin 9 and pwm only worked on pin 6.

Windows program

Relatively simple program made in visual basic, using visual studio. On the control panel on the top you can connect/disconnect from a COM port, change the font size and set program language (error messages are always in English). On the left of the program you have instructions for the device, after that appears what you wrote, on the right you have the Morse code with keyboard instructions. Available in Serbian and English.

Case

I didn't document anything as I was making this, but there isn't much to it. It's not 3D printed, I used a case from a dysfunctional PSU I had. I drilled the holes for the USB, potentiometer, LED, wires for the switch and added sticky magnetic tape I had laying around to hold the switch.

Final word

All in all, it's a really fun project and a thing to play with, proved very attractive at faires, and can even be used as an educational tool for learning morse code more easily.

Code

Schematics

Shematic
Untitled sketch schem pgp9jog5gx
Fritzing schematic
untitled_sketch_skXFTe2fyy.fzz

Comments

Author

Default
brzi
  • 5 projects
  • 26 followers

Additional contributors

Published on

June 24, 2017

Members who respect this project

Openbuildslogo bluebox34480925 1927621983976019 3540483993273106432 n smw29ycaemYo2ldkGo4sea

and 3 others

See similar projects
you might like

Similar projects you might like

Arduino Morse Code Machine

Project showcase by Vlada Krsmanovic

  • 10,224 views
  • 1 comment
  • 30 respects

Morse Code Translator

Project showcase by Team ONYX

  • 10,190 views
  • 2 comments
  • 15 respects

Morse Code Communication Using Arduino

Project tutorial by Jalal_Mansoori

  • 2,701 views
  • 7 comments
  • 19 respects

Morse Code Transmitter - Light Signal

Project showcase by Alireza Karkon

  • 1,639 views
  • 1 comment
  • 7 respects

Morse Code Transceiver

Project tutorial by Achindra Bhatnagar

  • 16,128 views
  • 13 comments
  • 92 respects

Morse Code Receiver

Project showcase by Alireza Karkon

  • 3,386 views
  • 5 comments
  • 23 respects
Add projectSign up / Login