Skip to content

4th Semester Project of Subject MPCA ๐Ÿ”ง Arduino-based Morse code encoder and decoder with dual sensor support (LDR/Piezo) and LCD display. Features real-time decoding, simulation mode, and complete A-Z alphabet recognition. Perfect for educational projects and amateur radio enthusiasts. ๐Ÿ“กโœจ

License

Notifications You must be signed in to change notification settings

Kathitjoshi/arduino-morse-encoder-decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Arduino Morse Code Encoder/Decoder

Arduino C++ License Platform Status

๐Ÿ“‹ Description

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.

โœจ Features

  • 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

๐Ÿ”ง Hardware Requirements

Components

  • 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

Pin Configuration

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

๐Ÿ”Œ Circuit Diagram

Screenshot 2025-07-03 173858

๐Ÿ“š Libraries Required

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

Install via Arduino Library Manager:

  • LiquidCrystal I2C by Frank de Brabander

๐Ÿš€ Installation

  1. Clone the repository

    git clone https://github.com/Kathitjoshi/arduino-morse-encoder-decoder.git
    cd arduino-morse-encoder-decoder
  2. Install required libraries

    • Open Arduino IDE
    • Go to Sketch โ†’ Include Library โ†’ Manage Libraries
    • Search for "LiquidCrystal I2C" and install
  3. Upload the code

    • Connect your Arduino to your computer
    • Open the .ino file in Arduino IDE
    • Select your board and port
    • Click Upload

๐ŸŽฎ Usage

Simulation Mode

The device starts in simulation mode and automatically decodes "PES" to demonstrate functionality.

Sensor Mode

  1. LDR Mode: Turn potentiometer fully left

    • Flash a light (flashlight, laser) in dot/dash patterns
    • Short flash = dot (ยท)
    • Long flash = dash (โˆ’)
  2. Piezo Mode: Turn potentiometer fully right

    • Tap or create vibrations in dot/dash patterns
    • Short tap = dot (ยท)
    • Long tap = dash (โˆ’)

Timing Guidelines

  • Dot Duration: ~200ms
  • Dash Duration: ~600ms
  • Character Pause: ~800ms
  • Word Pause: ~1400ms

๐Ÿ“– Morse Code Reference

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 โˆ’โˆ’ยทยท

โš™๏ธ Configuration

Adjustable Parameters

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)

LCD I2C Address

If your LCD doesn't work, try changing the I2C address:

LiquidCrystal_I2C lcd(0x3F, 16, 2);  // Try 0x3F instead of 0x27

๐Ÿ” Troubleshooting

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

๐Ÿ“ˆ Future Enhancements

  • Support for numbers and punctuation
  • Adjustable speed settings
  • Audio feedback
  • Memory storage for messages
  • Wireless transmission capability
  • Mobile app integration

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ‘จโ€๐Ÿ’ป Author

Made By Kathit Joshi, Kavyansh Jain, and Mahashwetha Panigrahi with ๐Ÿ’—

๐Ÿ™ Acknowledgments

  • Arduino community for excellent documentation
  • Morse code enthusiasts and amateur radio operators
  • Open source contributors

๐Ÿ“ž Support

If you encounter any issues or have questions:


โญ Star this repo if you found it helpful!

About

4th Semester Project of Subject MPCA ๐Ÿ”ง Arduino-based Morse code encoder and decoder with dual sensor support (LDR/Piezo) and LCD display. Features real-time decoding, simulation mode, and complete A-Z alphabet recognition. Perfect for educational projects and amateur radio enthusiasts. ๐Ÿ“กโœจ

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages