PolySynth started as a simple goal: how can a low-cost microcontroller and DAC combo be used to produce good sounding audio for hobby projects? Can this system be built into a modular hardware block and firmware library that can easily be added to future projects?
To answer these questions, PolySynth was born! Hardware-wise, PolySynth is simple: it consists of a low-cost 32-bit MCU (STM32F103), low-cost DAC and speaker amplifier, and small PCB mounted speaker. SPI is used for communication between the DAC and MCU, meaning almost any microcontroller can be used.
PolySynth's firmware is very exciting. The goal is to be able to dynamically generate audio samples to play on the speaker in real-time. These sounds are synthesized on-the-fly, meaning that different audio characteristics can be produced (e.g. piano, trumpet, etc).
Follow this project to keep track of my progress in getting PolySynth up and running!
Files
PolySynth-design.pdf
Design files for PolySynth: PDF exports of schematics and PCB layout
Adobe Portable Document Format -
422.42 kB -
08/29/2018 at 15:32
PolySynth comes to life! We can finally generate simple sinusoidal waveforms out of the DAC at arbitrary frequency!
Channel 0 above pulses once per period, so the frequency of that pulse indicates the sine waves' frequency. The above example shows a ~1 kHz sine wave output. The lines DIN, CLK, and CS are the serial interface from the MCU to the DAC. They are toggling much faster than 1kHz (approximately 1 MHz).
To do this, we store sine wave samples in a lookup table and simply iterate through them, streaming them out over SPI at a set frequency.
Now that the hardware drivers are in place, all that is left is to build a firmware stack on top of this to generate multiple frequencies via Additive Sinusoidal Synthesis.
As of 8/23/2018, PolySynth boards have been ordered! I got 10 from SeeedStudio for cheap, so hopefully they will be of good quality... I've never had a problem before with Seeed, so let's hope they continue to work well for me.
Since this project log update is a few days delayed, the boards should arrive soon! I'll let everyone know when they arrive and I get them assembled.