Lune-ish LFO question

Started by midwayfair, April 30, 2013, 11:01:04 AM

Previous topic - Next topic

midwayfair

Going with this because it's a simplified version of the LFO that makes it easy to see what's going on.

My questions are:
1) What does changing the value of that 330R do (R8 in the Shoot the Moon schematic below that)? When the depth is fully open, the resistance is 1.33K between the 9v source and the LED, so I assume that increasing R8 will affect the maximum (or minimum) depth in some way.
2) Are there other ways to get a bigger current swing (i.e., more depth)? I read ~3v at minimum to ~7v at max, but it could be just my multimeter being unable to keep up. Does increasing the gain in the second half of the IC do anything, or just make distortion likely? Does the choice of op amp make any difference here? (I've been using a TL072).



And another similar LFO:
http://www.buildyourownclone.com/board/download/file.php?id=1271
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

garcho

Hopefully I haven't got this all wrong but the 330R is just to provide a current cushion between the +V and LED, no? More resistance attenuates the current making the LED dimmer so when it swings between the LFO's output rails less of the cycle is spent lit up, somewhat similar to the 'spacing' control. If it has full current, the LED is so bright the LFO no longer affects it.

QuoteDoes increasing the gain in the second half of the IC do anything, or just make distortion likely?
The op amp in the second half of the LFO circuit is an integrator, the op amp in the first half is a comparator. The audio signal is never part of this circuit. Read up on those to demystify how the LFO works. Or just swap things and switch crap around and see what happens! At worst you'll blow a crappy op amp and an LED.

The output is confined by the power supply, and will be somewhat smaller in range than the rails do to 'real life'. Hope that helps a little.
  • SUPPORTER
"...and weird on top!"

midwayfair

#2
Quote from: garcho on April 30, 2013, 01:23:06 PM
The op amp in the second half of the LFO circuit is an integrator, the op amp in the first half is a comparator. The audio signal is never part of this circuit. Read up on those to demystify how the LFO works.

I wasn't talking about audio distortion -- I was talking about overdriving the LFO and clipping the waveform.

Thanks for the explanation -- this is the main thing I was referencing regarding op amp LFOs: http://circuitworkshop.com/forum/index.php?topic=215.0

Do you have a suggestion for something else to read?

edited for clarity
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

garcho

QuoteI was talking about driving the LFO past 9v and clipping the waveform.

The comparator outputs a square wave and the integrator turns that into a triangle wave. The 'smoothness' control is basically mixing the two waveforms. If you clip the triangle, you start to get a square wave. Since you already have access to that wave shaping, there's not really any point to clipping the triangle.
The output depends on the voltage of the op amp IC. Since all you're using the LFO for is lighting the LED (as opposed to a control voltage a la synth world) increasing the output of the opamp won't do much since you can already swing the LED from totally dim to completely lit.
  • SUPPORTER
"...and weird on top!"

midwayfair

Quote from: garcho on April 30, 2013, 01:36:53 PM
QuoteI was talking about driving the LFO past 9v and clipping the waveform.

The comparator outputs a square wave and the integrator turns that into a triangle wave. The 'smoothness' control is basically mixing the two waveforms. If you clip the triangle, you start to get a square wave. Since you already have access to that wave shaping, there's not really any point to clipping the triangle.
The output depends on the voltage of the op amp IC. Since all you're using the LFO for is lighting the LED (as opposed to a control voltage a la synth world) increasing the output of the opamp won't do much since you can already swing the LED from totally dim to completely lit.

I see. Thanks. :)
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

garcho

some random internet reads:

stuff

more stuff

more stuff

even more stuff

look under 'op amps' for oscillator schematic animations

There's gotta be more/better links out there but those are the first that come to mind.

Forrest Mims' little books are good for bare bones schematics.
  • SUPPORTER
"...and weird on top!"

samhay

#6
I'll wade in more later this evening - I have a couple of questions myself - but will clear up the first misconception now. Some dual op-amp LFOs use the second op-amp as an integrator to convert a square wave (from the 1st op-amp Schmitt trigger) to a triangle wave. This is not one of them - this does it all in a single op-amp. The second op-amp (bottom right) is a non-inverting buffer. The LFO, which I think comes originally from the Phase 45, is the single op-amp bottom left.
This might help: http://circuitworkshop.com/forum/index.php?topic=215.0

I'm pretty sure that Garcho's right about the 330R acting as a current limiter to the LED. You could change the buffer into an amplifier, but the LFO is running pretty close to the op-amp rails (that's how it works), so it will just act to square it up again. If you want more current through the LED, decrease both the parallel and series (1K) resistors to the vactrol's LED.

Edit - now I'm back with a question. Sorry for hijacking Jon, but hopefully it's relevant.
- Why does almost everyone who revisits this LFO use 220K resistors in the voltage divider to the (+) input and the two feedback loops? The LFO works fine with values quite considerably either side of this (albeit with a slightly different frequency), so is this just a classic example of a legacy effect, or am I missing something?
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

earthtonesaudio

220k = legacy part value, but because its a single op-amp oscillator, everything (rate, amplitude, offsets) depends on everything else, so changing one part changes everything.  The more common dual opamp oscillator (schmitt trigger in one op-amp, integrator in the other) is more common *because* it allows you to define the frequency separate from the amplitude, etc.
It's a good example of design tradeoffs (use fewer parts, but each part now does more jobs).

More light = lower resistance on the LDR = higher gain audio output, so the 330r does two things:
1. Prevents a 0% depth setting ("Is this thing on?")
2. Prevents too much gain at low depth.  It probably wouldn't be good to have the volume suddenly increase when you turn the depth down to zero. 

A more conventional way to do #2 would be to put a limiting resistor in series with the LDR.  But you'd still probably want a limiting resistor to do #1.

samhay

Quote from: earthtonesaudio on April 30, 2013, 05:18:49 PM
220k = legacy part value, but because its a single op-amp oscillator, everything (rate, amplitude, offsets) depends on everything else, so changing one part changes everything.  The more common dual opamp oscillator (schmitt trigger in one op-amp, integrator in the other) is more common *because* it allows you to define the frequency separate from the amplitude, etc.
It's a good example of design tradeoffs (use fewer parts, but each part now does more jobs).

Thanks - I figured as much, but was worried I had missed something. It is quite tricky getting the right speed range/feel with this LFO and I can see why most people stick with the tried and tested.

Quote from: earthtonesaudio on April 30, 2013, 05:18:49 PM
More light = lower resistance on the LDR = higher gain audio output, so the 330r does two things:
1. Prevents a 0% depth setting ("Is this thing on?")
2. Prevents too much gain at low depth.  It probably wouldn't be good to have the volume suddenly increase when you turn the depth down to zero. 

A more conventional way to do #2 would be to put a limiting resistor in series with the LDR.  But you'd still probably want a limiting resistor to do #1.

1 - good point
2 - there is a 1k series resistor to the LED, but it is also have of the voltage divider with another 1k resistor. Halving both of these will put twice as much current through the LED etc, but to to use this approach to vary the depth, you would need a dual gang pot, which is not ideal.
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

earthtonesaudio

The resistor in parallel with the LED is a current divider.  Imagine if instead of 1k you used 0 ohms.  All the current would go through the zero ohms and none through the LED and it would not light.

garcho

Sorry I didn't look closer before posting.
  • SUPPORTER
"...and weird on top!"

midwayfair

After some testing, anything above about 560R means no "0" depth setting; anything lower than about 270R just doesn't sound very good. It will glitch a little, but not a lot.

Seems there's a very small usable range.

I realized that "spacing" control works kind of similarly to -- it makes more "off" time in one by chopping off the wave asymmetrically. This is much better than tinkering with the depth control, which I suppose is why it was included on the Lune first place!
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

samhay

Jon - are you asking because you are thinking of transplanting this LFO into something else? If so, the LED driver side of things may not be set up to do quite what you want.
The depth control decreases the amplitude of the LFO voltage swing AND adds a voltage offset. Turning down the depth puts more DC current through the LED while reducing its swing. This makes sense for the Lune/Moon application as you want to pull the LDR low (and keep it there) when the depth is min, to get as close to unity gain as you can.

However, there are at least a couple of other way you may want a 'depth' control to work:
- You might want the LED current to alway be near 0 at the bottom of the swing so that the average current decreases as you decrease the depth. This makes sense if you want the LDR to stay 'high' when the depth is at min.
- You might alternatively want the average current to stay unchanged as you dial in the depth, with this only affecting the voltage/current swing.
Both of these options are quite easily doable using the Lune LFO, but you will need to play with the buffer and/or LED resistors. I can cobble together either/or schematics if anyone is interested.

garcho - It was an easy mistake to make and I have been spending, possibly a little bit too much time, thinking about this recently.
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

midwayfair

Quote from: samhay on May 01, 2013, 11:34:03 AM
Jon - are you asking because you are thinking of transplanting this LFO into something else? If so, the LED driver side of things may not be set up to do quite what you want.
The depth control decreases the amplitude of the LFO voltage swing AND adds a voltage offset. Turning down the depth puts more DC current through the LED while reducing its swing. This makes sense for the Lune/Moon application as you want to pull the LDR low (and keep it there) when the depth is min, to get as close to unity gain as you can.

However, there are at least a couple of other way you may want a 'depth' control to work:
- You might want the LED current to alway be near 0 at the bottom of the swing so that the average current decreases as you decrease the depth. This makes sense if you want the LDR to stay 'high' when the depth is at min.
- You might alternatively want the average current to stay unchanged as you dial in the depth, with this only affecting the voltage/current swing.
Both of these options are quite easily doable using the Lune LFO, but you will need to play with the buffer and/or LED resistors. I can cobble together either/or schematics if anyone is interested.

I already ported it to the Cardinal (with several changes), which requires the LDR to be "high" at low depth. A couple different CultureJam projects use the LFO, too, and I decided to use it as a portable LFO when I'm testing stuff now. I understood most of what it did, but I couldn't work out in my head exactly what that 470R CLR was *doing,* and also I just wanted to know if there was a way to get a little more out of it in case I use it in something else (there's always another LFO effect to be created).

I'd be VERY interested in your last comment!
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

samhay

Quote from: midwayfair on May 01, 2013, 11:54:47 AM
I already ported it to the Cardinal (with several changes), which requires the LDR to be "high" at low depth. A couple different CultureJam projects use the LFO, too, and I decided to use it as a portable LFO when I'm testing stuff now. I understood most of what it did, but I couldn't work out in my head exactly what that 470R CLR was *doing,* and also I just wanted to know if there was a way to get a little more out of it in case I use it in something else (there's always another LFO effect to be created).

I'd be VERY interested in your last comment!

Right, so the 470R (or 330R sometimes) sets the current through the LED at min depth and, as you discoverd yesterday, has a few knock-on effects.

I will post a couple of schematics tonight. Your approach in the Cardinal seems to work nicely, so I'm not sure if I can offer any improvement there. However, it's a great LFO, so if we can make it the 'swiss army knife' of LFOs (at least for LED/LDR work), then why not.
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

electrosonic

Not to hijack the thread, but wouldn't putting the LED in op amp's feedback look give better control over the brightness of the led. It would take an extra gain stage, but the current through the LED would be proportional to the LFO voltage,

something like this...




Andrew.
  • SUPPORTER

midwayfair

elctrosonic, the Tribive does something like that for its Rate indicator LED:
http://runoffgroove.com/tri-vibe.html

Your idea could probably work in place of the buffer; I'd have to test it.
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

samhay

Quote from: electrosonic on May 01, 2013, 03:38:16 PM
Not to hijack the thread, but wouldn't putting the LED in op amp's feedback look give better control over the brightness of the led. It would take an extra gain stage, but the current through the LED would be proportional to the LFO voltage,

something like this...
Andrew.

That will work, at least in part, and you can control the voltage through the LED by varying the 1k resistor to ground (or Vb more likely). However, the LED will probably not turn off at the bottom of the swing. I haven't tried it though, and I might be wrong.
Alternatively, if you want to control the current through the LED using an op-amp, you can use the op-amp in an inverting configuration. Now, the current is controlled by a series resistor to the (-) input. This is how the envelope detector works in my A-OK compressor. There is a problem with this approach howevever in that you need anti-parallel LEDs with each LED only lighting on half the waveform - i.e. you get half wave rectification. Your approach doesn't have this problem and is certainly worth a try.

I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

samhay

Some ideas on LED drivers for the 'Lune' LFO.


A - the approach used in the Tremulus Lune etc. The depth pot is a voltage divider between V+ and the LFO. As the depth is turned down (ignore the arrow on the schem), the LFO swing decreases and a DC offset is applied. The current through the LED (determined by R3) is similar to that at the top of the LFO's swing, so it stays bright and does not flash.

B - If you want the opposite to A, this should work. As the depth is turned down, you are adding a series resistance to the LED and reducing the current through it. The swing decreases, and at min depth, the LED does not light.

C - If you want some current through the LED at all depth settings, with the depth pot only varying the swing about this current, then this approach works. This is potentially helpful if you want the LDR to form one half of a voltage divider with a fixed resistor. Here, we replace the op-amp buffer with an inverting gain stage. It should be inverting so we can have a gain of 0 at min depth. As a result, we need a large value for R3 (several times the series resistors in the LFO) and 1M works well. If R3  = 1M and you want a gain of 0 to 1, then the depth pot should be 1M.  A linear taper seems to work better than log in this instance.

Note. I have tested these on the breadboard. All work, but may not work well. Resistor values will need to be fine tuned, but R1 = R2 = 1k is tried and tested. R1 sets the current through the LED and the depth pot should probably be the same value as R2 for A and perhaps 1-10x the value of R2 for B.
Why doe we have this weird R1/R2 voltage divider? The short answer is that the LFO will probably never swing near enough to 0V to turn the LED off at the bottom of the swing and this approach seems to fix this problem.
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

midwayfair

There's another one, too: it's possible to make R2 the depth. It shunts the LED at minimum resistance and gets pretty glitchy at about 10K. Some other adjustments to the LFO may be necessary.
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!