Skip to the content
PCBKitNew board
2 layersTinnitus, the printed circuit board in 3D

Tiny C99 library which allows you to use existing audio channels for digital transmission. The project was presented and defended at the national round of the SOČ competition and at the TMR UNIZA competition.

Copper layers
2
Thickness
1.6 mm
Parts
10
Nets
12
Pads
26
Tracks, vias
6, 0
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
30 Sep 2024
Updated
10 Jun 2026

Overview

Tinnitus is an open-source printed circuit board by Servacek, from the Servacek/tinytus repository on GitHub. It is a 2-layer board with 10 parts on 12 nets, routed with 6 tracks and 0 vias.

It is built around the ATTINY85-20PU. Its parts include 5 resistors, 2 capacitors, 2 diodes and 1 IC. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

1

README

README.md

TinyTUS - Tiny Transmission Using Sound

Small, modular C99 library for transmitting digital data over acoustic channels using FSK modulation. Targets desktop (Windows, Linux), WebAssembly, and embedded platforms.


Features

  • GFSK modulation - configurable bits-per-symbol (1, 2, 4, 8), frequency range, sample rate and symbol rate
  • Reed-Solomon ECC - configurable error correction percentage per frame
  • DSS scrambling - optional data scrambling before encoding
  • AGC - automatic gain control on the receive path
  • Sync detection - marker-based start/end-of-frame detection
  • Builds as an executable, static lib, DLL, or WASM module
  • PortAudio, libusb and the WAV helper are all optional and conditionally compiled

Live Demo

Since this library is compilable also for the web (using WebAssembly), I have built a small static website which shows it's capabilities. You can check it out here: https://servacek.github.io/audiomodem/

Custom hardware

In order to use an radio transceiver for digital communication using this library a special piece of hardware has to be made, which enables the computer to control the PTT circuit of the radio. Here is the schematic of such hardware, I have designed and used during testing with my Allamat 47 handhold CB radios.

image

Note that the value of the resistor R4 depends on the specific radio type used. Or in case you need flexibility, it can be replaced with a suitable trimmer.

Building

Requirements: clang, llvm-lib (Windows), make. PortAudio and libusb prebuilt libraries are included under libs/.

sh
make run    # build and run the main executable
make lib    # build as static library  -> bin/tinytus/lib/tinytus.lib
make dll    # build as DLL             -> bin/tinytus.dll
make web    # build for WebAssembly (requires emsdk, set EMSDK_PATH in Makefile)

Compiler flags can be overridden via dev.config in the repo root (gitignored):

makefile
# dev.config
CFLAGS = -O0 -g

Tests

sh
make tests          # build and run all tests
make test <name>    # build and run one test,  e.g.  make test gfsk
make clean          # remove all build artifacts

Each test is compiled from tests/test_.c against the full source tree. Output goes directly to stdout/stderr.

Available tests:

text
make test gfsk           - full modulate/demodulate round-trip
make test ber            - BER at various SNR levels
make test fsk            - basic FSK / Goertzel demodulation
make test hamming        - Hamming ECC encode/decode
make test frame          - frame packing and unpacking
make test goertzel       - Goertzel frequency detection
make test dss            - data scrambling
make test sync_detector  - sync word detection
make test wav            - WAV file I/O
make test tlv            - modem profile TLV encode/decode
make test modem_profile  - default profile singleton and field checks

New test files dropped into tests/test_*.c are picked up automatically. See tests/helper.h for ok()/fail() helpers, ASSERT macros and section headers.


Quick Example

c
#include <tinytus.h>

void on_received(const uint8_t *bytes, uint8_t n) {
    for (uint8_t i = 0; i < n; i++) putchar(bytes[i]);
    putchar('\n');
}

int main(void) {
    start_listening(NULL, on_received);
    send_payload(NULL, (const uint8_t *)"Hello!", 6);
    while (1) {}
    stop_listening();
    return 0;
}

A more complete example is in examples/simplechat.c.


Configuration

Compile-time knobs are in src/const.h:

text
SAMPLE_BIT_DEPTH          16      sample depth (8 / 16 / 32)
SQUELCH_THRESHOLD         0.01    minimum signal power to attempt decode
MARKER_DETECTION_THRESHOLD 0.4    marker confidence threshold
LIB_PORTAUDIO_ENABLED     1       set to 0 to drop PortAudio
LIB_LIBUSB_ENABLED        1       set to 0 to drop libusb
LIB_WAV_ENABLED           1       set to 0 to drop the WAV helper

Platform Notes

  • Windows - primary target; clang + MSVC CRT linkage
  • Linux - builds with the same Makefile; linker flags may need adjustment
  • WASM - set EMSDK_PATH in Makefile and run make web; PortAudio and libusb are disabled automatically

Parts

10
QtyValueFootprintReferences
2100nFCapacitor_THT:C_Disc_D3.0mm_W2.0mm_P2.50mmC1, C2
227RResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR3, R5
22K2Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR2, R4
23V3Diode_THT:D_DO-41_SOD81_P10.16mm_HorizontalD1, D2
110KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1
1ATtiny85-20PPackage_DIP:DIP-8_W7.62mmU1

Questions

What parts does the Tinnitus use?

10 parts, built around the ATTINY85-20PU. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Tinnitus KiCad files?

From the Servacek/tinytus repository on GitHub, at the commit this page was made from: the board is hardware/usb-adc-dac-converter-switch/tinnitus.kicad_pcb and its schematic hardware/usb-adc-dac-converter-switch/tinnitus.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Tinnitus design in my own project?

Its repository states no licence, so its author keeps all rights: ask Servacek before reusing the design.

More from Servacek/tinytus

2
  • 2 layers71.5 × 23 mmRelay, the printed circuit board in 3D

    Relay

    Servacek/tinytus

    Tiny C99 library which allows you to use existing audio channels for digital transmission. The project was presented and defended at the national round of the SOČ competition and at the TMR UNIZA competition.

    23 parts
  • 2 layers71.5 × 23 mmRelay, the printed circuit board in 3D

    Relay

    Servacek/tinytus

    Tiny C99 library which allows you to use existing audio channels for digital transmission. The project was presented and defended at the national round of the SOČ competition and at the TMR UNIZA competition.

    22 parts

Similar boards

  • 2 layers30.7 × 76.1 mmRepeater v2, the printed circuit board in 3D

    Repeater v2

    plusvic/simplebus2-intercom

    General description of the Simplebus2 protocol used by some Comelit's intercoms. Hardware for retransmitting Simplebus2 messages over UART.

    17 parts95CC0-1.0
  • 2 layers101.5 × 54 mmSimkarte, the printed circuit board in 3D

    Simkarte

    osmocom/osmocom-analog

    Software Implementation of analog cellular telephony systems like NMT, TACS, IMTS, A/B/C-Netz; mirror of https://gitea.osmocom.org/cellular-infrastructure/osmocom-analog

    15 parts32GPL-3.0
  • 2 layers76.2 × 50.8 mmJerboa-8, the printed circuit board in 3D

    Jerboa-8

    strickyak/jerboa-attiny85-mod-synth

    Modular Synthesizer using an ATtiny85 chip for each module.

    23 parts31MIT
  • 2 layersCastVolumeKnob, the printed circuit board in 3D

    CastVolumeKnob

    WebmasterTD/CastVolumeKnob

    Hardware Volume Knob for Google Cast devices

    18 parts25
  • 2 layers55.9 × 55.9 mmPrintplaat, the printed circuit board in 3D

    Printplaat

    floriaanpost/wonderfoon

    Een nieuwe implementatie van de wonderfoon

    14 parts24
  • 2 layers71.1 × 40.6 mmTiny blinky, the printed circuit board in 3D

    Tiny blinky

    Hack-a-Day/Remoticon_KiCad_Blender

    support files for the 2020 Remoticon KiCad to Blender > PCB renders workshop

    21 parts22
  • 2 layers242 × 60 mmRoothubs, the printed circuit board in 3D

    Roothubs

    gkiefer/home2l

    The Home2Ls - Smart Tools for a Private Home

    178 parts21