2018 Note: Obsolete! This chip has been superseded by the TAPLFO 3
The new chip adds several features, has additional waveforms and improved resolution, and also no longer requires a crystal. It’s an improvement in pretty much every way! Head over and check out the data sheet.
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).
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.
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.
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
There has also been a lot of discussion about this project over atDIYStompboxes.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!
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.
Version 2D – a bug fix
It turns out that as a result of adding the Wave Distortion feature in version 2, it became possible for the Clock output on pin7 to drift slowly out of sync with the main LFO output. This is due to inaccuracies in the calculations building up. This is much worse at slow settings (when the increments are small, so errors are proportionally larger), and when using extreme wave distortion settings (when the errors generated are greatest). It also doesn’t happen if the unit is sync’d to external pulses, since the phase is reset every time the pulses are timed.
Anyway, you’re not interested in that, right? You just want to know I’ve fixed it, right? Right! Version 2D is the fixed version.