Skip to main content
Version: ACS CC

Digital Synthesizer

Polyphonic synthesizer with DSP effects.

info

Author: Cărpinișan George
GitHub Project Link: https://github.com/UPB-PMRust-Students/acs-project-2026-george17c

Description

A bare-metal polyphonic synth built with Rust. This project is a 48kHz multi-effect audio engine running on an STM32 NUCLEO-U545RE-Q. It features high-level DSP and a hardware interface for instant feedback. It uses a custom-designed top panel interface to hold the controls for a real-time I2S digital audio stream.

Motivation

I like music and I'm fascinated by the hardware behind it. My goal is to recreate a studio-grade musical instrument, to the best of my ability. My synth will have some iconic effects and functionalities from a modern synthesizer for a fraction of its price.

Architecture

Architecture

The system is designed around a non-blocking, async pipeline:

  • Clock Generation: Used a hardware clock to guarantee a 48 kHz audio sample rate, alongside an 80 MHz CPU clock for DSP overhead.
  • User Interface (EXTI/GPIO/SPI): Handles asynchronous hardware interrupts from physical components to trigger notes and modify effect parameters. Presets and effects are displayed on an LCD screen.
  • DSP Engine: Computes multiple oscillators and applies effects in real-time.
  • DMA Controller: Moves audio blocks from RAM to the audio peripheral without interrupting the CPU.
  • SAI/I2S Peripheral: Formats the raw data stream into standard I2S frames and sends them to the external DAC.

Log

Week 13 - 19 April

  • Wrote the initial DSP logic (oscillators, phase modulation, filtering) in a high-level environment (rodio).
  • Started researching components and different top-panel layouts.
  • Ordered the first batch of components.

Week 20 - 26 April

  • Started the mechanical assembly.
  • Configured hardware clocks and initialized the I2S communication with the DAC. Tested its output (a C note from a pulse wave) on my headphones and speaker. Works!

Week 27 April - 3 May

  • Finished designing the top panel in AutoCAD.
  • Started working on the screen interface for preset selection and effect visualization.

Week 4 - 10 May

  • Received the panel.
  • Soldered jumper wires on the switches (GPIO pin) and daisy chained their GND pins.
  • Soldered wires on the potentiometers.
  • Fixed the DAC clock speed, the square wave sounded correctly by chance (it's more tolerant than a sine wave which needs to be sampled more accurately).

Week 11 - 17 May

  • Polished the preset logic, made the effect parameters more robust. Only changing their value when a corresponding potentiometer is close to the previous stored value.
  • Resoldered some GND pins on the keyboard.

Week 18 - 24 May

  • Assembled all the components using a breadboard as a VCC and GND bus. Found out the potentiometers are not properly powered using the breadboard.
  • Finished soldering on the proto board.

Hardware

  • STM32 NUCLEO-U545RE-Q: processing unit.
  • Mechanical keyboard switches, 10k potentiometers, EC11 rotary encoder: to shape the sound.
  • 2.8" LCD display: interface for visualizing effects.
  • PCM5102 DAC module: for output.
  • Power bank: main power supply.
  • Wooden box + laser-cut panel.

Schematics

Schematic

Bill of Materials

DeviceUsagePrice
STM32 NUCLEO-U545RE-QMicrocontroller~115 RON
Keyboard SwitchesFor triggering notes, navigating the display and using the sequencer20 x 0.9 RON
10k potentiometersFor changing effect parameters8 x 1.31 RON
Rotary EncoderFor navigating the display2 x 4.39 RON
2.8" LCD displayFor visualizing presets and effects55.08 RON
Electronics kitFor wires, breadboard39.21 RON
PCM5102 DAC moduleFor audio output37.50 RON
10 cm female-female wiresTo solder on switches1 x 6.99 RON
10 cm female-male wiresFor the VCC and GND pins of the DAC and display2 x 3.99 RON
Proto boardsTo act as a VCC and GND bus2 x 1.28 RON
Wooden boxCase for the whole circuitry34 RON
Laser-cut top panelFor the user controlled knobs and switches0 RON

Software

LibraryDescriptionUsage
embassy-stm32Async HAL for STM32Main hardware abstraction for GPIO, SAI, DMA, SPI, and Clocks.
mipidsiMulti-display driverModern driver for the ILI9341 display, compatible with embedded-graphics.
display-interface-spiGeneric SPI display interfaceProvides the communication layer between the SPI peripheral and the display driver.
embedded-graphics2D graphics libraryCore library for drawing shapes, images, and basic text on the display.
micromathEmbedded math libraryProvides optimized trigonometric and math functions (sin, cos, exp) for the DSP engine.
static_cellStatically allocated memoryAllows safe runtime initialization of values with a 'static lifetime, for sharing resources with async tasks without a heap memory manager.
heaplessFixed-capacity data structuresProvides structures String, or RingBuffer with static capacities, preventing runtime allocation panics while handling UI state buffers.
defmtEfficient loggingUsed for debugging
  1. How to create "On the Run" by Pink Floyd pattern on Behringer TD-3 (303)
  2. Synthesis Basics: How To Ring Mod, FM, and AM
  3. The Math Behind Music and Sound Synthesis