DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: PBE6 on December 12, 2014, 10:16:32 AM

Title: Oscillation problem
Post by: PBE6 on December 12, 2014, 10:16:32 AM
I put together a perfboard prototype of an inverting opamp distortion circuit last night, and it works fine..except for that viciously annoying whistle it keeps emitting :(

Here's the schematic:

(http://tapatalk.imageshack.com/v2/14/12/12/8b3aa3177aa08da6aafdfa7e40a33cae.jpg)

(All the "Vref"'s in the schematic are the same in real life, CircuitLab is just picky about duplicate names.)

It looked fine on the scope, but when I tried playing through it I got guitar plus a piercing whistle that changed pitch depending on the GAIN, SAT and SCOOP settings. The TONE and VOL controls didn't seem to affect the pitch.

Does anyone see anything obvious in the schematic itself that could be causing the whistle?
Title: Re: Oscillation problem
Post by: anotherjim on December 12, 2014, 10:42:02 AM
When on scope, did you have a jack cable in the output? Just wondering if it might be due to capacitive load on the last op-amp - because I don't see anything to make it unstable, unless it's a weak Vref (not on scheme). Try 100R after last amp if so.
Title: Oscillation problem
Post by: PBE6 on December 12, 2014, 11:14:06 AM
Thanks, I will try adding that resistor to the last opamp's output.

When I was checking it on the scope I didn't have anything connected to the circuit except the signal generator probe on the input and a probe on the output. It's entirely possible that I missed a tell-tale sign in the readout, but everything appeared to be behaving itself (i.e. no wiggles or sharp edges/spikes).

Vref is coming from the midpoint of two 5k6 resistors connected between the positive and negative terminals of a 9V battery. I did not attach a large capacitor to Vref, could that be an issue?
Title: Re: Oscillation problem
Post by: anotherjim on December 12, 2014, 02:41:02 PM
5k6 is "stiffer" than usual, so I doubt it's the problem. Some capacitance would help, but I don't think it's causing instability.

Output Op-amps can oscillate when a screened cable is plugged in the output due to the cables capacitive load. It won't show on scope without a cable in. 100R resistor usually cures it, at well as minimising output short circuit current.

Title: Oscillation problem
Post by: PBE6 on December 12, 2014, 03:50:02 PM
Do you think it's possible the Big Muff-style tone control is also presenting a capacitive load to the first opamp? Would a 100R resistor be an appropriate solution here if it is?

Side question - I chose the resistors for Vref so that the max current flow through them both was under 1mA, and assumed there would be enough current to run both opamps without significant sagging. In general, is it true that smaller resistors are better for Vref provided the current drain through them isn't so high that it wastes the battery?
Title: Re: Oscillation problem
Post by: anotherjim on December 12, 2014, 04:32:58 PM
Quote from: PBE6 on December 12, 2014, 03:50:02 PM
Do you think it's possible the Big Muff-style tone control is also presenting a capacitive load to the first opamp? Would a 100R resistor be an appropriate solution here if it is?

I've never seen it cause a problem interstage. Enough C direct to ground it could, but tone control is RC filters, there's enough R to buffer the C from ground

Side question - I chose the resistors for Vref so that the max current flow through them both was under 1mA, and assumed there would be enough current to run both opamps without significant sagging. In general, is it true that smaller resistors are better for Vref provided the current drain through them isn't so high that it wastes the battery?
10k Vref dividers are common with about 1 to 10uF bypass. It depends on the loading. The op-amps are insignificant, the tone network moderate. Your tone cap C6 could go to ground instead of Vref and thus take bass frequencies away from Vref
Title: Re: Oscillation problem
Post by: R.G. on December 12, 2014, 06:31:44 PM
Quote from: anotherjim on December 12, 2014, 02:41:02 PM
5k6 is "stiffer" than usual, so I doubt it's the problem. Some capacitance would help, but I don't think it's causing instability.

I think it might do that - as that's happened to me before when I accidentally left a bypass cap off.

@ OP: Hang 22uF or bigger cap from the Vref to ground. If the oscillation is still there, that wasn't it, but this certainly won't make it worse.
Title: Re: Oscillation problem
Post by: PBE6 on December 12, 2014, 08:06:12 PM
Oh.,

my..

gawd!!!

Thank you R.G.!! I put a 1000 uF across Vref and the whistle is gone! It was the easier fix to do between that and the 100R resistor, just because it didn't involve de-soldering anything, and it worked like a charm!

I was able to use the same trick to fix an old Super OCD build that had the same problem. Two pedals in one day, a new record!

Thanks to anotherjim as well, I really appreciate your attention to my problem and your suggested fix, I will give it a try on the next fresh build!

I love this place!! :D


Just out of curiosity, why did the cap fix the problem? I'm not sure I really understand what was happening in the first place to cause the whistle..
Title: Re: Oscillation problem
Post by: R.G. on December 12, 2014, 08:14:14 PM
Quote from: PBE6 on December 12, 2014, 08:06:12 PM
Just out of curiosity, why did the cap fix the problem? I'm not sure I really understand what was happening in the first place to cause the whistle..
Well, it was only a guess, based on having hurt myself in a similar way in the past.

The reference voltage is a direct input to every opamp in the circuit. Any noise that ever gets on it pollutes the signal path, and if there is anything that put signal back into the reference voltage, the stage is set for oscillation. Given the high gains of many circuits, it doesn't take much signal fed back into the reference to make it squeal. The cap shunts most of the AC to ground, usually so much that what remains is not enough to make the oscillation self-supporting.

It  could also have been a number of other things. I half expected you to post that this had half-worked, and that the oscillation was now less, and different sounding.  :icon_biggrin:
Title: Re: Oscillation problem
Post by: PBE6 on December 12, 2014, 08:35:27 PM
Aha! Perhaps that's why the GAIN, SAT and SCOOP controls affected the pitch, those controls affect what is getting shunted to Vref through the tone stack. The VOL control only feeds true ground, so no effect on the pitch.

Neat! And very handy to know.
Title: Oscillation problem
Post by: PBE6 on December 12, 2014, 11:56:16 PM
Ok..so I'm at a gig, and my guitar player tried the other "fixed" pedal (modified OCD). Here's the schematic I was working from:

(http://tapatalk.imageshack.com/v2/14/12/12/cf132af92a54323788afcd3e0bcd9a16.jpg)

(Added a blocking resistor between the clipping FET's and ground)

It was fine when it was the only gain source, but when he switched channels or added the Green Ringer after it, you could still hear a faint whine. Even when it was off. Almost fixed, but not quite.

I'll try redoing the circuit with a 100R resistor after any opamps, send any signals to ground instead of Vref, use bigger Vref resistors and double up on the Vref cap values. We'll see what happens tomorrow!

Any other suggestions on what it might be while I'm doing a re-design?
Title: Re: Oscillation problem
Post by: crb3 on December 13, 2014, 12:04:20 AM
Quote from: R.G. on December 12, 2014, 08:14:14 PM
The reference voltage is a direct input to every opamp in the circuit. Any noise that ever gets on it pollutes the signal path, and if there is anything that put signal back into the reference voltage, the stage is set for oscillation.

The power draw of a typical op-amp varies with the signal put through it. There are bipolar-supply audio amplifier designs which drive discrete transistors with the supply-rail draw through resistors, thus making use of this loading.

With no decoupling, the op-amps' outputs tugging on the supply rail gets coupled through the divider; presto, instant oscillator.

I don't think anywhere near 1000 uF is needed in the final design, in fact A: the RC constant of that network will be such that at power-up it will take long seconds for it to stabilize at the intended Vref, and B: with that much juice stored in that cap, you can blow out your op-amps by cutting the power suddenly, unless you add a protective shunt network to safely discharge it into the Vcc rail. I'd throw a 10 uF at it, maybe with a 0.1 uF MC in parallel to catch the higher-frequency stuff the 'lytic bucks out, and see if that reliably shuts it up.
Title: Re: Oscillation problem
Post by: PeterPan on December 13, 2014, 02:42:03 PM
In the future if you have an OP amp to spare, consider making a virtual ground for your vRef. In such a scheme, you would tie the - input  of the spare op-amp to its output pin, and put your voltage divider center on the + input. In this case, your voltage divider resistors can be quite high (100k works well), and the capacitor you'd place from the midpoint to -V would only need to be about 0.1uf. This saves both battery power and space, and the small capicitr will remove any noise generated by the resistors. I typically put a capacitor on the output pin too, but never more than 0.1 to 1uF. Such a virtual ground is so stable, you can easily use it as the ground return point for dozens of circuit ends that require it. I've even used it as the main input/output ground when the supply is not feeding other devices, completely eliminating the need for input and output blocking capacitors. And of course, its still always a good idea (especially in a high gain circuit like a distortion pedal) to bring all gnd-ref points to the same physical location, as near to the junction of output of that OP amp and its (-) input as possible.

Even for extra expense of adding another op-amp if you don't have spare, you'll be very pleased with how quite and stable your circuits come out.
Title: Re: Oscillation problem
Post by: anotherjim on December 13, 2014, 04:34:06 PM
It's usually the amp that's driving the output cable that can suffer oscillation due to cable capacitance.
You can read a lot about it. This for instance...
http://www.analog.com/library/analogdialogue/archives/31-2/appleng.html

In the OCD, there isn't any amp that isn't already buffered from capacitance by resistors.
Also, the only things using Vref are the first amp's + input bias and the clipping network.
All those down pointing arrows are connections to ground, not Vref.

You cannot send the clippers to ground instead of Vref without fitting AC coupling capacitors before and after the clippers. Then you would need to supply Vref bias to the second amp via an additional resistor to the + input. As it is in the schematic, the second amp's + input gets Vref from the first amp because it's all DC coupled.

As you have a scope, don't limit yourself to checking audio frequencies. Always switch the timebase from milliseconds up to microseconds to check for oscillations at really high frequencies. If it's a digital scope, the display can be very misleading if the timebase setting isn't compatible with the signals it's seeing.
Title: Re: Oscillation problem
Post by: PBE6 on December 13, 2014, 08:24:00 PM
+1 PeterPan, good advice! I will try a buffered Vref next time for sure.
Title: Re: Oscillation problem
Post by: PBE6 on December 13, 2014, 08:34:30 PM
+1 anotherjim, also good advice.

I'm going to try breadboarding a modified version of this OCD with AC coupling and all required bias resistors. Hopefully that will address the issue.

The other build works fine, no whistling whatsoever with the addition of the cap on Vref. I'm thinking I must have made some kind of error on the OCD, but to be honest the build quality was a bit sloppy so it's probably best to start again from scratch.
Title: Oscillation problem
Post by: PBE6 on January 12, 2015, 12:25:44 AM
Finally tried to rebuild my OCD pedal, but I'm still getting a faint whine when the pedal is bypassed. Here's the schematic:

(http://tapatalk.imageshack.com/v2/15/01/11/63ad9fdae2f42d7eff90c9fd54236bc5.jpg)

Anyone see part of the circuit that may be the problem? No whine when the pedal is on, only when it's bypassed (standard 3PDT stompswitch).
Title: Re: Oscillation problem
Post by: PBE6 on January 13, 2015, 11:10:10 AM
Question: what's going on in the circuit when the footswitch is disengaged? The way I wire up my boxes, the positive battery terminal is always connected to the circuit and the circuit is always grounded to the chassis. The switch engages the circuit inputs/outputs and connects the negative end of the LED to the circuit ground to light it up. The battery ground is only connected to the chassis when an input cable is inserted. This is pretty standard, no? But in this configuration, the circuit is always running in the background - just with no input. Could this be part of the problem? The faint whine is only audible when the circuit is *disengaged*, no problems when the circuit is engaged.
Title: Re: Oscillation problem
Post by: karbomusic on January 13, 2015, 12:41:59 PM
Quote from: PBE6 on January 13, 2015, 11:10:10 AM
Question: what's going on in the circuit when the footswitch is disengaged?

The fact that the input to the circuit is now free floating when bypassed; it goes into oscillation and that finds its way into the output path. You can do a couple of things... Continue to fix the whine or if you are using a 3PDT and have that extra pin (the other side of the LED switch), run a jumper from the circuit input to that pin which will shunt it to ground when bypassed. There is a caveat with fixing it by grounding when bypassed... If you use any type of true bypass external switcher, you are still floating the input because the main pedal is engaged and the switcher does the floating so you'd have to account for it there as well, or fix the original whine. A buffered bypass may also fix it IIRC.

Let me know how it goes, I have a circuit of my own that has the issue and I ground the input on bypass since I've never fixed the original faint whine. I've used 4 different layouts (2 Vero, 2 Etched PCBs) as well as completely redesigning Vref and it persists.
Title: Re: Oscillation problem
Post by: PBE6 on January 13, 2015, 03:32:38 PM
Thanks karbomusic, I will give it a try and see what happens.
Title: Oscillation problem
Post by: PBE6 on January 13, 2015, 11:08:01 PM
Worked like a charm!!! Thanks karbomusic!!! Looks like I have a new design habit. =D

On a side note, I ended up lowering the amount of gain in the make-up gain stage from 12 dB to 4 dB as the original values were causing the opamp to clip. The lower gain also makes the saturation control much more useful.

After almost a year of getting my keister kicked by this build, I think I've finally killed it - with kindness ;) -  and an enormous amount of help from this forum. Thanks all!!
Title: Re: Oscillation problem
Post by: karbomusic on January 13, 2015, 11:43:05 PM
Certainly glad you got it worked out.  :)


QuoteThe lower gain also makes the saturation control much more useful.

That may also kill the whine, not sure if you checked before adding the ground mod but reducing the gain often helps the whine.
Title: Re: Oscillation problem
Post by: PBE6 on January 14, 2015, 12:15:40 AM
I fixed the whine first, the gain change was an afterthought. Your suggestion about grounding the disengaged input was the magic bullet in this case!
Title: Re: Oscillation problem
Post by: PBE6 on January 16, 2015, 10:15:23 AM
I was playing around with this box again last night, and noticed something else odd. It actually works great now when engaged and when bypassed, but if I unplug my guitar while it's on it squeals like a pig! This makes sense based on previous discussions, when the input is hanging this thing tends to oscillate something fierce. But why is that? I don't think I really understand what's going on here. I thought the feedback caps would be enough to kill any high frequency gain mishaps.

Can anyone provide some insight on this particular circuit? The version where the diodes are dumping signal directly to ground?
Title: Re: Oscillation problem
Post by: karbomusic on January 16, 2015, 12:40:38 PM
Quote from: PBE6 on January 16, 2015, 10:15:23 AM
I was playing around with this box again last night, and noticed something else odd. It actually works great now when engaged and when bypassed, but if I unplug my guitar while it's on it squeals like a pig! This makes sense based on previous discussions, when the input is hanging this thing tends to oscillate something fierce.

That is normally cured if the input jack has a switch for the 9V battery which has the additional advantage of powering down the circuit before it can squeal much. If you don't have that, you can use a jack that simply grounds the input when unplugging the cable. You know this already I'm sure.

I have a completely different circuit with the same whine issue and the only thing I think I haven't addressed is simply trying different op amps. I think I have addressed almost everything else. I'm sure it is due to my adding a few dB of additional gain at the last stage so I'm gonna swap some stuff and see what happens.
Title: Re: Oscillation problem
Post by: PBE6 on January 16, 2015, 01:32:43 PM
I've connected the negative terminal of the battery to the ring of the stereo input jack so the power is off when there is no input plug inserted. The input is also grounded when the circuit is bypassed as per your suggestion, which has cured the whine. The noise I'm talking about happens when the circuit is engaged and the cable is plugged into the input but not the guitar. I'm used to buzzing in this situation, but not squealing! On the bright side, it's easily avoidable.

Just looking at the circuit, the first stage can provide up to 227x gain (47 dB), although the TL072 is definitely going to max out long before it gets that high. After that the diodes cut the signal down to a max of about 0.8 V (unless the "Sat" control is dialed to mix in some of the original signal). Would that kill any oscillation from the first stage? Or is it here to stay once it's created?

I dialed the second stage gain down a bit to 1.7x (5 dB), which is pretty modest. I don't think that would be contributing.

But I don't really see any loops now that the diodes are dumping signal to ground. Am I missing something obvious?

Maybe the most likely cause would be an opamp limitation. Is there a particular opamp that works well for Dist+/OCD style pedals?
Title: Re: Oscillation problem
Post by: karbomusic on January 16, 2015, 02:17:09 PM
QuoteThe noise I'm talking about happens when the circuit is engaged and the cable is plugged into the input but not the guitar. I'm used to buzzing in this situation, but not squealing! On the bright side, it's easily avoidable.

Ah.... I missed that, yea, you're just moving the "free hanging" part to yet another location. It's an endless circle if not careful and the reason it's best to cure the whine at the source, which as evidenced by my troublesome circuit, not my area of expertise.  :icon_redface: :icon_mrgreen:
Title: Re: Oscillation problem
Post by: PBE6 on January 16, 2015, 02:29:54 PM
Mine either!! :)
Title: Re: Oscillation problem
Post by: juan_felt on May 17, 2017, 03:26:53 PM
Quote from: R.G. on December 12, 2014, 06:31:44 PM
Quote from: anotherjim on December 12, 2014, 02:41:02 PM
5k6 is "stiffer" than usual, so I doubt it's the problem. Some capacitance would help, but I don't think it's causing instability.

I think it might do that - as that's happened to me before when I accidentally left a bypass cap off.

@ OP: Hang 22uF or bigger cap from the Vref to ground. If the oscillation is still there, that wasn't it, but this certainly won't make it worse.

Hi R.G.,

I'm trying to solve a very similar issue to the one described on this thread. I put together in one PCB a BSIAB2 (with an active Baxandall instead of the tone control) and a LPB1. Both effects are great separated, but when I engage both at the same time with relatively high gain on the BSIAB and high output on the LPB1, I get a really loud, high pitch feedback, that changes when I move the controls (eq, volume..). I also built an exact same pedal, and when I turn on the BSIAB on the first one, and the LPB1 on the second one (both max level), I don't get the noise.

Both PCB have ground planes. I have 47uF cap to ground on the Vref, and a 100uF on the 9v supply. Both effects have their own polarity protection Diode.

Do you have any idea of what could be causing the problem?

Thanks!
Title: Re: Oscillation problem
Post by: juan_felt on May 17, 2017, 03:33:34 PM
BSIAB2 schematic

(http://f.defaut.free.fr/photos/BSIAB2/bsiab_2_sc.gif)

LPB schematic is similar to this one, plus the 100uF cap from 9v to ground
(https://hotbottles.files.wordpress.com/2012/02/lpb-schematic.png)

Title: Re: Oscillation problem
Post by: manocharli on October 20, 2018, 02:41:13 PM
Hi, I would like to make a contribution to the case of the oscillation in the Boneyard clone circuit. In my case I made the single version. the oscillation beep made it impossible to use the pedal. buy several 7660s to try and at the first exchange for another 7660s of another brand goodbye oscillation. I hope I have helped something. regards


(https://i.postimg.cc/MM2XqJTJ/20181020-100730.jpg) (https://postimg.cc/MM2XqJTJ)