DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: moosapotamus on December 06, 2008, 02:34:58 PM

Title: [ ? ] Continuously variable phase LFO?
Post by: moosapotamus on December 06, 2008, 02:34:58 PM
Can this be easily done with a single control pot?

(http://moosapotamus.net/LFO_ani.gif)

When the pot is fully CCW both LFO signals would be in phase with each other. When the pot is turned fully CW the second LFO signal (green line) would lag behind the main LFO (blue line) such that the two LFO signals would effectively be 360 degrees out of phase with each other. Turning the pot from fully CCW to CW and back would essentially do what the animated GIF above is showing, allowing the offset between the two LFO signals to be set anywhere you like.

Practically speaking, I think this would be similar in principle to having just one LFO with a main LFO output, followed by an inverting opamp to give a second LFO output that is 180 dgrees out of phase, exactly opposite (inverted), with the main LFO output, like would be done in a stereo ping-pong tremolo, for example (see the commonsound panneur). However, instead of the inverting opamp there would be something else, some kind of continuously variable lag circuit.

Anyone have any ideas about how to do this?

I've been looking for a way to do this for a while with no luck.

Thanks
~ Charlie
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 06, 2008, 04:29:45 PM
Yes, maybe.   :icon_rolleyes:

The direct way is with a microcontroller having two outputs. Most sine generators in uCs are table look up things. You simply tell the second output to look up the value X degrees back from the main output.

The maybe way is with quadrature or three-phase  waves to start with, I believe it's possible to mix a little of phase A with a little of phase B and if the "a little" coefficients are correct you wind up with a third phase at selectable angles to the first two. We had to do something like that in my electrical power class to derive three phase from a Scott-T connection or something like that.

Mmmm. I think you could use a time delay chip as well. That gets complicated too.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: moosapotamus on December 06, 2008, 07:04:05 PM
Hmmm... Thanks for the ideas, RG. Yeah, none of that sounds "simple".

Instead of something that's continuously variable, maybe this would be the next best thing? ...

(http://img.photobucket.com/albums/v437/latronax/FortyFiver2132.jpg)

From this thread...
http://www.diystompboxes.com/smfforum/index.php?topic=59768.msg467785#msg467785

Looks way cool! But need to simultaneously adjust for resistors to change speed? What does P1 do? Is there enough voltage on each of those outputs to light one or two LEDs? Anyone tried it?

~ Charlie
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 06, 2008, 07:43:40 PM
The Forty-Fiver is an interesting-looking thing, but has some problems. I put it into the simulator, which is a good first step. It verified some of my suspicions.

The outputs are indeed at 45 degree angles in phase, as advertised. But you have hit on the issues by asking about P1. P1 adjusts the loop gain. Any sine wave self-oscillator needs to have two things: a phase shift of 360 degrees (or an integral multiple of that) and a gain around the total loop of exactly one. You may have noticed that the circuit in question has four phase shift stages of the discrete "univibe" ilk plus one inverting stage. The inverting stage is 180 of the 360, so the thing will oscillate at a frequency where the phase shift per stage is 1/4 of the remaining 180, or 45 degrees per stage. OK so far. However, there's that gain thing. If each phase stage had a gain of perfectly one, then the final inverter stage would only need a gain of one, and the loop gain would be perfect. But P1 sets the final stage to a gain higher than one. That's because each of the imperfect phase stages has some signal loss. The signal is biggest at T5's collector, and gets smaller at each stage that follows, until it gets back to T5 to boost it up for another trip around.

If you set P1 too high, the sine wave is distorted. If you set it too low, the self-oscillation dies out. All, every single one of the RC phase shift sine oscillators in existence have these issues. They universally need some method of detecting the size of the output signal and changing the gain a little to keep it stable.

In this LFO, you set the frequency of oscillation by setting the frequency where there is 45 degrees of phase shift per stage - that is, you change all four of Rf simultaneously and with required tracking. If they don't track, the numbers of degrees of phase shift per stage are not equally distributed.

A simpler option might be to use opamp-style phase shift stages, which have true unity gain, along with some active gain sense and changing. That would produce what this seems to but does not offer, four equal sized, equal offset sine waves. The tracking problem still exists, but you could use PWM on switches in series with resistors to "servo" them all at the same time, and by the same amount.

Sadly, again it gets complicated.

You sure you wouldn't like to just have a $2 PIC read one pot and then spit out two sine waves with X phase difference between them?  :icon_wink:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: moosapotamus on December 06, 2008, 08:27:30 PM
Thanks for that explanaition, RG!

Quote from: R.G. on December 06, 2008, 07:43:40 PM
You sure you wouldn't like to just have a $2 PIC read one pot and then spit out two sine waves with X phase difference between them?  :icon_wink:

I think you might be talking me into it! But I don't really have any practical experience with PICs or programmable microcontrollers in general. Would this be an application that I might be able to dive right into? Can you maybe point me in the right direction?

Thanks
~ Charlie
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 06, 2008, 08:53:17 PM
OK.
1. You will need some understanding of programming.
2. You will need a PIC programmer. This can be quite inexpensive, or self-made.
3. You will need some software as an environment to program in.

There is a huge body of information on the net about these three things. There is a lot over in the DSP forum here. Item 1 is the biggie; and the three together is the hump to get over to do your own custom controllers. After you get those done, You can whip out pretty much any custom logic widgie you want. If you have zero understanding of programming and/or don't want to get into it, bag this approach right now. If it sounds like fun to play with, you may find it as seductive as building effects.

Where do you stand?
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: moosapotamus on December 06, 2008, 10:48:08 PM
Well it's been a while, but I'm not a complete stranger to programming. I was into chaos theory back in the 80s and used to play with writing programs that would output graphics of strange attractors and fractals for fun. So I think I'm up for tackling that hump. More recently I briefly tinkered with an AVR that did a persistance of vision kind of thing. So I suppose I could transfer some of that to working with a PIC. Guess I just need to start searching, gathering info and dig in. 8)

~ Charlie
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: Nasse on December 07, 2008, 02:49:21 AM
Been thinkin that electromechanical wheel I should buy parts before christmas. And for years I have been thinkin about those analog circuits build from digital chips, like this http://www.elektor-electronics.co.uk/magazines/2001/december/digital-three-phase-sinewave-generator.54870.lynkx? (http://www.elektor-electronics.co.uk/magazines/2001/december/digital-three-phase-sinewave-generator.54870.lynkx?)

Dunno if something like this could be done: If analog lfo can be made to start/stop (I know they can) make two similar or more, press the stop button, and make start time continuously variable on one or more, so the lfos start with phase difference. Of course this is complicated and gives other problem, and perhaps you can not do it while playing
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: TELEFUNKON on December 07, 2008, 05:32:46 AM

QuoteCan this be easily done with a single control pot?
Nothing simpler than that: just take to 2 phaseshift stages like from your average phaser
which shifts your average 1kHz signal from o° to 180° each, which results in  0° to 360°.
Replace the shiftcap by one that`s 1.000x the average value,
and get your average 1Hz LFO signal shifted from 0° to 360°.

Control those 2 phaseshift with a single stereopot (1 knob), with your average LDRs,
or your average FET control.
(the latter two voltage controlled by a true single pot-to-LEDs or FETgate).

Or mod above circuit: http://img.photobucket.com/albums/v437/latronax/FortyFiver2132.jpg
take T1 and T2 with their associated resistors, where RF1 and RF2 become the stereopot
for shifting from 0° to 360°. Make CF1 and CF2 something like 1µF to adapt it to the low LFO rates.
Disconnect Cc (also ~1µF) from the collector of T5 and now feed your average LFO into Cc.
use the collector and emitter of T3 as your two new antiphase outputs (via large caps for DC-blocking)
which can be set from 0° to 360° compared to your old LFO at the emitter, and offset 180° degrees
at the collector.
(throw out CF3 and RF3 and T4 and T5 with their associated Rs `n`Cs completely!)

If  LDRs for RF1 and RF2 are used, you can control the phase with a single pot-to-LED or another LFO
or envelope control, or seekwencer  :icon_wink:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: Paul Perry (Frostwave) on December 07, 2008, 05:44:52 AM
Isn't there some way to manipulate two triangle waves to give a phase varying triangle?
If so, this could then go through a triangle to sine converter & there you have it.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: TELEFUNKON on December 07, 2008, 05:56:15 AM
Quote from: Paul Perry (Frostwave) on December 07, 2008, 05:44:52 AM
Isn't there some way to manipulate two triangle waves to give a phase varying triangle?
If so, this could then go through a triangle to sine converter & there you have it.

Aah: the old "add a voltage to the threshold of a sawtooth oscillator" thing?  :icon_smile:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 07, 2008, 08:23:18 AM
Quote from: moosapotamus on December 06, 2008, 10:48:08 PM
Well it's been a while, but I'm not a complete stranger to programming. I was into chaos theory back in the 80s and used to play with writing programs that would output graphics of strange attractors and fractals for fun. So I think I'm up for tackling that hump. More recently I briefly tinkered with an AVR that did a persistance of vision kind of thing. So I suppose I could transfer some of that to working with a PIC. Guess I just need to start searching, gathering info and dig in.
OK, you're a prime candidate. If you did a POV and have programmed, you can do it.

I am most conversant with PICs. I have messed a bit with Atmel stuff, but I keep missing the robust pin specs of the PIC when I do it, even if the ATT stuff is faster. There are others here who are more familiar with Atmel. I can point you to a huge set of resources on the PIC. For instance, the archive of the MIT PICLIST email list:
The PIC List: http://piclist.com (http://piclist.com)
Beginner's Checklist:   http://piclist.com/techref/piclist/begin.htm (http://piclist.com/techref/piclist/begin.htm)
Source Code Library (huge, really... the code you need is here) : http://piclist.com/techref/microchip/routines.htm
and for your particular issue:
Implementing the sine function on the PIC: http://www.brouhaha.com/~eric/pic/sine.html (http://www.brouhaha.com/~eric/pic/sine.html)

I can sketch out your program for you.
- define and initialize the chip
- enter the main loop
- GOSUB read the pots
- store the pot value
- GOTO main loop
- SUBROUTINE read the pots
- RETURN
- ON INTERRUPT
- timer interrupts every X milliseconds, set by speed pot
- update the timer timing based on any new speed pot setting
- see if any output to do
- if so, get last phase value, increment it by the phase step
- calculate second phase value from phase delay pot
- get output value 1 and value 2 from the sine table for the two phase values
- output value 1 on output 1
- output value 2 on output 2
- RETURN

The pseudocode program is the same for any variety of uController you pick. In fact, if you get a compiled language like BASIC or C, the actual program will be 99% the same, only the initialization will be different. Assembler is, of course, very unique per hardware.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 07, 2008, 09:26:53 AM
There is a hack way to do this, that might be good enough for something like a trem circuit.  Low parts count, though the chips take up a bit of board space.

If you wire together the trig and thresh inputs of a 555 they form the input of a Schmidt trigger.  Wire it up as a Schmidt oscillator using a stop resistor and control pot in series from output to this new input, and stick a cap from input to ground.  This is your LFO, with a 50:50 duty cycle.  By varying the voltage on the control pin, you can PW modulate the square to go from slither to fat block (you'd need a scope to set this up).  If you use a 7556, the other half can be wired up as another Schmidt trigger and used to invert the output of this oscillator.  The inversion is freqency modulated as well as PWMed.  Feed both outputs to separate flip-flops in a 4013 to divide down, and you end up with two square waves of 50:50 duty cycle with one square that can be shifted from almost in sync to almost 360 degrees phase shift with the other.  Set up a couple of unbuffered inverters as unity gain amps (1M input and feedback resistors) and they'll distort the squares into sinusoidal wave forms. 

OK, not perfect as you end up with slightly choppy sine waves, but it could possibly work for a trem.  I used something similar to the above in a guitar synth that never got built: got a mild flange-distortion effect from my guitar.

Well, I did say it was hack.  Low parts count, though: 3 ICs, one cap and a few resistors.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: zyxwyvu on December 07, 2008, 05:51:21 PM
Quote from: moosapotamus on December 06, 2008, 10:48:08 PM
Well it's been a while, but I'm not a complete stranger to programming. I was into chaos theory back in the 80s and used to play with writing programs that would output graphics of strange attractors and fractals for fun. So I think I'm up for tackling that hump. More recently I briefly tinkered with an AVR that did a persistance of vision kind of thing. So I suppose I could transfer some of that to working with a PIC. Guess I just need to start searching, gathering info and dig in. 8)

~ Charlie

If you want to stick with AVRs, check out http://www.avrfreaks.net/ (http://www.avrfreaks.net/). There should be enough info in the tutorials in the forum to do this project.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: moosapotamus on December 07, 2008, 06:08:25 PM
Oh man... the eternal PIC vs AVR question. Hmmm...

RG - Thanks for all the PIC info. That's going to keep me quiet (busy) for a while.

Cool ideas everybody. Thanks! Compared to using a PIC, though, everything seems pretty cumbersome from a build perspective. Of course, from an implementation perspective, using a PIC would be cumbersome for me (since I'm a uC newbie), but it would not consume nearly as much PCB real estate as the other ideas. Ultimately I would, of course, like to be able to fit all of this into a standard sized stompbox.

So, while I would still totally love to find a "simple" way to to do this in the analog realm ('cause that's my comfort zone), I think I might take my original question over to the Digital & DSP forum. Still open to more analog ideas, tho. 8)

Thanks
~ Charlie
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: Eb7+9 on December 07, 2008, 10:06:54 PM
Take two phase shift oscillators with closely matched passives, use a design that has a grounded speed setting resistor in it ... something like grounded Rx in this circuit:

http://www.discovercircuits.com/Andy/WienBridgeOscillator1.pdf (http://www.discovercircuits.com/Andy/WienBridgeOscillator1.pdf)

how you negotiate global speed control is another matter, more below ... what you can do is take a couple of photocells to alternately tie a variable resistance across the grounded speed resistor on each LFO ... by tying the same resistor across the matched speed resistors you'll get the same offset and therefore traverse at the same rate across in both directions ... even though there might be two speed setting resistors in each LFO you only one need to tweak one of the resistors to produce the slight frequency offsets you're looking for ...

when a comparator senses (close-enough) when the two crests line up you feed a toggle or flop circuit to hold one photcell on and when they line up again you get the flop to turn on the other cell on and the current one off ... you'll be getting a back and forth between your waveforms by alternately producing a slight slowing down and resuming of each LFO in alternate fashion ... or you can also wire it so one side is stable and the other goes between a possitive and negative offset, but you might not really perceive a difference depending on what your final application is about ...

if you want to make all Rx variable and have LFO's tracking speed wise you can use matched photocells for accurate speed control and have both LFO continuously speed variable - you do this by driving LED's with a singular current and matching cells using a two point method ... then you can take a fifth matched photocell and have its LED driven by a current mirror (wich trackes the speed control current) in which you can ratio under or above using a "offset speed" pot - you do this by varying the smallish leg resistance on one side at the base of the mirror ...

the fifth photocell is the variable resistor that shunts the speed Rx resistors via the two switching photo-cells ... as your speed control cells go up and down so will the offset resistor by the same ratio - and therefore the ratio of shunting resistor to speed resistor will be compatible in value and not produce a gross mismatch in equivalent LFO speed resistances ...

there are several other ways of doing this ...

one is to use current controlled LFOs to produce tracking triangle wave oscillators with tri-sine converters at the ouput ... do a similar thing with a comparator-flop combo to toggle to produce slight offsets in the LFO control currents when crests get close to lining up ... in this case photocells are used to switch resistance in the control part of a mirror ... it's easier to have one LFO stable and the other go under and over using this approach ...

Title: Re: [ ? ] Continuously variable phase LFO?
Post by: moosapotamus on December 08, 2008, 04:34:01 PM
Hi JC! Long time... :D
Thanks for weighing in on my question. If I'm interpreting correctly you are talking about a circuit that moves the offset or phase of LFO2, like in my little animated gif above, automatically back and forth, all by itself? Smack me if I've got that wrong. :icon_redface: I'm looking for a way to manually set the (static) offset with a pot.

Also, sounds like a lot of components, too. A uController still seems like the way to go... unless someone can convince me otherwise. ;)

Thanks
~ Charlie
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: Franky on December 08, 2008, 05:03:51 PM
PWM is the key. You might not be able to get a full phased signal (cause you can't use PWM on full range, often 10 to 90%)..

the frequency of the square wave would be the same as the sine, then the pot controls the pulse width, which integrated gives you a control voltage for a phasing stage. And no µC.. (AVR is really cool btw)...
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 08, 2008, 05:59:41 PM
Quote from: Eb7+9 on December 07, 2008, 10:06:54 PM
... closely matched passives
...how you negotiate global speed control is another matter
... a couple of photocells to alternately tie a variable resistance across the grounded speed resistor
... a comparator senses (close-enough)
... you feed a toggle or flop circuit
... you get the flop to turn on the other cell on and the current one off
... you'll be getting a back and forth between your waveforms by alternately producing a slight slowing down and resuming of each LFO in alternate fashion
... or you can also wire it so one side is stable and the other goes between a possitive and negative offset, but you might not really perceive a difference depending on what your final application is about
...make all Rx variable
... matched photocells
...take a fifth matched photocell and have its LED driven by a current mirror
...ratio under or above using a "offset speed" pot
... smallish leg resistance on one side at the base of the mirror
... fifth photocell is the variable resistor that shunts the speed Rx resistors via the two switching photo-cells
... as your speed control cells go up and down so will the offset resistor by the same ratio - and therefore the ratio of shunting resistor to speed resistor will be compatible in value and not
... produce a gross mismatch in equivalent LFO speed resistances ...
... current controlled LFOs to produce tracking triangle wave oscillators with tri-sine converters at the ouput
... a comparator-flop combo to toggle to produce slight offsets in the LFO control currents when crests get close to lining up
I'm in. Can you sketch up a schematic for that? About how many ICs is that?
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: Eb7+9 on December 09, 2008, 03:07:01 PM
Quote from: moosapotamus on December 08, 2008, 04:34:01 PM
I'm looking for a way to manually set the (static) offset with a pot.

Also, sounds like a lot of components, too.

hey Charlie, good to be back ...
just survived my third motorbike accident ... dang !!

sorry, I was going by your gif and thought you wanted something automatic

if you want static control then you'll have to go with something like RG's approach since you can't perfectly null out offsets between phase-shift oscillators and keep them running in sync - unless you play with the amplitude control elements and make them electronically controllable - in the vibe that would be the diodes across the center phase shift cap ... what I'm saying here is you could have photocells across the center cap instead of diodes and delay the squeezing of the center cap on a second oscillator through a control circuit - but that's very iffy right off the bat ...

in the automatic version the built-in frequency offsets can be swamped by other residuals which you'd control ...

best regards ...

Title: Re: [ ? ] Continuously variable phase LFO?
Post by: moosapotamus on December 09, 2008, 03:52:59 PM
Quote from: Eb7+9 on December 09, 2008, 03:07:01 PM
just survived my third motorbike accident ... dang !!

Whoa! :icon_eek: Very glad to still have you with us. Be careful out there, bro.

Well, I am looking for the manual way to go... twisting a pot. But, I think RG is interested in your automatic solution. :wink: :wink:
Actually, I'd be interested in seeing a drawing of that too, if you're up for it. I'm sure you can think of something to use it in, too. :icon_cool:

Thanks
~ Charlie
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: puretube on December 09, 2008, 07:06:40 PM
Quadrature analog multiplication...

= quadrature LFO into VCAs (e.g.: LM13700);

see Bode/Kakehashi...  :icon_wink:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 09, 2008, 07:19:17 PM
Quote from: puretube on December 09, 2008, 07:06:40 PM
Quadrature analog multiplication...
= quadrature LFO into VCAs (e.g.: LM13700);
See first reply.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: puretube on December 09, 2008, 07:33:00 PM
Quote from: R.G. on December 09, 2008, 07:19:17 PM
Quote from: puretube on December 09, 2008, 07:06:40 PM
Quadrature analog multiplication...
= quadrature LFO into VCAs (e.g.: LM13700);
See first reply.

analog, not µC...  :icon_wink:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 09, 2008, 10:21:02 PM
Quote from: puretube on December 09, 2008, 07:33:00 PM
Quote from: R.G. on December 09, 2008, 07:19:17 PM
Quote from: puretube on December 09, 2008, 07:06:40 PM
Quadrature analog multiplication...
= quadrature LFO into VCAs (e.g.: LM13700);
See first reply.
analog, not µC...  :icon_wink:
See first reply.
uC was topic 1, analog trig games mixing quadrature LFOs was topic two.
See first reply.  :icon_wink:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: Eb7+9 on December 09, 2008, 11:38:26 PM
Quote from: moosapotamus on December 09, 2008, 03:52:59 PM
I'm sure you can think of something to use it in, too.

I was really hoping you could fill me in what you were gonna do with that Charlie 'cause tell you the truth the only thing I've ever found useful or pleasing for stage or recording use are anti-phase phasors as far as poly phase control is concerned - but that's just in my limited experience ... that's how my stereo-vibes work, two signal paths with cells operating in anti-phase fashion - and not with one side dry like they do in many chorus and stereo phasor circuits ... there the control waves are locked at 180-deg through an inverting circuit - not a big deal to do either ... quadrature oscillators seem a little lame in stereo phasor apps IMO since they won't provide full phase canceling effects in a 2-D setting - and to me the idea of upping that to spatial rotation through a locked quadraphonic system seems like a useless indulgence ...

It just seems to me that if your were to do something sonically pleasing with two sine waves chasing each other it would be best to duplicate the whole circuitry and manually adjust the speed range of one unit to chase and pseudo-track the other ... the lack of perfect tracking would probably make it more interesting than "fixed at other than 180" - but maybe in your app it's different, I'm still thinking in phasor terms ...

About the automatic sine bouncer - it's not a big deal to draw out, all you gotta do is temper the output of your comparators to D-flop circuit levels (5v) - it's easy using a resistor and 5v zener combo and a ground clamp at the output of an op-amp to get compatible interface voltages ... come to think about it, the idea might cause interesting swirl weirdness in a stereo phasor but I'm so into the orgasmic aspects of true symmetric stereo anti-phasing  ... quite profound an experience if I may say so, especially if I'm going through a pair of JCM800's   :icon_redface:

cheers ...
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: snap on December 10, 2008, 04:07:39 AM
my bet:
Charlie wants to make an "ADA Dancing Hoax"  :icon_smile:
unlike the EHX flanger with its switchable static 90 degrees difference LFO outputs,
he wants to drive one BBD clock with a staticphase LFO
while he wants the second so-called  LFO to drive a second BBD clock.
It is a replica of that first LFO at the same rate but leading or lagging in phase.
When both LFOs approach zero phase difference and one goes from leading to lagging,
the BBD clocks approach zero frequency difference.
When the first one was higher than the second, but now gets lower,
"through zero flanging" is the outcome.

With a single control knob he can manually or pedally cross the zero point.
If he varies that controlresistor, he can cycle the zeros.

Now on with a DUAL R5106/SAD1024/TDA1022/MN3007/MN-/BL-/V3207 convertible PCB !
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: Eb7+9 on December 10, 2008, 04:26:37 AM
Quote from: snap on December 10, 2008, 04:07:39 AM
my bet:
"through zero flanging" is the outcome.
...
With a single control knob he can manually or pedally cross the zero point.
If he varies that control resistor, he can cycle the zeros.

I think I get it ... there's a global delay in all this, right ? ... otherwise Causality would say NO WAY ... you guys want to imitate a delayed tape flanger sorta thing ... is this correct Charlie?

... the idea sounds cool

the first thing that comes to mind - and I'm almost ripping my gut laughing about the possibility of this even remotely working - would be to track your first sine wave with a sine-LFO PLL and then have a way of inserting a controllable amount of phase-offset in the phase detector at the front ... the PLL would produce a sine wave  that tracks plus or minus "some" phase offset - and the variation would be perfectly continuous as opposed to using a PIC/digital approach ... I've never used a PLL to track a really slow frequency, but in theory it should work ... I think ... we would need to double check the range of the 565 for example

I think that would be an approach to try ... could end up being simple too if it did work, like injecting/pulling a small DC current (by OTA ?!) on the charging cap in front of the VCO, or it might be nasty if we have to build a PLL from discretes to introduce the offset ... I think I burnt all my PLL stuff way back ...

now, I hope you guys don't want this right away - I've got a couple of amps to work on thanks to Mr. Hammer who went and told a friend I work on these things ...
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: moosapotamus on December 10, 2008, 09:34:24 AM
Quote from: snap on December 10, 2008, 04:07:39 AM
my bet:
Charlie wants to make an "ADA Dancing Hoax"  :icon_smile:

Quote from: Eb7+9 on December 10, 2008, 04:26:37 AM
I think I get it ... there's a global delay in all this, right ? ... otherwise Causality would say NO WAY ... you guys want to imitate a delayed tape flanger sorta thing ... is this correct Charlie?

... the idea sounds cool

LOL :D. You guys are way ahead of me. That wasn't what I was thinking, but it does sound like a totally awesome idea... way cooler than what I was thinking.

Let's do it! 8)
Seems like there are already several different approaches to consider.

But in addition, I think I am still interested in my actual original idea, too... the static offset control... A little while ago I built up a combination auto-wah / tremolo on my breadboard and it sounded pretty cool. The auto-wah and tremolo sections were in series so it sounded like a very vocal-like tremolo. With two independent LFOs, one for the auto-wah and the other for the tremolo, depending on where the auto-wah was sweeping when the tremolo opened up, the output was just a snippet of the auto-wah. So it was possible to set the two LFOs each at a different speed such that every time the tremolo opend up, it produced a different filter sweep sound. Then I put an in inverter on one of the LFOs to sync up the auto-wah and tremolo, either in phase or opposite phase. That was kind of cool too, but I thought that if it was possible to have two LFO outputs that were in sync and manually adjust the offset of one of them, instead of the random sound of two independent LFOs running at slightly different speeds, you could precisely control which section of the auto-wah sweep came through each time the tremolo opened up. Seems like you would be able to dial in a repeating up sweep, repeating down sweep, repeating over the top sweep, or repeating under the bottom sweep, for example, just by simply adjusting the static offset of the second LFO. But I couldn't figure out how to do that, so there it is... Maybe not as cool as TZF, but still kinda cool, I think. 8)

So anyway... if a way to do the static offset adjustment could be figured out, couldn't a third LFO simply be added to get the cyclical auto offset sweep? Two birds, one stone.

I'll bet there are some folks who could think up a number of other applications for this, too.

Thanks!
~ Charlie
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: Eb7+9 on December 11, 2008, 12:45:36 AM
I think I figured out how this Static Sine-Phase Offset Controller thing can be done - of course a 565 won't work here ...  I see a new form of opto-control design - this time using two opto's to control a Sine wave oscillator (eg. Vibe) and have the LEDs controlled through a V/I circuit that's fed off the smoothing filter that normally follows a std Phase Detector in a PLL ... in effect creating a novel opto-based version of the classic PL-Loop, especially suitable for Low Frequencies - everybody follow ?

It's similar in Loop-System principle to an op-amp wired for NFB except instead of tracking voltage here we're tracking frequency through a front end circuit that can measure frequency/phase differences between an outside sine wave (ref) and one that will track and convert the difference to an output current which charges/discharges a cap which then speeds up or slows down the said tracking (opto-controlled) sine wave oscillator ...

the opto's would be perfect for this type of control - you don't want/need variations in LFO frequency that are that fast anyways ... I would even be tempted to do a phase reading at both up and down zero crossings to reduce tracking jitter ... and what I was saying about injecting a bipolar current at the averaging node would indeed produce the offset we're looking for - normally in charge pump PLL designs designers try to minimize offsets between current sources in the pump as they result in an equivalent DC current, and an equivalent Phase Offset in the tracking - what we're trying to produce and control ... a single pot hooked up to the front of an OTA would provide the ability of setting an arbitrary phase offset by injecting the bipolar output current of the OTA in or out of the averaging cap, bearing in mind that at very low LFO speeds the reaction time of the loop would be slow to respond as well ... in that respect Adjusting the Offset might cause weirdness and loop instability and take some time to recover, especially at really low frequencies ... might be fun/useful at the same time

a new and interesting PLL study case is before us ladies and gents, certainly it would be fun to try getting Vibe oscillators to track like this - we just gotta figure out suitable Phase Detector and Charge Pump circuits ...

btw, what LFO frequency range are we talking here ??

Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 11, 2008, 08:55:56 AM
From Wikipedia:
QuoteA phase-locked loop or phase lock loop (PLL) is a control system that generates a signal that has a fixed relation to the phase of a "reference" signal.
...
The analog phase detector ...The phase difference at the inputs, when in lock, is near 90 degrees for this type; the exact amount being determined by the loop gain.
...
Digital

The simplest is an XOR gate. It compares well to the analog mixer in that it locks near a 90° phase difference and has a square-wave output at twice the reference frequency.
...
One desirable property of all PLLs is that the reference and feedback clock edges be brought into very close alignment. The average difference in time between the phases of the two signals when the PLL has achieved lock is called the static phase offset (also called the steady-state phase error). The variance between these phases is called tracking jitter. Ideally, the static phase offset should be zero, and the tracking jitter should be as low as possible.
In general, PLL phase detectors of the analog kind lock at 90 degrees +/- the phase error/jitter. Digital detectors lock at 90 degrees for the simple kind, zero degrees for the state machine kind, again +/- the phase error/jitter.

There may be some difficulties in getting a static offset out of a PLL...
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: moosapotamus on December 11, 2008, 10:41:35 AM
Quote from: Eb7+9 on December 11, 2008, 12:45:36 AM
... in that respect Adjusting the Offset might cause weirdness and loop instability and take some time to recover, especially at really low frequencies ... might be fun/useful at the same time

8)

Quote from: Eb7+9 on December 11, 2008, 12:45:36 AM
a new and interesting PLL study case is before us ladies and gents, certainly it would be fun to try getting Vibe oscillators to track like this - we just gotta figure out suitable Phase Detector and Charge Pump circuits ...

btw, what LFO frequency range are we talking here ??

Unfortunately, I am not familiar with PLLs, but it's all sounding like a pretty interesting idea.

LFO frequency range... I guess, whatever is typical for a modulation type effect - phaser, chorus, tremolo, etc... So, what's that... like ~0.1Hz to 50Hz or higher... maybe?

Not sure about any other folks, but I'm not necessarily stuck on it being a perfect sine wave either. Triangle or even square would be cool, too... especially if it simplifies things.

~ Charlie
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 11, 2008, 11:31:51 AM
Quote from: moosapotamus on December 11, 2008, 10:41:35 AM
Not sure about any other folks, but I'm not necessarily stuck on it being a perfect sine wave either. Triangle or even square would be cool, too... especially if it simplifies things.

In that case, what I outlined will pretty much do the job (it's simple).  However, square waves (even with the corners rounded off) don't do filters much justice.  For autowah (LFO variety), the best wave form (in my opinion) is +ve going FW rectified sine/inverted 'hyper-triangle'.  The sweep will hang around at the top end for the most part and just dips briefly into the mud.  Other wave forms stay in the lower part of the sweep for an equal amount of time and it sounds muddy...unless you sweep two filters in anti-phase (though those circuits always sound a bit phaser-like to my ears).

Perhaps a quad-oscillator is all that's needed?  I posted a simple quad-triangle design once (accurate, low parts-count and no scope required to set it up).  Link is now inactive (changed provider), but I could post it again if there's any interest.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: moosapotamus on December 11, 2008, 03:00:50 PM
Yeah, gez. I agree... smoother, more sine-like is better for autowah, and hyper-tri would be totally cool.

Quote from: gez on December 11, 2008, 11:31:51 AM
In that case, what I outlined will pretty much do the job (it's simple).

Let's see if I can follow your description. Something like this? ...

(http://moosapotamus.net/gezLFO.gif)

I know... I'm a klutz. :icon_redface: What did I miss?

Quote from: gez on December 11, 2008, 11:31:51 AM
Perhaps a quad-oscillator is all that's needed?  I posted a simple quad-triangle design once (accurate, low parts-count and no scope required to set it up).  Link is now inactive (changed provider), but I could post it again if there's any interest.

I would be interested in seeing that.

Thanks
~ Charlie
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 11, 2008, 04:24:52 PM
Gez, I think you have the right idea. I had a devil of a time with my circuit simulator - it doesn't like mixing digital and analog parts very well - but I think you're right about the single pot sliding phase of the square waves.

I couldn't get the 555 sim to work right, so I pulled a trick out of Lancaster's CMOS cookbook to do the variable duty cycle. A couple of CMOS inverters makes a good variable duty cycle oscillator by splitting the charge and discharge of the integrator cap with a couple of diodes. The result is nearly 0% to nearly 100% duty cycle. A third inverter gives you the reverse. From there, a 4013 gets the necessary pair of variable-phase-offset square waves.

Of course, we could leave it there, but it would be really nice to get triangles or sines, and that's possible from the squares. Using the two square wave outputs with the variable phase relationship, you put a CD4046 on each output and phase lock to the two squares. But instead of using the CD4046's VCO, you use a waveform generator chip like the XR2206 or ICL8038 to get square for the PLL and a simultaneous (and phase locked) sine and triangle from each one. So you wind up with two sines (AND two triangles AND two squares along the way) which can be slid past one another in phase from about 1-2 degrees up to about 358-359 degrees.

The chip tally is: 1x CD4049, 1xCD4013, 2xCD4046, 2xXR2206 plus whatever scaling and control Rs and Cs are needed. It might be possible to do this a different way by replacing the 4046s and 2206s with switched capacitor lowpass filters to just drag the sine out of the output square wave. That looked like a lot of work too.

I beat on PLLs for a while over a number of phase detectors and could never get a sliding phase by introducing an offset into the detected voltage. The loop always servoed itself back to either 90 degrees or 0 degrees depending on the phase detector.

I keep coming back to liking looking up sine values in a table.  :icon_lol:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 11, 2008, 05:53:07 PM
RG, that's really clever using PLLs to clock wave-generator chips.  Now why didn't I think of that?  :icon_smile:

Charlie, I've just come back from babysitting my nephews.  Rather than pay me, their parents ply me with alcohol to persuade me to look after their kids.  As I seldom drink these days, I'm slightly worse for wear.  Will post the quad design tomorrow and the PWM idea over the weekend (want to mull things over for a little while - might be able to get a better range of phase shift with a little thought).  What you've posted is almost there, but has a few mistakes.  Not to worry.

Goodnight Vienna! (hic)
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 11, 2008, 08:01:28 PM
I also had a run at the straighforward thing - simple phase shift stages. I had thought they'd run out of shift, and two stages was marginal for a 1Hz to a 5Hz range of LFO, but you can indeed get close to 180 degrees over that range with the allpass stages. I used Rf=Rin=10K, Cp=1uF and Rphase =100K.

A quad pot would just about sew that one up  :icon_biggrin: if you could find one. A dual 100K works OK-ish. Probably a variable duty cycle switched-resistor would be best, but then you gotta do a PWM and three or four resistor switches.

The phase shifts as the frequency changes, of course. But at a single frequency it's maybe OK for tinkering.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 12, 2008, 04:27:32 AM
Quad Triangle LFO:

(http://i465.photobucket.com/albums/rr14/Longfuse123/Quad_LFO.jpg)

ICL7621 chip available at Mouser.  Think very carefully if you sub in something else.  The op-amp needs symmetrical swing (preferably rail-to-rail) and a decent common mode voltage range in order to prevent latch-up.  A further dual op-amp is required to invert the triangles to get a full quad LFO (as shown: only 2 outputs, 90 degrees out-of-phase).  Wire both halves of the extra chip as unity gain inverting amps.

If you can't read anything (snap is from my notebook and was hurriedly scribbled in), get back to me.  Keep caps equal in value.  It's set up to be pretty slow, so you might want to use smaller caps.  The range is pretty decent, if I recall. 
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 12, 2008, 06:06:20 PM
Quote from: R.G. on December 11, 2008, 04:24:52 PMI couldn't get the 555 sim to work right, so I pulled a trick out of Lancaster's CMOS cookbook to do the variable duty cycle. A couple of CMOS inverters makes a good variable duty cycle oscillator by splitting the charge and discharge of the integrator cap with a couple of diodes. The result is nearly 0% to nearly 100% duty cycle. A third inverter gives you the reverse. From there, a 4013 gets the necessary pair of variable-phase-offset square waves.

I remembered this afternoon that mucking about with the control pin also causes changes in frequency as well as PWM.  A quick breadboard and a few minutes with the scope confirmed this.  The change is too large to compensate for with the frequency pot.

The old diodes and pot trick you mentioned does give PWM with a wide range, but only at a fixed freqency.  In order to get that control plus a decent range in frequency, you'd have to do something along the lines of your stutter circuit.  It could be done with inverters, but the flip-flops I use (made by ST) are incredibly picky and won't clock unless being driven by a 555 timer or a Schmidt trig input device.

I'll give this some more thought.  There must be a way of doing it with a reasonably low parts count.  Oh yeah, that would be a PIC... :icon_lol:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 12, 2008, 07:24:56 PM
Hey, I think you could do the same PWM thing on the duty cycling resistors. Imagine:

(1) a PWM setup using two inverters. This is set to run at, say 32kHz, and give a duty cycle between 1% and 99%. It's fixed frequency and only provides a pwm signal.
(2) a second PWM setup with the other three inverters. This is the low speed one. It's the same as the high speed one except that there are two CD4066 gates in series with the diodes. The 4066 gates are run from the high speed PWM; they are in series with each end of the PWM pot on the low speed setup.

The high speed PWM makes a "resistor multiplier" out of the 4066 gates and the ends of the low speed PWM pot. The high speed PWM pot is then a frequency control - it smoothly varies the apparent resistance of the low speed PWM pot. The output of the low speed PWM is the same as it was, two antiphase, inverse-duty-cycle rectangle waves. These drive the flipflops you mentioned and now you have one-pot variation of speed and one-pot variation of phase angle.

From there, you can PLL a sine/triangle generator to the two outputs and have your single pot, 0-360 phase slide on a sine LFO.

Chip count:
1 - CD4049
1 - CD4066
1 - CD4013

If you want sines, you add
2 - CD 4046 (for the digital phase/frequency detector only, the VCO is not used)
2 - XR2206 VCO sine/triangle chips.

There is the usual assortment of pots, Rs and Cs. It sounds complicated, but in reality it's just stuff out of the CMOS Cookbook. Take it one step at a time and it should just fall into place.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: ashcat_lt on December 13, 2008, 12:43:23 AM
You guys are way above my head, but I don't think anybody's mentioned this in this thread.

According to this (http://www.tonmeister.ca/main/textbook/node56.html) (right around the first graph) "any phase-shifted sine wave can be expressed as the combination of its sine and cosine components with a specific amplitude relationship".  This should mean that if you've got a way to consistently shift the LFO 90 degrees, you'd ought to be able to make the rest happen with some form of mixer.  You'll split the LFO three ways.  Leave the first alone.  Take the second, shift 90 degrees and mix it with the third.  Your "relative phase knob" controls the proportions of this mix.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: TELEFUNKON on December 13, 2008, 03:12:36 AM
Quote from: R.G. on December 11, 2008, 08:01:28 PM
I also had a run at the straighforward thing - simple phase shift stages. I had thought they'd run out of shift, and two stages was marginal for a 1Hz to a 5Hz range of LFO, but you can indeed get close to 180 degrees over that range with the allpass stages. I used Rf=Rin=10K, Cp=1uF and Rphase =100K.

A quad pot would just about sew that one up  :icon_biggrin: if you could find one. A dual 100K works OK-ish. Probably a variable duty cycle switched-resistor would be best, but then you gotta do a PWM and three or four resistor switches.

The phase shifts as the frequency changes, of course. But at a single frequency it's maybe OK for tinkering.

see reply#8.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: TELEFUNKON on December 13, 2008, 03:15:41 AM
Quote from: ashcat_lt on December 13, 2008, 12:43:23 AM
You guys are way above my head, but I don't think anybody's mentioned this in this thread.

According to this (http://www.tonmeister.ca/main/textbook/node56.html) (right around the first graph) "any phase-shifted sine wave can be expressed as the combination of its sine and cosine components with a specific amplitude relationship".  This should mean that if you've got a way to consistently shift the LFO 90 degrees, you'd ought to be able to make the rest happen with some form of mixer.  You'll split the LFO three ways.  Leave the first alone.  Take the second, shift 90 degrees and mix it with the third.  Your "relative phase knob" controls the proportions of this mix.

see replies #21, #24
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 13, 2008, 04:00:54 AM
Quote from: R.G. on December 12, 2008, 07:24:56 PM
Hey, I think you could do the same PWM thing on the duty cycling resistors. Imagine:

(1) a PWM setup using two inverters. This is set to run at, say 32kHz, and give a duty cycle between 1% and 99%. It's fixed frequency and only provides a pwm signal.
(2) a second PWM setup with the other three inverters. This is the low speed one. It's the same as the high speed one except that there are two CD4066 gates in series with the diodes. The 4066 gates are run from the high speed PWM; they are in series with each end of the PWM pot on the low speed setup.

The high speed PWM makes a "resistor multiplier" out of the 4066 gates and the ends of the low speed PWM pot. The high speed PWM pot is then a frequency control - it smoothly varies the apparent resistance of the low speed PWM pot. The output of the low speed PWM is the same as it was, two antiphase, inverse-duty-cycle rectangle waves. These drive the flipflops you mentioned and now you have one-pot variation of speed and one-pot variation of phase angle.

From there, you can PLL a sine/triangle generator to the two outputs and have your single pot, 0-360 phase slide on a sine LFO.

Chip count:
1 - CD4049
1 - CD4066
1 - CD4013

That's clever, RG, and would have a reasonably low component count.

There are a number of ways of doing the PWM.  It all seems to be swings and roundabouts, though.  I was thinking of doing a variation of the Andy Flind circuit found in Practical Oscillator Circuits.  Use half a 7556 as a Schmidt trigger and use an op-amp integrator in conjunction with it to form a triangle oscillator.  The bias on the + input of the op-amp could be shifted up/down using a pot (and stop resistors either side) across the rails.  This would vary duty cycle, but frequency remains the same as the Schmidt's trigger thresholds remain fixed.  I think Telefunkon was alluding to something like this in an earlier post (adding a voltage to the 'threshold' of the integrator?)  The other half of the 7556 inverts the PWM square and both squares are sent to the flip-flops.  Would be trickier getting the full range of PWM without latching the LFO, though.  Would either have to put up with latching in extreme positions of the pot, or pull in the range of PWM slightly.  All swings and roundabouts...

Anyway, total parts count would be:

1 - op-amp (if dual, the other half could be used as a ref voltage to divide down the square for more linear freqency control)
2 - 7556
3 - 4013

Slightly less PCB space taken up and not much in the way of resistors and caps.

From there, your idea of PLLs and wave generators could be used.  Surely some form of divider/counter chip would have to be used in conjunction with the PLL, though?  low parts count, but a lot of the 'parts' are chips (board space is growing by the minute!)  :icon_smile:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: TELEFUNKON on December 13, 2008, 04:18:40 AM
No, Gez, it was not about PWM, but rather about some synth sawtooth VCO
and deriving varying phaseshifted triangles therefrom by mirroring part of the saw 
across a controllable DC voltage "line".
It does have something in common with the PWM-stuff though, on second thought  ???

BTW.: interesting history-bit about Mr. TRIGGER ! (http://www.thebakken.org/research/Schmitt/Otto-intro.htm)
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: Paul Perry (Frostwave) on December 13, 2008, 05:01:46 AM
Thanks for that link to the history of Mr trigger, Telefunkon! Best reading for ages! Truly there were giants in those days...
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: TELEFUNKON on December 13, 2008, 05:13:59 AM
You`re most welcome, Mr. Perry!

`t took me a long time to finally find out if it were Schmidt or rather Schmitt, that was correct.
Both spellings can be found over the past decades (as you know) - and I definitely wanted to know which one was the right one.
So finally that link luckily showed up last year.  :icon_smile:

What a biography!
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 13, 2008, 08:54:04 AM
The idea I outlined in my last post caused frequency changes.  Had to resort to pot-and-diodes:

(http://i465.photobucket.com/albums/rr14/Longfuse123/009.jpg)

In theory, the 4k7 resistor limits PWM.  In practice it doesn't make a jot of difference.  It was necessary in order to preserve the virtual earth effect when the phase pot (the 470K - sorry, forgot to label it) is at its extremes.  Without it, there was a sudden decrease in frequency.

The above circuit gives you two square waves of 50:50 duty cycle.  The pot and diode trick gives a huge range of PWM, so the square waves go from as-good-as totally in sync, to as-good-as 360 degrees out-of-phase (you can barely tell on the scope: they look in sync).

Square waves aren't much use to you on their own.  Adding inverters biased for unity gain will round the corners off somewhat, but there'll still be sharp rise/fall times before rounding, and this will probably cause tick.  LDRs will help, in that they'll distort/slow down the transitions, or you could add another dual op-amp to convert the squares into trapezoid.  Would get rid of tick and give you choppy trem/filter action (not that musical for filters).

RG's suggestion of using PLLs and wave generator chips will give you the most options, but is an added layer of complexity.  If your flip-flops are OK with being clocked by inverters (mine won't work with them), then his inverter chip idea is also worth considering.  Whichever way you go, the above circuit might at least help you evaluate if this whole idea is worth persuing (doesn't take much to breadboard).

PS  Many op-amps should be OK.  Helps if they have symmetrical swing at the output.

Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 13, 2008, 10:15:38 AM
Quote from: gez on December 13, 2008, 04:00:54 AM
There are a number of ways of doing the PWM.  It all seems to be swings and roundabouts, though.  I was thinking of doing a variation of the Andy Flind circuit found in Practical Oscillator Circuits.  Use half a 7556 as a Schmidt trigger and use an op-amp integrator in conjunction with it to form a triangle oscillator.  The bias on the + input of the op-amp could be shifted up/down using a pot (and stop resistors either side) across the rails.  This would vary duty cycle, but frequency remains the same as the Schmidt's trigger thresholds remain fixed.  I think Telefunkon was alluding to something like this in an earlier post (adding a voltage to the 'threshold' of the integrator?)  The other half of the 7556 inverts the PWM square and both squares are sent to the flip-flops.  Would be trickier getting the full range of PWM without latching the LFO, though.  Would either have to put up with latching in extreme positions of the pot, or pull in the range of PWM slightly.  All swings and roundabouts...

Anyway, total parts count would be:

1 - op-amp (if dual, the other half could be used as a ref voltage to divide down the square for more linear freqency control)
2 - 7556
3 - 4013

Slightly less PCB space taken up and not much in the way of resistors and caps.
That's a good one!
Quote
From there, your idea of PLLs and wave generators could be used.  Surely some form of divider/counter chip would have to be used in conjunction with the PLL, though?  low parts count, but a lot of the 'parts' are chips (board space is growing by the minute!) 
Actually, it's important that the PLL not do a bunch of multiplication/division. The phase shift you're looking for is tied to the phase shifted square waves. If you multiply or divide in the PLL, the resulting sine runs at the frequency of the VCO, and the phase shift is lost. It needs to run at unity. Which makes me remember - you'll probably have to go active on the phase detector integrator to get a low enough time constant for the filter.

It's always something.  :icon_frown:


Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 13, 2008, 10:29:41 AM
Quote from: R.G. on December 13, 2008, 10:15:38 AM
That's a good one!

No it's not!  I just realised that once the flip-flops divide down both squares, there's only a Max shift of 180 degrees.  I had one of those 'hang on!' moments when I was remembering the scope patterns.  A few sketches of the waveforms on the back of some scrap paper confirms this. 

In short, AGHHHHHHH!

Was that the sound of a (UK) towel being thrown in?  I think so...[reaches for revolver in desk]
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 13, 2008, 10:36:58 AM
Put the revolver back into the desk. 0 to 180 is almost as good as 0 to 360. If one insists on 0 to 360, one can invert one waveform at 180 and then get the 180 to 360 side of things.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 13, 2008, 10:54:17 AM
...or use a couple of PLLs instead of flip-flops, to square up both outputs. (I was out of bullets)
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: puretube on December 13, 2008, 04:23:08 PM
Quote from: R.G. on December 09, 2008, 10:21:02 PM
Quote from: puretube on December 09, 2008, 07:33:00 PM
Quote from: R.G. on December 09, 2008, 07:19:17 PM
Quote from: puretube on December 09, 2008, 07:06:40 PM
Quadrature analog multiplication...
= quadrature LFO into VCAs (e.g.: LM13700);
See first reply.
analog, not µC...  :icon_wink:
See first reply.


uC was topic 1, analog trig games mixing quadrature LFOs was topic two.
See first reply.  :icon_wink:

OOps :icon_redface:, sorry R.G., the mentioning of "three-phase" and "electrical power class" in that reply distracted my attention;
(since I prefer the 4 phases over the 3 for my purposes...).

On the other hand (cc.: quad-LFO into OTA-VCA [LM13700] ) is not just a " believe"-thing, but actually works proven well in practice,
and especially nice and effective when going into 4-quadrant modulators.

bytheway: your mentioning of the problems in the fortyfiver cc. the gain,
is the same as in (m-)any of the common/wellknown feedbackoscillators (mostly seen in Wienbridge configurations),
and can easily be dealt with by the use of some (simple) kind of AGC...
(but the aim of that special 45er was the fun of using tiny quad-SMD-components and thus making it low-part-count  :icon_smile:).
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 13, 2008, 06:16:59 PM
Quote from: puretube on December 13, 2008, 04:23:08 PM
OOps :icon_redface:, sorry R.G., the mentioning of "three-phase" and "electrical power class" in that reply distracted my attention;
(since I prefer the 4 phases over the 3 for my purposes...).
No problem at all. Four phase is actually slicker for many purposes.

One odd thing I remember from my AC power and motors courses is that you can transmute ANY multiphase power into any other multiphase setup with the appropriate set of transformers.  :icon_eek: Shocked me. Three-phase to quadrature was on the final...

QuoteOn the other hand (cc.: quad-LFO into OTA-VCA [LM13700] ) is not just a " believe"-thing, but actually works proven well in practice,
and especially nice and effective when going into 4-quadrant modulators.
No, it's not at all make believe. I spent some time messing with I-Q modulators and dome filters; these are the generalization of multiphase to modulated signal, and are the basis of most modern radio practice.

Quotebytheway: your mentioning of the problems in the fortyfiver cc. the gain,
is the same as in (m-)any of the common/wellknown feedbackoscillators (mostly seen in Wienbridge configurations),
and can easily be dealt with by the use of some (simple) kind of AGC...
(but the aim of that special 45er was the fun of using tiny quad-SMD-components and thus making it low-part-count  :icon_smile:).
I understand. My only point was that it had some problems for the one app at hand. And having both the true and inverted versions of the waveforms available means you can use four two-quadrant multipliers instead of two four-quadrant multipliers - I think.

The simple and straightforward version as shown has all the gain lumped at one place in the chain. That means that the loss in signal is distributed in each stage. The 45-er would be perfect if you could get the gain *and* lossed distributed into each stage. That would keep all the waveforms the same size and make it easier to do the kinds of mixing needed for variable phase results. The all-opamps version does this by making all the losses just about nil. Another way, even simpler, is to use the 45er as is, but put a resistor divider on each stage to make the higher-output stages be the same as the lowest output stage. Probably work just as well.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: Eb7+9 on December 14, 2008, 12:34:00 AM
that's a lot of work for getting a square wave which can't be used to modulate filter control or BBD timing ... and, can't you just use a triangle LFO, variable threshold comparators and a couple of flops to get the same output ??

this raises the question again, what is it exactly that you want to modulate Charlie ?

my optical PLL uses 6 op-amps (2 as followers, 4 as comparators), 4 bjt's, 2 jFets, 2 D flops, 2 NOR gates, 2 opto-couplers and two phase shift sine oscillators (2 bjt's each) ... as the problem started out it puts out two synched up sine waves using a Hogge detecto - locked at zero degrees +/- offset, and not 90 - with a phase range of +/- pi ... this is std for PLL's with a Hogge front end ... the phase offset is controllable through application of an offset current on the averaging cap as mentioned - PLL's do not auto-correct phase-offsets as was claimed by RG otherwise there wouldn't be all this research put into finding ways to null them out ... also, the circuit as I have it will work on a single 9volt source ... the 5v TTL circuits work easily within the 9volt environment using simple diode shifting on the logic IC's and is adjusted according to the output swing of the op-amps - so no exotics op-amps necessary here ...

one cool application of this optical PLL is in a producing over-damped/under-damped speed-up/slow-down speed adjustment responses of sinewave LFO's - this depending on loop gain settings and filter bandwidth in the optical PLL ... but a lot of work just for that ...

what's the deal Charlie ??
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 14, 2008, 05:06:42 AM
Quote from: Eb7+9 on December 14, 2008, 12:34:00 AM
that's a lot of work for getting a square wave which can't be used to modulate filter control or BBD timing

That has continuously been pointed out to Charlie.  It's a hack way of doing things; but possibly a way of evaluating whether it's worth persuing a better way of doing this (spending a few months learning PIC programming).  Also, Charlie did say that other types of wave forms would do, including square.


Quoteand, can't you just use a triangle LFO, variable threshold comparators and a couple of flops to get the same output ??

Sure, but (as I've mentioned in a few of my posts above) not all flip-flops play game and need sharp rise/fall times in order to be clocked.  All the UK suppliers I use send me ST flip-flop chips.  They're a pain in the backside and won't clock using humble op-amps/inverters etc.  To get them to work usually involves the addition of Schmitt trigger devices, hence the inclusion of a 7556 in my schematic.  Bearing in mind others might have this problem, it's wise to include Schmitt trigs in the design.  Now tot up the part count of your idea.  Dual op-amp for the triangle, a comparator or two plus pot(s?) for threshold control, flip flop, Schmitt trigger chip to get the flip-flops to work (best to be on the safe side)...not much in it, is there?  Possibly a higher parts count, even.

Your idea of varying the thresholds is the first thing I came up with when thinking of a way of making that Quad oscillator I posted variable.  It could possibly be done very easily - a pot and resistor is all that's needed - but would only give a 90 degree phase shift.  That could be inverted and then both inversions could be compared with an inversion of the original triangle (180 degrees out-of-phase) and I think that would cover the whole range.  I'd need to sketch wave forms on some scrap paper to be sure.  Not what was required though - 4 way rotary switch and a pot isn't as sexy as a single pot.

Quote from: Eb7+9 on December 14, 2008, 12:34:00 AM
this raises the question again, what is it exactly that you want to modulate Charlie ?

He's outlined what he wants in a previous post.  I pointed out (when I posted it) that the variable phase square wave schematic isn't that suitable.  The quad LFO I posted might be a good compromise, though.  OK, not variable, but at least you get a few more positions (as the actress said to the Bishop)...
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 14, 2008, 06:35:53 AM
Charlie, just remembered this circuit once posted by Marcos (from an old magazine):

(http://www.geocities.com/diygescorp/autowah.gif)

It uses a square wave LFO, then (crudely) shapes it into something resembling a triangle to drive a simple T-filter.  Not perfect as amplitude of the modulating waveform reduces with increased frequency.  With a limited range, though, it works surprisingly well (I once breadboarded it).  I'm not suggesting for one moment that you build this (it's too primitive), but it's a quick and easy circuit to breadboard along with what I posted (or something similar) to assess whether your idea is at least worth persuing.  You could do something along similar lines for your tremolo.  Everything immediately underneath, and to the right, of pin 11 would be used.  Just a thought...

Title: Re: [ ? ] Continuously variable phase LFO?
Post by: slacker on December 14, 2008, 10:18:01 AM
Probably won't work, but how about taking your variable phase square waves and feeding them into  Johnson counters with the outputs summed like shown here (http://www.robthefiddler.com/electronics-audio-diy/circuit-experiments/big-johnson-signal-generator/) or over at Geo (http://www.geofex.com/Article_Folders/LFOs/psuedorandom.htm#Regular%20Stair%20Step%20LFO) to get stepped triangle waves. Filter the crap out of them or use them to drive LED/LDR combos and at tremolo speeds they might get smooth enough.


Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 14, 2008, 12:31:59 PM
Quote from: Eb7+9 on December 14, 2008, 12:34:00 AM
PLL's do not auto-correct phase-offsets as was claimed by RG otherwise there wouldn't be all this research put into finding ways to null them out ... also, the circuit as I have it will work on a single 9volt source ... the 5v TTL circuits work easily within the 9volt environment using simple diode shifting on the logic IC's and is adjusted according to the output swing of the op-amps - so no exotics op-amps necessary here ...
I always like it when I have to go think about something.  :icon_biggrin:

Let's do the logic stuff first: CMOS runs well at 9V, no 5V needed, and are plenty fast enough for sampling on a 10Hz circuit, I think. So no need for 5V logic. But in many instances LFOs will need either their input or output or both to go to either ground, or the power supply or both. Rail to rail input and output opamps are not particularly 'exotic', just less common that most jellybean opamps. But back to PLLs.

My earlier comments weren't really a "claim". I went out and did some quick research before posting and also some simulation. There is indeed an error signal in PLL output phases, which differs depending on what kind of phase detector is used. The actual resulting phase error between perfect lock and actual output in a PLL is an error signal, and there is a great amount of work spent trying to find ways to null them out. But the errors are small compared to the entire cycle to start with, nothing like a selectable 0-360 degree phase difference. My "claims" were pretty much rephrasing the words out of a couple of sources I found in Wikipedia.

I did a lot of looking for a phase detector where you could inject an error to force the phase of the output signal to be at a fixed offset, and didn't find anything, which matched with what I was taught about PLLs; I did this because I was mindful that new things are invented all the time. Didn't find anything. I did find a lot of things which said for a given phase detector that the offset was pi/2 or 0 degrees in lock, the implication being that the phase detector drove the residual error to as small as it could.

Beyond that, a PLL is a feedback system. The error in a PLL is analogous to the error in an opamp or other feedback system. The output is equal to the input error times the open loop gain minus the feedback factor loss. That is - small compared to the input or output. In fact I found a lot of math on PLLs where the phase error at the output was described as proportional to 1/(Kp*Kf), the funny K factors being the forward gain of the loop and phase detectors. The point of that is that the loop gain drives the sensed phase error toward zero.

And that opens a window to getting a static offset phase in a PLL - lower the loop gain, because the higher the loop gain the lower the error until it goes unstable.

So I thought, OK, let's just try it. I fired up the circuit simulator and started prototyping PLLs. Had a fun couple of hours.  :icon_biggrin:  What I found was that nothing I could simulate would give me a stable, useful phase offset; this included multiplier, XOR, and latched phase detectors, as well as hacking on PDs with variable resistors, current sources, etc. Low loop gains give you some offset, but the odd thing was that there was always a falling-off-the-cliff point; back to the books. Phase detectors have this input/output graph that's commonly presented to show their behavior. There's a discontinuity and loss of lock at the extremes, which correspond to where one would want to operate a phase offset PLL. So you have to run at low gain (implying slow lock, and small capture range) as well as easy loss of lock even if you got

I always keep in mind that I may be wrong or ignorant of something, though. So I went off to look up Hogge detectors (invented 1985, long after my intro to PLLs) and I did find one reference to a Hogge detector with an output that offers some output of phase with respect to the reference signal. It's in US patent 7151814, and I found it here: http://www.google.com/patents?id=Akx-AAAAEBAJ&printsec=abstract&zoom=4&dq=patent:7151814&as_drrb_ap=q&as_minm_ap=1&as_miny_ap=2008&as_maxm_ap=1&as_maxy_ap=2008&as_drrb_is=q&as_minm_is=1&as_miny_is=2008&as_maxm_is=1&as_maxy_is=2008#PPA9,M1 (http://www.google.com/patents?id=Akx-AAAAEBAJ&printsec=abstract&zoom=4&dq=patent:7151814&as_drrb_ap=q&as_minm_ap=1&as_miny_ap=2008&as_maxm_ap=1&as_maxy_ap=2008&as_drrb_is=q&as_minm_is=1&as_miny_is=2008&as_maxm_is=1&as_maxy_is=2008#PPA9,M1)  I'm having trouble relating this to a usable PD for the application at hand.

It is entirely possible that there is something hidden there that I don't know. So let's do this JC - post a source for the info on a variable Hogge detector output, as I have. I'm sure you must have done your research before posting, as I did.  You may also want to post your proposed circuit in the interest of being clear.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 14, 2008, 12:55:46 PM
Quote from: slacker on December 14, 2008, 10:18:01 AM
Probably won't work, but how about taking your variable phase square waves and feeding them into  Johnson counters with the outputs summed like shown here (http://www.robthefiddler.com/electronics-audio-diy/circuit-experiments/big-johnson-signal-generator/) or over at Geo (http://www.geofex.com/Article_Folders/LFOs/psuedorandom.htm#Regular%20Stair%20Step%20LFO) to get stepped triangle waves. Filter the crap out of them or use them to drive LED/LDR combos and at tremolo speeds they might get smooth enough.
I tried to make something out of that one, as the Johnson counter sine wave converter is a favorite of mine. I think it will be severely limited in the amount of phase shift, because each of the output square waves is offset by no more than one period of the square waves. Since that's the clock into the Johnson counters, the offset is no more than one of the original periods per Johnson clock, and that results in a phase shift of 2*pi/N where N is the number of stages in the Johnson counter. I think the counter "dilutes" the phase shift by the number of stages.

But the Johnson counter does make for a nice sine source.

Upon some thought I did come up with a workable solution for that - use a CD4046 PLL to multiply the phase shifted square waves by N. Drive the Johnson counter with the Nx output, then use the highest order bit of the Johnson counter as the output frequency to mix back into the PD. PD2 in the 4046 drives the phase difference between the reference (original square wave) and VCO output (in this case, one output of the Johnson counter) to zero degrees in lock. Since the phase of the output square wave is locked to the phase of the high order bit, the output stepped sine is now locked to the input reference square wave, and it follows the offset as long as the loop is locked.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: Eb7+9 on December 15, 2008, 12:09:21 AM
Quote from: R.G. on December 14, 2008, 12:31:59 PM
Beyond that, a PLL is a feedback system. The error in a PLL is analogous to the error in an opamp or other feedback system. ... The point of that is that the loop gain drives the sensed phase error toward zero.

if NFB nulled out offsets in gainy loop systems (why they're always input referred) there wouldn't be offset issues in opamp circuits, but there are - NFB doesn't null those out ... likewise NFB in a Phase-Locked loop won't do the same - otherwsie all PLL designs would exhibit by default maximum BERs (bit-error rates) by design as you describe it ...

in Data Recovery terms the "center of the eye" performance (zero offset target) provides a measure of immunity against jitter in the data extraction sense - that part we're not interested in here ... tough, the low-jitter goal is applicable enough for the sake of producing a stable (tracking) sine wave ... so we can use the basic idea of a zero offset tracking circuit and its low output jitter nature in this "still unseen application" situation ... btw, this architecture is also known for cleaning up jitter (clock conditioning) in timing repeaters ...

Though here we have it especially easy, with a steady stream of zeros and ones (a data signal acting like a clock) following the sine-to-square comparators ... it's easier for a clock extracting PLL to lock onto a constant series of 0/1's than a pseudo random data stream - in the process yielding minimum possible output jitter on the recovery LFO ... so piece of cake in principle for this typical Data Recovery architecture ... then it's just a matter of controlling the phase-offset component when in lock ...

Quote
So I fired up the circuit simulator and started prototyping PLLs. Had a fun couple of hours.  :icon_biggrin:  What I found was that nothing I could simulate would give me a stable, useful phase offset; this included multiplier, XOR, and latched phase detectors ...

doubtful ... sorry, but unless you've discovered something the entire Data Recovery industry doesn't know mixed-mode Spice sims for complete PLLs typically takes days (at best) or weeks to run and show lock, even in simple circuits - of course that's unless you're allowing gross modeling inaccuracies ... also, not to sound pedagogical or anything, you don't run to the simulator to learn basic theory, it's there to confirm the thinking ...

Quote
It is entirely possible that there is something hidden there that I don't know. So let's do this JC - post a source for the info on a variable Hogge detector output, as I have. I'm sure you must have done your research before posting, as I did.  You may also want to post your proposed circuit in the interest of being clear.

google Clock Recovery PLL and you'll find that the Hogge and Alexandere Phase Detectors are the darlings of the industry ... in your searches keep an eye open for a delay block (two inverters with a cap between them) that is typically inserted in the Hogge detector to cancel out a propagation delay borne offset current in the charge pump - though this is useful only in very high speed circuits it's telling us something right off the bat about offset existence/reduction ... in either case it's easier to correct (or alternately, intentionally insert) an offset component either as a mismatch in the current pump or as an equivalent DC current into the averaging cap

Basic theory of operation says that the loop using a Hogge detector will stabilize when the up/dn currents are the same going into the cap - this can ALSO occur if the signals are out-of-phase and the current-pump has a proportional offset equal (in charge envelope per cycle) to the phase offset times - one skewing is canceled by the other through NFB which results in a stable phase offset taking place when in lock ... btw, the math for this PLL design falls inside the basic linear-phase theory - Hogge is a linear-phase detector with it's PD gain curve equal in slope in both directions ...

I once talked about using a modern development of this kind of architecture, augmented with an adaptive filter switch (set by a cycle-slip detector), which allows faster locking of notes in a synthesizer guitar tracker circuit ... but as I recall that hit a nerve or something ...

before I reveal my measly opto-converter block to the whirl I'd like to see what we're applying this idea to first ...
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 15, 2008, 04:07:35 AM
Quote from: Eb7+9 on December 15, 2008, 12:09:21 AM
before I reveal my measly opto-converter block to the whirl I'd like to see what we're applying this idea to first ...

Reply 28, Page 2
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: slacker on December 15, 2008, 07:55:54 AM
Quote from: R.G. on December 14, 2008, 12:55:46 PM
I tried to make something out of that one, as the Johnson counter sine wave converter is a favorite of mine. I think it will be severely limited in the amount of phase shift, because each of the output square waves is offset by no more than one period of the square waves.

Yeah you're right, I did have my doubts about it working because it seemed too simple but I couldn't put my finger on what it was.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 15, 2008, 10:03:16 AM
Quote from: Eb7+9 on December 15, 2008, 12:09:21 AM
Quote from: R.G. on December 14, 2008, 12:31:59 PM
Beyond that, a PLL is a feedback system. The error in a PLL is analogous to the error in an opamp or other feedback system. ... The point of that is that the loop gain drives the sensed phase error toward zero.

if NFB nulled out offsets in gainy loop systems (why they're always input referred) there wouldn't be offset issues in opamp circuits, but there are - NFB doesn't null those out ... likewise NFB in a Phase-Locked loop won't do the same - otherwsie all PLL designs would exhibit by default maximum BERs (bit-error rates) by design as you describe it ...
There are several reasons behind that not following. First of all, I was referring to loop error, not offset error. A feedback system must have some error at its inputs to sustain a non-zero output. It is the error that drives the forward gain of the system to move the output. An otherwise theoretically perfect opamp with less than infinite open loop gain would still have a nonzero error at its inputs in operation. This error residue is that provides the input signal to the amplifier inside the loop to move away from rest.

Offset error is another thing entirely; I believe you may be confusing terms. In opamps, offset error is an inherent mismatch which makes the amplifier be balanced when the two inputs are not at exactly equal voltages, but rather at some slightly different voltage. The usual source of the error is mismatched input devices, but there can be internal issues as well. In any case this offset causes a static offset at the output. As an example, an opamp with an input offset error of 10mV is balanced when the inputs are 10mV apart, not 0V apart. As a result, the feedback loop causes the output to be off by the closed loop gain times the input offset. A gain-of-ten amp with a 10mV input offset will have an output offset at balance of 100mV.

That says nothing at all about the error signal, often called residue or error residue caused by the finite forward gain in the loop at all. Back at PLLs, yes they follow this kind of beginner's basic control theory too. They can have input offset errors or the equivalent; these are uglinesses that good designers try to minimize. There are also error residues; in feedback systems with less than infinite gain, these are what drive the system to non zero output, and as such are always there. I can refer you to a good beginner's text on control theory if you'd like to read up on this.

Quotein Data Recovery terms the "center of the eye" performance (zero offset target) provides a measure of immunity against jitter in the data extraction sense - that part we're not interested in here ... tough, the low-jitter goal is applicable enough for the sake of producing a stable (tracking) sine wave ... so we can use the basic idea of a zero offset tracking circuit and its low output jitter nature in this "still unseen application" situation ... btw, this architecture is also known for cleaning up jitter (clock conditioning) in timing repeaters ...
Phase jitter in PLL systems is an imperfection of another nature. It's mainly a consequence of the imperfections of the phase detector in spotting edges (which in digital systems serve as the reference for "in phase"). And I'm not sure why you're trying to deal with "that part we're not interested in here".
Quote
Though here we have it especially easy, with a steady stream of zeros and ones (a data signal acting like a clock) following the sine-to-square comparators ... it's easier for a clock extracting PLL to lock onto a constant series of 0/1's than a pseudo random data stream - in the process yielding minimum possible output jitter on the recovery LFO ... so piece of cake in principle for this typical Data Recovery architecture ... then it's just a matter of controlling the phase-offset component when in lock ...
I think you may have some confusion going on there. I'm with you on this assertion right down to "then it's just a matter".  The problem is that I can find only the one patent from 2006 that offers some scheme for doing this. In fact, all the literature I can find supports my memory in phase detectors driving phase offset to fixed positions, not variable ones.

It's kind of like we already know of an interstellar warp drive - the Alcubierre metric solutions to general relativity (http://en.wikipedia.org/wiki/Alcubierre_drive (http://en.wikipedia.org/wiki/Alcubierre_drive)) describe a "warp bubble" that moves through space at speeds faster than light and carriers the contents of the bubble along with no FTL violations inside the bubble. Then it's "just a matter" of making these bubbles, right? It seems that estimates of the energy needed to make one range between the complete conversion to energy of several solar masses at the low end and tens of times the entire mass of the universe on the other end. That "only a matter" business is important.  :icon_lol:

Quote
Quote
So I fired up the circuit simulator and started prototyping PLLs. Had a fun couple of hours.  :icon_biggrin:  What I found was that nothing I could simulate would give me a stable, useful phase offset; this included multiplier, XOR, and latched phase detectors ...
doubtful ... sorry, but unless you've discovered something the entire Data Recovery industry doesn't know mixed-mode Spice sims for complete PLLs typically takes days (at best) or weeks to run and show lock, even in simple circuits - of course that's unless you're allowing gross modeling inaccuracies ... also, not to sound pedagogical or anything, you don't run to the simulator to learn basic theory, it's there to confirm the thinking ...
Yeah, that's kinda what I was doing, using the simulator to confirm the thinking. Did you really think that I don't know about the issues in simulators? Come on JC, get serious. You're not sounding pedagogical, you're grasping at straws.

Quote
Quote
It is entirely possible that there is something hidden there that I don't know. So let's do this JC - post a source for the info on a variable Hogge detector output, as I have. I'm sure you must have done your research before posting, as I did.  You may also want to post your proposed circuit in the interest of being clear.
google Clock Recovery PLL and you'll find that the Hogge and Alexandere Phase Detectors are the darlings of the industry ... in your searches keep an eye open for a delay block (two inverters with a cap between them) that is typically inserted in the Hogge detector to cancel out a propagation delay borne offset current in the charge pump - though this is useful only in very high speed circuits it's telling us something right off the bat about offset existence/reduction ... in either case it's easier to correct (or alternately, intentionally insert) an offset component either as a mismatch in the current pump or as an equivalent DC current into the averaging cap
Actually, I meant the variable Hogge detector. And oddly enough, I did google plls of all kinds, both eyes open. The info I found indicated that there was some limited offset correction, of the order of phase jitter. This is by no means a 0-360 phase shift by twiddling a knob. What I found was telling us that there is some small offset correction.

QuoteBasic theory of operation says that the loop using a Hogge detector will stabilize when the up/dn currents are the same going into the cap - this can ALSO occur if the signals are out-of-phase and the current-pump has a proportional offset equal (in charge envelope per cycle) to the phase offset times - one skewing is canceled by the other through NFB which results in a stable phase offset taking place when in lock ... btw, the math for this PLL design falls inside the basic linear-phase theory - Hogge is a linear-phase detector with it's PD gain curve equal in slope in both directions ...
Yes, that is what the basic theory says. However, unless I miss some issues, this does not change the eventual outcome outside the PD in the VCO. As I said, I'm willing to learn - point me to it.  :icon_biggrin:

QuoteI once talked about using a modern development of this kind of architecture, augmented with an adaptive filter switch (set by a cycle-slip detector), which allows faster locking of notes in a synthesizer guitar tracker circuit ... but as I recall that hit a nerve or something ...
Wow that would be really cool. Got a circuit which demonstrates that? That needs less than three solar masses of energy?

Quotebefore I reveal my measly opto-converter block to the whirl I'd like to see what we're applying this idea to first ...
I think if I were in your position I would too.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: puretube on December 15, 2008, 06:34:59 PM
Quote from: R.G. on December 13, 2008, 06:16:59 PM...
The simple and straightforward version as shown has all the gain lumped at one place in the chain. That means that the loss in signal is distributed in each stage. The 45-er would be perfect if you could get the gain *and* lossed distributed into each stage. That would keep all the waveforms the same size and make it easier to do the kinds of mixing needed for variable phase results. The all-opamps version does this by making all the losses just about nil. Another way, even simpler, is to use the 45er as is, but put a resistor divider on each stage to make the higher-output stages be the same as the lowest output stage. Probably work just as well.


Note however, that unlike the more "usual"  3stage hi-pass or lo-pass phaseshiftoscillators, which need a gain of ~27 in the loop
(can`t remember the gain needed for 4 stages...),
the "45er`s" loop gain is merely slightly higher than 2  :icon_eek: .
(even less in a theoretical perfect (simulated) circuit... give spice a few seconds to get the wave started...  :icon_wink:)

BTW.: in the other "usual" 3- or 4-stage phaseshiftoscillators and phaseshifters per se,
I prefer the lo-pass configuration because of its inherit smoothing capability in combination with AGC,
noise rejection, and forgivingness cc. being overdriven at its hottests spots...
(if it weren`t for the neccessity of floating (series-) variable resistors...  :icon_smile:)
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 15, 2008, 07:26:14 PM
Quote from: puretube on December 15, 2008, 06:34:59 PM
Note however, that unlike the more "usual"  3stage hi-pass or lo-pass phaseshiftoscillators, which need a gain of ~27 in the loop
(can`t remember the gain needed for 4 stages...), the "45er`s" loop gain is merely slightly higher than 2 
Yes, that's par for circuits which buffer between the RC phase shift stages. I remember seeing a circuit in one of TI's analog app notes using four opamp buffered RC stages and the necessary gain was microscopic.

It seems that each stage is operating at a "gain" of about one over the fourth root of two, about  0.84.
Quote
BTW.: in the other "usual" 3- or 4-stage phaseshiftoscillators and phaseshifters per se,
I prefer the lo-pass configuration because of its inherit smoothing capability in combination with AGC,
noise rejection, and forgivingness cc. being overdriven at its hottests spots...
(if it weren`t for the neccessity of floating (series-) variable resistors... 
Yep that is nice.
Title: Re: [ ? ] TRI-SINE_90
Post by: puretube on December 16, 2008, 07:06:56 PM
How about starting Charlies new "Sway-LFO" with a simple 2-stage design using 2 identical caps and 2 voltage-controllable resistors,
that offers both: a triangular wave, and a sinewave output?
Fixed 90 degrees apart?

(http://img.photobucket.com/albums/v442/lectronix/2008_dec/AC2698.jpg)


(as a regular 1 pot basic LFO, and later add  the "back-and-forth" feature)?

(http://img.photobucket.com/albums/v442/lectronix/2008_dec/90x_y2709.jpg)

movieclip... (http://smg.photobucket.com/albums/v442/lectronix/2008_dec/?action=view&current=MOV02705-1.flv)
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 16, 2008, 08:02:08 PM
If you're going to use an LM13700, why not either use the two halves as a double integrator quadrature generator, or use them as a state variable band- or low-pass filter and a Schmitt trigger to make a square wave so you could do a square -> sine filter generator?
Title: Re: [ ? ] SINE-SINE_90
Post by: puretube on December 16, 2008, 08:13:40 PM
Quote from: R.G. on December 16, 2008, 08:02:08 PM
If you're going to use an LM13700, why not either use the two halves as a double integrator quadrature generator, or use them as a state variable band- or low-pass filter and a Schmitt trigger to make a square wave so you could do a square -> sine filter generator?

I prefer the option of switching from TRI to SINE for the 2nd (90°) output,
and also don`t want choppy slopes (click...)

(http://img.photobucket.com/albums/v442/lectronix/2008_dec/sinsin-2707.jpg)
(switched to sine-sine)

( clip (http://smg.photobucket.com/albums/v442/lectronix/2008_dec/?action=view&current=MOV02708.flv) )


Ooops, the schemo (http://img.photobucket.com/albums/v442/lectronix/2008_dec/sinsin-xg.jpg) was missing...  :icon_smile:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 17, 2008, 08:57:32 AM
Ton, how come you get a triangle wavefrom from one of the outputs?  I'd have thought both outputs would have been sine.  Is it something to do with feedback from that 100k trim in parallel with the back-to-back diodes??  :icon_confused:
Title: Re: [ ? ] SIMP-QUAD
Post by: puretube on December 17, 2008, 09:00:13 AM
simplified version:

(http://img.photobucket.com/albums/v442/lectronix/2008_dec/simpquad-xg.jpg)

@ C1 = C2 = 100n, f = 0.2Hz ... 200Hz

Title: Re: [ ? ] SIMPQUAD
Post by: puretube on December 17, 2008, 09:08:50 AM
Quote from: gez on December 17, 2008, 08:57:32 AM
Ton, how come you get a triangle wavefrom from one of the outputs?  I'd have thought both outputs would have been sine.  Is it something to do with feedback from that 100k trim in parallel with the back-to-back diodes??  :icon_confused:

`t happened by accident on the breadboard...  :icon_redface: , but I declare it a "feature", now.  :icon_razz:
see in the simplified version:

http://img.photobucket.com/albums/v442/lectronix/2008_dec/simpquad-1k.jpg (http://img.photobucket.com/albums/v442/lectronix/2008_dec/simpquad-1k.jpg)

in IC-B, the inv. input goes to half supply directly now,
while the 1 leftover 1k either is connected to the noninverting input for SINE,
or disconnected for TRI @ the phi-2 output...
(while output phi-1 remains sine...)

(the TRI has a larger amplitude, though (4V), than the SINE (3V)) - the scope-pic in reply#66 was with attenuated tri...
in reality it looks like this:
TRISINE_90 clip (http://smg.photobucket.com/albums/v442/lectronix/2008_dec/?action=view&current=MOV02705-1.flv)

In the original schemo (http://img.photobucket.com/albums/v442/lectronix/2008_dec/sinsin-1k.jpg), that`s why there is an
asterisk at the upper 1k of IC-B:
either have it as is in the schem for SINE,
or disconnect the righthandside of the resistor (at: "x") from pin 14, and hook it to pin 13 (at: "y") for TRI instead!

A funny gag for folx who don`t care about waveforms...  :icon_wink:

In "SINE-SINE_90" mode, the amplitudes are equal, and sway around Ub/2 symmetrically.

The TRIMpot in the original schemo allows for dialing in a compromise between maximum achievable amplitude,
and minimum possible distortion. (best between 2Vpp and 4Vpp). - for folx with scope...
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 17, 2008, 11:16:58 AM
Thanks Ton, I think I've got it.  With one switch position the previous stage isn't divided down, so with max amplitude signal it's almost like driving an integrator with a square...hence triangle?

I think the quad triangle oscillator I posted could have a decent phase shift with the addition of a PLL.  Use a variable threshold for the comparator to achieve 180 degree phase shift, then follow with a 4046 to correct the waveform to 50:50 duty cycle.  The squared signal then drives the remainder of the circuit (the second integrator).  An extra chip and only a few more components.
Title: Re: [ ? ] SWAY-SINE_360
Post by: puretube on December 17, 2008, 12:46:45 PM
Seeing reply#8 (http://www.diystompboxes.com/smfforum/index.php?topic=72676.msg588284#msg588284),
I hooked up a 2nd LM13700 as per so-called "SmallStone 13700" ( :icon_wink:) schemo (with 100n caps) after the "Sine-Sine_90" :

(http://img.photobucket.com/albums/v442/lectronix/2008_dec/th_MOV02712.jpg) (http://smg.photobucket.com/albums/v442/lectronix/2008_dec/?action=view&current=MOV02712.flv)
(click on pic for clip...)

shifting a ~10Hz sine back from 0° to ~ -355° and forth to 0° again with a single 100k pot...
channel1 is the fix 0° LFO-output, channel2 is the variable output from the 2nd stage of the 2nd LM13700,
into which the LFO was being fed...
(sorry for crappy clipquality coz of focus- and synchro-problems of the cam...)

The 2stage-shifter theory works perfect...
Title: Re: [ ? ] SWAY-SINE_360
Post by: R.G. on December 17, 2008, 01:00:26 PM
Quote from: puretube on December 17, 2008, 12:46:45 PM
The 2stage-shifter theory works perfect...
It absolutely does. The only thing wrong with that is that you must change the phase shift stage at the same time and by the same amount as you change frequency, or the phase shift of the two LFOs changes with settings of the frequency pot as well.

If Charlie's application is OK with adjusting the phase pot each time the frequency is changed, it is fine.
Title: Re: [ ? ] SWAY-SINE_360
Post by: puretube on December 17, 2008, 01:11:58 PM
Quote from: R.G. on December 17, 2008, 01:00:26 PM
Quote from: puretube on December 17, 2008, 12:46:45 PM
The 2stage-shifter theory works perfect...
It absolutely does. The only thing wrong with that is that you must change the phase shift stage at the same time and by the same amount as you change frequency, or the phase shift of the two LFOs changes with settings of the frequency pot as well.

If Charlie's application is OK with adjusting the phase pot each time the frequency is changed, it is fine.

I don`t think he wants to measure correlation, but rather wants to get some moving sounds  :icon_smile:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: moosapotamus on December 17, 2008, 02:06:48 PM
Damn! Need to get caught up on this discussion. Only skimmed it so far...

I have not had electricity in my home since this past Friday 12/12 ~1:30 AM, and can only get online a little bit during the day at work. Sub-freezing temperatures over the weekend with no heat left me homeless, sleeping with relatives. Now running a borrowed generator to power a few lights, TV and the pellet stove to keep warm. Had ~ 2" of snow this morning and expecting much more on Friday. No news on when power will be restored, hopefully by the weekend.

You guys are posting some verry cool stuff, tho. Please keep it coming. I'll get caught up when I can. 8)

Thanks
~ Charlie
Title: Re: [ ? ] SWAY-SINE_360
Post by: R.G. on December 17, 2008, 02:53:26 PM
Quote from: puretube on December 17, 2008, 01:11:58 PM
I don`t think he wants to measure correlation, but rather wants to get some moving sounds  :icon_smile:
In that case, we were done at reply #8.   :icon_biggrin:
Title: Re: [ ? ] SWAY-SINE_360
Post by: Eb7+9 on December 17, 2008, 05:21:27 PM
Quote from: R.G. on December 17, 2008, 01:00:26 PM
The only thing wrong with that is that you must change the phase shift stage at the same time and by the same amount as you change frequency, or the phase shift of the two LFOs changes with settings of the frequency pot as well.

If Charlie's application is OK with adjusting the phase pot each time the frequency is changed, it is fine.

that's the whole point to using a PLL, the static phase offset doesn't need to be adjusted as LFO frequency is changed ... they're perfectly independent of one another ...
Title: Re: [ ? ] SWAY-SINE_360
Post by: R.G. on December 17, 2008, 07:30:45 PM
Quote from: Eb7+9 on December 17, 2008, 05:21:27 PM
that's the whole point to using a PLL, the static phase offset doesn't need to be adjusted as LFO frequency is changed ... they're perfectly independent of one another ...
Sigh.

I know that, JC. That's why I was haring off down PLL rabbit holes, verifying for myself that phase detectors work the way I think they do.

We have the following ways:
- microcontroller; does exactly what Charlie wanted, completely independent, etc., etc. and suffers only from its output being stepped digital by one of several methods and needing smoothing, and needing (simple) programming.
- various forms of digital synthesis in the form of counters; getting phase shifts set into the counters is hard, as it the interface from knobs.
- quadrature sine oscillators which are then mixed to a variable phase output using VCAs and trig identies.
- PLLs with offsets applied to their phase detectors; doesn't work because phase detectors (with the possible exception of that patented thingie) lock at fixed positions plus or minus an error term. The error term is small and deliberately so in all PLL work I can find, and driven that way by the feedback that makes a loop lock.
- sine oscillator followed by phase shift network to shift the result in an analog fashion; works fine, but phase shift and frequency are interrelated and it's a two-knob exercise to get a new setting.
- your magic solution which you won't reveal.

All of these have their issues, yes?

But I did come up with one that seems to work. I did come up with a workable solution that's phase sensitive, not frequency sensitive, with a PLL. It occurred to me that since PDs want to lock at a fixed place, let them. You're looking in the wrong place for introducing phase shift trying to inject it in the middle of the PD. Take the original sine wave, run it into a comparator against a variable reference voltage. Us the edge of the comparator output, which reliably is offset X degrees into the sine, as the reference signal to a PLL. Do it outside the loop.

Sine waves are deterministic. A given number of degrees will always result in the same voltage on a normalized sine wave. So as you vary the comparator reference, its output is a variable-duty cycle square wave depending on the reference voltage. The leading (or trailing!) edge is at a position in the reference sine wave's phase that is fixed by the relationship of the sine voltage to the reference. For the resulting offset sine, take the sine wave out of a waveform generator chip and run THAT into a comparator, too, or just use the square wave output from the chip if it's available at the same time.

Now you can whip in a PLL, use the PD to lock the leading edge of the square wave output of the waveform generator chip to the edge of the output of the reference comparator. If you've used something good - one of those Hogge or other edge detecting PDs works - your PLL will lock to the leading edge +/- jitter and loop error, which the world is busy trying to make small. And since that involves dragging along the sine wave from the waveform generator chip, you now have a single knob phase adjustment which tracks phase, and remains locked to the desired phase in the face of the frequency being moved around.

It even works in a simulator; even with an XOR PD if you use two monostables to force the duty cycles of the two square wave  signals to be the same (an XOR PD is duty cycle dependent).

So the net is - generate a reference signal from the reference sine wave which tracks at a phase offset, then lock to that. Worked first time.
Title: Re: [ ? ] SWAY-SINE_360
Post by: Eb7+9 on December 18, 2008, 03:45:44 AM
Quote from: R.G. on December 17, 2008, 07:30:45 PM
That's why I was haring off down PLL rabbit holes, verifying for myself that phase detectors work the way I think they do.

your understanding of PD's is in need of revision ... or vision

Quote
We have the following ways:
- microcontroller; does exactly what Charlie wanted, completely independent, etc., etc. and suffers only from its output being stepped digital by one of several methods and needing smoothing, and needing (simple) programming.

needing simple programming ... right ...

Quote
- various forms of digital synthesis in the form of counters; getting phase shifts set into the counters is hard, as it the interface from knobs.

- quadrature sine oscillators which are then mixed to a variable phase output using VCAs and trig identies.

adding sines and cosines won't give you constant amplitude

Quote
- PLLs with offsets applied to their phase detectors; doesn't work because phase detectors (with the possible exception of that patented thingie) lock at fixed positions plus or minus an error term. The error term is small and deliberately so in all PLL work I can find, and driven that way by the feedback that makes a loop lock.

ask yourself what gets "equalized" when the PLL (NFB phase/frequency loop) is in lock and you'll see where your thinking is wrong in this case ...

Quote
- sine oscillator followed by phase shift network to shift the result in an analog fashion; works fine, but phase shift and frequency are interrelated and it's a two-knob exercise to get a new setting.

the most obvious nay case ... for same reason adding a fixed delay in a PLL PD doesn't apply to the variable frequency case ...

Quote
- your magic solution which you won't reveal.

All of these have their issues, yes?

nope ... the magic one spreads love of good design all over the place and does what it's supposed to

Quote
But I did come up with one that seems to work. I did come up with a workable solution that's phase sensitive, not frequency sensitive, with a PLL.

right, your usual strategy, make my solution look like it's yours after you said it couldn't be done ...
old hat

my bet is you'd be fired by now ... "phase sensitive, not frequency sensitive" would raise serious eye-brows at an engineering meeting ...

Quote
It occurred to me that since PDs want to lock at a fixed place, let them. You're looking in the wrong place for introducing phase shift trying to inject it in the middle of the PD. Take the original sine wave, run it into a comparator against a variable reference voltage. Us the edge of the comparator output, which reliably is offset X degrees into the sine, as the reference signal to a PLL. Do it outside the loop.

you're getting lost again, this doesn't work for the same reason applying a delay line to the sine wave won't ... PD's don't do anything on their own, it's the loop you should be talking about

there are two place where offsets are deliberately introduced/corrected in Mixed-Mode PLL's ... in the PD as a delay block - routinely done to trim the delay offset caused by the D (delay) flip-flop as I said above - but this only works/designed in fixed frequency PLL's (some design approaches make it variable [adaptive] to use in combatting jitter) ... or it's done in the charge pump, as I've been advocating ... or even again, by adding a small (enough) DC current to the averaging node ... but the second case may introduce some jitter ... offset in the Charge Pump is my choice at this point ...

Quote
Sine waves are deterministic. A given number of degrees will always result in the same voltage on a normalized sine wave. So as you vary the comparator reference, its output is a variable-duty cycle square wave depending on the reference voltage. The leading (or trailing!) edge is at a position in the reference sine wave's phase that is fixed by the relationship of the sine voltage to the reference. For the resulting offset sine, take the sine wave out of a waveform generator chip and run THAT into a comparator, too, or just use the square wave output from the chip if it's available at the same time.

Now you can whip in a PLL, use the PD to lock the leading edge of the square wave output of the waveform generator chip to the edge of the output of the reference comparator. If you've used something good - one of those Hogge or other edge detecting PDs works - your PLL will lock to the leading edge +/- jitter and loop error, which the world is busy trying to make small. And since that involves dragging along the sine wave from the waveform generator chip, you now have a single knob phase adjustment which tracks phase, and remains locked to the desired phase in the face of the frequency being moved around.

So the net is - generate a reference signal from the reference sine wave which tracks at a phase offset, then lock to that. Worked first time.

as if you can fathom the nature of determinism ...

you're *very* lost

the net is, you have two "fairly matched" sine wave oscillators - take 'em from our good old friend the Univibe (yes we could use better ones) ... make one your reference, manually controlled with a dual pot, the other opto-coupler controlled - the later being part of what I'm calling an Opto PLL ... by nature their signal ampltudes will track if frequencies do ... convert the outputs of both sine waves to square via comparators set halfway on the DC amplitude scale ... 'adapt' a (digital) Hogge PD using appropriate level shifting, biasing, yada yada, to control the usual current/charge pump into a lead/lag or averaging filter (impedance) ... then introduce a voltage to resistance converter reading the voltage on the cap and setting the photo-cell resistors in inverse proportion to complete the PLL loop ... you can probably draw my schematic now

at startup, say, reference oscillator is running faster than PLL sine wave oscillator and PD sends predominant amounts of UP signal to the Charge Pump till cap voltage charges up to level where PLL sinewaver starts to exceed frequency of ref sinewavre ... at which point PD starts sending predominant amounts of DN signal to the Charge Pump and cap voltage starts dropping - PLL sinewaver slows down ... this switches back and forth until loop is phase locked (ie. no more cycle slips take place) through NFB equalizing process ...

at this point you need to look carefully at how the Hogge detector and Charge Pump interact to understand how a Static Phase offset can take place WHILE the loop is still locked and jitter free - answer to question above is contained in this explanation ...

I'm already designing a guitar frequency tracker that uses the same blocks, except with a current controlled oscillator and a jFET V/I converter instead of optos - obviosuly optical coupling is too slow for instrument tracking but perfect for our mysterious LFO chasing application here ... I always wanted to DIY a mixed-mode PLL with discrete components, I'm just not sure if the Charge Pump switches will work very well with jFETs instead of MOS but at this point I can't see why it wouldn't work if the gates are protected from forward bias using reverse diodes (Spice is obviously lousy here) ...  I just need to find me a couple of J177's and J309's to verify before I whip out this fine looking pup ... or go with a couple of CMOS devices ...

I wish I could say it's not rocket science but I think it is ...
Title: Re: [ ? ] SWAY-SINE_360
Post by: R.G. on December 18, 2008, 08:33:44 AM
Quote from: Eb7+9 on December 18, 2008, 03:45:44 AM
your understanding of PD's is in need of revision ... or vision
All knowledge is always in need of enhancement.

Quoteneeding simple programming ... right ...
It depends on your background, I guess.

Quoteadding sines and cosines won't give you constant amplitude
Done properly, it does. You get to adjust the amplitudes with the VCAs.

Quoteask yourself what gets "equalized" when the PLL (NFB phase/frequency loop) is in lock and you'll see where your thinking is wrong in this case ...
Sorry. I've done a whole lot of reading on PLLs recently. I can always be wrong, but in this case, the reading reinforces my views. What gets locked is phase. It's a phase locked loop. Go read the literature. If you need it, I can provide starting places for you.
Quote
the most obvious nay case ... for same reason adding a fixed delay in a PLL PD doesn't apply to the variable frequency case ...
I'm not sure what you mean here at all.

Quotenope ... the magic one spreads love of good design all over the place and does what it's supposed to
Well, golly, isn't this the Age of Aquarius? Only - I haven't seen the magic one. And like all magic, it can be said to do anything at all as long as it never gets looked at. In the techie world we call this believing your own press releases.  :icon_biggrin:

Quoteright, your usual strategy, make my solution look like it's yours after you said it couldn't be done ...
old hat
I might say the same thing, since your solution was never revealed, eh? Seems like it could cut both ways.  :icon_biggrin:

But I won't, as you were arguing for inserting offset voltages into a PD to cause a static phase offset in the PD, so I'm guessing that you had some scheme for doing this. That's quite different from deriving a static phase offset from the original square wave first, then locking to that edge with no dinking inside the PD needed, and allowing the PD to lock where it wants.
Quote
my bet is you'd be fired by now ... "phase sensitive, not frequency sensitive" would raise serious eye-brows at an engineering meeting ...
It would raise eyebrows. I'd be asked to explain. Been there, done that, got the T shirt. But you can "fire" me if it makes you feel better.

Quote
Quote
It occurred to me that since PDs want to lock at a fixed place, let them. You're looking in the wrong place for introducing phase shift trying to inject it in the middle of the PD. Take the original sine wave, run it into a comparator against a variable reference voltage. Us the edge of the comparator output, which reliably is offset X degrees into the sine, as the reference signal to a PLL. Do it outside the loop.
you're getting lost again, this doesn't work for the same reason applying a delay line to the sine wave won't ... PD's don't do anything on their own, it's the loop you should be talking about
You do it your way, I'll do it mine. I've now breadboarded my version. It works. However, your note that "PD's [sic] don't do anything on their own, it's the loop you should be talking about" is correct. Let the PD - and the loop do what it wants to.

Quoteas if you can fathom the nature of determinism ... you're *very* lost
We all are, JC, we all are.  :icon_biggrin:

Quote
Quote
the net is, you have two "fairly matched" sine wave oscillators ... make one your reference, manually controlled with a dual pot, the other opto-coupler controlled - the later being part of what I'm calling an Opto PLL ...  yada yada,  ... you can probably draw my schematic now
...
I wish I could say it's not rocket science but I think it is ...
I await your design with bated breath. It's always possible that I just can't discern the true meaning in your words. I can always be wrong.

And I've always wanted to know a rocket scientist!

:icon_biggrin:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 18, 2008, 11:14:08 AM
OK, JC. I found out what you're on about.

A non-edge triggered PD, like an analog multiplier, when fed from a 50% duty cycle signal from both reference and output waveforms, and with a low total loop gain, can be made to respond to an external push or pull on the loop filter and change the static phase between in and out. It's touchy as all get out, and changing either the attempted phase offset or the frequency of the main loop makes it lose lock, but it can be made to work in some situations if you're really, really careful.

I found this by following the line of reasoning that says the error residual in a feedback circuit is always what drives the output to match the input, so I wondered what could make the error residual be as large as the input signals. the only was was with a forward gain that was low enough to need input offsets as large as the input signals themselves. And sure enough, when you dial back the loop gain to make it low enough, you can force the loop error residual to look like a static offset.

In the PLL setup, it seems to mess up the loop filtering if you change it very much, but maybe you could dink with the filter to get more immunity from this perturbance.

And so, in keeping with my practice of admitting mistakes. I do. JC, I salute you. There is part of this you're right about, and part that I had not pursued far enough.

I think there are big practical problems with inserting offsets in the PD from what I can see, and I believe that is why it was so hard for me to find this, but it's at least not impossible.  :icon_biggrin:

Kudos, JC. Good one.  :icon_biggrin:

Title: Re: [ ? ] SWAY-SHIFT
Post by: puretube on December 18, 2008, 01:34:48 PM
Quote from: R.G. on December 17, 2008, 01:00:26 PM
Quote from: puretube on December 17, 2008, 12:46:45 PM
The 2stage-shifter theory works perfect...
It absolutely does. The only thing wrong with that is that you must change the phase shift stage at the same time and by the same amount as you change frequency, or the phase shift of the two LFOs changes with settings of the frequency pot as well.

If Charlie's application is OK with adjusting the phase pot each time the frequency is changed, it is fine.

Since both the (base-)LFO and the SHIFTer are voltage controlled (single pot each), one could "servo"-assist the shifter,
by simply adding part of the Frequency-Control-Voltage to the Phase-Displacement-Control-Voltage
as an "error-voltage", and thus make up for the frequency-dependance of the

SHIFTER... :

(http://img.photobucket.com/albums/v442/lectronix/2008_dec/swayshift-xg.jpg)

as mentioned in reply#73 (http://www.diystompboxes.com/smfforum/index.php?topic=72676.msg590420#msg590420)

(_ :icon_wink: _) (http://img.photobucket.com/albums/v442/lectronix/2008_dec/SMALLSTONE_13700.jpg)



Aaahh - those were the days, when the rate of a tremolo was either 3-positions-switchable
or continuously variable, from 3Hz to 11Hz...  :icon_razz:
Title: Re: [ ? ] SWAY-SINE_360
Post by: slacker on December 18, 2008, 01:44:14 PM
Quote from: R.G. on December 17, 2008, 01:00:26 PM
Quote from: puretube on December 17, 2008, 12:46:45 PM
The 2stage-shifter theory works perfect...
It absolutely does. The only thing wrong with that is that you must change the phase shift stage at the same time and by the same amount as you change frequency, or the phase shift of the two LFOs changes with settings of the frequency pot as well.

If Charlie's application is OK with adjusting the phase pot each time the frequency is changed, it is fine.

Given that both the LFO and the phase shifter are voltage controlled shouldn't it be possible to have the CV for the LFO also adjust the phase shifter so that the phase relationship stays the same at different speeds. Maybe by adding some sort of variable offset to the voltage dialled in by the phase pot.
Probably end up with a CV generator that was bigger than the rest of the circuit though :)
Title: Re: [ ? ] SWAY-SHIFT
Post by: puretube on December 18, 2008, 01:47:52 PM
Quote from: slacker on December 18, 2008, 01:44:14 PM...
Given that both the LFO and the phase shifter are voltage controlled shouldn't it be possible to have the CV for the LFO also adjust the phase shifter so that the phase relationship stays the same at different speeds. Maybe by adding some sort of variable offset to the voltage dialled in by the phase pot.
Probably end up with a CV generator that was bigger than the rest of the circuit though :)

See reply#83...  :icon_smile: (http://www.diystompboxes.com/smfforum/index.php?topic=72676.msg590688#msg590688)
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: slacker on December 18, 2008, 01:56:16 PM
Doh, you'd posted that while I was asking the question, I looked at the schemo but didn't notice the writing.

How do you think that variable phase LFO would sound with your Modzky?
Title: Re: [ ? ] SineSine for Modzky
Post by: puretube on December 18, 2008, 03:40:25 PM
Quote from: slacker on December 18, 2008, 01:56:16 PM
Doh, you'd posted that while I was asking the question, I looked at the schemo but didn't notice the writing.
That`s what I figured - hence the smiley...  :icon_biggrin:

QuoteHow do you think that variable phase LFO would sound with your Modzky?

Since the MODZKY (http://www.diystompboxes.com/smfforum/index.php?topic=58718.msg458008#msg458008)
originally expected to be driven by a sinewave generator, it will not sound any different when used with this LFO.

The one thing that needs to be observed however, is how to control the "depth", since both phases (mod+ and mod-)
need to be attenuated simultaneously... *



...aahh: while writing this, it comes to mind, that you probably meant the fact that this LFO has 90 degrees phaseoffset
instead of the supposed 180 degrees in the original "Modzky" ?
ouff - either it will sound a little more (or less) "phasey", or less (or more) "throbby" - my last experiments about that 90°/180°configuration were > 9 years ago...
(or only use the 0° output, and invert it for getting 180°)
(or invert the 0° and the 90°, and drive 2 modulators for True Stereo...  :icon_wink:)

and all that "Modzky" stuff was on breadboard - maybe I can find it & test ?


*good application for the pending LM13700 "BALMOD"  :icon_question:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 19, 2008, 10:04:23 AM
Following on from Ian's comments about stepped LFOs, how about something along the lines of the sequenced LFO at Geo?

http://geofex.com/Article_Folders/LFOs/psuedorandom.htm#An Analog Sequenced LFO (http://geofex.com/Article_Folders/LFOs/psuedorandom.htm#An%20Analog%20Sequenced%20LFO)

Two 1-of-16 switches could be clocked.  One chip could have fixed resistors wired from V+ to each of the selected 16 pins.  A single resistor from in/out to ground would form a divider with the selected pin.  Resistor values could be chosen for a fixed-phase sinewave (calculations are covered in one of Owen Bishop's books, IIR).  The other switching chip would select one of 16 sliders sequentially for a second, 'graphic' LFO.  Although that's a hell of a lot of sliders, with appropriate filtering for smoothness you could pretty much get any phase shift within 360 degrees.  Not only that, but you could custom-shape the 2nd wave form to whatever you like.

If an up-down counter were used, you'd only need to deal with half a cycle at a time (graphically, that is) and would end up with a 32 step waveform.  Would that be smooth enough with filtering, RG? 

Apart from the sliders, the circuit has a relatively low parts count and would be very versatile.  Bleedin' hell, I might even build that myself!
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 19, 2008, 10:44:55 AM
Well, it will certainly work for the arbitrary-waveform case. Shaping the waveform by retouching the pots for a phase shift would be a PITA (for me at least) after the first few times, though.  In this case, I'd prefer the two-stage phase shifter. But then, if you do the arbitrary-waveform thing as the first waveform, the two-stage phaser gives you a phase shifted LFO on an arbitrary waveform.

The filtering may be easy enough. There are some switched-capacitor filters now that come in eight pin dips that are *eighth* order lowpasses with no extra parts except an external clock pulse at 100x the cutoff frequency. Put that just above the LFO's highest frequency and you probably get some pretty clean LFO stuff.

Give it a try!
Title: Re: [ ? ] Beat-LFO-phi
Post by: puretube on December 19, 2008, 01:13:00 PM
How about ye good ole analog beat mixing way:

(http://img.photobucket.com/albums/v442/lectronix/2008_dec/beatlfophi-xg.jpg)

or a la H.A. Norby ? (http://www.pat2pdf.org/patents/pat2758204.pdf)
(where "audio input" would be the basic LFO, and "oscillator" be any fixed freq. help-oscillator)?
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 19, 2008, 01:44:23 PM
Quote from: R.G. on December 19, 2008, 10:44:55 AMGive it a try!

I'm missing some of the parts, but I could cobble together some 1-of-8 switches to work as 1-of-16 switches.  Just need to use a little logic to get it to work (litterally and metaphorically!)  :icon_smile:

I like the idea of this.  Will do some serious work in the New Year, but should have some time to toy around with the basics over Xmas...
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 20, 2008, 09:44:27 AM
Hmm, posted earlier today in this thread and it's vanished without trace in the interim.

It was along the lines of RG's idea, using a 4060 with a 1-of-16 switch (4067).  The binary code from the 4060 is also sent to a 4008 binary adder and the other 4-bit input of the 4008 is wired to a 16 position binary rotary switch.  The result from the 4008 goes to another 4067.  This gives a 16 position phase-shift from the pot (max shift 360 degrees).

The 4067s could either 'sample' the same dividers/sliders (if variable waveform required) to give the same waveform phase-shifted, or both chips could have their own set of resistors from the 16 pins to V+ and a resistor to ground from each of the chips' in/out pins.  This would allow for different waveforms (and consume less current).  That would be my preferred choice as what suits tremolo doesn't necessarily suit a filter.

Have yet to use a 4008, but I think what I've outlined would work.  Same for the binary rotary switch, but they seem freely available on eBay.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 20, 2008, 09:56:09 AM
Hey, gez, that's downright clever. Modulo 16 addition does amount to a one-of-sixteen phase shift if you make waves from the outputs.

Back at the sine-square-comparator-PLL dealey, I was not happy with the fact that the phase shift on the resulting waveform was nonlinear, a result of the slope of a sine wave being nonlinear. Then I did another forehead slap. If you use a waveform generator which generates sine and triangle at the same time, then you use the sine output for the LFO, but use the triangle for the comparator/lock business. This lets the knob for phase angle be perfectly linear.

The XR2206 is not found everywhere, so I came up with an opamps-only solution. It's reasonable, if a bit touchy, to make a shaper to make sine waves out of triangle waves, so it's possible to make a stock integrator/Schmitt trigger LFO produce a reasonable approximation to a sine ( a clipper, dual JFET, etc) and so this isn't all that impossible.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 20, 2008, 11:59:35 AM
I finally got around to looking up some waveform generator chips. The MAX038 is clearly the winner.

It puts out simultaneous sine, square, and triangle waves, and contains on the chip a sync output for synching to external waveforms, as well as a phase detector for making up a phase locked loop.

So two MAX038's, a comparator, and either a CD4046 or two 555s give the desired result: a sine LFO with a second sine LFO which can be moved back and forth in phase from the first LFO by a single knob.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 20, 2008, 03:39:57 PM
... only, Maxim has now discontinued the MAX038, I find.  :icon_frown:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: TELEFUNKON on December 21, 2008, 09:20:19 AM
http://pdfserv.maxim-ic.com/en/ej/EJ19.pdf
pages 7, 8
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 21, 2008, 10:13:11 AM
I was hoping that the reference would tell me that it wasn't discontinued. No luck.

I did some experimentation with some simulation runs that convince me that you can shape a triangle wave into a sine wave with lowish (about 3%) distortion with only a couple of clipping diodes if you're willing to trimpot-adjust the size of the triangle going in.

That would let you use the voltage controlled LFO design at GEO as the basis of both "sine" generators and also let you have a voltage controlled oscillator to run in the PLL at a cost of one dual opamp per sine generator, two sine trimpots, and a PLL chip for the phase detector.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 22, 2008, 12:12:48 PM
Well, I messed around with a 16-step sine today and was pleasantly surprised.  Only had a solitary 4051 "1-of-8" switch, but managed to make the wave 16 step by using the 4th bit of a 4516 counter (in conjunction with an inverter) to flip the resistors' rails during the zero-crossing (the first 8 steps are set up to cover the first 180 degrees of a sine only).  End result looked like a 'barbedwire sine' (probably due to capacitance - wave was higher frequency than needed in order to see it properly on the scope), but with a simple cap to ground it smoothed right out (albeit with a reduction in amplitude).

Although I have some switched cap chips, I'm not running the clock anywhere near high enough to make them effective (need to check the data sheet, so don't quote me on that).  Going to rig up half a LM13700 as the clock and use the other half as an 'integrator follower' to do the filtering chores.

With the right parts (chips) to lower the parts count, this could be a nasty circuit!  :icon_twisted:
Title: Re: [ ? ] Tube Func
Post by: puretube on December 22, 2008, 12:44:25 PM
Why not roll our own Function Generator (http://www.pat2pdf.org/patents/pat2748278.pdf), and implement a voltage control into the linked schemos  :icon_razz: for replacing the max038  :icon_question:

fun aside, the XR2206 can be had for a reasonable price (RoHS!)... (even  NTE seems to offer a clone).


or go Trigonometric... (http://pdf1.alldatasheet.co.kr/datasheet-pdf/view/48104/AD/AD639.html)       ...
   AD639-like? (http://www.elektronik.ropla.eu/pdf/stock/adi/temp/pdf/2353.pdf) - hmm-unobtainable, too  :icon_mad:



Funnily enough, my distributor offers the AD9833 (http://pdf1.alldatasheet.co.kr/datasheet-pdf/view/48600/AD/AD9833.html)
as a "functional replacement" for the MAX038... at least it is smaller, and has less pins  :icon_razz:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 22, 2008, 01:14:58 PM
Yeah, that's what I was saying.

See http://geofex.com/FX_images/ramp-lfo.pdf (http://geofex.com/FX_images/ramp-lfo.pdf), first circuit. The pots, switch, and first opamp are for the ramp up/down stuff. From the output pin of the first opamp on is a triangle/square voltage controlled oscillator with vastly more range than an LFO needs. Since the triangle has fixed positive and negative peaks, implementing a sine shaper with under 5% distortion is only a matter of scaling so that a pair of clipping diodes rounds off the peaks.

It doesn't have anything like the super performance, accuracy, and other features of the waveform chips, but it does give you a square for locking and a triangle for making the variable-phase marker, as well as a shaped-sine output which is fixed in phase with the triangle. Two of those (two dual opamps) a comparator, and a CD4046 should do it.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: puretube on December 22, 2008, 01:33:58 PM
R.G.: tried to find info on a VCLFO on geofex like you mentioned yesterday,
but couldn`t find the: "search GEO" on the left hand side in the "regular features, anymore...


btw, my 2-OTA "sine-sine_90" (http://img.photobucket.com/albums/v442/lectronix/2008_dec/sinsin-1k.jpg) or "simpquad" (http://img.photobucket.com/albums/v442/lectronix/2008_dec/simpquad-1k.jpg) offers no tri, square, or other
"harsher" signals at any point (except maybe the "trough zero" points, which actually are "through half supply-voltage"),
than a soft-clipped (=rounded) sine at pin3...  - seems to be some kind of analog equilibrian pendulum...  :icon_smile:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: moosapotamus on December 22, 2008, 08:44:18 PM
This thread is making my head spin. :icon_biggrin:

I've only had snippets of time to try to keep up since recovering from the massive ice storm that knocked out our power for about six days (some folks in our area still don't have power restored - going on two weeks for them). Actually, we are still kind of recovering. Picked up some of our pets today that my brother in-law was keeping safe for us. We've had below freezing temperatures almost every night. Pile on all the holiday stuff and I barely have time to go poop. :icon_eek:

Anyway... you guys have posted so much cool stuff to try out. I need a three week vacation. :icon_cool:

gez - the stepped lfo thing sounds really cool!
puretube - really want to try your ideas out, too. thanks for posting the schemes. :icon_cool:
jc - your stuff always blows me away... even when I can't completely get my entire head around it. anxious to see what you've been describing.

Thanks!
~ Charlie
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on December 23, 2008, 11:03:12 PM
There's nothing new under the sun. I found an article from Elektor 1997 showing a CD4046 used for its phase detector and an XR2206 used for its sine/tri/square output to generate a sine or triangle from an arbitrary rectangle wave.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: TELEFUNKON on December 25, 2008, 06:39:27 AM
Quote from: R.G. on December 15, 2008, 07:26:14 PM
Quote from: puretube on December 15, 2008, 06:34:59 PM
Note however, that unlike the more "usual"  3stage hi-pass or lo-pass phaseshiftoscillators, which need a gain of ~27 in the loop
(can`t remember the gain needed for 4 stages...), the "45er`s" loop gain is merely slightly higher than 2 
Yes, that's par for circuits which buffer between the RC phase shift stages. I remember seeing a circuit in one of TI's analog app notes using four opamp buffered RC stages and the necessary gain was microscopic.

It seems that each stage is operating at a "gain" of about one over the fourth root of two, about  0.84.
Quote
BTW.: in the other "usual" 3- or 4-stage phaseshiftoscillators and phaseshifters per se,
I prefer the lo-pass configuration because of its inherit smoothing capability in combination with AGC,
noise rejection, and forgivingness cc. being overdriven at its hottests spots...
(if it weren`t for the neccessity of floating (series-) variable resistors... 
Yep that is nice.


Here is what a certain Mr. Bode had to say about cascaded allpassfilter versus cascaded lowpassfilter (quadrature) phaseshiftoscillators:
M.S.O. (http://www.pat2pdf.org/patents/pat4145670.pdf)
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: TELEFUNKON on December 25, 2008, 06:40:05 AM
Quote from: Paul Perry (Frostwave) on December 07, 2008, 05:44:52 AM
Isn't there some way to manipulate two triangle waves to give a phase varying triangle?
If so, this could then go through a triangle to sine converter & there you have it.

Here is a sawtooth version: B. Hutchins (http://www.aes.org/e-lib/browse.cfm?elib=3873)
also see Elektor 10/1982 (http://www.doepfer.de/History/Elektor_dent_de_scie_module.pdf)
and ETI 1/1983
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: Paul Perry (Frostwave) on December 25, 2008, 06:45:33 AM
Thanks Telefunkon! "Une belle affaire" indeed :icon_wink:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 27, 2008, 01:56:49 PM
Hope your Xmas wasn't ruined, Charlie!

Found a little time today to do a bit more work on this.  The OTA tracking filter I cobbled together worked beautifully and I got a really nice sine over a wide range of frequencies.  Don't have the chips to do the phase shift, though, and won't until next month...but it's feasible.  I'll mess around with some switched cap filters I have, as that will probably take the parts count down...will have to do some data-sheet reading.  As with all 'simple' ideas, they end up more complicated than anticipated as you work through to a final design.  It will be low current consumption, though - IIR those wave shaper chips are real hogs, although RG's idea does sound simpler than mine.  All swings and roundabouts...
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on December 27, 2008, 02:07:10 PM
Quote from: gez on December 27, 2008, 01:56:49 PMIIR those wave shaper chips are real hogs

Just checked the data sheet of the MAX038: 80mA - 100mA per chip!  :icon_eek:

Plus split-supply required?
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on January 03, 2009, 11:58:37 AM
(http://i465.photobucket.com/albums/rr14/Longfuse123/SineShift.jpg)

Got the parts through and, as you can see, it works.  Only the first 8 settings of the rotary pot are shown above, but the phase shift continues for the full 360 degrees (16 positions in total).  No filtering shown, hence the stepped nature of the waves.  No points for the camera work, either...

So far the parts count is 1 cap, a handful of resistors, 5 eight-pin CMOS chips, one pot and a specialist rotary switch.  I did a little trick to make 4051 chips 16 step.  They're cheaper than 1-of-16 multiplexers and I saved a little board space in the process.

I have some switched-cap chips in my parts bin somewhere.  Not sure if they'll fit the bill.  Filtering could be done otherwise, using an LM13700 (at the expense of final amplitude).  The 4060 would have to be voltage-controlled, though.  Should be easy enough: wire the inverters of the 4060 as a Schmitt and wire it to a dual op-amp.

Is it worth it, though? (simple on paper, but the end result is quite a complex circuit).  All depends on whatever everyone else had in mind, I suppose...
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on January 03, 2009, 01:50:59 PM
Nice work Gez.

I've always liked stepped-approximation sine techniques.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on January 03, 2009, 04:56:03 PM
The story so far:

(http://i465.photobucket.com/albums/rr14/Longfuse123/Stepper001.jpg)

Apologies for the quality of the sketch.

Outputs would most likely need to be buffered (suitable op-amp followers) to be of any use.

4V peak-to-peak with a 9V supply.  Parts count would be higher still to end up with smooth sine-waves.  In its favour, current consumption is low.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on January 04, 2009, 10:58:41 AM
(http://i465.photobucket.com/albums/rr14/Longfuse123/PhasedSines.jpg)

(http://i465.photobucket.com/albums/rr14/Longfuse123/SmoothedSine.jpg)

MF10 did the trick.  The frequency is too slow to be dual-scoped, hence the weird second image, but hopfully you can see the phase-shift.

Theoretically, gain can be increased by reducing in value the 20Ks to pins 4 and 17 of the MF10: anything down to 10K.  Might cause clipping with a 9V supply, though, so I kept things to 2V peak-to-peak.

Data sheet didn't have any info on the input bias current of the MF10's input amp.  Might be possible to sidestep the op-amp followers and stick in high value resistors (IM input resistors).  Shouldn't cause too much distortion, and would do away with a chip.  Also isn't clear whether the 10Ks from 2-4 and 17-19 are necessary.  When I could be bothered I'll pull them and see what happens.

Waveform is smooth, although it has a 'thickened'/'serrated' look to it.  The data sheet said this would happen.  IIR, Penfold uses a small value cap to smooth this out.  Probably not necessary (good enough for our purposes).

Clock bleedthrough might be a bit of a problem...a PCB designer's nightmare?

Although a relatively simple circuit the parts count is mainly chips, which is a pain.  Phased sines are not something that can be done easily in the analogue domain (it seems).  The outputs are amplitude stable, though, and the circuit has reasonably low current consumption (unfortunately the MF10 can hog around 8mA or so, IIR).

The schematic should be checked against data sheets/CMOS cookbook.  Can't guarantee I didn't make a mistake when drawing it.

Well that's my entry.  Do I win a cream cake?
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on January 04, 2009, 11:12:12 AM
Yep, the serrations will be with you from any digital/switched cap filter. They would be there in a uC version too, to a degree depending on the output strategy. However, for an LFO, it is likely that they would be completely inaudible.

Good work. It looks nice. Yes, cream cake for you!  :icon_biggrin:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: slacker on January 04, 2009, 11:40:22 AM
That's really clever Gez, I like the way you flip the supply to the voltage dividers to get 16 steps, very cool.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on January 04, 2009, 12:12:37 PM
Why thank you Sirs!

I'm wondering if it would be easy to rig up a decoder chip and display to the binary switch, so that you can see which position is selected.  I've got some recent articles from EPE that go into using low-current displays.  Might have to do some digging.  As for a decoder chip...ideas? (off the top of your heads).
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on January 18, 2009, 09:05:18 AM
Update

Did some empirical testing of the MF10.  With a 9V supply it can deliver an output signal of around 6.5V peak-to-peak before clipping occurs, so setting gain for unity presents no problems.  The resistors to pins 4 & 17 form the input resistors of two separate inverting op-amps.  The other, 10K resistors provide feedback to these inputs.  By making all resistors equal value, unity gain (4V peak-to-peak in this case) is achieved. 

No info is given in the data sheet as to how much bias current the inputs of the op-amps require, but I made all resistors 1M and it functioned fine.  This meant that I was able to pull the op-amp buffers feeding the MF10.  Although there may have been some distortion of the stepped signal due to loading (I didn't check), there was no discernable distortion of the final sine waves.  In short, if you up the value of all resistors associated with the MF10 to 1M, you can pull the ICL7621 op-amp, thereby simplifying the circuit a little. 
Title: [TUBE] / [HOW] to de-ripple digi-sines...
Post by: puretube on February 06, 2009, 01:23:37 PM
Gez:
here`s (http://www.pat2pdf.org/patents/pat2488297.pdf) a nice one (from 64 years ago...  :icon_eek: )
to get rid of the steps in a non-filter way  :icon_smile:
(US pat.#2488297).
(can be adapted to those newfangled semiconductors, though...)
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on February 06, 2009, 02:37:39 PM
 :icon_eek:

I think I'll stick with the filter! :icon_smile:
Title: Re: [TUBE] / [HOW] to de-ripple digi-sines...
Post by: puretube on February 20, 2009, 06:28:26 PM
Quote from: puretube on February 06, 2009, 01:23:37 PM
Gez:
here`s (http://www.pat2pdf.org/patents/pat2488297.pdf) a nice one (from 64 years ago...  :icon_eek: )
to get rid of the steps in a non-filter way  :icon_smile:
(US pat.#2488297).
(can be adapted to those newfangled semiconductors, though...)

Of course, those newfangled adaptions would only work for triangle-waves (like in the vintage circuit...),
but not for sine-wave construction  :icon_redface: .
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: puretube on February 20, 2009, 07:17:42 PM
Quote from: gez on January 04, 2009, 10:58:41 AM
(http://i465.photobucket.com/albums/rr14/Longfuse123/PhasedSines.jpg)

(http://i465.photobucket.com/albums/rr14/Longfuse123/SmoothedSine.jpg)

MF10 did the trick.  The frequency is too slow to be dual-scoped, hence the weird second image, but hopfully you can see the phase-shift.

Theoretically, gain can be increased by reducing in value the 20Ks to pins 4 and 17 of the MF10: anything down to 10K.  Might cause clipping with a 9V supply, though, so I kept things to 2V peak-to-peak.

Data sheet didn't have any info on the input bias current of the MF10's input amp.  Might be possible to sidestep the op-amp followers and stick in high value resistors (IM input resistors).  Shouldn't cause too much distortion, and would do away with a chip.  Also isn't clear whether the 10Ks from 2-4 and 17-19 are necessary.  When I could be bothered I'll pull them and see what happens.

Waveform is smooth, although it has a 'thickened'/'serrated' look to it.  The data sheet said this would happen.  IIR, Penfold uses a small value cap to smooth this out.  Probably not necessary (good enough for our purposes).

Clock bleedthrough might be a bit of a problem...a PCB designer's nightmare?

Although a relatively simple circuit the parts count is mainly chips, which is a pain.  Phased sines are not something that can be done easily in the analogue domain (it seems).  The outputs are amplitude stable, though, and the circuit has reasonably low current consumption (unfortunately the MF10 can hog around 8mA or so, IIR).

The schematic should be checked against data sheets/CMOS cookbook.  Can't guarantee I didn't make a mistake when drawing it.

Well that's my entry.  Do I win a cream cake?


Let`s share the cream, or the cake...

why trying to create a sinewave, and then chase it through an MF10 (or an LTC1060 - pin compatible...) ?

Create a square, divide it by 100, chase it through half of an MF10 (Low-Pass/clocked by the original square): out comes the sine...

(BTW.: filtering those staircase-ripples is frequency-dependant, again - and it does bother me - Rock`n`Roll or not...)

To get rid of the staircase-steps:
create a square, divide it by 1000, chase it through half an MF10 (Low-Pass/clocked by 1/10th of the frequency of the original square),
chase it through another half of an MF10 (Low-Pass/clocked by the original square): voila, off are the freaks!
[this way, the frequency influencing cap becomes a reasonable size for LFO purposes, too...  :icon_wink:]

To get phase-shifted sinewaves:
create a square, divide it by 100, and divide that one by 2 and call it phase one;
take the 1/100th in another "channel", and use a comparator/opamp to (voltage-controlled...)PWM
the pulses;
divide these by 2 to create 50% duty cycle and call it phase two;
chase both phases through the 2 halves of an MF10 (Low-Pass/clocked by the original square) :
out come the phase-shiftable sines (voltage-controllable)...

To get a quadrature (90°) pair:
create a suare, divide it by 100, chase it through the well-known 4013-to quadrature-flipflop-circuit,
chase 2  90° seperated outputs from the 4013 through half an MF10 each (Low-Pass/clocked by 1/4th of the original square)...

Or:
create a square, divide it by 100, chase it through half an MF10 (you guessed it: Low-Pass/clocked by the original square)
call it "phase one",
take it and run it through the other half of the MF10 (again you guessed it: Low-Pass/clocked by the original square),
and call it "phase two" : nicely separated by 90 degrees. but: about 1/3 of the other phase`s volume  :icon_redface:


Coming up next week: schemos for nothing, and vids for free! (no vero, though...)  :icon_razz:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: Nasse on February 20, 2009, 08:20:42 PM
I mail ordered two small dc motors with gearbox and I think the speed range could be useful. Of course those are toys. While I was thinkin if I had computer sequencer and audio editor and multiple output soundcard and just make ssuitable signals and rectify those and take the cable(s) to the pedal.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: StephenGiles on February 21, 2009, 07:04:05 AM
 ;)
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on February 21, 2009, 09:10:05 AM
Quote from: puretube on February 20, 2009, 07:17:42 PM
why trying to create a sinewave, and then chase it through an MF10 (or an LTC1060 - pin compatible...) ?

Create a square, divide it by 100, chase it through half of an MF10 (Low-Pass/clocked by the original square): out comes the sine...

(BTW.: filtering those staircase-ripples is frequency-dependant, again - and it does bother me - Rock`n`Roll or not...)

To get rid of the staircase-steps:
create a square, divide it by 1000, chase it through half an MF10 (Low-Pass/clocked by 1/10th of the frequency of the original square),
chase it through another half of an MF10 (Low-Pass/clocked by the original square): voila, off are the freaks!
[this way, the frequency influencing cap becomes a reasonable size for LFO purposes, too...  :icon_wink:]


I have an old EPE schematic that basically shapes a square into a sine by just using the MF10.  The MF10's centre frequency is the clock frequency divided by 50/100 (depends on which selection you choose).  So, the designer divided the clock by 50 (using some weird TL stuff I'd never heard of) and then fed that through the MF10's band-pass (running from clock).  Huge range, reasonably simple.  Would be even simpler just dividing down close to the 50 mark, then using the low-pass output (and probably taking a dip in amplitude...although it would be stable across the range of frequencies).

Although I had considered the above, I used the method outlined in this thread as I wanted the option of creating other wave forms (mainly 'inverted hyper-triangle') or one wave form against another.  Plus, it seemed a reasonably 'simple' way of creating the phase shift.  There are many ways of doing the shift, but when you start mapping out a working circuit it all starts to get complicated and there's not much in it.

Incidentally, creating quadrature with squares is very simple.  Feed your clock to one input of an XOR gate, divide clock by 2 and feed that to the other input of the gate.  The XOR's output is of the same frequency as, and 90 degrees out-of-phase from, the divided down clock.  Original square has to have perfect symmetry (usually divided down itself). 
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on February 21, 2009, 10:05:26 AM
Forgot to mention, the MF10 in the EPE design was wired as a 4-pole filter (both halves used). 
Title: SinoStep ; SinoQuad
Post by: puretube on February 23, 2009, 08:28:42 AM
Didn`t wanna rain on yer parade, Gez...  :icon_redface:

Anyway, to explain what I wrote before, though the following is not continuously variable, yet... :

Quote from: puretube on February 20, 2009, 07:17:42 PM
Create a square, divide it by 100, chase it through half of an MF10 (Low-Pass/clocked by the original square): out comes the sine...

(BTW.: filtering those staircase-ripples is frequency-dependant, again - and it does bother me - Rock`n`Roll or not...)

Coming up next week: schemos for nothing, and vids for free! (no vero, though...)  :icon_razz:


(http://img.photobucket.com/albums/v442/lectronix/2009/Sinostep1sml.jpg)

second half of the dual switched-capacitor-filter-block IC4 unused...
(the first half is wired as LowPass for f/100, in mode 1a as noted in the National datasheet page9, fig.8 )

SinoStep_1 (http://img.photobucket.com/albums/v442/lectronix/2009/Sinostep1k.jpg)

(http://img.photobucket.com/albums/v442/lectronix/2009/SinoStep1scope.jpg)






Quote from: puretube on February 20, 2009, 07:17:42 PM

To get rid of the staircase-steps:
create a square, divide it by 1000, chase it through half an MF10 (Low-Pass/clocked by 1/10th of the frequency of the original square),
chase it through another half of an MF10 (Low-Pass/clocked by the original square): voila, off are the freaks!
[this way, the frequency influencing cap becomes a reasonable size for LFO purposes, too...  :icon_wink:]

Coming up next week: schemos for nothing, and vids for free! (no vero, though...)  :icon_razz:

(http://img.photobucket.com/albums/v442/lectronix/2009/Sinostep2sml.jpg)

SinoStep_2 (http://img.photobucket.com/albums/v442/lectronix/2009/Sinostep2k.jpg)

(http://img.photobucket.com/albums/v442/lectronix/2009/SinoStep2scope.jpg)






Quote from: puretube on February 20, 2009, 07:17:42 PM
To get a quadrature (90°) pair:
create a suare, divide it by 100, chase it through the well-known 4013-to quadrature-flipflop-circuit,
chase 2  90° seperated outputs from the 4013 through half an MF10 each (Low-Pass/clocked by 1/4th of the original square)...

Coming up next week: schemos for nothing, and vids for free! (no vero, though...)  :icon_razz:

well, err, the original square itself needs to be divided by 4 too , additionally (by IC5), to match the 100:1 frequency criterium, of course...  :icon_redface:

(http://img.photobucket.com/albums/v442/lectronix/2009/SinoQuad3sml.jpg)

the first divide-by-ten counter (IC2) above can be omitted, so the master clock goes into pin 14 of IC3 directly...

SinoQuad_3 (http://img.photobucket.com/albums/v442/lectronix/2009/SinoQuad3k.jpg)

(http://img.photobucket.com/albums/v442/lectronix/2009/SinoQuad3scope.jpg)







Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on February 23, 2009, 08:39:43 AM
Quote from: puretube on February 23, 2009, 08:28:42 AM
Didn`t wanna rain on yer parade, Gez...  :icon_redface:

No problem Ton.  I haven't had a chance to look through what you've done, but it looks like a more elegant solution.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: puretube on February 23, 2009, 09:03:52 AM
The "variable phaseshift"-experiment at the moment is in the stadium of having one fixed sine,
plus a +/- 90° shiftable sine of exactly half the frequency of the fixed one...  :icon_rolleyes:

:icon_smile:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on February 23, 2009, 09:11:04 AM
Ton, what on earth is your Avatar?? 

It's not some voodoo charm is it?  Mojo man!  :icon_lol:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: puretube on February 23, 2009, 09:56:05 AM
Quote from: gez on February 23, 2009, 09:11:04 AM
Ton, what on earth is your Avatar?? 

It's not some voodoo charm is it?  Mojo man!  :icon_lol:

You know the original P-FUNK-sign? :
(http://img.photobucket.com/albums/v442/lectronix/2009/gcfunksya0.jpg)(http://img.photobucket.com/albums/v442/lectronix/2009/funkcard0.jpg)
(nowadays often abused by the metalrockerz... )

That`s the way  BOOTSY & me (http://img.photobucket.com/albums/v442/lectronix/2009/boot_2.jpg)

greet whenever we meet... :

(http://img.photobucket.com/albums/v442/lectronix/2009/booton0.jpg)

making the P-FUNK-sign, and touching each other`s fingertips!

Pure P-Funk Energy Transfer...

(that pic in the avatar - see enlarged in above link - was shot when Bootsy saw me in the crowd right in front of the stage
at a concert in Nuremberg ~ a decade ago... yes, that naked arm is mine, there).
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on February 23, 2009, 11:46:18 AM
Ah, I can make out your arm now.  And, if I get close to the monitor, I can make out a figure.

It looked like some bird's foot wrapped in/with something!
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: puretube on February 24, 2009, 11:42:28 AM
Quote from: puretube on February 23, 2009, 09:03:52 AM
The "variable phaseshift"-experiment at the moment is in the stadium of having one fixed sine,
plus a +/- 90° shiftable sine of exactly half the frequency of the fixed one...  :icon_rolleyes:

:icon_smile:

Looks like I have stuck there where Gez had the same quirk in reply#49... (http://www.diystompboxes.com/smfforum/index.php?topic=72676.msg589538#msg589538)
Quote from: gez on December 13, 2008, 10:29:41 AM
... I just realised that once the flip-flops divide down both squares, there's only a Max shift of 180 degrees.  I had one of those 'hang on!' moments when I was remembering the scope patterns.  A few sketches of the waveforms on the back of some scrap paper confirms this. 
In short, AGHHHHHHH!

... I thought of the following:
derive a PWMed (shiftable) rectangular wave [Fpwm] from the original square [Fo], which (similar to Gez`s 7556 oscillator) will be an almost 360° shiftable cousin of [Fo], however of varying duty-cycle
(that`s why Gez put flipflops after the oscillator`s outputs: to get symmetrical squares...);

now double the rates of each output, to get 2[Fpwm] and 2[Fo] (frequency-doubling),
and chase those two new pulsetrains through half a 4013 flipflop each,
to get a pair of symmetrical (50/50 duty-cycle) squares of identical original frequency [Fo]
with a shiftable phase-offset of ~0°...360° for [Fpwm].

These 2 signals to be filtered by an MF10 to obtain sinewaves...

The neccessary frequency-doubling could be done by RC-differentiating and triggering on the rising edge,
and do the same on the falling edge of [Fo], and combining (adding) the derived pulses,
so you get a pulsetrain of 2[Fo];
Same procedure for [Fpwm], to get the 2[Fpwm] pulsetrain.




BTW: to put out nice linear triangles out of the MF10 remains a little mysterious to me...  :icon_redface:

OTOH, there`s yet another way to put out a nice quadrature pair of sines from squares out of one half of the filterchip...
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on February 24, 2009, 12:10:29 PM
Ton.  Perhaps you could use a circuit similar to the one I posted earlier in this thread (the square-wave PWM one).  The PWM output could be sent to a 4046 PLL with all your divider stuff in the phase-loop.  At the bottom of the divider chain is your phased square, 50:50 duty cycle.  At the top is the clock for the MF10. 

The non-phased square could either be sent to the other half of the MF10 via another PLL for 'squarification' (50:50 duty cycle).  That would give you the best part of 360 degree phase shift.  If you divided down the non-phased square, you'd only have 180 degree phase shift but your two sines are of different frequency.

Or, you could use something along the lines of what I last posted (schematic wise), but change the resistor values to get a different waveform.  You could do an 8 step sine against a 16 step to get your different frequencies.  I've sketched out a circuit for a 16 step inverted hyper-triangle (the connoisseur's choice for filters!  :icon_razz:), but have been too lazy to breadboard it.  Could either use a 1-of16 multiplexer, or chain two 1-of-8 chips together.

Not sure if the above is of any use to you.  Just some thoughts off the top of my head (am probably missing something).
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on February 24, 2009, 12:18:07 PM
PS  Nice quad schematic of yours (finally got some time last night to go through it).  The use of 4017s was inspired.  Also, I'd never before come across that wiring of flip-flops to get quadrature.  I still need to work through it with the data sheet to find out what's going on, but it looks much simpler than what I've been doing all these years.  Thanks!
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: puretube on February 24, 2009, 12:25:03 PM
Gez: a totally different approach to hypertriangling occurred to me 2 weeks ago while brainstorming/scoping stuff cc.  my "new project"...
will show soon, when I find that darned envelope-backside I sketched the schemo on... :icon_wink:

and: yes, I`m aware of the R/2R ladder stuff and the up/down counting/multiplexing thing,
and the graphic oscillator approach,
but rather keep my thing "analogue" (though there`ll always be a comparator in there...  :icon_smile:).

[edit]:
Quotehyper-sine (the connoisseur's choice for filters!  ),

and flangerz...  :icon_wink:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: puretube on February 24, 2009, 12:30:34 PM
Quote from: gez on February 24, 2009, 12:18:07 PM
PS  Nice quad schematic of yours (finally got some time last night to go through it).  The use of 4017s was inspired.  Also, I'd never before come across that wiring of flip-flops to get quadrature.  I still need to work through it with the data sheet to find out what's going on, but it looks much simpler than what I've been doing all these years.  Thanks!

Not neccessarily "mine"...  :icon_wink:
(recently found the patent, where that circuitwiring that has been all over Elektor for decades, (as well as in the synth- and the radio-scene...)
had it`s origin  :icon_eek:).
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on February 24, 2009, 12:31:10 PM
Just edited my post.  That should have been inverted hyper-triangle.  :icon_redface:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: puretube on February 24, 2009, 12:37:49 PM
Quote from: gez on February 24, 2009, 12:31:10 PM
Just edited my post.  That should have been inverted hyper-triangle.  :icon_redface:

...didn`t even notice that slip... the intention was clear to those interested in the art...  :icon_biggrin:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: gez on February 24, 2009, 12:38:55 PM
I tip my cigar at you sir (and raise my brandy glass)!  :icon_lol:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: puretube on February 25, 2009, 06:57:23 AM
 :icon_redface:... from sketching the pulses on paper, it seems that my idea in reply#131 (http://www.diystompboxes.com/smfforum/index.php?topic=72676.msg605737#msg605737) is another no-go...  :icon_rolleyes:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: moosapotamus on February 25, 2009, 10:30:45 PM
Well, even tho most of this thread is over my head, just gotta say... "way cool!" 8)

~ Charlie
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: Cliff Schecht on February 26, 2009, 01:01:08 AM
I probably missed the post, but did anybody mention all-pass filters? You don't get the 360 degrees of freedom that some may want, but you can get nice quadrature phasing without amplitude variations.

Or could you not combine two cascaded single-pole all-pass filters (using a dual-ganged pot, of course) with an inverter to get your 360 degrees?
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: TELEFUNKON on February 26, 2009, 06:59:48 AM
Quote from: Cliff Schecht on February 26, 2009, 01:01:08 AM
I probably missed the post, but did anybody mention all-pass filters? You don't get the 360 degrees of freedom that some may want, but you can get nice quadrature phasing without amplitude variations.

Or could you not combine two cascaded single-pole all-pass filters (using a dual-ganged pot, of course) with an inverter to get your 360 degrees?

see reply #41.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: puretube on February 28, 2009, 01:35:33 PM
Quote from: puretube on February 25, 2009, 06:57:23 AM
:icon_redface:... from sketching the pulses on paper, it seems that my idea in reply#131 (http://www.diystompboxes.com/smfforum/index.php?topic=72676.msg605737#msg605737) is another no-go...  :icon_rolleyes:

...However it lead to a new waveform: the "Crownwave", which now is an essential part of my brandnew
"MindButcher" Fundamental-Centrifuge...   :icon_eek: :icon_wink:  :icon_biggrin:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: Cliff Schecht on February 28, 2009, 03:34:36 PM
Quote from: TELEFUNKON on February 26, 2009, 06:59:48 AM
Quote from: Cliff Schecht on February 26, 2009, 01:01:08 AM
I probably missed the post, but did anybody mention all-pass filters? You don't get the 360 degrees of freedom that some may want, but you can get nice quadrature phasing without amplitude variations.

Or could you not combine two cascaded single-pole all-pass filters (using a dual-ganged pot, of course) with an inverter to get your 360 degrees?

see reply #41.
I was mistaken here, a single all-pass filter and signal inverter will give you your 360 degrees of freedom. If the RC section is designed in a high-pass configuration with the cutoff low enough (i.e. a 2.2 uF cap and 1 meg resistor), you can get your 180 degrees phase shift at low low frequencies (LFO frequencies at least). With good matching of the inverter resistors, you can get a good amplitude response as well (H(w)=1 throughout range of interest).
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on February 28, 2009, 04:19:30 PM
All pass sections are good for specific phase shifts at one frequency, or for a variable phase shift as frequency changes. H(w) is indeed 1 at all frequencies, but phase changes slowly from not-quite-ever 0 degrees to not-quite-ever 180 degrees as frequency changes. For an LFO, you could indeed get almost 0-360 by cascading two allpasses, but if you turn the frequency pot on the master LFO, the relative phase changes too, unless you make the allpasses also track the change in LFO frequency. Ugly. Tracking. Nasty.

You could use allpasses overlapped in a chain to give a main and a quadrature output over a reasonable range of frequencies. The so-called dome or Hilbert filter does this OK if you take the time to tweak it in. From quadrature, you can get any phase shift between main and slave by combining the proper amount of I and Q. But that's a bagfull of opamps, tweaking, accuracy, etc. eetch.

Title: Re: [ ? ] Continuously variable phase LFO?
Post by: Cliff Schecht on March 01, 2009, 02:32:47 PM
Quote from: R.G. on February 28, 2009, 04:19:30 PM
All pass sections are good for specific phase shifts at one frequency, or for a variable phase shift as frequency changes. H(w) is indeed 1 at all frequencies, but phase changes slowly from not-quite-ever 0 degrees to not-quite-ever 180 degrees as frequency changes. For an LFO, you could indeed get almost 0-360 by cascading two allpasses, but if you turn the frequency pot on the master LFO, the relative phase changes too, unless you make the allpasses also track the change in LFO frequency. Ugly. Tracking. Nasty.

You could use allpasses overlapped in a chain to give a main and a quadrature output over a reasonable range of frequencies. The so-called dome or Hilbert filter does this OK if you take the time to tweak it in. From quadrature, you can get any phase shift between main and slave by combining the proper amount of I and Q. But that's a bagfull of opamps, tweaking, accuracy, etc. eetch.



I guess it all depends on the application. I am using a variable phase LFO for a tremolo and for the small range of frequencies that I'm trying to offset, the all-pass filter works well. If you're looking for phase-tracking accuracy and need the gain to be consistent throughout a decent range then yeah, an all-pass filter can be a nightmare. For something like a trem, however, where small amplitude variations really aren't noticeable (I'm sure you know that the human ear is much more sensitive to relative pitch) and relative phase shift isn't ultra-important (it just needs to be offset-able for the stereo effect), they work well.
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on March 01, 2009, 03:23:13 PM
Different horses for different courses.  :icon_biggrin:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: puretube on October 06, 2009, 06:59:48 PM
Creating a square-clock, shifting it from 0° to 180°, double the frequency (or quadruple it and flipflop it down to symmetrical "double"),
and use this as a generator-clock for an MF-10 should do the 360°-trick, shouldn`t it ?  :icon_question:
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: R.G. on October 06, 2009, 10:47:24 PM
?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
?? ?? ?? ?? ?? Are we still chasing this one?  ?? ?? ?? ?? ?? ??
? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
Title: Re: [ ? ] Continuously variable phase LFO?
Post by: johngreene on May 05, 2010, 12:39:38 PM
I haven't been on here very much over the past few years and I see I've missed some discussions that I would have found interesting! I developed something similar to a few things here using an Attiny MCU. It has the following features:
1. 3 LFO outputs, 120 degrees apart.
2. Phase adjustment on one of the LFOs to vary it 0 - 360 degrees to LFO 1.
3. Offset adjustment.
4. Amplitude adjustment.
5. Frequency adjustment (.07Hz - 20Hz).
6. Symmetry adjustment
7. Ramp function (rate and width) for ramping between two speeds.

Switchable functions:
1. Tap Tempo input
2. Wave Selection (triangle, square, sine)
3. Range select (allows 3 'presets' for different 'modes', currently not used).

And it is this big:
(http://i26.photobucket.com/albums/c126/johng001/LFO_3.gif)
Title: (OT) : [ ! ] Continuously variable lopsidation/hyperbolication LFO?
Post by: puretube on May 07, 2013, 09:16:39 AM
While working on an improved stereo nano-wiggle-wobble solidstate pedal
loosely based on the"Modzky" (http://www.diystompboxes.com/smfforum/index.php?topic=58718.msg458008#msg458008) (as mentioned in reply#87 (http://www.diystompboxes.com/smfforum/index.php?topic=72676.msg590733#msg590733)),
using a derivate of a low frequency voltage-controlled quadrature oscillator (VCQO)
like the one mentioned in reply#70 (http://www.diystompboxes.com/smfforum/index.php?topic=72676.msg590372#msg590372), or the one mentioned in reply#68 (http://www.diystompboxes.com/smfforum/index.php?topic=72676.msg590275#msg590275),

a nice noticeable observation on the scope-screen was made when trying to mod
the modulation a bit more lively...




An extra pot (P2) + diode (D2) and an inserted diode (D1) offers 2 great new opportunities:

1.) vary the waveform continuously from pure sine-wave via lopsided-sine ("seasick") to saw-tooth
at one output - and - (simultaneously ! )
2.) vary the waveform continuously from pure sine-wave via "soft-hyperbolic" to "fullwave-rectified-sine-like"
at the other output...

The (quadrature-output-) voltage-controlled voltage-controlled quadrature LFO (VCVCQO)
is made of above mentioned few components added to one of the Quad-LFOs/VCOs from further above like this:

(http://i661.photobucket.com/albums/uu335/puretube/VCVCQO1105.jpg)


Swapping P2 from one output to the other, swaps the ouputted (?) waveforms from one to the other
on either outputs...


(the theoretical construction of both waveforms can easily be computed by those
practised in the art of trigonometry and/or modulation-technique,
or by studying the works of Fourier, Bode, Sunstein, and numerous others -
a  practical simple implementation like above might inspire other DIY "breadboard-jockeyz"
to new beginnings...)