Posted by & filed under Projects, Synth DIY.

This voltage-controlled LFO is based on the PIC 16F684, which is a pretty basic chip. Nonetheless, this LFO has more features than your average LFO. For a start, it can produce 7 basic waveforms, and also includes a noise source. It can also morph its waveforms under CV control, well beyond basic PWM.

VCLFO waveforms

There is an optional sample-and-hold module that can sample whatever is selected, the current waveform or the noise source. The LFO frequency, waveform selection, waveform distortion, and S&H rate are all voltage-controlled using 0-5V. The overall output level is also voltage-controlled.

Block Diagram

Block diagram of VCLFO with 7 waveforms, noise source and sample and hold feature

The chip uses the analogue inputs of the PIC for CVs. These are fed to the internal A/D convertor, which samples each input every 150uS or so and converts the voltage to an 8-bit value. In order to avoid using an external D/A convertor for the output, the chip uses the built-in PWM module. The PWM output needs passing through a lowpass filter to convert the pulses back into an analogue output.

Using an external crystal with the PIC allows the chip to run at its maximum clock speed of 20MHz, and this means that the PWM module is able to produce a 19.5KHz sample rate at 10-bit accuracy. I’ve tested the LFO by feeding the output into the filter modulation input of a SH101. No digital artifacts are audible on the straight-line waveforms (Ramps, Triangle, Square), but there is a slight stepping on the curved waveforms at the lowest frequencies. The SPIKE waveform is the worse case, since it has the steepest gradients. I’m considering adding interpolation to remove this slight problem.

Later note: I’ve gone back to the code and reduced this problem significantly by concentrating the lookup table on the steepest parts of the SPIKE waveform. Similar tricks have been applied on other waves too, and the errors have been reduced by 33% to 70%, with the best increase on the SPIKE wave.

Pinout Diagram

VCLFO pinout

Waveform distortion

VCLFO waveform distortion

The WAVE DISTORT CV input can produce phase distortion of the LFO output. The waveform is regarded as being in two sections, usually half the total length of the waveform. By reducing the time one of these sections takes whilst increasing the time the other takes, it is possible to distort the waveform without altering its pitch.

More details

If you’d like to build one, or like to know how I built mine, perhaps you’d like to look at:

By way of explanation of the flowchart, perhaps it is worth saying that the code consists of two main sections:- An interrupt routine that runs the LFO and noise source and ensures a constant output sample rate and frequency, and a main code loop that polls the various A/D channels (CV inputs) in turn and converts their values to something useful for the code. It’s also worth pointing out that I did the flowchart diagram before I added the WAVE DISTORT CV feature, so that doesn’t appear.

Update: Current Version 9D

The chip still had quite a few pins free, so I felt I could add some more features. A couple of things weren’t in the original version:

  • The SYNC input that resets the LFO waveform or S&H back to the beginning.
  • The WAVE DISTORT input to bend the LFO waves out of shape.

I’ve also reworked the PWM filter to use a two-stage 4th order Bessel filter. This improves the performance and reduces digital noise on the output. I hadn’t studied filters much before, and the existing design I chose to use originally was a Chebyshev filter which has a steeper rolloff, but not such good high frequency performance. For this application, the rolloff isn’t so important, but high frequency performance definitely is.

    Related Products

  • VCLFO 9D

    VCLFO

    The VCLFO 9D is a simple-to-use 0-5V voltage-controlled LFO chip with many more features than your average LFO. For a start, it can produce 7 basic waveforms, and also includes a noise source. It can also distort its waveforms under CV control, well beyond basic PWM. There is an optional sample-and-hold module that can sample whatever is selected, the current waveform or the noise source. The LFO frequency, waveform selection, waveform distortion, and S&H rate are all voltage-controlled using 0-5V. The overall... Read more »...

    More Info Buy Now

2 Responses to “Voltage Controlled LFO (VCLFO 9D)”

    • Tom Wiltshire

      Initially, that’s exactly what I had – a Pulse Width control which affected only the square wave. However, I was never happy with it because it didn’t do anything to the other waveforms. After a while, I came up with the Wave Distortion control, which still produces pulse width modulation on the square wave, but *also* alters the other waveforms too. So there still is a PW control, but now it’s labelled Wave Distort because it’s more general.
      It still doesn’t alter the Noise output, but you can’t have everything!

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *