Tap-Tempo LFO using the ATTiny85

Update (04.05.2014): I’ve made a minor tweak to the source code; the sinewave has been phase aligned with the other waveform options where it previously 1/4 off.

Chips in stock have been updated to v2.1. I’ve also updated the source code, which is now available in an archive:

TapTempoLfo_v2_1.zip


I’m sharing with you today the source code for a tap-tempo LFO (Low Frequency Oscillator) that can be used in place of a traditional analog LFO in many different circuits.

First off, I know there are several similar chips out there already available, but I think half the fun is making my own. And I did have fun, and I learned a lot. And I plan on integrating this into some of my existing layouts for some tap-tempo fun.

This is the source code for the whole thing. It’s for DIY only. I don’t presume anyone would want to use this commercially, but if so contact me.

It uses stepped ADC voltages to select between different wave forms and tempo multipliers /dividers.

Available wave forms: Sine, ramp up, ramp down, triangle and square.
Available tempo multipliers: 1/4, 1/2, 1, 2 and 4.

Tap once to start tempo sampling (the LED should light up and stay lit). Tap again to stop the tempo sampling and set the base tempo (LED will no longer be constantly lit, but start pulsing following the tempo. If you wait longer than 10 seconds before closing the tempo sample the chip will keep it’s last tempo setting and drop out of tempo sampling mode.

The first tap will reset the wave shape to help you keep the LFO synced to the music (got that idea from reading electric druid’s pages).

I think that’s it. A basic circuit would look something like this.

tap_tempo_lfo

Related Posts

10 thoughts on “Tap-Tempo LFO using the ATTiny85

  1. I agree it would be nice to have this work with the PT2399 etc., and that is on my todo-list. But unfortunately it’s far from a trivial code change, and I anticipate it taking a good while to get working.

  2. Hello!
    Thank you very much for the project!
    I’m not very good at programming those microchips, so could you please (if it’s piece of cake and will not take much time) modify the code so it outputs plain voltage depending on tempo?
    It could be great for setting delay time for PT2399 chips with LED/LDR.

    If you are interested, let me know, so I could reply with a detailed algorithm 🙂
    p.s. sorry if my language seems strange, my mother tongue is russian

  3. Hi Marc, you’re welcome 🙂
    How to program the chips is outside the scope, at least for the time being. It depends on what programmer you use for one thing. Unfortunately you can’t use ISP since the reset pin is tied up; HVSP required. This also means you need to re-program the reset fuse bit, along with the DIV8 bit.
    I do have a few pre-programmed chips for sale in the “shop” section for those who can’t or won’t do their own programming. Alternately there’s plenty of tutorials and documentation on AVR on the net.
    Hope you figure it out!

  4. Hi,

    First thanks for this project!!!! i have a question: can i progrma attiny85 with isp? need i manipulated the fuses?

    how i program the avr?

    Sorry im newbie 😉

    Thanks

  5. Since the output signal isn’t necessarily a square wave pulse I’m not sure how accurate it would be. Incidentally I’m doing a revision of the chip now since I would like that exact feature myself. Stay tuned 😉

  6. I haven’t got any experience with the Arduino, I use an Atmel STK500 dev board myself.
    Phase 90 would be a good one, but the delays work on a set resistance rather than a low frequency control signal so it’s a different problem. On my list though 😉
    Also, immediately upon completing this I see several short comings that I would like to address, but we’ll see (I’d very much like to sync several tap-tempo effects using a single button).
    I like the MN3007 idea and will keep it in mind.

  7. GREAT!!! I haven’t tries it in a circuit yet, but the code compiles nicely and if this works it’ll mean lots of new possibilities.

    When first trying to compile this I had a problem that I solved by reading this thread:

    http://forum.arduino.cc/index.php/topic,60649.0.html

    From now on I suppose we’ll be seeing tap tempo variants of SmallTime, Phase90, LittleAngel and so on, but may I suggest a next programming project?

    I’d really like to see a pluggable microcontroller daughterboard that could emulate an MN3007. I want a flanger! And I’m fed up with fake chips! And I’m too cheap to pay $20 a piece for real ones…

    You may have thought about this already. Do you know if it’s possible?

  8. mind… blown… I’m not sure I’m smart enough to ever make use of this, but it’s something I have definitely wondered about since the first time I bought a “tapflo” or “taptation” chip. You’re a smart cookie, Sabro.

Leave a Reply

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

Time limit is exhausted. Please reload CAPTCHA.