Arduino Morse Code Decoder
This product was inspired by "Morse Code Decoder" created by pinkai_s91 on Instructables, which is available through the link: https://www.instructables.com/Morse-Code-Decoder/.... However, this product was designed to create a friendlier environment who are Morse Code beginners trying to learn Morse Code and to provide a more detailed demonstration of how Morse Code applies to sound and light. Throughout this Instructable, I will teach you how to make a decoding device that provides longer intervals between each dash/dot, audio aspect to differentiate dash/dots, and sufficient time for Morse Code beginners to memorize the dash and dots of an alphabet.
Take note that you must open the Arduino Serial Monitor window while inserting your Morse Code by pushing the button. Once you push the button, the LED will light up and the buzzer will make a sound to notify you whether you inserted a dot/dash. If the LED lights up for a while, it's a dash. On the other hand, if the LED only flashed for a second, then it's a dot. Similar for the buzzer, if the sound continues for a while, it's a dash. If the sound lasts for only a second, then it's a dot. After inserting the dots and dashes of the alphabets, your computer will then translate the morse code into alphabets in the Arduino Serial Monitor window. In order to differentiate every alphabet, you must wait for at least a second after you inserted the first few dots and dashes for your first alphabet.
Note: I've attached a demonstration video at the end of this Instructable, you can use the video as a model to see if your decoding device functions normally.
P.S. I've also attached a picture of dots and dashes for every alphabet in this Instructable. Morse Code beginners can refer to the image while inserting the Morse Code.
Supplies
-Arduino Leonardo *1
-Breadboard *1
-USB to Type C connecter *1
-Yellow LED (Color is Optional) *1
-100-ohm Resistor *1
-Alligator clip to male wire *4
-Male to male wires *4
-Buzzer *1
-Button *1
Creating the Circuit
Create your circuit according to the images shown above
Few Tips to Eliminate Small Errors:
-One female end of the button is attached to D2 while the other is attached to the ground
-Black wire of the buzzer is attached to GND while the red wire is attached to D7
-Positive foot of LED should be attached to D4
-Negative foot of LED should be attached to a 100-ohm resistor
-The other foot of the 100-ohm resistor should be connected to GND with a male to male wire
Please note the following if you wish to make a container for your device:
1. Connect the buzzer to Arduino using alligator clips
2. Connect the LED to Arduino using alligator clips
3. Connect the button to Arduino using male to male wires
Coding
Since I've already written the code for you, go to this link. However, for those who would like to understand the functions of certain codes, I and the original author included some sidenotes to help comprehension.
If you are new to Arduino, you just need to click the download button on the side. After you downloaded the zip, you just need to open the "Arduino_Improvement_Project.ino" to start the Arduino app. There will be a pop-up window, just click "ok". Once you arrived in the Arduino window, you will need to navigate to sketch to upload the code I've provided for you.
Creating the Container (Optional)
Find a container that has a dimension of 24.5 cm x 13.5 cm x 7.5 cm (Length x Width x Height) . However, you may also need some bubble paper to fill the extra room on the left and right sides of the Arduino board. Although this step is optional, I recommend making a container for your device because a container can prevent a collision that can cause wires to leave their positions. A special note for people who decide to make a container for this device would be: "Mind the length of the wires that connects the button, buzzer, and LED because they must be able to sit on the surface of your box."
After finding a box that suits the size of this device, cut a hole that has a diameter of 3 cm (For button), a hole that has a diameter of 2.5 cm (For buzzer), and a hole that has a diameter of 0.5 cm (For LED). After doing so, cut a square that has a side length of 1.5 cm for the USB to Type C connector to connect to Arduino. Further notes to be specific of the holes' locations.
Location Measurements:
1. Every hole should be 1 cm apart from each other
2. The first hole starts from the left side, with a 1 cm distance from the box's left edge
3.Remember to keep sufficient space below for a circle to form
Installing the Device
Before Installing the device, disconnect LED and buzzer from alligator clips and the button away from male to male wires. After doing so, insert each material into the hole designed to hold it. Open the box and place the Arduino board inside the box. Lastly, remember to connect the corresponding alligator clips or male-to-male wires after installing the Arduino board inside the box. Before checking empty spaces beside the Arduino board, remember to connect the Arduino board to your laptop or PC using the USB to Type C connecter. If there is extra space on the left or right, cut two pieces of bubble paper to fill up the empty space. This shall prevent any collision that can cause wires to leave their positions. For further decorations, you may use your markers to label each hole or to give a name to your device. In this case, I will name my device: "The Bombe", which was a WW2 decoding device used by the Allies. Congratulations! You have now completed the container for your device. All you are left to do is to check whether the device is operating normally. To do so, you will only need to follow these simple steps listed below:
Check for Function
1. Open the Serial Monitor in Arduino by navigating to the "Tools"
2. Refer to the Morse Code list provided and test a few alphabets
If your device is not working properly, check the position of your wires on the breadboard and whether the alligator clips are clipped tightly to the buzzer, LED, or button.
Here is a demonstration video for reference below: