High Pitched WHINE

Started by Otsismi, February 06, 2014, 02:53:05 PM

Previous topic - Next topic

Otsismi

I've bee trying to design my own distortion circuit recently, and I've run into an issue.

Basically I'm running a tube screamer-ish soft clipping opamp circuit (Madbean Egghead) into some transistor gain stages (Sho boost and j201 stages). I hope to get the soft clipping from the diodes and opamp and then clip the transistors for added distortion and balls. Everything works fine on its own. In other words, when I play a guitar through each individual circuit, the egghead alone, or the SHO alone, everything sound fine. But when I chain them together, a high pitched extremely loud whining sound starts.

Maybe AC current in the circuit is to blaim? Inadequate power filtering? (Using the MXR brick) I've tried a bunch of things but cannot figure it out.

http://www.madbeanpedals.com/projects/Egghead/EggHead.pdf

http://hotbottles.files.wordpress.com/2012/03/sho_mac_2.jpg

therecordingart

High gain circuits tend to oscillate. Does changing the values of the caps in the opamp feedback circuits help? Do you have this on a breadboard? What does your wiring look like? There are a lot of things to rule out when you get into high gain stuff.

Otsismi

It's on a breadboard yes, when I attenuate the volume from the egghead going into the SHO I can eliminate the oscillation but the volume is just too low for the tone I want, I just want to push the next stage a little bit harder but then I start to get the whine again.

R.G.

Mother Nature and Mr. Nyquist are tapping you on the shoulder.

Nyquist stated the criterion that now bears his name. If you have an amplifier that (1) has feedback and (2) has enough forward gain to make up for the losses in the feedback path, and (3) has a phase shift that makes the resulting feedback be in phase with the input at any frequency, then IT WILL OSCILLATE.

This was, of course, simply a restatement of the consequences of a few of Mother Nature's Laws, but in a simple, concise form.

Item 1 is easy - EVERYTHING has feedback, even if it's only through the microscopic capacitance of two wires a foot (or a mile) apart. The only issue is (2) - what is the attenuation of the feedback path compared to the forward gain of the amplifier at any given frequency. And then there's that phase thing.

All amplifiers have phase shifts, and they all have feedback. This leads us to the realization that

==> EVERYTHING OSCILLATES IF IT HAS ENOUGH GAIN <==

You're taking a gain-ish distortion circuit, then sticking more gain stages on it. At some point the microscopic resistances in the bypass caps (um, you DO have bypass/decoupling caps, don't you?) cause enough feedback to make it sing. At some other point, the resistances of the power and ground wires make the feedback needed to oscillate; at some further point the inductance of the wires/traces can cause it to oscillate; later, the capacitances between wires and such can make it oscillate.

The higher the gain in the overall circuit, the more you have to carefully decouple the power supply (hmmm; I *wonder* if that's why they call them "de-coupling" caps), be careful where the power and ground wires go, and what currents flow in them, and the more care you have to put into where the wires go. Does the output to the volume pot "hot" terminal pass in parallel to the input jack wire? How about the tone pot lead?

Anyway, Mother and Mr. Nyquist are whispering in your ear.
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.

italianguy63

#4
+! always what RG says.

But, don't overlook possible obvious things:

Try battery power first and see if you can rule out the wall-wort.

MC
I used to really be with it!  That is, until they changed what "it" is.  Now, I can't find it.  And, I'm scared!  --  Homer Simpson's dad

Mark Hammer

You know, on this forum, when I see a subject header like "High pitched whine", I can't tell if the OP wants to find out how to produce it, or how to get rid of it!  :icon_lol:

amptramp

Quote from: Otsismi on February 06, 2014, 05:14:30 PM
It's on a breadboard yes, when I attenuate the volume from the egghead going into the SHO I can eliminate the oscillation but the volume is just too low for the tone I want, I just want to push the next stage a little bit harder but then I start to get the whine again.

You can't really get effective decoupling on a breadboard.  Op amps may have some power supply rejection, but they still inject currents back into the power wiring that may cause other stages to oscillate.  Keep in mind what R.G. has said - high gain circuits want to oscillate and you will have to tame them with decoupling and feedback lead networks (a capacitor in parallel with the feedback resistor) so the gain can drop below zero before the phase shift causes oscillation.

I doubt a breadboard is going to show you what will happen with oscillation when a circuit is built up on a PCB, Vero or prototyping board.  You may be OK with the current design, but you will have to test it to see.

Otsismi

Can you explain decoupling the power supply in more detail? I have coupling caps between each stage And extensive power filtering but the power is just hitting the rails and each
stage is powered off of these rails

Otsismi

Also I'm not using a wall wort. I'm using an mxr brick

duck_arse

http://www.muzique.com/lab/hum.htm

the first diagram, between each major section/amplifing block, won't hurt too much.
" I will say no more "

R.G.

Quote from: Otsismi on February 07, 2014, 01:10:27 AM
Can you explain decoupling the power supply in more detail? I have coupling caps between each stage And extensive power filtering but the power is just hitting the rails and each stage is powered off of these rails
Excellent question. Capacitors in series between input and output of stages COUPLE signal from one to the next. Capacitors from power to ground, especially when there are resistors between the power to stages shunt any noise and/or signal caused by a stage to ground and so they DE-couple the stages. This is important because power rails can carry signals from later, bigger signal stages back to the earlier stages and allow the feedback that can make oscillation.

For tiny circuits like pedals, we usually get away with using one or two capacitors from power to ground for the whole circuit. Usually something like 100uF electrolytic from power to ground and maybe a 0.1uF ceramic are all that's needed. These decoupling caps form a shunt impedance to cut down on the amount of signal artifacts from signal stage to signal stage, and usually lower the general impedance of the power rails enough to cut the amount of signal on the power rails below the point that would cause oscillation.

But remember - there is always a point where if you add more gain, it will oscillate. The more gain, the more stages, the more you have to be careful with decoupling the power rails, worrying about what currents flow on which ground wires, and general layout of where signals flow on which wires.
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.

amptramp

A breadboard layout is usually the worst case for circuit feedback effects.  A good layout may eliminate some problems but if you can get it to stabilize on the breadboard, chances are it will be stable in a printed circuit or Vero or prototyping board.

There used to be a number of application notes from National Semiconductor showing how to limit oscillation in op amp stages, but these seem to have disappeared.  The load isolation and feedback lead tamed many a circuit back when I was doing analog design.  If you have a feedback resistor from output to inverting input, a small capacitor in parallel will prevent the capacitance to ground from the inverting input from causing the gain to rise with frequency then meet the falling open loop gain - keeping this from happening will solve a lot of problems.  If you have a capacitive load, you can isolate it with a resistor.  If you need accurate feedback, you can take the feedback resistor from the end of the isolation resistor that is not connected to the op amp output, but keep a small value capacitor from the op amp output to the inverting input.  A capacitive load connected to the output resistance of the op amp looks like a feedback lag (lowpass) which reduces feedback at high frequencies.

If you suspect power supply coupling between stages, run each stage from a separate battery to see if that helps.  If only the grounds are connected together and the oscillation disappears with separate supplies then yes, you have a decoupling problem.

Otsismi

Very very interesting indeed. I do not have the firm grasp on impedance, feedback, and stabilization that is needed to fully understand your responses, but I will take the suggestion of isolating the power between the circuits. My mxr brick has 8 different 9V outputs so I can run individual regulated power to each stage in the circuit.

PRR

> explain decoupling the power supply in more detail? I have coupling caps between each stage

This comes up again and again.

Let's do a cartoon.

You run a paper mill. It has three stages:

1) Chew trees into pulp
2) Spread pulp thin and press-dry it
3) Cut the big paper into useful sizes



You need to "couple" the three sections together. You often can't direct-butt one to the next. You need something to "couple" the connection. Here a choo-choo to move pulp or paper along. In audio we often need a coupling capacitor to move the audio while ignoring any DC mismatch.

Machines also need a power source.

OK, you are making paper BUT... every time the grinder hits a big tough tree the motor goes CHUNG! and the lights dim. The heavy motor load makes the power line sag. Say your sheet cutter uses an electromagnet to lift the knife, and every time the power sags the knife drops, cuts a short roll. Meanwhile the electric size-press also wobbles and makes thin-spots in the paper. Toilet-paper buyers don't like short rolls with thin spots.

The motor load is "coupling" through the shared power line. You want to DE-couple the various loads on the line so they don't affect each other.

What you want is electric storage buckets. One near the tree-chomp motor to supply the CHUNG! power. One near the sizer and knife so they don't feel much residual sag.

BTW this drawing also shows a Poor Practice. I have the CHUNG! load at the end of the power line running past all the other more-sensitive loads. It is usually better to put your heavy load as close as possible to the power source. A haywire breadboard is very prone to unanticipated coupling through power rails (and also through thin air).
  • SUPPORTER

bluebunny

^^^ Sublime, Paul.  Again.
  • SUPPORTER
Ohm's Law - much like Coles Law, but with less cabbage...

lungdart

The TS soft clipping gain stage doesn't actually increase the signal amplitude all that much, that's why there is a separate gain stage before the volume pot to give you a little boost control along with attenuation. Since you are adding a large gain stage after this to hardclip it, this boost stage is redundant and becomes another stage to add to oscillation issues.

I would remove the volume stage and replace it with a coupling cap before your high gain stage. The 0.1uF cap on the input of the high gain stage should work fine. If you want a brighter sound, I would replace it with a higher value like 1-2.2uF. Then I would put the volume pot at the end of the high gain stage past the 10uF cap.

Also, be sure you are powering the high gain stage from the 9v line, and not 4.5V bias of the TS circuit.

Electronics product designer
Stomp Labs Inc
Stomplabs.com

wavley

#16
Once again a great explanation from Paul!  It leaves me wanting to make a Wang Chung joke, I can't really come up with one witty enough so I'll just give you this video.  

Enjoy your seizure...



edit: It is no coincidence that I let out a high pitched whine whenever I hear Wang Chung.  There, I took the high road instead of something involving grinders.
New and exciting innovations in current technology!

Bone is in the fingers.

EccoHollow Art & Sound

eccohollow.bandcamp.com