Close

Background and Planning

A project log for Synthesizer LFO / Function Generator

Building an arbitrary waveform generator to serve as an LFO in a Eurorack synthesizer

steven-gannSteven Gann 06/23/2022 at 23:370 Comments

I've been slowly building a basic synthesizer rig from scratch, and one thing I've been needing is a module that can generate different waveforms at low frequencies to provide dynamic CV signals to other modules like VCFs, VCAs, etc. In a more traditional synthesizer rack this would be provided by an LFO module. There's many LFO module schematics around the Internet, but a lot of them either have serious design flaws like temperature sensitivity or distortion outside of specific frequency ranges, or they depend on expensive or hard-to-find components like temperature-compensated transistors, transconductance amplifiers, etc.

After building a few simpler analog LFO designs, including one op-amp based and one using 555s, I had the idea to use a microcontroller with a DAC and ADC. DSP for audio is pretty hard to do on simpler MCUs, but generating a low-frequency waveform should be achievable!

I grabbed a PIC18 Curiosity that I already had and wrote up a simple program to see how fast I could push a 256-sample sine wave out the 8-bit DAC and after a little experimenting I was able to get a fairly clean sine wave of about 1KHz. There's a tiny amount of aliasing but it is barely noticeable and I can probably clean it up later with a low-pass filter if I really need to. Since it's generation CV signals and not actual audio, it should be just fine!

Now that I've confirmed the MCU I have handy will meet my needs, this leaves just a couple other challenges:

  1. The DAC's output is 0v to 3.3v, but CVs need to be -10v to 10v, adjustable since some modules like CVs as small as +/-2.5v for 1v/octave
  2. I'd like another CV (like from a sequencer or MIDI-CV module) to control the frequency, but the ADC is similarly limited to 0v to 3.3v and CVs can be as large as +/-12v
  3. I want to the CV input and output to be as robust as possible against overvoltage, shorts, etc.
  4. I want to use cheap, basic components I already have on hand since the Global Chip Shortage has made more specific components hard to get, so this means passives, discrete diodes and transistors, and op-amp

Discussions