← All posts

How Morse Code Translators Work: From Light Signals to Text

A Morse code translator converts sequences of dots and dashes into readable text. While online text converters are common, real-time translators that decode actual light or sound signals are far more interesting — and useful.

Text-Based Translation

The simplest form of Morse code translation is text-to-text: you type dots and dashes, and the translator outputs letters. This uses a straightforward lookup table mapping each character to its Morse equivalent.

For example:

  • Input: .... . .-.. .-.. ---
  • Output: HELLO

Real-Time Signal Decoding

Translating actual Morse code signals (light flashes or audio tones) is more complex. Here's how it works:

1. Signal Detection

The translator must first detect the presence of a signal:

  • Light: Camera measures brightness changes frame-by-frame
  • Audio: Microphone detects tone frequency and amplitude

2. Threshold Determination

An adaptive threshold separates "on" (signal present) from "off" (no signal):

  • Sample the ambient brightness/noise level
  • Set a threshold above the noise floor
  • Adjust continuously to handle changing conditions

3. Timing Analysis

Once on/off states are determined, the translator measures durations:

  • Short "on" = dot
  • Long "on" (3x dot length) = dash
  • Short "off" = gap between elements
  • Medium "off" (3x) = gap between characters
  • Long "off" (7x) = gap between words

4. Character Recognition

With dots and dashes identified, a binary tree or lookup table maps each sequence to a character. The Morse code tree starts at the root — a dot goes left, a dash goes right — until you reach a leaf node with the decoded character.

5. Speed Adaptation

Good translators automatically detect the sending speed by measuring the shortest "on" duration (which should be a dot) and scaling all timing thresholds accordingly.

Challenges in Real-Time Decoding

  • Noise: Ambient light changes, camera shake, audio interference
  • Speed variation: Human senders aren't perfectly consistent
  • Farnsworth timing: Some senders use different inter-character spacing
  • Signal strength: Weak or distant signals may be hard to distinguish

How Our App Decodes Morse Code

The Morse Code app uses your phone's camera as a real-time Morse code translator:

  1. Frame processor captures brightness data at 30+ FPS
  2. Adaptive thresholding adjusts to ambient light conditions
  3. Timing analysis determines dots, dashes, and gaps
  4. Auto-speed detection adapts to any sending speed
  5. Binary protocol support also decodes Manchester-encoded binary signals

The entire process happens on-device with zero latency — no internet connection needed.

Download free for iOS or Android.

Try the Morse Code App

Decode, transmit, and learn Morse code on your phone. Free for iOS and Android.