Remember the screeching of the dial-up modem? Turning data into sound is still one of the simplest ways to connect devices: you can use an audio cable, send it from a speaker to a microphone, put it on a telephone line or a radio, or just store it in a WAV file. No Wi-Fi, no pairing, no extra hardware.

TinyModem is a header-only C++ library of software audio modems for Arduino and the desktop. It is based on the arduino-audio-tools, so any audio input and output works: an I2S codec, a built-in DAC or ADC, PWM or a sound card.

One library, ten modem types

  • FSK: the classic one, compatible with minimodem (Bell 202/103, RTTY, caller ID, …)
  • MFSK: many tones, robust over a speaker and a microphone
  • PSK: PSK31 and friends, now also QPSK and 8PSK
  • OFDM: the fast one for a cable or a good audio path
  • AX.25: APRS and packet radio, now also FX.25 and IL2P with Reed-Solomon error correction, compatible with direwolf
  • ggwave: exchange short messages with phones and browsers
  • Olivia / Contestia: keyboard chat with extremely weak signals
  • CSS: LoRa-like chirp spread spectrum
  • Morse code: International and American (railroad) Morse
  • DTMF: telephone touch tones

Olivia, CSS, Morse, DTMF, QPSK/8PSK, FX.25 and IL2P are new in version 1.2.0.

As simple as a Serial port

A modem is just an Arduino stream: you print your data and read what was received, like with a Serial port. Switching to a different modem type takes a one-line change, so you can easily try out which one works best for your audio path.

Fast enough for small boards

Most modes run many times faster than real time: an ESP32-S3 decodes Morse 130 times and PSK125 almost 60 times faster than real time, and even the RP2040 without a floating point unit handles most modes. On the desktop, the tinymodem command line tool encodes and decodes WAV files or your sound card.

Try it

Everything you need is on GitHub: the library, examples, the command line tool and a wiki that compares the modem types and tells you which one to choose for your project.

👉 github.com/pschatzmann/TinyModem


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *