LM386 based Rat

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

Previous topic - Next topic

soggybag

For fun I experimented with making a Rat from a LM386 in place of the LM308. It worked mostly.

I notice the range of gain sounds is limited. I'm guessing this because the LM386 has limited gain range of 20 to 200 where the op-amp in the Rat gets a gains from 1 to 2300.

I'm guess the LM386 at gain 20 is enough to get the diodes clipping and the the max of 200 doesn't sound too much different.

To get around this I put a gain/volume control on the input the LM386. This effectively provides a gain of 0 to 200 which expanded the sound palette a bit.

The sounds here are not bad but it's not getting the range of sounds you get from the Proco Rat. This could be a good starting block for something.





anotherjim

Nice schematic.
Seem to me that you could get the max gain available to around 2000 with a preamp stage before the gain pot which, if you must, could be another JFET.
The 386 input impedance is lowish at 50k while a JFET drain resistor is usually much larger than 5k so you won't get all the extra gain in practice  - unless you inset a buffer stage after the gain pot to drive the 386. Since the input will now get inverted you can switch to the inverting input of the 386 to keep the true signal polarity throughout.
Also, you can match the input impedance more closely to the Rat by the value of JFET gate bias resistor and input cap.


Mark Hammer

#2
Jim's right.  It needs a gain stage in front of the 386. Keep in mind that the Rat can achieve gains in the thousands.  The other thing I would suggest is that you adapt the Rat strategy of having differential gain for the lows vs mids and highs.  One way to achieve this would be to use an RC pair (in series) between pins 1 and 8, such that the gain is greater for mids and highs than for lower content.

The 386 provides for a 1.35k resistance, internally, between pin 1 and 8.  If you stick a 470R resistor in series with a 220nf cap, and join pins 1 and 8 with that (and no other bridging components), you'll get greater gain for content above 1.5khz.  I'll note that there was a project in Nuts & Volts some years back for a device/circuit to plug into a television's earphone jack, for people who were losing their high-end hearing.  It also used a 386 and a version of the mod I'm suggesting to goose the highs.

Of course, since you are relying on the built-in gain of 20x for the low end, you'll need some additional push up front to make the diodes clip, which is why Jim's suggestion is the right one.

soggybag

Thanks for the insights!

With the input impedance starting at 50k the pot on the input is only going to bring that down as you turn the gain down. I'll have to try the input stage.

I'll also give that differential gain idea a try.


antonis

Quote from: soggybag on June 05, 2022, 01:29:53 PM
I'll have to try the input stage.

Plz, don't take me seriously, but I'd try a BJT bootstrapped Emitter folllower.. :icon_wink:
"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..

soggybag

You're trolling me Atonis! Emitter follower input was used by Boss and Ibanez!

antonis

#6
Quote from: soggybag on June 05, 2022, 03:40:27 PM
You're trolling me Atonis!

Of course I DO, Mitchel..!! :icon_wink:

But it's all upon to you proving it..

P.S.
You kow, that humble configuration called "emitter follower" should deserve more than a couple of naughtily thrown resistors foray.. :icon_wink:
"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..

Vivek

LM386 has input impedance of 50k

m4268588

--------------------------------------------------------------------------------
Input level range of 386 is low(0.5). If this is exceeded, a DC offset occurs and the capacitor is charged.
This can be solved by reducing the shunt resistor or by clipping diode in advance.


The minimum gain of 386 is not 20. It's 10.
I don't know if you can less than 10 it by adding comp cap.

anotherjim

Just to remind us...

Although I've seen places where measured gain tests give less than x20, I'm pretty sure the authors failed to account for the 50k input resistance on their test signal source.

If you add an input stage, there are several more places to build filters that equal the Rat's complex response curve. For sure, you could fit the high pass filtering across pins 1 & 8, but outside their pass band, the native x20 still exists. If you want to be able to turn it down so it just tickles the clipping diodes, maybe fit a resistor across the diodes to form a 1/20th attenuator with the series resistor.

I'm assuming the idea is that the 386 clips just as musically as the old LM308, however, don't assume the 386 is another slew-rate slow coach. It can easily do ultrasonic work. I've seen an unstable one doing 19Mhz.


duck_arse

QuoteApplications:
.......

Ultrasonic drivers

from the NatSemi datasheet.
don't make me draw another line.

Vivek

Suppose one took an LM XXX and an LM YYY

and altered each circuit to have very similar impedances,  gain at each stage, clipping levels at each stage, inter-stage frequency responses


What really would then be the difference in sound between the two ?

iainpunk

Quote from: Vivek on June 06, 2022, 10:55:00 AM
Suppose one took an LM XXX and an LM YYY

and altered each circuit to have very similar impedances,  gain at each stage, clipping levels at each stage, inter-stage frequency responses


What really would then be the difference in sound between the two ?
the main difference would lie in the non-linearities and clipping 'knee'.

the LM386 can be coaxed into lower gain than 20... even unity, using 'standard' NFB like you would in a normal opamp, but with a DC blocking cap between the IC output and the beginning of the feedback loop, so the (-) input still sees 0vDC.
i haven't found a way to increase the internal gain yet, but i have some ideas to get slightly more than 200, using bootstrapping.

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

cheers

Vivek

While I believe it's extremely hard to hear slight differences in transfer curve knee

Especially if the distortion is created by rail saturation ie one knee and output banged against it rather hard.

So I want to mantain that (besides graceful rail saturation recovery issues), two different Opamps doing rail saturation create roughly identical harmonics which would be rather hard to differentiate between.

iainpunk

Quote from: Vivek on June 10, 2022, 07:29:54 AM
While I believe it's extremely hard to hear slight differences in transfer curve knee

Especially if the distortion is created by rail saturation ie one knee and output banged against it rather hard.

So I want to mantain that (besides graceful rail saturation recovery issues), two different Opamps doing rail saturation create roughly identical harmonics which would be rather hard to differentiate between.
you'd be surprised how much the knee makes a difference in a rail clipper, also, different types of opamps have different output limits, some are symmetrical, some are really asymmetrical, some have high dropout voltage, and some very low. these things all have a tone of their own, when allowed to clip. i especially like the CA3130 with its cmos output stage

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

cheers

soggybag

Thanks for all of the suggestions. I got back on this.

I put an LPB-1 in front of the input. I probably should have used a JFET but I had a 2N5089 on hand.

I tried bridging pins 1 and 8 with a 470r and 220n. This does bring a little "focus" to the sound. Sounds like the gain drops a bit. I'm guessing that is because some lows are getting filtered.

Mark Hammer

The lows aren't getting filtered.  They're just not getting boosted as much as the highs.

m4268588

I don't know if the gain increase is possible by AC ground with Pin 1 (and 8 ). I thought you were going to do it, I don't see the need for "LPB-1" if that trick is possible.

Pin 5 to 1 (or 2) works as a NFB. Pin 5 -> 1 is implemented internally.

soggybag

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?


antonis



For pins 1 & 8 left open, Gain is set by 1k35 resistor at X20..
By wiring anything between pins 1 & 8, we effectivelly lower equivalent resistance between those pins, resulting into Gain increase..
(X200 for pins 1 & 8 short)
By placing any RC combination across pins 1 & 8, you form a frequency dependent gain circuit..
(a pot, wired as variable resistor, in place of R can be called frequency selective gain pot..)

If you want to emulate RAT's "dual" HPF, you have to place two RC filters (of different corner frequencies) in parallel..

P.S.
A similar RC configuration can be implemented, between pins 1 & 5, for Bass boost..
(effectivelly shunting 15k feedback resistor..)
"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..