News:

SMF for DIYStompboxes.com!

Main Menu

LM386 based Rat

Started by soggybag, June 04, 2022, 04:33:38 PM

Previous topic - Next topic

Mark Hammer

#20
Quote from: soggybag on June 12, 2022, 11:07:24 AM
pin 8 > 470r > 220n > pin 1

Forms a high pass filter. That looks like a higher resistance to lower frequencies so gain drops for those. High frequencies so no resistance so gain goes up for those?
It IS a highpass filter.  But it's a lower-impedance path for high end than the 1.35k that it is bypassing.
Conceptually, it is the exact same logic used by the Proco Rat: gain for lows and lower mids, but  MORE gain for upper mids and highs.  And, using the values suggested, it splits the gain for lows and highs at about the same point and almost in the same proportions, as an actual Rat does.  Actually, I take that back.  In a Rat content above 1539hz gets more boost, as it does here with the suggested values, but the Rat provides about 10x as much gain for the upper frequencies as the low ones, and I've only hiked it up by 2.8x.  If you wanted to replicate the top/bottom split in the Rat for both spectral content AND differential gain, you' use a 120R resistor and 1uf cap.

soggybag

What's the math, how did you calculate that?

Mark Hammer

It's just the normal calculation of gain for an op-amp (in the case of the Rat), and what I gather is simply the ratio of the built-in pin-1-to-pin-8 resistance vs the provided resistance.  If 1.35k gets you a gain of 20, and 120R (as a common value) is a little less than 1/10th of that, the gain for whatever passes through there should be closer to the max (i.e., 200x).  A 120R/1uf network ought to theoretically provide highpass filtering at F = 1/(2*pi*R*C), which would be 1326hz.

The more educated types here can probably spot something wrong in my calculations, but it's close enough for rock and roll.  The first network moved things in the preferred direction for you, so I figure this will nudge them a little closer.  It all still relies on supplementing with a booster stage up front, though.

Does that answer your question?

antonis

#23
Just to add on Mark's interpretation for LM386 gain maths..

IMHO, gain is set by R7 (15k) divided by R6+R5 (1k35+150) so for pins 1 & 8 unconnnected Gain is X 20 (15k/1k5)..
By shorting 1k35 resistor, gain is raised at X200 (15k/150)..
Any other RC series combination across 1k35 resistor sets gain "somewhere" between x20 and X200, depending on particular RC corner frequency..

Same effect can be obtained by wiring RC series configuration between pin 1 and GND..
(which, IMHO, should be more close to RAT dual HPF behavior by placing 2 RCs from pin 1 to GND)

(modified scheme borrowed from m4268588)
"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..

Mark Hammer

I like that approach a little better.  Although it still needs to be said that, with a max gain of 200, the 386 will still require "outside assistance" to provide the sorts of intense clipping a normal Rat does.  Of course, that may not be the goal of the OP.

m4268588

If this attempt works well, the maximum gain is 1500. (Not 200)
But will it really work?

iainpunk

your basically asking the chip for more gain than it actually has on tap, so youre letting it run more open loop, inviting the nonlinearities of the internal transistors back into the sound, which is probably a good thing for guitar, but bad for any other audio circuits. i have seen very few circuits asking for more gain than the IC (or discrete transistor amplifier) can provide, thus running it (nearly) open loop, its kind of a less explored path.

using an outside opamp to keep pin 1 at a strong DC point ramps up the gain a bunch, but still not enough for something like a RAT, i guess 1.3v or so, but you can measure the DC operating point it normally operates at and just replicate that with the extra opamp.

cheers
friendly reminder: all holes are positive and have negative weight, despite not being there.

cheers

Mark Hammer

Quote from: m4268588 on June 13, 2022, 07:54:01 AM
If this attempt works well, the maximum gain is 1500. (Not 200)
But will it really work?
I don't know HOW much gain would be required to make a 386+something-else sound Rat-like.  Keep in mind that the equally venerable Distortion+ also sticks a pair of diodes to ground after the gain stage, and it does what it does with a max gain of 214x.  In the case of the classic Rat, many of its idiosyncratic sounds are produced by asking the LM308 to exceed its open-loop gain capacity for higher frequency content.  We would not be attempting the same thing with the 386 here.