Skip to the content
2 layers150 × 75 mmHarmoniser HAT, the printed circuit board in 3D

Harmoniser HAT

Can-Bot/RTEP_Pedal3

Repository for ENG5220: Real-Time Embedded Programming - S.H.R.E.D Pedal

Size
150 × 75 mm
Copper layers
2
Thickness
1.6 mm
Parts
34
Nets
71
Pads
180
Tracks, vias
360, 20
Pours
13
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
5 Feb 2025
Updated
21 Apr 2025

Overview

Harmoniser HAT is an open-source printed circuit board by Can-Bot, from the Can-Bot/RTEP_Pedal repository on GitHub, published under the MIT licence. It is a 2-layer board of 150 × 75 mm with 34 parts on 71 nets, routed with 360 tracks and 20 vias.

It is built around the 24LC256-I/P. Its parts include 12 resistors, 8 connectors, 4 capacitors, 3 switches and 2 ICs. It belongs with the audio and music boards of this library.

Main components

1

README

README.md

🎛️ Real-Time Digital Effects Pedal

A modular, real-time audio effects system for Raspberry Pi, developed in modern C++ with multithreading, low-latency processing, and unit-tested DSP effect chains.

📜 Project Overview

The Real-Time Harmoniser is a standalone real-time embedded system designed to apply audio effects (like pitch-shifting and gain distortion) to incoming audio with minimal latency. The pedal is controllable via a hardware interface and written for the ENG5220: Real-Time Embedded Programming course.

Key Features:

  • Modular DSP architecture with hot-swappable effect chains
  • Sample-by-sample processing for minimal latency
  • Real-time capable Harmonizer using SignalsmithStretch
  • Multithreaded control-safe design with atomic buffer swapping
  • CI-integrated Google Test unit testing
  • Memory-safe code verified with Valgrind

🧩 System Architecture

text
+-----------+     +--------------+     +--------------------+
| Audio In  | --> | Sampling     | --> | DigitalSignalChain | --> Audio Out
+-----------+     +--------------+     +--------------------+
                                       |  Gain, Fuzz, Harmonizer ...
                                       +--------------------+

Each audio sample flows through a configurable DSP chain loaded dynamically from a config file.

⚙️ Getting Started

🔧 Prerequisites

  • Raspberry Pi 4/5 (or any Linux system)
  • libsndfile1-dev, libasound2-dev, libgtest-dev, valgrind
  • CMake ≥ 3.7, Clang or GCC

🛠️ Build

bash
chmod +x code/init.sh code/build.sh
./code/init.sh    # Installs dependencies and fetches submodules
./code/build.sh   # Builds the pedal and test binaries

▶️ Run

bash
./code/run.sh     # Runs the real-time pedal binary

✅ Unit Tests

bash
./code/unit_test.sh    # Runs unit tests with Valgrind

🧼 Clean

bash
./code/clean_run.sh     # Re-builds the project and runs
./code/clean_test.sh    # Re-builds the project and runs the integration test

📂 Project Structure

text
code/
├── src/              # All source files
│   ├── dsp/          # DSP chain and factory
│   ├── effects/      # Harmonizer, Gain, Fuzz etc.
│   ├── sampling/     # Sample and output modules
│   └── test/         # Functional and unit tests
├── assets/           # Input/output WAV files and configs
├── CMakeLists.txt    # Project build configuration
├── run.sh            # Launches the pedal binary
├── test.sh           # Runs Valgrind test harness
└── init.sh           # Dependency setup and submodule fetch

📊 Performance

MetricValue
Latency (per sample)< 3μs (tested on x86)
Realtime Factor~10x
CPU Usage< 40% on RPi 4
Memory Leaks❌ None beyond Alsa Standard (Valgrind verified)

🔬 Features Under Development

  • Live web-based configuration via Angular UI (shred.local)
  • Additional effects: Reverb, Delay
  • Plugin support for 3rd-party effect modules

✅ Achievements

CriteriaStatus
Multithreaded DSP✅ Lock-free atomic switching
Realtime sample-by-sample✅ Implemented in Harmonizer
Unit Testing✅ GTest + Valgrind
CI/CD Integration✅ GitHub Actions
Well-commented, structured code✅ Reviewed and documented
Pedal UI and Config✅ Completed

📜 License

MIT License. See LICENSE for details.

Parts

34
QtyValueFootprintReferences
910kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR34, R35, R36, R37, R38, R39, R46, R47, R48
4MountingHoleMountingHole:MountingHole_2.7mm_M2.5H1, H2, H3, H4
3RotaryEncoder_SwitchRotary_Encoder:RotaryEncoder_Bourns_Vertical_PEC12R-3x17F-SxxxxSW1, SW2, SW3
20.1uCapacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mmC40, C43
2100uCapacitor_THT:CP_Radial_D8.0mm_P5.00mmC9, C13
23k9Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1, R2
11kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR3
124LC256Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU2
1BOB21250-LEFTConnector_PinSocket_2.54mm:PinSocket_1x16_P2.54mm_VerticalJ11
1BOB21250-RIGHTConnector_PinSocket_2.54mm:PinSocket_1x16_P2.54mm_VerticalJ12
1I2C HeaderConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ6
1I2S HeaderConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ8
1Jumper_2_OpenConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJP1
1Line InConnector_Audio:Jack_3.5mm_CUI_SJ1-3523N_HorizontalJ9
1Line OutConnector_Audio:Jack_3.5mm_CUI_SJ1-3523N_HorizontalJ10
1MCP23017_SPPackage_DIP:DIP-28_W7.62mmU5
1PWRConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ7
1RPi GPIOConnector_PinHeader_2.54mm:PinHeader_2x20_P2.54mm_VerticalJ1

Similar boards

  • 2 layers90.2 × 48.3 mmMOBO SMD, the printed circuit board in 3D

    MOBO SMD

    lkesteloot/alice

    Website documenting a hardware project from the 1990s.

    64 parts79Apache-2.0
  • 2 layers100 × 67 mmBms, the printed circuit board in 3D

    Bms

    scttnlsn/bms

    Battery management system for 4-series li-ion packs

    52 parts67
  • 2 layers160 × 100 mmCodyComputer, the printed circuit board in 3D

    CodyComputer

    fjmilens3/cody-computer

    Design files and source code for the Cody Computer.

    59 parts64GPL-3.0
  • 4 layers100 × 49.8 mmExpansion board, the printed circuit board in 3D

    Expansion board

    reubenstr/zuko

    A quadruped robot dog!

    75 parts51MIT
  • 2 layers81.3 × 96.5 mmMidi2cv, the printed circuit board in 3D

    Midi2cv

    tomarus/midi2cv

    Eurorack MIDI2CV and Arpeggiator using an Arduino Nano.

    63 parts31
  • 4 layers63.6 × 67.5 mmPropellerPCB, the printed circuit board in 3D

    PropellerPCB

    tomkinsc/open-spectrometer

    Code, mechanical designs, and electronic plans related to the OpenSpectrometer project.

    76 parts30
  • 2 layers108.4 × 70 mmUser Expansion, the printed circuit board in 3D

    User Expansion

    Ashet-Technologies/Home-Computer

    A retro-inspired home-computer project.

    858 parts20CERN-OHL-P-2.0
  • 2 layers136.8 × 87 mmJcap, the printed circuit board in 3D

    Jcap

    cspang1/jcap

    JAMMA Custom Arcade Project

    66 parts15MIT

Questions

How big is the Harmoniser HAT PCB?

It measures 150 × 75 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Harmoniser HAT use?

34 parts, built around the 24LC256-I/P. 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 Harmoniser HAT KiCad files?

From the Can-Bot/RTEP_Pedal repository on GitHub, at the commit this page was made from: the board is Schematics/Harmoniser HAT.kicad_pcb and its schematic Schematics/AINPUT.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Harmoniser HAT design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).