Single op-amp LFO - I can't figure out what I'm missing

Started by Mark Hammer, August 11, 2021, 05:17:20 PM

Previous topic - Next topic

Mark Hammer

The other day, I suggested an idea for medium-slow amplitude modulation of bandpass filter outputs by multiple unsynced LFOs ( https://www.diystompboxes.com/smfforum/index.php?topic=127669.0 ).  In an effort to keep the chip-count low, I thought I'd use the single op-amp triangle LFO circuit normally employed in the MXR Phase 90, as shown here:


I went with low-current LM358s, a regular choice for tick-free LFOs.  I ended up having to use 10uf electros (I built up two different speed LFOs on a single LM358) instead of the 15uf shown, but that should not have had a substantive impact on what I saw.  When I built and scoped it, two things became apparent.  First, measuring at the junction of R22 and C10 did not give me a triangle wave.  It was really more squarish than anything else.

Second, if I measured the DC voltage at that junction, using a 9V supply, it measured 2.48V.  The AC voltage read zero.  Straddling an LED between that junction and ground gave me a steady luminance, and not the wobbly light I was hoping to use with LDRs.

At first, I thought maybe the problem was that the Phase 90 uses a 5.1V zener to set the reference voltage, and not the simple resistive divider I had initially tried on the breadboard.  But implementing the exact same Vref used in the P90 did not improve matters.

So, what am I missing, here?
- is the waveform more dependent on using 15uf than I thought?
- is there something about the Vref that I'm simply not seeing in the P90 diagram?
- does there need to be something else between where I did measure and where I *ought* to have measured?

I really don't want this to turn into a forest of dual op-amps.

R.G.

Several things come to mind.

First, the 15uF cap is an "integrator" in this circuit. It kind of integrates the pulse up/down from the opamp into an up/down slope. Since it's an R-C integrator, it's a roll up/down kind of thing, not the constant slope that a real opamp integrator would give you. That works OK-ish as long as the pulse waveform it's integrating is much shorter between up and down than the RC time constant of the "integrator". If the pulse time is longer than the "integrator" time constant, the cap has time to get past the linear-ish ramp and into the rolling over part of its time response.

The trick in doing that is to make the hysteresis on the opamp used as a comparator be small compared to the ramp up/down voltage on the integrating cap. The smaller the hysteresis on the opamp, the shorter the part of the capacitor ramp time that gets used, and the more like a linear ramp triangle wave it resembles. The bigger the ratio of R21 to R19 is, the smaller the hysteresis, and the more linear the waveform at the cap is - but the smaller the peak-to-peak is on the triangle wave.

The integrating cap is constantly loaded with 150k from R24 so probe loading should not be a big issue.

Try dinking with the ratio of R21 to R19 and see if that helps. The bigger the ratio, the more linear the triangle and the smaller the peak to peak.

I'm just kibitzing from the schematic. Could be something else. I'll go stick the circuit into a simulator and see what happens.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Rob Strand

#2
Two things stand-out:
- The probe loading RG mentioned.  If you have a x10 probe setting use that.
   That will have the most effect when the 470k pot is set to 470k
- R36 has no series resistor, normally in the range 4k7 to 10k,  without that
   the output waveform could be a bit square.
   That will be an issue when the 470k pot is set to 0R

Check the output swing on opamp output.  If the swing is a low voltage in the positive direction try placing a 10k resistor from the opamp output to +V.  If the swing is swing is a high voltage in the negative direction the 10k to ground.    Honestly try both you will soon see if the there's an effect.

For least issues you want the average DC level on the opamp output to be roughly Vref.   If your Vref is too high it could be causing issues.   Maybe force it vcc/2 just to get it working.

C7 and R24 mess with the waveform a little.  Usually it's not an issue but for debugging you could temporarily knock C7 down to 1n.

My money is on tweaking Vref then tweaking the pull-up or pull-down resistor on the opamp output.

I'm pretty sure you can get it to work.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

amz-fx

This type of simple lfo is never going to make a great looking triangle wave, but some versions are better than others (with a little tweaking). It is always going to look a bit squashed.

Try modifying it like this to see if it improves:



Sometimes a wave that looks not-so-great on a scope will sound quite good in practice.  :)

regards, Jack

Rob Strand

#4
QuoteThis type of simple lfo is never going to make a great looking triangle wave,
Even in theory it's not triangular but is exponential,
[Ignore squarewave.]



If the opamp output swing is too narrow or the Schmitt-trigger levels are too wide the cap struggles to charge up and the exponential waveform can start to level-off at the top and bottom, and go flat-ish.
[For that matter oscilloscope loading can do something similar.]

Only an example,




The part R24 and C7 round off the waveform but normally only for high speed settings.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.


Rob Strand

Quoteregards, Jack
Often the opamp spice models don't model the saturation voltages and output stage behaviour correctly.  So the output waveforms can look different (in many cases similar).    It's this detail which drives people to put pull-up ad pull-down resistors on some LM358/LM324 designs.


Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

ElectricDruid

This design is what I call a "shark's fin" oscillator, rather than a triangle wave oscillator. Sure, it's close to a linear triangle in certain circumstances, but it doesn't take much messing with it for it to turn fully shark's fin or worse.

amz-fx

I did a quick breadboard of the circuit that I posted recently. Here is the exact circuit used:



Output from a TL072 op amp:


Output from the LM358 op amp:


No changes were made between the scope captures except to change the op amp. Everything else remained exactly the same. The hi-Z input of the 072 allows it to run slower with the same components (about half the speed of the 358 and with higher output voltage).

Best regards, Jack

Mark Hammer

Thanks so much, Jack.  I've been a bit distracted with some inconveniences related to health (nothing major, so no worries) and other interruptions, but I hope to build this some time within the next 48hrs.

anotherjim

The 358 output might be smaller as its operating swing is offset to 0v and further away from 9v (typically 0v to 6v). You could mess with the 220k bias resistors to fix the offset, but you want simple. A TL062 would be a good low-power alternative.
Don't forget a scope on AC coupling will slew the displayed wave at low frequencies. Use DC coupling to see what it's really like.
Hope things settle down for you Mark.

Mark Hammer

Thanks for the good wishes, Jim.  Turns out I have to live with gallstones.  That'll make it hard to know if I'm simply making "guitar face", or experiencing a sudden bolt of pain.

Built the circuit Jack offered, and it appears to work as shown.  Still can't get brighter and darker get it to make an LED, but on the scope it appears to behave as predicted in the sim.

amz-fx

Connect the LED through a series diode or two to the output of the LM358 (with a series resistor too). The diodes (1N4148) can drop the low side voltage enough to let it turn off when the output goes low.

regards, Jack

ps: Had my gall bladder removed years ago, and I wish that I had not. Live with it if you can tolerate the pain. :)

PRR

To continue the off-topic drift: I had atypical(*) pain there, and with only a quickie ultrasound they booked me for surgery, took 99% of my gall out, I felt great and have little(**) lasting effect. It is of course possible I was so stopped-up that nothing changed when it came out.

(*) I am told many people don't stop screaming until emergency surgery. I had very bad nights and months of feeling fine.

(**) I have had a couple MUCH milder "attacks". Maybe he missed a piece? Maybe it is 'phantom limb', my body misses the nerve trunk that was cut off.
  • SUPPORTER

Mark Hammer

I'm okay with pain.  I've lived through 9 kidney stone attacks, had a simulated amputation and accompanying phantom limb pain, had my chest cut open and reattached with staples, been a pedestrian hit by cars a few times, had my Tylenol 4 run out when I had all 4 wisdom teeth removed, and hit the sidewalk with my face.  This gallstone stuff gets in the way of sound sleep, but pain-wise it's low on the scale.  Fortunately, if I sit bolt upright, it doesn't bug me, so at least it doesn't interfere with soldering.

Jiminvan

Hi everyone: Reviving an old thread here, but I am having problems with the Phase 90 LFO, both in real life and simulating it in CircuitLab.  Here's the circuit sim (if I'm embedding it right):



The first problem is I can't get the simulation to oscillate at all. Just pure DC voltages at the relevant nodes. I'm using the Time Domain simulation in CircuitLab and have checked all the usual sources of error.

The real life problem, on the build I'm doing, is that the output on the JFETs (i.e. Vgs) is tiny. I have a good square wave on the opamp output, at about 7.5V, and a decent triangle wave at the integrator cap (where R2/C3 join) albeit maybe smaller than expected (approx 1.8Vp-p), but less than 100mV p-p for Vgs. That's not going to do anything! I've got the same result with and without the JFETs in the circuit.

Appreciate any thoughts!

Thanks,
Jim


amz-fx

Do you have a 1M resistor between the "Out" and the Vbias trimmer?

regards, Jack

Jiminvan

Thanks for your reply Jack. 

Yes the bias comes from a 200k trimmer and connects to the LFO out through a 1M resistor.

Appreciate the help!

Jim

PRR

  • SUPPORTER

Jiminvan

Thanks for your help PRR.

See updated image of the simulated circuit.

Vout = 3.8Vdc

V where R2 and C3 join ("LFOtriangle") = 5.13Vdc

V on the opamp output ("LROsquare") = 5.22Vdc

No hint of any oscillation in the sim output from the Time Domain Simulation in CircuitLab.

Jim