Engineering

Project 02 / 06

Over-the-Air Acoustic Modem for Text Transmission

A two-author MATLAB project converted short ASCII text into a framed, 3 kHz acoustic waveform and reconstructed it on a receiving laptop using built-in audio hardware. The receiver isolated and aligned an unknown-start packet before deciding bits and rebuilding the message.

Trial 2 — received packet to recovered baseband

Two laptops — over-the-air recordingTrial 2 received-signal plot: a laptop microphone recording contains a distinct transmitted packet between lower-level background signal.
MATLAB time-domain plot labeled Received signal over the air, with a high-energy acoustic packet around the middle of lower-level background signal.
Two laptops — receiver processingTrial 2 recovered baseband after matched-carrier demodulation, low-pass filtering, and trimming.
MATLAB plot labeled Recovered baseband after demodulation and low-pass filtering, showing the trimmed bipolar pulse-like signal used for bit decisions.

Trial 2 recovered HELLO WORLD with zero errors across 120 frame bits, including 88 payload bits.

01 — A text message through an acoustic channel

The project turns a short text message into an audible signal and then reconstructs it from a laptop-microphone recording.

Max Pohl and I built a MATLAB acoustic modem that converts text to bits, modulates them onto a 3 kHz audio carrier and plays the signal through a laptop speaker. A second laptop records the sound, aligns the bit boundaries and reconstructs the text.

Trial 2 shows a received acoustic packet and a recovered baseband signal. It does not measure range, throughput, or noise tolerance.

02 — Framing an audible bitstream

The transmitter used a fixed framing and modulation scheme to make the text message representable as audio.

From characters to passband audio

Each ASCII character occupied eight bits. A known 32-bit preamble, formed by repeating [1 0] sixteen times, was placed before the payload so the receiver could later score candidate symbol alignments.

Each bit became a 10 ms rectangular pulse: +1 for a 1 and −1 for a 0. At the reported 44.1 kHz sampling rate, this produces 441 samples per bit; the bipolar baseband was then multiplied by a 3 kHz cosine carrier, normalized, saved as audio, and played through the laptop speaker.

  • ASCII payload: 8 bits per character.
  • Frame prefix: 32-bit known preamble before the payload.
  • Baseband mapping: +1 / −1 pulses, 10 ms each.
  • Passband path: 3 kHz carrier, normalization, and speaker playback.

Passband modulation

The reported cosine carrier c[n] shifts the bipolar baseband b[n] into an audible passband waveform x[n] for speaker playback.

Bipolar baseband pulse train formed from the framed bits.
Cosine carrier generated at the reported carrier frequency.
Carrier frequency, configured as 3 kHz.
Sampling rate, configured as 44.1 kHz.

These are reported implementation settings and relations, not measured throughput, bandwidth, or an optimized parameter selection.

Modem configuration
ParameterConfigured valuePurpose
Sampling rate44.1 kHzAudio processing rate
Carrier3 kHzCosine modulation carrier
Bit duration10 msRectangular pulse duration
Samples per bit441Samples in each bit interval
Preamble32 bitsKnown prefix for alignment
FIR low-pass filter101 tapsReceiver low-pass filter

The bit duration is a configuration setting. The recorded tests do not measure end-to-end throughput.

03 — Recovering timing before recovering text

The receiver must locate the useful packet and choose bit boundaries before it can reconstruct characters.

Receiver path

The MATLAB receiver records 10 seconds of audio, multiplies the recording by the same carrier, and applies a 101-tap FIR low-pass filter. It identifies the start and end of the message from the filtered waveform using a threshold of 0.2 · max|y|, with one bit of padding before trimming.

Because the recording does not arrive with known symbol boundaries, the receiver evaluates candidate offsets up to four bit intervals. For each candidate it compares the first 32 detected bits with the known preamble, considers printable-ASCII plausibility, chooses the highest-scoring alignment, then decides each 441-sample segment by the sign of its mean before grouping bits into ASCII bytes.

04 — Three documented acoustic trials

The team ran one single-laptop baseline and two two-laptop trials using the same modem settings and the HELLO WORLD message.

Reported HELLO WORLD acoustic-trial outcomes
TrialSetupMessage recoveredFull-frame BERPayload-only BER
1Single laptop (baseline)HELLO WORLD0/120 = 0.00000/88 = 0.0000
2Two laptops (intended use)HELLO WORLD0/120 = 0.00000/88 = 0.0000
3Two laptops (final demo run)hELlO WORLD2/120 = 0.01672/88 = 0.0227

Each row shows one HELLO WORLD trial. Full-frame BER includes the preamble and payload; payload-only BER excludes the preamble. The calculations compare overlapping portions of the transmitted and recovered bitstreams. The presented results do not include repeated-trial statistics, a range sweep, or acoustic-channel uncertainty bounds.

Trial 2 decoded output

MATLAB command window from Trial 2 showing HELLO WORLD and zero errors over 120 full-frame bits and 88 payload bits.
Two laptops — one documented zero-error observationTrial 2 MATLAB output: HELLO WORLD was recovered with 0 errors over 120 full-frame bits and 0 errors over 88 payload bits.

The console shows Trial 2's zero-error result. It does not establish that the modem will be error-free in other runs or conditions.

05 — What the BER records

The BER calculations compare transmitted and recovered bit sequences while separating frame-alignment errors from message-payload errors.