Two Way Morse Code Communication System
by aromalmihraj42 in Circuits > Arduino
29 Views, 0 Favorites, 0 Comments
Two Way Morse Code Communication System
.jpg)
This morse code translation system utilizes a KY-008 laser module and a photoresister (LDR) to send and decode messages. This circuit is made to simulate the communication and encryption on Singulus. While Singulus uses QKD for encryption purposes, this circuit makes use of existing Morse code for rudimentary replication.
The program first takes input from the Serial Monitor, which is then translated to morse code in forms of light pulses. This is then detected by the angled photoresistor which translates the detected light durations to morse code and back to English to display for the user.
Supplies

Breadboard x2
Arduino UNO + USB Cable
Jumper Wires x8
Photoresistor (LDR)
4.7k Resistor x2
KY-008 Laser Module
Connect Laser Module to Arduino


Connect 5V and GND pins to power rails for easy access. Then:
- Connect right pin to GND rail using 4.7 kΩ resistor
- Connect middle pin to 5V rail
- Connect left pin to digital pin 2 as the output
See attached pin diagram to ensure correct orientation.
Connect Photoresistor to Arduino


To connect the photoresistor, on another breadboard:
- Connect one pin to GND rail using 4.7 kΩ resistor AND connect to A1
- Connect other pin to 5V rail
See attached pin diagram to ensure correct wiring.
Troubleshooting: If not working, try connection power rails over as they might not cover entire board but rather only half.
Angle Photoresistor to Detect Laser

Before the code is executed, it must be ensured that the laser is clearly pointing to the photoresistor. Ensure additionally that other sources of light do not fluctuate and influence the photoresistor readings.
Check the photoresistor first using the code below that should display the voltage. Check this by covering it with your finger, a cloth, turning off the lights, etc.
Add and Deploy the Code
The final step is to compile upload the code onto the Arduino. Before this, however, ensure sensorThreshold (Line 7) is set to the default voltage outputted with ambient light and that the photoresistor is in clear line of sight of laser. After uploading the code, test with letters (i.e. A, B,...) then simple words (e.g. HI), then simple sentences (e.g. Hey there).
Note: To write in the Serial Monitor and also receive output from the detected morse code in the Serial Monitor, open it by clicking the magnifying glass in the top-right of the screen. Furthermore, if you wish to see how the detected light changes, open the Serial Plotter for a graph visual.