Author Topic: Yet Another Rat Oscillation Thread XD  (Read 4169 times)

strungout

Yet Another Rat Oscillation Thread XD
« on: July 12, 2016, 12:25:46 PM »
This is my clean blend mod for use with a bass.

I used the schematic from Electrosmash: http://www.electrosmash.com/images/tech/pro-co-rat/pro-co-rat-schematic-parts.jpg and the Shaka boost for the clean path: http://diystompboxes.com/pedals/schems/shakaboost.jpg

And made my own layout (half the fun!):



Changes/mods:

-I used a TL072, NE5534 and OPA3124 instead of the LM308 because I needed another opamp. All oscillate, tho the TL072 lets me turn the gain know slightly higher.

-Used a 10uf cap instead of a 1uf at the output of the 2n5457.

-Switched 1n914s and LEDs.

My voltages:

1-4.33
2-4.35
3-3.94
4-0
5-4.14
6-4.34
7-4.37
8-8.70

So. To me the voltages seem good, and the pedal does work (although I can't get just a clean tone with the blend control). I have built a rat before and it still works great after many years. Right now the circuit is out of the box. I have read a couple threads from people who had the same problem, which leads me to think my layout might be at fault Hell, here's a pic:



Looking for other eyes, brains and thoughts.

EDIT: Oh,  it it worked fine on my breadboard.

EDIT: I've shortened all my wires. No dice. And I melted a pin out of my switch... can always use it as an on of I guess... sigh.
« Last Edit: July 12, 2016, 03:03:33 PM by strungout »
"Displaying my ignorance for the whole world to teach".

"Taste can be acquired, like knowledge. What you find bitter, or can't understand, now, you might appreciate later. If you keep trying".

GGBB

Re: Yet Another Rat Oscillation Thread XD
« Reply #1 on: July 12, 2016, 06:21:33 PM »
The "clean" boost has a gain of 100 if I'm looking at it correctly - that's probably not going to be clean - could explain your blend problem.

As for the oscillation, have you tried isolating (keeping it away) the input signal wire from the others? Better yet a shielded input signal wire would probably help. It might all go away once you put it in the enclosure.
  • SUPPORTER

strungout

Re: Yet Another Rat Oscillation Thread XD
« Reply #2 on: July 12, 2016, 06:40:06 PM »
It actually went away, I dont know why or how... which is kind of annoying cause Im left not knowing what the problem was!

So, then I put it in the box but all I got is some low hiss.. then it did the hiss out of the box too... I then figured I had some bad solder joint, redid all of them... now I get nothing. Sigh...

I shouldve bought some shielded wire while I was at the electronics shop...

Now, I'm gonna take a break before I end up trying to see if that rat can fly!   :icon_twisted:


About the clean path, I did lower the gain with a 24k instead of the 100k res. Which is closest to the 25k pot the circuit calls for. Much better. Funny thing is, I have the same setup for a TS9 on my breadboard and it's (the 100k res) clean enough...
"Displaying my ignorance for the whole world to teach".

"Taste can be acquired, like knowledge. What you find bitter, or can't understand, now, you might appreciate later. If you keep trying".

Markw5

Re: Yet Another Rat Oscillation Thread XD
« Reply #3 on: July 12, 2016, 08:34:31 PM »
Rat's have very high gain with the drive or gain control turned up high. Also, it has has a hi-Z input making it sensitive to stray capacitive coupling around the input. Those two things make it prone to oscillation. So, it's important to keep the input circuitry that goes to the non-inverting opamp input physically well separated from output ande inverting input circuity (and compensation pin 8 - if using an LM308). In your layout drawing, they don't look as separated as I would try to make it.

strungout

Re: Yet Another Rat Oscillation Thread XD
« Reply #4 on: July 12, 2016, 09:21:36 PM »
Rat's have very high gain with the drive or gain control turned up high. Also, it has has a hi-Z input making it sensitive to stray capacitive coupling around the input. Those two things make it prone to oscillation. So, it's important to keep the input circuitry that goes to the non-inverting opamp input physically well separated from output ande inverting input circuity (and compensation pin 8 - if using an LM308). In your layout drawing, they don't look as separated as I would try to make it.

@Markw5: Just to make sure I understand you, you mean the component connected to pin 3 should be further from the path from pin 1-2? I'll have to check my other layout and see if I did that... And what do you mean by 'stray capacitance'?


So I took some time off to cool down. Fixed some bad connections aaannddd I'm back to oscillation  :icon_lol: I'm still gonna try and figure this out, but I might end up using a lower value gain pot (remember it's for a bass, in the end). Or redo the layout and build another one, perhaps using others' layout, accommodating for the clean path. I'll have to check if I have enough components.

I decided to go ahead and try it with my bass and well, there is no oscillation, but you can hear something weak wayyyy in the back wanting to feedback, but not quite getting there. Why would that be? Less high frequency content? Both my guitar and bass use humbuckers.

This is for a friend, the Rat is the first one I thought of and I brought it to his house so he could hear what you can get out of it. He like it. Now I build one using a TS9 and he's gonna come over to check out that one. Personally, I like the TS9 version better!
"Displaying my ignorance for the whole world to teach".

"Taste can be acquired, like knowledge. What you find bitter, or can't understand, now, you might appreciate later. If you keep trying".

Markw5

Re: Yet Another Rat Oscillation Thread XD
« Reply #5 on: July 13, 2016, 10:34:42 AM »

By stray capacitance, I mean than when two wires near each other have different voltages on them there are electric field lines that exist in the space between the wires. This is the same as inside a capacitor where electric field lines exist between the capacitor plates. Therefore, wires (and components) close together can act like capacitors. The amount of capacitance goes down rapidly with more distance between the wires. So, having a wire connected to the opamp output to close to the opamp input would be the same a adding a capacitor of a few pF between output and input. So, how much difference might a few pF make? It depends on the frequency and the other impedances in that part of the circuit. If the impedances are high, such as with JFET opamps and 1meg bias resistors, then a few pF of stray capacitance can be enough to support oscillation. Connecting a bass guitar might lower the impedance at the input if it is a low impedance in parallel with the other input node impedances. In that case, a little extra feedback capacitance has less effect on amplifier behavior. The fix is to move the components and wiring connected to pin 2 as far away as possible from Pin3 (inverting input), pin6 (if that's the output pin), and pin 8 (if using an LM-108). With good layouts, the input circuitry will be off in a corner or on the side of the board near pin 2, and as much of the other wiring as possible will be on the other side of the opamp near pin 6 (or whatever the output pin is). Wiring to pin 3 (inverting input) should run under the opamp to the other side near pin 6, so it doesn't stay close to pin 2 for longer than necessary and so all that feedback circuitry connected to the output is far away as possible from the non-inverting input. That will minimize any stray capacitance around that part of the circuit and should fix the oscillation.

strungout

Re: Yet Another Rat Oscillation Thread XD
« Reply #6 on: July 13, 2016, 11:35:09 AM »
@ Markw5: I think I understand, thanks for explaining. That's what I did, without knowing it, on my previous rat build. I'll check my TS9 version today and redo the layout if needed. The rat will have to wait, I'm out of certain components.
"Displaying my ignorance for the whole world to teach".

"Taste can be acquired, like knowledge. What you find bitter, or can't understand, now, you might appreciate later. If you keep trying".

strungout

Re: Yet Another Rat Oscillation Thread XD
« Reply #7 on: July 13, 2016, 12:31:00 PM »
@Markw5: As I understood you, this layout could give me stray capacitance problems, right?




EDIT: Oops, of course it is! I'm using 2n5088s.

« Last Edit: July 13, 2016, 02:32:55 PM by strungout »
"Displaying my ignorance for the whole world to teach".

"Taste can be acquired, like knowledge. What you find bitter, or can't understand, now, you might appreciate later. If you keep trying".

Markw5

Re: Yet Another Rat Oscillation Thread XD
« Reply #8 on: July 13, 2016, 12:35:03 PM »
Could you put up a schematic with it? Makes it easier to see what's going on.

strungout

Re: Yet Another Rat Oscillation Thread XD
« Reply #9 on: July 13, 2016, 02:33:47 PM »
Added!
"Displaying my ignorance for the whole world to teach".

"Taste can be acquired, like knowledge. What you find bitter, or can't understand, now, you might appreciate later. If you keep trying".

Markw5

Re: Yet Another Rat Oscillation Thread XD
« Reply #10 on: July 13, 2016, 02:40:08 PM »
Well, what you have in your layout is not the same as the schematic. But let's take the schematic as an example. If you physically took IC1A and rotated it 90 degrees cw so the ouput is pointing down and rotate the circuitry connected to the output and inverting input with it, so all the diodes and stuff are now on the right side of the opamp and Q1 and it's components remained on the left, that would be pretty good in terms of physical separation. With dual opamps, you can't quite do that but you try to get as much separation as possible on one physical side of the opamp. Mostly doing that by putting the input circuit in one corner and the ouput stuff in the other corner.  Also, from your layout it looks like you are using 5532 opamps which are fairly fast bipolar types which also draw a fair amount of power supply current. May not run too long on a battery. Also, because they are high speed the power pins should be bypassed to ground right at the IC socket with .1uf ceramic caps, in order to minimize the chances of oscillation feedback coupling through the opamp power pins. They are quite capable at oscillating at a few megahertz and you might not know it without an oscilloscope, but sometimes the only audible symptom is the circuits sounds bad, bad sound quality, but you can't hear the oscillation itself due to the very high frequency. What I usually do with fast opamps is solder some solder wick braid underneath the socket on the solder side of the PCB to make a little ground plane right under the opamp, then solder to power bypass caps to that. The reason for using braid is because it is low inductance and can make a fairly good quality ground if otherwise laid out right with respect to the other circuitry. Basically, short length, fairly direct ground connected in a star topology with no loops.
« Last Edit: July 13, 2016, 02:52:36 PM by Markw5 »

strungout

Re: Yet Another Rat Oscillation Thread XD
« Reply #11 on: July 14, 2016, 04:54:10 AM »
Is this any better?


"Displaying my ignorance for the whole world to teach".

"Taste can be acquired, like knowledge. What you find bitter, or can't understand, now, you might appreciate later. If you keep trying".

Markw5

Re: Yet Another Rat Oscillation Thread XD
« Reply #12 on: July 14, 2016, 10:18:10 AM »
Yes, better. But you could optimize it even a little more. For example, the black wire extending left from U1-3 to the 1u coupling cap could be moved down one row for most of its length. And the 1u cap could be moved up and to the right a little. Its like, you look around for opportunities to make it better. Also, when you hand wire something like this, there is no law saying to can't solder components on the bottom of the board. That's were I usually put  0.1uf power decoupling caps, on the bottom, soldered right onto the opamp sockets. It's a little better than you could do with normal through hole construction, and closer to what you could get with surface mount. If no law against, feel free to do what works best, would is my preference. On the other hand, when you design something for automated manufacturing then you have to conform to what the production equipment is capable of.

Also, already you are sort of constraining your thinking about how to build this by the limitations of your layout program. For example, it doesn't encourage you to consider that you could hand wire power supply wiring on the bottom of the board out in space, or between rows and columns of your layout program and perfboard.

Important things to remember are to avoid letting wires run close and parallel to each other as much as possible, because that's like connecting a small capacitor between the two wires. In some cases adding a little cap of 2-3 pF might have almost no effect on the circuit, but in other cases it can cause oscillation or other performance problems. Also, if two wires need to come close together, try to make them cross at right angles and spend as little time close to each other a possible. Also, you can put ground traces next to high impedance wire runs to act similar to a partial shield. Sort of like using a half-shielded cable, and a little shielding can be better than none in some cases.

Finally, if you want to understand more about layout issues, there are some good resources out there to read. Here are a couple:
http://www.analog.com/media/en/technical-documentation/application-notes/AN-202.pdf
http://www.analog.com/media/en/technical-documentation/application-notes/6001142869552014948960492698455131755584673020828AN_345.pdf
http://pdfserv.maximintegrated.com/en/an/AN4079.pdf
« Last Edit: July 14, 2016, 11:00:17 AM by Markw5 »

strungout

Re: Yet Another Rat Oscillation Thread XD
« Reply #13 on: July 14, 2016, 11:05:33 AM »
Thanks for the links. I'll read those pdfs and tinker with my layout a bit more.
"Displaying my ignorance for the whole world to teach".

"Taste can be acquired, like knowledge. What you find bitter, or can't understand, now, you might appreciate later. If you keep trying".

strungout

Re: Yet Another Rat Oscillation Thread XD
« Reply #14 on: July 14, 2016, 01:14:08 PM »
My latest iteration:

"Displaying my ignorance for the whole world to teach".

"Taste can be acquired, like knowledge. What you find bitter, or can't understand, now, you might appreciate later. If you keep trying".

Markw5

Re: Yet Another Rat Oscillation Thread XD
« Reply #15 on: July 14, 2016, 02:11:10 PM »
You might be able to improve the latest one by folding up the 47n cap and 4k7 resistor closer to the inverting input and increase the length of the yellow trace connecting to right side of the 4k7. Then the capacitance between the right side of the 47n cap to the the non-inverting node will be much less. Anyway, you get the idea. This is how I tend to think about routing circuits.