An intelligent Arduino-based Morse code decoder that can interpret Morse code signals from multiple input sources. The system features dual sensor support (LDR for light-based signals and piezo for sound/vibration), real-time decoding, and LCD display output. Perfect for educational purposes, amateur radio enthusiasts, or anyone interested in learning Morse code.
- Dual Input Support: Light Detection Resistor (LDR) and Piezo sensor
- Real-time Decoding: Instant Morse code to text conversion
- LCD Display: 16x2 I2C LCD for output visualization
- Simulation Mode: Built-in demonstration with "PES" example
- Adjustable Sensitivity: Potentiometer-controlled sensor selection
- Serial Monitor Output: Debug and monitoring capabilities
- Complete Alphabet Support: A-Z character recognition
- Arduino Uno/Nano/Pro Mini
- 16x2 LCD with I2C backpack
- Light Dependent Resistor (LDR)
- Piezo sensor/buzzer
- 10kฮฉ Potentiometer
- Resistors (10kฮฉ for LDR pull-down)
- Jumper wires
- Breadboard
Component | Arduino Pin | Description |
---|---|---|
LDR | A0 | Light sensor input |
Piezo | A1 | Sound/vibration sensor |
Potentiometer | A2 | Mode selection |
LCD SDA | A4 | I2C data line |
LCD SCL | A5 | I2C clock line |
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
Install via Arduino Library Manager:
- LiquidCrystal I2C by Frank de Brabander
-
Clone the repository
git clone https://github.com/Kathitjoshi/arduino-morse-encoder-decoder.git cd arduino-morse-encoder-decoder
-
Install required libraries
- Open Arduino IDE
- Go to Sketch โ Include Library โ Manage Libraries
- Search for "LiquidCrystal I2C" and install
-
Upload the code
- Connect your Arduino to your computer
- Open the
.ino
file in Arduino IDE - Select your board and port
- Click Upload
The device starts in simulation mode and automatically decodes "PES" to demonstrate functionality.
-
LDR Mode: Turn potentiometer fully left
- Flash a light (flashlight, laser) in dot/dash patterns
- Short flash = dot (ยท)
- Long flash = dash (โ)
-
Piezo Mode: Turn potentiometer fully right
- Tap or create vibrations in dot/dash patterns
- Short tap = dot (ยท)
- Long tap = dash (โ)
- Dot Duration: ~200ms
- Dash Duration: ~600ms
- Character Pause: ~800ms
- Word Pause: ~1400ms
Letter | Code | Letter | Code | Letter | Code | Letter | Code |
---|---|---|---|---|---|---|---|
A | ยทโ | B | โยทยทยท | C | โยทโยท | D | โยทยท |
E | ยท | F | ยทยทโยท | G | โโยท | H | ยทยทยทยท |
I | ยทยท | J | ยทโโโ | K | โยทโ | L | ยทโยทยท |
M | โโ | N | โยท | O | โโโ | P | ยทโโยท |
Q | โโยทโ | R | ยทโยท | S | ยทยทยท | T | โ |
U | ยทยทโ | V | ยทยทยทโ | W | ยทโโ | X | โยทยทโ |
Y | โยทโโ | Z | โโยทยท |
const int threshold = 500; // Sensor sensitivity
const int dotDuration = 200; // Dot timing (ms)
const int dashDuration = 600; // Dash timing (ms)
const int charPause = 800; // Character separation (ms)
const int wordPause = 1400; // Word separation (ms)
If your LCD doesn't work, try changing the I2C address:
LiquidCrystal_I2C lcd(0x3F, 16, 2); // Try 0x3F instead of 0x27
Problem | Solution |
---|---|
LCD not displaying | Check I2C address (0x27 or 0x3F) |
Sensor not responsive | Adjust threshold value |
Incorrect decoding | Check timing parameters |
No output | Verify wiring connections |
- Support for numbers and punctuation
- Adjustable speed settings
- Audio feedback
- Memory storage for messages
- Wireless transmission capability
- Mobile app integration
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Made By Kathit Joshi, Kavyansh Jain, and Mahashwetha Panigrahi with ๐
- Arduino community for excellent documentation
- Morse code enthusiasts and amateur radio operators
- Open source contributors
If you encounter any issues or have questions:
- Open an issue on GitHub
- Check the troubleshooting section
- Contact via email: your.email@example.com
โญ Star this repo if you found it helpful!