PCB layout question - oscillation near maxed gain/volume

Started by Xambax, September 11, 2020, 04:12:28 AM

Previous topic - Next topic

Xambax

Hello guys,

I have a PCB layout question.

I recently started using Kicad. That is the first for me as I haven't ordered PCB in the past. So far I laid out 73 Rams head muff circuit and wampler hot wired and they both work fine most of the time. However, both Rams head and wampler tend to enter oscillation near the maxed out volume/gain settings.

I've read in other topics that it is a common rookie layoutist mistake but I couldn't find much info on what to do to remedy the problem.

What I've indirectly got from the scattered info is to put clipping diodes as close to the opamp and clip the legs as short as possible. That was in a discussion thread about RATs having a tendency to oscillate under similar conditions. Also, I've read that using SMD components help too as it means less traces that can turn into an antenna.

I would love if someone could confirm that and also point me in the right direction as a rookie in pcb layouting. What are some other things to look out for with that particular problem. How do you fight it and do you have some other guidelines I can adopt to avoid it?

Thanks!


antonis

You've "trapped" all OUTs between supply rails..
Also, INs should be located inside ground plane(s)
(it should be a good idea for ground plane to enclose the whole circuit..) :icon_wink:

P.S.
Is there any particular reason for PCB having ALL 3 positive supply rails connected..??
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

ElectricDruid

In general, something will only oscillate if there is a feedback path from the output to the input. The trouble is, when the gain is very high, it only takes a very small amount of signal leaking from the out to the in to cause the problem.

Once you know that, you can start to lay out a board to take it into account. Keep input traces away from output traces. Keep input *wires* away from output wires. A ground plane on the PCB will help to prevent signals getting from one place to another, and you could try shielded wires for in/outs on high gain pedals (essentially just extending the ground plane up the cables too). But nothing is guaranteed, and keeping high gain circuits under control isn't always easy.

One board I designed had problems because a sensitive input pin was next to a loud output pin. That was just the arrangement of pins on the IC. The first revision of the PCB had a certain amount of leakage from the output to the input next door. Since I couldn't change the layout of the IC, the second revision tried to fix the problem by putting input traces on the bottom of the board and the output traces on the top! Luckily it worked!

I think your build looks very tidy. It's nice work.

EATyourGuitar

keep the input away from the output. turn components 90 degrees.



the second one is probably a bad example because it has a parallel FX chain. I did the best that I could do for a 2 layer board.


if you want to completely fix the problem you can do SMD and PCB mounted everything with a 4 layer board. PCB mounted jacks, pots, footswitch. you run the input sandwiched between two ground planes.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

Xambax

Quote from: antonis on September 11, 2020, 04:53:12 AM
You've "trapped" all OUTs between supply rails..
Also, INs should be located inside ground plane(s)
(it should be a good idea for ground plane to enclose the whole circuit..) :icon_wink:

P.S.
Is there any particular reason for PCB having ALL 3 positive supply rails connected..??

What do you mean by trapping outs between supply rail? I see all of the outs are between +9V and GND wire solder pad at the top but don't understand why is it a bad placement. Thanks! Enclosing INs with ground plane makes sense to me.
3 supply rails are connected because they are not interconnected on the pcb. I know it is not the best solution. I didn't feel like having a long trace connecting all three points at the top of the pcb. I know grouping components differently would help.

Quote from: ElectricDruid on September 11, 2020, 05:07:36 AM
In general, something will only oscillate if there is a feedback path from the output to the input. The trouble is, when the gain is very high, it only takes a very small amount of signal leaking from the out to the in to cause the problem.

Once you know that, you can start to lay out a board to take it into account. Keep input traces away from output traces. Keep input *wires* away from output wires. A ground plane on the PCB will help to prevent signals getting from one place to another, and you could try shielded wires for in/outs on high gain pedals (essentially just extending the ground plane up the cables too). But nothing is guaranteed, and keeping high gain circuits under control isn't always easy.

One board I designed had problems because a sensitive input pin was next to a loud output pin. That was just the arrangement of pins on the IC. The first revision of the PCB had a certain amount of leakage from the output to the input next door. Since I couldn't change the layout of the IC, the second revision tried to fix the problem by putting input traces on the bottom of the board and the output traces on the top! Luckily it worked!

I think your build looks very tidy. It's nice work.

Thanks, that is insightful!

Quote from: EATyourGuitar on September 12, 2020, 08:10:12 AM
keep the input away from the output. turn components 90 degrees.

What do you mean by turning components 90 degrees? the 4 layer pcb idea: so it's GND-signal-GND-signal from front to back layer?

Thanks to all for good advices!

EATyourGuitar

Induction (capacitive coupling) happens when to wires are parallel. The same can happen for capacitors and resistors. If all of your components are parallel that is the worst way. If you turn everything 90 degrees you still have all your components parallel. The solution is to move the signal through the board in a diagonal line like a staircase. This matters more for power amplifiers that need clean sound. Guitar pedals are trying to sound like a high gain amp with distortion so it may be a welcome feature.

You are correct with your 4 layer stack up. Make sure the input is sandwiched on both sides by ground. The output is louder so it has a better signal to noise ratio even in the worst case. For this reason the output goes on layer 1 or layer 4 and the metal box keeps it in the box.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

bartimaeus

#6
sometimes you can fix this by cutting the most offensive traces, and replacing them with a wire that takes a better path. like if you have an input and output traces running parallel, cut the connection to that output trace and just connect your output wire to the component directly.

maybe share the kicad view of the board, so we can see both sides?