Inverting current LFOs (e.g Ross, Small Stone)

Started by MrStab, November 09, 2015, 09:32:01 PM

Previous topic - Next topic

MrStab

Hi guys,

Prepare for some totally unscientific dribble. feel free to point out the flaws, and feel even free-er to try it out.

Ages ago in a thread, RG suggested i use a NPN current mirror driving a PNP current mirror in order to drive multiple LM13700s in a phaser. this i eventually understood, and executed successfully. it was a simple current mirror without resistors and consists of Q1-Q4 in my diagram below.

Now, I know it's pretty simple to invert voltage-output integrator LFOs, but I really like the sounds the hyper-triangular Ross LFO can make, so i dug through the forum & beyond to find leads on how to invert it for an alternating stereo effect. All I could find was another suggestion from RG, where he suggested driving a PNP differential amplifier to invert the current. iirc it was purely-hypothetical.

Whilst i understood the principle, i just couldn't get my head around that suggestion, i couldn't get it working in a simulator, and i didn't wanna cheat by just asking. so i took that same principle of unbalancing a Wheatstone bridge, messed around for a while and eventually made progress.



i don't know exactly what current the Ross LFO puts out at 9V, because my PSU puts out 8.4V for some reason, but let's assume it's 460uA. 460uA is the peak of the NON-inverted waveform, so it's the baseline for the inverted one.

9V/0.00046A = 19,565.22 ohms
let's make that a 20k resistor. adjust as needed. this is R2. R1 is the 10k resistor already on the output of the LFO.

As the current mirror drives Q5, there'll be less resistance through Q5, and more current from R2 will sink that way, and less through other nodes connected to R2.

I had this working with a LED, but i couldn't get much of a wobble on my DMM without it. Also, the LED forward-voltage (or possibly Q5's Vbe) kept making the sweep "latch" at a point. So i kept trying various things, resistors on the LED etc., until i read up some "for dummies" stuff on diodes and current. I realised a diode generally was what i needed, and i knew that Schottky diodes have a low forward-voltage, so i removed all the other resistors and used that in place of the LED.

bingo. it seems to work great. i have no scope, so it's possibly still problematic, but not to my ears or multimeter. as the non-inverted current never actually dips to zero on the rest of the current mirror, the sweep doesn't hit any thresholds, and seems smooth and uninterrupted.

i thought of regulating it by scaling it all down to 5V or something, but i figured the LM13700 source LFO would sag with the PSU anyway. i don't doubt it's somewhat imprecise, but it's more than precise enough.

try it out!
Recovered guitar player.
Electronics manufacturer.

PRR

> the hyper-triangular Ross LFO

You know the drill. *Link to the plan!* I can't remember where I left the car, and the intimate details of hundreds of pedals don't always spring to mind. You are working on it. You probably (should) have those references handy.

True, "hypertriangular" is so queer that even Google can find hints. But the LFO alone makes little sense. It must be loaded by something. The OTA bias resistors? A Depth pot? I'm not going to hit every Google-hit trying to suss that out.

Anyway, and due respect to R.G., it *seems* easier than you are making it. The Darlington outputs a Voltage which is converted to OTA Current via not-shown resistors?

So take the voltage wave through an inverter.

The inverter "center" must be the "middle" of the hy-tri wave. This is not clearly defined in my 3rd-grade math book. What you are doing may also need to be a bit off-center to sound "balanced". So bias the inverter from a trimmer.

http://oi64.tinypic.com/24orhhy.jpg

Since the wave goes very close to Zero, we need an inverter which will swing way low. The TL07x series don't do well for that. The LM324 has other faults, but WILL pull in and out down below 0.1V, which is fine for our purpose. I would never (again) run audio through a '324, but people do. The cost is too low to while about "unused sections". If space matters, there is a dual in 8DIP.

Trim and feedback resistors and trim bypass cap are approximate. The two "1Meg" should be nominally equal, and 5% may be required (1% is not, but WTH). Trim pot 10K to 1Meg. Cap several uFd for 10K trimmer, can be somewhat smaller for hi-R trimmer.
  • SUPPORTER

PRR

After typing/drawing all that, I think your plan is folly.

As shown, stock output is mostly off, inverted output is mostly ON. As stereo, it will be lop-sided.

I think what you want to do is shift the wave a half-cycle later in time.

For a variable rate LFO, this may be difficult. Especially with that implementation.

A particular awkwardness is that the implementation is very clever. It has the OTA bias/drive requirements factored-in. The low tip is at 0.8V, which touches the OTA's 0.6V/1.2V input node voltage.

The most direct may be complementary triangle waves, each through a wave-shaper to blunt the top, then re-biased to the OTA's needs.
  • SUPPORTER

Keppy

Nice job getting this working! I like the use of current mirrors. I have a weird soft spot for them, since I'm always dreaming up cool uses for OTAs (which are based on current mirrors) that turn out not to work. I'm weird.

But, since we all love to tinker, and discrete transistors aren't theoretically ideal for current mirrors, plus all the stuff Paul said...

Quote from: PRR on November 10, 2015, 12:42:08 AM
I think what you want to do is shift the wave a half-cycle later in time.



There is a square wave output at location 1, and if you invert that, you can feed a copy of U4A (and associated circuitry) to get an identical wave with a half-cycle offset.

Quote from: PRR on November 10, 2015, 12:42:08 AM
A particular awkwardness is that the implementation is very clever. It has the OTA bias/drive requirements factored-in. The low tip is at 0.8V, which touches the OTA's 0.6V/1.2V input node voltage.

True. So let's copy it to preserve the output limits of the square wave section. Duplicate the entire scheme with these changes:

1) Cross-connect the inputs of the new U4B to the inputs of the old U4B, (+) to (-) and vice versa. This should cause the new square wave section to exhibit the opposite behavior of the old one, provided you also:

2) In the copy only, disconnect U4B inputs from the R27/R28/R19/C11 junction and from the output emitter feedback. This removes two feedback paths to ensure the new square wave circuitry follows the old without oscillating on its own, while preserving the same loads on the OTA current outputs.

3) Use a dual gang rate pot.

This seems like a reasonable, 1-chip solution that's faithful to the current design, assuming I haven't missed anything crucial. That's a bad assumption (it's 2:30am), so don't believe a word of it until someone else says it might work. :)
"Electrons go where I tell them to go." - wavley

MrStab

well, i did say feel free to point out the flaws :( lol

i think my wording of the thread title, particularly the "e.g" part, removed all suggestion that this was specifically for those two phasers, and too much was too implied. so apologies for lack of references.

as i'm driving 4 LM13700s (assuming the Iabc's on each chip are matched), i was already going down the current mirror route, so perhaps painted myself into a corner.

FWIW, it doesn't actually sound weird on headphones or through small practice amps, but picturing it panning all the way from stage-left to right, i can imagine that the more bulbous shape of the inverted waveform might not be ideal. thanks for making me aware of that, Paul. so, to use the correct lexicon, i basically want the sharp, pointy bit on either side. that seems more sensible.

i happen to be using the later (?) LM13700 version of the LFO (http://home-wrecker.com/ross_phaser_black.png), which just uses an extra buffer stage and has the timing cap going to ground, but is effectively the same. i also happen to have two of these in the design, for independent and sync-able channels a' la the Phase 99, so it might not be too much trouble to implement your suggestion, Keppy.

I more or less understand what you're suggesting, but wouldn't mismatched tracking on a dual-gang rate pot risk putting one channel out of sync with the other? dual reverse-log pots have caused me much heartache lately, with a once-trusted Chinese seller suddenly pulling a bait-and-switch on me, but i'm sure i could find some.

failing all this, i may just switch to a boring old triangle. it's good enough for MXR and the Phase 45 i've had on my pedalboard for 3 years!

thanks guys, should've asked here sooner.
Recovered guitar player.
Electronics manufacturer.

amptramp

The LM566 can also be made into a decent LFO and it has an interesting oscillator design:  current charges a capacitor and double the current discharges it with the charging current still there, so you get a 50% duty cycle.  If you are saving space, it comes in an 8-pin DIP.

Keppy

Quote from: MrStab on November 10, 2015, 12:17:34 PM
well, i did say feel free to point out the flaws :( lol
Not my intent. I learned something from your post, since I'd been under the impression that discrete current mirrors weren't practical due to the difficulty of matching transistors. You've demonstrated that they're workable in at least some cases, which I think is pretty cool. I've been a fan of this LFO for a long time, and responded mostly as an excuse to try and solve the stereo problem another way.

Plus, this is guitar effects. If it works and you like it, it's not flawed for your purposes. :)

Quote
as i'm driving 4 LM13700s (assuming the Iabc's on each chip are matched), i was already going down the current mirror route, so perhaps painted myself into a corner.
The output of the original oscillator is a low impedance voltage source and is quite capable of driving 4 OTAs. I don't think I understand you right.

Quotewouldn't mismatched tracking on a dual-gang rate pot risk putting one channel out of sync with the other?
Not really but kinda. The added circuitry isn't really an oscillator, just a wave shaper triggered by the square wave the original oscillator produces. So, they CAN'T get out of sync. However, differences in pots (or resistors, or OTAs...) will produce differences in the range of the second output. They will switch directions at the same time, but still might not sound identical. I suspect this won't be an issue, since the differences won't be allowed to compound over multiple cycles, but I can't say that for sure without building it.

Quotefailing all this, i may just switch to a boring old triangle. it's good enough for MXR and the Phase 45 i've had on my pedalboard for 3 years!
Why? You said you had it sounding good. Don't let our relentless urge to tinker talk you out of something you're happy with. I'd love to hear a soundclip, actually, since the "flaw" of an inverted hypertriangle might be a cool sound.
"Electrons go where I tell them to go." - wavley

PRR

#7
Thanks, Keppy.

> 1-chip solution

I see 3/2 of LM13600? (Plus any VCAs.) Still a low chip-count for this much mangle.

> discrete current mirrors weren't practical due to the difficulty of matching transistors.

For small-range current swing, just stuff a few mV of resistor up their emitters.

This may work near-enuff for 10:1 range of current, probably too sloppy at 100:1 range. Since our trem depth may want to be at-least 10:1, it is a concern.

Stereo make it easier. When one side goes loud, we won't so-much notice that the other side is not as soft as it might be.

> capable of driving 4 OTAs. I don't think I understand you right.

His link to the Home-wrecker site image shows a full implementation. Aside from itself, the LFO drives four OTAs which seem to be wired as phase-shifters. It does this with one 10K and all Iabc pins strapped. This depends on the Vbe at all Iabc pins being matched, which is not for-sure. I'd lean to four 39K resistors. It may still match bad at near-zero gain, but with ~~4V swing it will match to <1% (or resistor tol) at higher levels even with worst-mix '13600s.

Total signal-string Iabc is about 0.4mA (4.6V-0.6V/10K). This resistor is the missing load on the Darlinton which I was confused about. There's <1mA back to the LFO, 1.4mA total. As the buffer is rated for 20mA, no strain. If each signal OTA is biased only to 0.1mA, you could add more than a hundred signal OTAs. Part-sourcing becomes the issue, not LFO loading.

EDIT- '3080 Iabc pin sits at 0.6V. LM13600 Iabc pin sits at 1.2V. So some numbers above, and practical trims, will differ.
  • SUPPORTER

MrStab

before i get stuck into this, i need to go back through some old threads to figure out why current mirrors even came into the equation. bear with me
Recovered guitar player.
Electronics manufacturer.

PRR

I was thinking (uh-oh).... there must be a simple transfer function which is similar to the "Hyper Triangle".

Transistor input is exponential voltage to current. When driven with a triangle, the positive peak gives much more current than the negative peak. When triangle is right-size, the current curve is a lot like the HyperTriangle.

In the OTA, the gain is proportional to the current.

And the OTA *has* a transistor-diode control port.

While we are told to feed "Iabc pin" with a current (gives precise linear control), if we drive it with a voltage source from 500mV to 650mV (double for '13600), the gain response is very much like the desired effect.

The problem is that we must feed the Iabc pin with a low impedance, high current available; but if we hit it with more than 2mA the chip blows-up (boo-hoo).

It can be done. A million DBX and THAT VCAs take voltage drive across transistor junctions. Though it occurs to me that their junctions float between current sources, and it may be impossible to over-blow them up?

Anyway, here is a sim showing the idea. Stuff in dotted box is just a ramp generator (I don't have native triangle or ramp sources), shimmed to rise 500mV-650mV in reasonable time. The rest is just an OTA, simplified (lacks rail-rail output). The Q6Q7 frill was needed to mask Early Effect leak-through in simulation.

http://oi66.tinypic.com/t87ok0.jpg

Obviously this is the first half-cycle of the LFO wave; the second retraces the same path backward.

I think it works and much like your expectation.

Stereo just needs the inverted triangle. A Depth pot should come after the triwave source and before the direct and inverted outputs.

Both triangles must be attenuated to 150mV peak-peak and biased to 575mV average.

All this mV stuff has to be fairly trimmable for chip parameters, and quite low impedance (under 500r). Any opampery involved should work at higher levels and the output resistor-dividered down 10:1 or 20:1, else hiss will modulate the Iabc voltage and the gain.
  • SUPPORTER

Keppy

Quote from: PRR on November 10, 2015, 06:43:33 PM
> 1-chip solution

I see 3/2 of LM13600? (Plus any VCAs.)
Sorry, I meant one additional chip to what was already required for the mono oscillator.
"Electrons go where I tell them to go." - wavley

MrStab

Here's the post where current mirrors first came up - i think it was because i planned to use a depth pot in series with the LFO output: http://www.diystompboxes.com/smfforum/index.php?topic=110754.msg1017118#msg1017118. Currently i'm using a 20k pot, but i plan to reduce that to reduce that to 10k (a max of 20k total coming off the LFO, then).

Quote from: Keppy on November 10, 2015, 02:39:10 PM
The added circuitry isn't really an oscillator, just a wave shaper triggered by the square wave the original oscillator produces. So, they CAN'T get out of sync

ah okay, i had a feeling. else you probably wouldn't have mentioned it.

Quote from: PRR on November 10, 2015, 06:43:33 PM
His link to the Home-wrecker site image shows a full implementation.

i'm not using that exact circuit, but one that'd involve 8 OTAs (over 4 ICs) when in stereo mode, 4 on each side. the only pic i could find of that variant which showed only the LFO had a width mod by Mark Hammer, so i decided not to post that to avoid confusion. i can clean up my current schematic and post if needed, but as far as "mono mode" goes, it's no different from the Ross phaser in the OTA department (bar different cap values in the phase-shift stages).

Quote from: PRR on November 10, 2015, 09:14:39 PM
I was thinking (uh-oh).... there must be a simple transfer function which is similar to the "Hyper Triangle".

Transistor input is exponential voltage to current. When driven with a triangle, the positive peak gives much more current than the negative peak. When triangle is right-size, the current curve is a lot like the HyperTriangle.
Quote
http://oi66.tinypic.com/t87ok0.jpg

i've read in a coupla places that exploiting this non-linearity on a triangle wave can produce the desired results. thanks for taking the time to check all that out. I'm reminded of this: http://www.birthofasynth.com/Scott_Stites/Images/multiphase_tech/th_sine_shape.jpg, which someone has adapted into this: http://i.imgur.com/OVFTOYq.png, but i get the feeling your proposal may be more effective as it's not a repurposed sine-shaper. at one point i had considered it, but didn't wanna just use it without understanding it.

i think i'm with you guys in principle, though i've a lot to soak up as i re-tread this thread. i'll be weighing this up with board space, which is fairly limited at the moment, but removing the current LM13700 LFOs would free up a lot. i do like the hy-tri waveform, and want to pursue it as much as reasonably possible, but there is a limit to that. i'll do what i can to try and learn more about the opamp triangle -> differential amp approach, and maybe build one at some point this week to see how it... wait for it... "pans" out.

if nothing else, i'm learning a lot about OTA nuances here. i think after the 30th reading, i should be good. maybe this thread will produce (or identify) a definitive solution to this issue, seems there is some demand.

cheers! as ever, i find it hard to keep track of all the input, so apologies for any misinterpretation or overlooked stuff.
Recovered guitar player.
Electronics manufacturer.

MrStab

#12
been messing around with a different approach in my head and in a definitely-inaccurate online n00b simulator (really need to get LiveSpice or LTSpice learned...), and i have this rough idea, but it's probably more hyper-sawtooth at best. it plays on the cheap & dirty sine-from-clipping-diodes method.

split LFO between inverted & non-inverted buffers, each goes to one diode with cathode to ground, each is inverted again. here's a link to the definitely-inaccurate simulator (can you tell i'm pre-empting here?  :icon_biggrin:) with the circuit, Java needed:

http://falstad.com/circuit/circuitjs.html?cct=$+1+0.000005+10.20027730826997+50+5+50%0AR+112+192+32+192+0+3+40+4.5+4.5+0+0.5%0Ad+288+176+288+240+1+0.6%0Ag+288+240+288+272+0%0Aw+336+176+288+176+0%0Aw+336+176+384+176+0%0Ar+208+176+288+176+0+1%0Ac+432+176+384+176+0+0.00001+-0.5997754672169149%0Aa+112+176+208+176+0+9+0+1000000%0Aw+112+160+112+112+0%0Aw+112+112+208+112+0%0Aw+208+112+208+176+0%0Aw+112+192+112+304+0%0Aa+480+192+576+192+0+9+0+1000000%0Ar+432+176+480+176+0+1000%0Aw+480+176+480+144+0%0Ar+480+144+576+144+0+1000%0Aw+576+144+576+192+0%0Ag+480+208+480+240+0%0Aw+352+320+384+320+0%0Ad+352+320+352+368+1+0.6%0Ag+352+368+352+400+0%0Ar+272+320+352+320+0+1%0Aw+576+192+608+192+0%0AR+160+336+160+368+0+0+40+4.5+0+0+0.5%0Aw+576+336+608+336+0%0Ag+480+352+480+384+0%0Aw+576+288+576+336+0%0Ar+480+288+576+288+0+1000%0Aw+480+320+480+288+0%0Ar+432+320+480+320+0+1000%0Aa+480+336+576+336+0+9+0+1000000%0Ac+432+320+384+320+0+0.00001+-0.5788928179120809%0Aa+160+320+256+320+0+9+0+1000000%0Ar+112+304+160+304+0+1000%0Aw+160+304+160+272+0%0Ar+160+272+256+272+0+1000%0Aw+256+272+256+320+0%0Aw+256+320+272+320+0%0Ao+22+64+0+551+1.093625362391506+9.765625e-105+0+-1%0Ao+24+64+0+551+1.093625362391506+9.765625e-105+0+-1%0Ao+0+64+0+550+10+0.003125+1+-1%0A

there's no doubt a bunch of stuff that can be trimmed out or improved upon, but maybe an overall concept can be gleamed from it
Recovered guitar player.
Electronics manufacturer.

MrStab

by the way, if a hypercube is a cube with 4 spatial dimensions, wouldn't a hypertriangle just be a pyramid? lol
Recovered guitar player.
Electronics manufacturer.

MrStab

#14
deriving from this http://i.imgur.com/OVFTOYq.png, how bout something like this:



again, this isn't a big-boy simulator and is probably way off. maybe someone can examine the feasibility.

doesn't look exceptionally hypertriangular to me*, but maybe that could be tweaked. at first i started out with loads of opamps doing convoluted inverting, then i tried to reduce parts by swapping the bottom half's transistors for PNPs and swapping the supply polarity (which i figured made sense if handling an inverse wave), as well as swapping the differential inputs after that. amplitude also needs balancing.

if it did work, then the whole LFO could fit on a quad chip with 4 BJTs

*EDIT: Changing that 390R resistor to 680R produces something more like this:



EDIT 2: cutting out one set of the 51k and 2.2k resistors, and just using a common pair, naturally increases swing. didn't notice that. i also realised i probably need to scale this thing down to 9V from 18V, but it seems fine as-is at 9V single-supply.

http://falstad.com/circuit/circuitjs.html?cct=$+1+0.000005+10.20027730826997+50+5+50%0AR+272+160+192+160+0+3+40+4.5+4.5+0+0.5%0Aw+400+160+352+160+0%0Ar+272+160+352+160+0+51000%0Ag+496+240+496+256+0%0Ar+272+160+272+400+0+51000%0Aw+704+368+768+368+0%0At+400+160+448+160+0+1+-2.4320778829935197+0.5354537704609355+100%0Ar+448+176+496+176+0+390%0Ar+496+176+496+240+0+18000%0At+544+160+496+160+0+1+-2.564518334052642+0.48122009252517106+100%0Aa+576+128+656+128+0+9+0+1000000%0Ar+544+160+544+240+0+2200%0AR+544+240+544+272+0+0+40+4.5+0+0+0.5%0Ar+448+128+448+80+0+10000%0Ar+496+128+496+80+0+10000%0Aw+448+80+496+80+0%0AR+496+80+496+48+0+0+40+9+0+0+0.5%0Aw+576+144+496+144+0%0Aw+496+128+496+144+0%0Aw+448+128+448+144+0%0Aw+448+128+576+128+0%0Aw+576+128+576+112+0%0Ar+576+80+656+80+0+10000%0Aw+656+80+656+128+0%0Aw+576+80+576+112+0%0Ar+576+144+576+208+0+15000%0Ar+400+160+400+224+0+2200%0AR+400+224+400+256+0+0+40+4.5+0+0+0.5%0AR+400+464+400+496+0+0+40+4.5+0+0+0.5%0Ar+400+400+400+464+0+2200%0Ar+576+304+576+352+0+15000%0Aw+576+384+576+416+0%0Aw+656+368+656+416+0%0Ar+576+416+656+416+0+10000%0Aw+576+368+576+352+0%0Aw+448+368+576+368+0%0Aw+448+368+448+384+0%0Aw+496+368+496+384+0%0Aw+576+384+496+384+0%0AR+496+480+496+512+0+0+40+9+0+0+0.5%0Aw+448+320+496+320+0%0Ar+496+368+496+320+0+10000%0Ar+448+368+448+320+0+10000%0AR+544+480+544+512+0+0+40+4.5+0+0+0.5%0Ar+544+400+544+480+0+2200%0Ar+496+416+496+480+0+18000%0Ar+448+416+496+416+0+390%0Ag+496+320+496+304+0%0At+400+400+448+400+1+-1+2.8293945262864884+-0.4058977029676747+100%0At+544+400+496+400+1+-1+2.698066923313302+-0.5376495850081637+100%0AR+576+304+624+304+0+0+40+4.5+0+0+0.5%0Aw+720+128+768+128+0%0Aw+400+400+272+400+0%0AR+576+208+576+240+0+0+40+4.5+0+0+0.5%0Aa+576+368+656+368+0+15+-15+1000000%0Ac+656+128+720+128+0+0.00001+1.8093013315007038%0Ac+656+368+704+368+0+0.00001+0%0Ao+51+32+0+551+10+0.000048828125+0+-1%0Ao+5+32+0+551+9.353610478917778+9.765625e-55+0+-1%0A
Recovered guitar player.
Electronics manufacturer.

PRR

> LFO between inverted & non-inverted buffers, each goes to one diode with cathode to ground, each is inverted again.

Yes, that will work, and I probably hid a hint somewhere.

Lot of inversions and re-scaling.

Driving the Iabc with a triangle *voltage* does essentially the same thing. There is the big problem of not exceeding 2mA, which needs both thought and extreme breadboard caution. Another thing is that it isn't ideal for any OTHER waveform, which is limiting.

  • SUPPORTER

MrStab

#16
i'm a repeat victim of the Iabc current limit, through repeated negligence. in any case, i have this on the breadboard and it SEEMS to work! using the Boss CE-2 (bog-standard opamp) LFO for a triangle wave, and non-ideal values based on the fact i recently ran out of loads of common values at once, but i just wanted to see if it'd actually work overall:




hyper-triangular, peak a half-cycle apart. i'm using BC549s for the NPNs and 2N3906 for the PNPs, so HFE is way off (though i tried to match each pair). more tweaking needed.
Recovered guitar player.
Electronics manufacturer.

MrStab

#17
from my first attempt at LTSpice:



U1 & U2 are the triangle LFO. the rest is the hypertriangle circuit. yellow wave is NPNs, blue is PNPs. the flatness of the trough and sharpness of peak can be affected by increasing the 43k and 680R resistors (43k is probably too low, but lower values = increased swing). i had to change R21 on U4's + input (R21) to get the offset to the middle of the supply (i expected it to just widen the swing). also, the PNP-side trough (blue) isn't flat in the pic, but it does display a very slight asymmetry, a kinda wobble. most likely negligible but maybe fixable.
Recovered guitar player.
Electronics manufacturer.