Skip to the content
PCBKitNew board
2 layers71.5 × 23 mmRelay, 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.

Size
71.5 × 23 mm
Copper layers
2
Thickness
1.6 mm
Parts
22
Nets
24
Pads
67
Tracks, vias
3, 0
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
30 Sep 2024
Updated
10 Jun 2026

Overview

Relay is an open-source printed circuit board by Servacek, from the Servacek/tinytus repository on GitHub. It is a 2-layer board of 71.5 × 23 mm with 22 parts on 24 nets, routed with 3 tracks and 0 vias.

It is built around the ATTINY85-20PU, TLV75533PDBV and TS5A23157DGSR, with the MJ-3502 among its other parts. Its parts include 10 resistors, 4 capacitors, 3 ICs, 3 diodes and 1 transistor. It belongs with the home automation and IoT boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

4

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

22
QtyValueFootprintReferences
41K5Resistor_SMD:R_0805_2012MetricR7, R9, R10, R11
3LEDLED_SMD:LED_0805_2012MetricD1, D2, D3
210KResistor_SMD:R_0805_2012MetricR4, R8
21uFCapacitor_SMD:C_0201_0603MetricC1, C2
247RResistor_SMD:R_0805_2012MetricR2, R3
1100nFCapacitor_SMD:C_0805_2012MetricC5
11nFCapacitor_SMD:C_0805_2012MetricC3
1220RResistor_SMD:R_0805_2012MetricR5
12N7002Package_TO_SOT_SMD:SOT-23Q1
15K1Resistor_SMD:R_0603_1608MetricR1
1ATtiny85-20PPackage_DIP:DIP-8_W7.62mm_SocketU3
1MJ-3502ProjectSpecific:AudioJackPort3.5mmStereoJ2
1TLV75533PDBVPackage_TO_SOT_SMD:SOT-23-5U1
1TS5A23157DGSPackage_SO:TSSOP-10_3x3mm_P0.5mmU2

Questions

How big is the Relay PCB?

It measures 71.5 × 23 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Relay use?

22 parts, built around the ATTINY85-20PU, TLV75533PDBV, TS5A23157DGSR and MJ-3502. 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 Relay KiCad files?

From the Servacek/tinytus repository on GitHub, at the commit this page was made from: the board is hardware/usb-relay-audio-switch/rev01/relay.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 Relay 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 layersTinnitus, the printed circuit board in 3D

    Tinnitus

    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.

    10 parts

Similar boards

  • 2 layers70.5 × 64 mmEsp32, the printed circuit board in 3D

    Esp32

    ste2425/PSP-Bluetooth

    Formerly PSP-Consolizer, PSP-Bluetooth aims to add Bluetooth controller support to the PSP 1K/2K/3K.

    95 parts108MIT
  • 2 layers223.5 × 160 mmBase, the printed circuit board in 3D

    Base

    bread-modular/bread-modular

    Modular Synths for Everyone

    201 parts67MIT
  • 2 layers179 × 115 mmTouchord, the printed circuit board in 3D

    Touchord

    dovker/Touchord

    A chord generating midi controller using RP2350

    77 parts14GPL-3.0
  • 2 layers80 × 60 mmETH2Zigbee, the printed circuit board in 3D

    ETH2Zigbee

    acha666/ETH2Zigbee

    71 parts
  • 6 layers155 × 100 mmCM5IO második terv, the printed circuit board in 3D

    CM5IO második terv

    NBence0/JedlikBots

    Welcome to the official GitHub page of JedlikBots! 🎓🤖 We are the dedicated team of software development and robotics students from the Jedlik Ányos Technical School in Győr, Hungary.

    491 parts
  • 4 layers180 × 100 mmClass board V0.2, the printed circuit board in 3D

    Class board V0.2

    TIGP-Experimental-Methods/class-board-2026

    TIGP class instrument 2026: one board, five blocks - KiCad hardware, ESP32-S3 firmware, phone PWA, Python API, workbook

    342 parts
  • 4 layers33.8 × 38 mmYatchy, the printed circuit board in 3D

    Yatchy

    Szybet/Yatchy

    A modular, hackable, improved watchy like watch

    92 parts184
  • 4 layers37 × 34.3 mmReadout 60pin, the printed circuit board in 3D

    Readout 60pin

    opentac/opentac

    OpenTac: open tools to design, fabricate, read and simulate flex-PCB tactile skins that sense normal and shear force, for any robot surface.

    55 parts92MIT