

Harmoniser HAT
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
1README
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
+-----------+ +--------------+ +--------------------+
| 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
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
./code/run.sh # Runs the real-time pedal binary✅ Unit Tests
./code/unit_test.sh # Runs unit tests with Valgrind🧼 Clean
./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
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
| Metric | Value |
|---|---|
| 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
| Criteria | Status |
|---|---|
| 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| Qty | Value | Footprint | References |
|---|---|---|---|
| 9 | 10k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R34, R35, R36, R37, R38, R39, R46, R47, R48 |
| 4 | MountingHole | MountingHole:MountingHole_2.7mm_M2.5 | H1, H2, H3, H4 |
| 3 | RotaryEncoder_Switch | Rotary_Encoder:RotaryEncoder_Bourns_Vertical_PEC12R-3x17F-Sxxxx | SW1, SW2, SW3 |
| 2 | 0.1u | Capacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mm | C40, C43 |
| 2 | 100u | Capacitor_THT:CP_Radial_D8.0mm_P5.00mm | C9, C13 |
| 2 | 3k9 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R1, R2 |
| 1 | 1k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R3 |
| 1 | 24LC256 | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U2 |
| 1 | BOB21250-LEFT | Connector_PinSocket_2.54mm:PinSocket_1x16_P2.54mm_Vertical | J11 |
| 1 | BOB21250-RIGHT | Connector_PinSocket_2.54mm:PinSocket_1x16_P2.54mm_Vertical | J12 |
| 1 | I2C Header | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J6 |
| 1 | I2S Header | Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical | J8 |
| 1 | Jumper_2_Open | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | JP1 |
| 1 | Line In | Connector_Audio:Jack_3.5mm_CUI_SJ1-3523N_Horizontal | J9 |
| 1 | Line Out | Connector_Audio:Jack_3.5mm_CUI_SJ1-3523N_Horizontal | J10 |
| 1 | MCP23017_SP | Package_DIP:DIP-28_W7.62mm | U5 |
| 1 | PWR | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J7 |
| 1 | RPi GPIO | Connector_PinHeader_2.54mm:PinHeader_2x20_P2.54mm_Vertical | J1 |
Similar boards
- 2 layers90.2 × 48.3 mm

- 2 layers100 × 67 mm

- 2 layers160 × 100 mm

CodyComputer
fjmilens3/cody-computer
Design files and source code for the Cody Computer.
59 parts64GPL-3.0 - 4 layers100 × 49.8 mm

- 2 layers81.3 × 96.5 mm

- 4 layers63.6 × 67.5 mm

PropellerPCB
tomkinsc/open-spectrometer
Code, mechanical designs, and electronic plans related to the OpenSpectrometer project.
76 parts30 - 2 layers108.4 × 70 mm

User Expansion
Ashet-Technologies/Home-Computer
A retro-inspired home-computer project.
858 parts20CERN-OHL-P-2.0 - 2 layers136.8 × 87 mm

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).