Tap Tempo LFO (TAPLFO V2)
This simple Tap Tempo LFO is based on the PIC 16F684. You can set the LFO frequency by tapping a tempo on a button connected to the chip, or by changing the Tempo CV. With this chip you can build tap tempo effects units or stompboxes, tap tempo controlled drum machines or tap tempo sequencer clocks. All of these are described in the datasheet below.
The LFO can produce 8 waveforms, including a random (sample & hold) wave. All the waveforms except the random wave can be altered by the wave distortion CV. See the VCLFO page for more details of waveform distortion.
The chip also includes a tempo multiplier. This is combined with the tapped tempo to allow the LFO frequency to be set at a multiple of the tapped rate. The available multipliers are 0.5, 1, 1.5, 2, 3, and 4. This allows half- and double-time, and triplet times.
The LFO tempo, multiplier, waveform selection, wave distortion, and output level are all voltage-controlled using 0-5V. Unwanted features are easily disabled by tying the relevant pin to a constant voltage (usually 0V or +5V).
Block Diagram
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. Although this doesn't sound like much, in practice it is impossible to hear any artifacts in most situations.
Pinout Diagram
Possible uses
The TAP TEMPO input can accept clock pulses from other equipment, which allows the LFO to be syncronised to other devices. The chip also includes a CLOCK OUTPUT which can be used to drive other equipment. This allows a tap-tempo controlled clock for an analogue sequencer or drum machine, for example.
The PWM output from the chip can be used to drive the LED in a vactrol (or similar LED/LDR combination) directly, without any subsequent op-amp filter stages. The slow response of the vactrol provides more than enough filtering. This makes for an extremely simple circuit with very few components. The vactrol's LDR can be used to replace a standard potentiometer to add tap tempo LFO control to a variety of circuits.
Example circuits are in the datasheet.
More details
If you'd like to build one, or like to know how I built mine, perhaps you'd like to look at:
- Tap Tempo LFO PIC 16F684 ASM code
- Assembled HEX code from above file
- Circuit Diagram - complete modular synth tap tempo LFO
- Circuit Diagram - tap tempo tremolo
- Circuit Diagram - tap tempo sequencer clock
- Tap Tempo LFO datasheet (includes example circuit diagrams, example waveforms, and chip pinout)
The Tap Tempo LFO elsewhere on the web
Chris Safi has programmed many variations of this code, and even done versions on an 8-pin chip. You can download these over at his website Strange Design. It's really great work.
There has also been a lot of discussion about this project over at DIYStompboxes.com where I initially put the idea forward. I got a lot of support, and no-one got annoyed at me for taking about nine months to finish it off! Thanks guys!
Version 2
Chris Safi added the Wave Distortion feature from my original VCLFO into the TAPLFO code. I added a phase reset on the first tap to the tap tempo input. This allows you to keep the LFO on the beat with a single tap. I also tweaked some waveforms so they all reset to the top of the waveform. Finally, I used the spare pin from the first version as a digital input to step through the different multipliers. This works with the Multiplier CV in the same “either/or” way as the Tap Tempo input and the Tempo CV.