666 hz whine in the Holy Grail

Started by j_flanders, June 02, 2021, 06:04:49 AM

Previous topic - Next topic

amptramp

The output amplifier does not have any capacitance across the 100K feedback resistor.  100pF would give you a rolloff at 15923 Hz, not enough to affect the audio but it may be enough to stabilize the output stage.  Feedback lead is necessary to compensate for the lag caused by the capacitance to ground at the inverting input.  The LM356 can supposedly drive a lot of capacitance but it still needs a feedback lead to do it.  More isolation on the output is a good idea as the combination of output impedance and capacitance to ground creates a feedback lag that will cause oscillation.

Rob Strand

#21
QuoteThe output amplifier does not have any capacitance across the 100K feedback resistor
+1  That's going to help for sure (maybe even enough).
It's also a difference between U3 and U5.

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

j_flanders

Quote from: amptramp on August 26, 2021, 12:19:06 PM
The output amplifier does not have any capacitance across the 100K feedback resistor.  100pF would give you a rolloff at 15923 Hz, not enough to affect the audio but it may be enough to stabilize the output stage.
I jumpered the additional series resistor at the output to get the whine back, then tried a capacitor in the feedback loop of U5.
I'm just pressing the through hole cap's leads to pin 1 and 2 and it doesn't take much to kill the whine/oscillation. The suggested 100pF works and 68pF, the smallest cap I had, worked as well.
There's some space around the 100k to tack on a through hole cap.
Maybe I could also simply solder an smd cap on top of the 100k.
It's a lot more fiddly operation than adding a resistor to the 3PDT switch (between the lead coming from the pcb output and the lug it connects to).

amptramp

Quote from: j_flanders on August 27, 2021, 04:57:27 AM
Quote from: amptramp on August 26, 2021, 12:19:06 PM
The output amplifier does not have any capacitance across the 100K feedback resistor.  100pF would give you a rolloff at 15923 Hz, not enough to affect the audio but it may be enough to stabilize the output stage.
I jumpered the additional series resistor at the output to get the whine back, then tried a capacitor in the feedback loop of U5.
I'm just pressing the through hole cap's leads to pin 1 and 2 and it doesn't take much to kill the whine/oscillation. The suggested 100pF works and 68pF, the smallest cap I had, worked as well.
There's some space around the 100k to tack on a through hole cap.
Maybe I could also simply solder an smd cap on top of the 100k.
It's a lot more fiddly operation than adding a resistor to the 3PDT switch (between the lead coming from the pcb output and the lug it connects to).

Just think - all those manufacturers who paint or grind off the lettering on devices to attempt ot hide their circuit design and you have the ultimate means to do the same - put the cap on top of the resistor.  It might be a fiddly operation but think of the concealment - no one can copy what you have done.

Rob Strand

FWIW, I had a looks at some numbers for the opamp in the TI and (old) National Semiconductors data.

The 150 ohm output resistor should be OK.  It's not great but it's shouldn't cause problems - 470 ohms to 1k would be better.
FWIW, the worse capacitive loading is in the 100pF to 470pF zone, which is in the same region as cables.

The TI data gives the input capacitances.   With 100k feedback resistors it's going to do a lot more damage than the 150 ohm output resistor + capacitive loading.   Adding a cap across the 100k is the right solution.

The fact you change the 150 ohm to removed oscillation means it's hanging on by a thread without the cap across the 100k.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

j_flanders

#25
Quote from: Rob Strand on August 26, 2021, 07:00:21 PM
It's also a difference between U3 and U5.

I opened up another one of these and it does have a whining noise at the output of U3.
I tried various caps parallel to that 39pF in the NFB of U3 but nothing helped, not even a 10nF cap.
The additional resistor at the output of U5 still makes the whine coming from U3 (?), entering U5, inaudible at the output of the pedal.
Another weird thing: adding the 10nF cap parallel to the 39pF cap gives whine at the output of U5 despite the extra resistor there.
There's no whine at the wet side of the blend pot.

EDIT:
Some further audio-probing shows this whine is 'everywhere', similar to the rev A pedal in my opening post.  It's both on the ground as on the signal path.

Rob Strand

#26
QuoteI opened up another one of these and it does have a whining noise at the output of U3.
I tried various caps parallel to that 39pF in the NFB of U3 but nothing helped, not even a 10nF cap.
Under normal circumstances the you only need enough feedback capacitance to overcome the input capacitance of the opamp.  That will end-up a being a small value.   However,  there is a slight caveat, and that's if there a large resistor on the + input.  It's possible adding a C4 like on this pic can help,


A little after posting that snippet last night it occurred to me there might be something more going on.   The "natural" oscillation frequency when things wrong regarding load capacitance and feed back caps should be about 100kHz to 1MHz, not 666Hz.   Oscillation problems can produce some pretty weird output waveforms but even then on an oscilloscope you might expect to see some high frequency around 100kHz to 1MHz then on top of that some other complex behaviour perhaps with the 666Hz.   You wouldn't expect to only see a 666Hz.

Low frequency oscillations type usually comes from much more tractable causes like design issues, component fails, circuit bugs which cause unintentional positive feedback.    You can get positive feedback like this from high gain circuits.   The circuit itself becomes the 666Hz oscillator.    That's a much different cause to nitty-gritty electronics issues like capacitive loading and feedback caps.

As I mentioned earlier, we are dealing with a sample system so high-frequencies could be shifted down due to sampling/aliasing.  It's something to keep in the back of you mind.

If an opamp is oscillating at 100kHz to 1MHz it could put a lot of junk on the supply and that could get into many parts of the circuit. 

So I guess the best thing to do is to look at  number of waveforms throughout the circuit with an oscilloscope and see if there is only a clean 666Hz oscillation or there is some evil 100kHz to 1MHz stuff in there.

QuoteThe additional resistor at the output of U5 still makes the whine coming from U3 (?), entering U5, inaudible at the output of the pedal.
Another weird thing: adding the 10nF cap parallel to the 39pF cap gives whine at the output of U5 despite the extra resistor there.
There's no whine at the wet side of the blend pot.
Yep, pretty weird behaviour.    No oscillation on the Wet side is plausible since that comes from the processor and R6 + C filter could prevent high frequencies going into the processor.   I wouldn't expect things at U3 to affect U5 and things at U5 to affect U3 unless it was coming from the supply.

If we keep an open mind we shouldn't write-off oscillations from the regulator U2.    Those regulators can oscillate and it would create all sorts of weird behaviours if it did.      C10 and C11 aren't big enough to do a good job of removing a strong 666Hz signal from the power rails.

Another thing which is kind of asking for trouble is the 100k resistor R25.   You could try shorting it out or putting a 1k across it.

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

j_flanders

#27
Thanks for the suggestions Rob.

Before I try them, I'd like to post one last find:
When audio probing, I hear whine on ground on the pcb but not on the sleeves of the jacks.

For example:
There is a wire coming from the sleeve of a jack.
It's about 2cm (1 inch) long and connects to the ground on the pcb.
At one end of this wire (at the jack) I hear no whine, at the other end (on the pcb) I hear whine.  ???

The photo below is for illustration purpose. In my test setup all jacks are connected to the chassis. Chassis connected to mains earth.


PRR

> At one end of this wire (at the jack) I hear no whine, at the other end (on the pcb) I hear whine.  ???

Bad joint? Wire broken internally?
  • SUPPORTER

amptramp

PRR - what happened to the cube count over your avatar?  Are you no longer a guru on this board?

The 666 Hz oscillation may be the symptom of an RF oscillation that develops a bias somewhere that cuts the oscillation off then allows it to start again.  This is like a superregenerative radio receiver that regenerates but shuts itself off and starts again at some supersonic audio frequency except this time, the frequency is in the audio band.

j_flanders

#30
Quote from: PRR on August 28, 2021, 01:06:21 PM
> At one end of this wire (at the jack) I hear no whine, at the other end (on the pcb) I hear whine.  ???

Bad joint? Wire broken internally?
Nope, neither. I checked that before I posted. From solder pad to sleeve it reads 0,5 Ohm. That's as low as my DMM usually goes.
It's not radiating noise either because it stops as soon as if I lift the audio-probe from the ground solder pad.

Edit: Since the jack is connected to the chassis I cannot be sure I'm measuring the resistance of that cable. I'd have to disconnect the jack from the chassis and measure again.
However, I have another identical pedal that behaves the same. It'd be unlikely that both have the same bad joint or internal break.

j_flanders

Quote from: amptramp on August 28, 2021, 01:47:39 PM

The 666 Hz oscillation may be the symptom of an RF oscillation

With the pedal open, and using a high gain amp sim on the Zoom modeller and listening to headphones when audio probing for whine, I have heard a radio station on a rare occasion.

j_flanders

Ok, as soon as I disconnect the DC-jack from the chassis, I no longer hear whining on the ground traces on the pcb.
It's one of these jacks:


It does not solve the whine at the output opamp though, I still need an additional resistor there or a cap in the NFB loop.

Rob Strand

#33
QuoteOk, as soon as I disconnect the DC-jack from the chassis, I no longer hear whining on the ground traces on the pcb.
It's one of these jacks:

When you probe a single point on a ground you are measuring voltage across two points on the ground.    The first point is the probe point.   The second point is the wherever the probe ground is connected.  If your probe goes to a grounded amplifier the ground point can be ill-defined  and the probe is not actually measuring what the eye sees as the ground point of the probe.

QuoteIt does not solve the whine at the output opamp though, I still need an additional resistor there or a cap in the NFB loop.
So that suggests there might be a probing issue.  You are allowing the probe to see the issue or not but the basic problem is still present on the board.

On a board with digital parts you can get 666Hz noise due to noise on the ground which is caused by the processor activity.

The fact you can solve the problem with parts that relate to oscillation keeps making me think the issue is an oscillation issue and probably not a PSU/ground issue.  The 666Hz is a complex side effect of the RF.

One way you can probe for high frequencies without an oscilloscope is to use a peak detector.   The idea is the oscillation is usually fairly strong and at high frequencies.   Point in the circuit which are normally DC or have moderate audio AC signals will actually have strong HF swings which are anything upto the full supply rail.     You see the strong swings with one of the following circuits,



It might be a good idea to reduce the input cap value to 1nF (or even 100pF) as this help block any audio AC, including hum, and only detect RF AC.    The shortcoming of the probe is you need some intuition to interpret the measurement.  It will measure both audio signal, audio noise, and RF.   You also need to make a good choice for the probe ground.   Keep the multimeter and multimeter leads away from the chassis to prevent RF signal paths through the DMM.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

j_flanders

Thanks for the replies and for coming up with new ideas Rob. They sure may come in handy further down the line.

I have a whine-free pedal at the moment, at least there's no whine at the output.

But not having found the root cause, for now, I'm still gathering some more 'data':

With the whine now removed from ground I probed further to see where there was still some whine.
There's a lot of whine on the +5A and +5D lines. For example on R28 and R26 (voltage divider to supply 2.5V for U3 and U5)
There's a huge loud whine on the input of the 78M05.
I tried several power supplies, both unregulated and regulated, no difference.
The mode switch affects the amount of whine.
I get the most whine around the 78M05 in the Flerb setting, slight less on Spring and much less on Hall.
In open air (not boxed up) the 78M05 measures around 80 to 90° C.

Rob Strand

#35
QuoteWith the whine now removed from ground I probed further to see where there was still some whine.
There's a lot of whine on the +5A and +5D lines. For example on R28 and R26 (voltage divider to supply 2.5V for U3 and U5)
There's a huge loud whine on the input of the 78M05.
I tried several power supplies, both unregulated and regulated, no difference.
The mode switch affects the amount of whine.
I get the most whine around the 78M05 in the Flerb setting, slight less on Spring and much less on Hall.
In open air (not boxed up) the 78M05 measures around 80 to 90° C.

There are a few causes of whine on the PSU rails:
1) The simplest is the circuit is working normally and the rails aren't "stiff" enough to prevent rapid load changes from affecting  the voltage.  The way you would handle that is with bigger supply caps and perhaps sometimes resistors in the supply rails to  isolate noisy rails from quite  rails.

That would also mean the frequency of the whine is a result of what the processor is doing.   The fact the whine changes with different modes could mean it's from this cause.

A noisy supply rail could also affect U3 and U5 as the Vref caps are only 100nF and then supply noise will find its way to Vref and then into the audio.    That would also explain whine at both U3 and U5.

2) The opamps are oscillating.  When that happens it's not uncommon for the high frequency junk to get onto the supply rails.  If the supply isn't "stiff" enough at high frequencies it makes things worse.

3) The regulator is oscillating.    That can be because the input or output caps aren't large enough or located too far from the regulator.

The way I normal check this is to solder some 10uF tantalum caps at the input and output of the regulator.  Solder the caps right on the regulator pins.    Another test, perhaps not as good, is to do the same with known good 100uF electros.     There's no intention that the 10uF caps are a fix since tantalums cause problems in the field.  They are only used as a strong test to see if the oscillation can be turned off.   If it works then  a solution using more normal caps is sort.

IMHO, it's an easy test and worthwhile doing.


However trying to fit the problem to your observations isn't so clean-cut.

If you did have an oscilloscope the waveforms you get in case (1) are very different to cases (2) and (3).  Case (1) will have some sort of pattern or perhaps you see bursts of activity.   These patterns might be embedded in other mess which comes of normal operation of the processor.   Cases (2) and (3) will have some sort of 100kHz to 1MHz waveform.

I still don't understand how playing with the feedback-cap or the output resistor could *help* cause (1), that's pretty much only going to happen in case (2).    At a very long stretch it might work in case (3).


Bad grounds and poor layout can make any of the above worse than they need to be.

An oscilloscope would help narrow down some of the unknowns.   Nonetheless it seems a tricky problem.  If it were easy I doubt the problem would exist in the first place, or, it would have been solved after reply #5 or so.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

mozz

You need a scope. The 7805 needs 0.1uf besides any larger caps. It should be easy enough to tack one on if there are none. I would even swap out the 7805 for another brand if possible.
  • SUPPORTER

j_flanders

#37
This is what's on there now: (In the rev C circuits they also put a reverse polarity protection diode before the 4.7 Ohm resistor)
The 10µF at the input reads around 10 µF. The two 10µF's at the output read around 18µF (guessing 2 x 9µF in parallel)
Should I put two extra 10µF tantalum at input and output and also two 100nF (film? tantalum?) caps?




Rob Strand

#38
QuoteShould I put two extra 10µF tantalum at input and output and also two 100nF (film? tantalum?) caps?
If I want to stop those regulators from oscillating I start with 10uFs tantalums because I've never seen that combination fail.   However, I really hate tantalums across power rails as a commercial solution because they end-up failing and shorting out the supply rails.    They are great for a test if you suspect regulator oscillations.   Get rid of the oscillations first then shoe-horn in a practical solution later.

According to the datasheets you need at least 330nF on the input and 100nF at the output, both located right at the regulator.   The claim is those parts should prevent oscillation even when the regulator is far from the main input and output caps.   I'd probably go for those plus at least 47uF on the input and at least 10uF on the output.

Where things get fuzzy is when you put an electrolytic on the input side close to the regulator and ditch the "inconvenient" 330n.  Sometimes you see 100nF at the input but it's technically not correct, it's a half-way skimp.   There's 1000's of circuits out there like that and i'm sure not all are problem free when the electrolytics age.     If you use 220uF to 1000uF maybe it will have more success. 

What's clear is the existing 2x47n's aren't the way to ensure success.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

amptramp

#39
Quote from: j_flanders on August 30, 2021, 07:19:12 PM
This is what's on there now: (In the rev C circuits they also put a reverse polarity protection diode before the 4.7 Ohm resistor)
The 10µF at the input reads around 10 µF. The two 10µF's at the output read around 18µF (guessing 2 x 9µF in parallel)
Should I put two extra 10µF tantalum at input and output and also two 100nF (film? tantalum?) caps?


There are three kinds of tantalum capacitors you can run into, especially if you are getting old tantalums from military surplus gear.

What you can buy readily are dry-slug tantalums.  The problem there is that the dielectric is tantalum pentoxide and if it is subjected to steady power line stress and any part of the pentoxide breaks down, it turns into tantalum dioxide, which is a conductor.  This creates a blaze at that point which quickly sweeps around the capacitor like a firestorm as the pentoxide is converted to dioxide.  Tantalum pentoxide is usually pinhole-free, so you get very small amounts of leakage current but any defect can result in a fire, so it is not rated for use across a power line where current can be fed continuously in it.  Its reliability is determined by the number of ohms per volt in series with it.  Dry slug caps have excellent high-frequency capability to the point where you do not need to parallel them with ceramic caps.  Tantalum caps are smaller than aluminum caps because the dielectric constant of tantalum pentoxide is 27 whereas the dielectric constant for aluminum oxide is about 10.

Wet slug tantalum does not have the fire mechanism of dry slug but it cannot tolerate more than 0.3 volts of reverse bias or it will short out.  They are usually seen as silver-cased devices with a red rubber insulator at the positive end.  The reverse bias failure mode is silver dendrites going across the space from cathode to anode.

Tantalum foil capacitors are rare but they are also used across power lines and do not have the extreme sensitivity to reverse voltage the wet-slug devices have.  If you find CLR69 capacitors, look no further - they are the holy grail of filter caps and I used them on a power converter for the Space Shuttle.  With a specific gravity of 16.69 for tantalum, you have to use the minimum amount you can get away with for a space launch because these things are heavy.

I should mention that tantalum is a conflict metal that comes complete with bloodshed in the areas of central Africa where it is mined and you may have customers who don't like it for that reason.