LM386 softer clipping

Started by Steben, September 22, 2021, 03:52:57 PM

Previous topic - Next topic

Rob Strand

#20
QuoteHowever ...

If you look at the gain of the LM386 it's quoted as x200 and x20  but notice the ratio of the resistors is 15k/150 =100 and 15k/1.5k = 10.  There's a factor of 2 missing.   I have a feeling missing factor of 2 comes from the second 15k which is between the emitter of the first transistor and pin 7!!!.  So maybe a clipper isn't so simple because shorting out one 15k only reduces the gain by a factor of 2.    Taking that idea further perhaps leaving of the bypass cap increases the gain.   I need to look at this closer.  Seems like a little bit more going on.
OK after a few mins of thought in the quite of my own home ... the 15k on pin7 doesn't affect the gain.  The x2 is to do with the mirror.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

teemuk

ElectroSmash site features analysis of the LM386, which also explains how the internal gain setting and DC biasing circuits work.
https://www.electrosmash.com/lm386-analysis

Vivek


Rob Strand

QuoteElectroSmash site features analysis of the LM386, which also explains how the internal gain setting and DC biasing circuits work.
https://www.electrosmash.com/lm386-analysis
Well spotted!   That's exactly what I did.   That site has done everything.   It's even got an example of the changing the gain with a resistor (and cap) across pins 1 and 5, which is what I was getting at before about the stable/soft clipper.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Vivek

#24
Rob, do you mean gain set by pins 1 and 8 ?


The pin 1 and 5 trick has only been shown for the bass boost application which is straight from the data sheet.

Or do you mean to make the Pins 1 and 5 bass filter's bandwidth so wide that it becomes a gain control instead ?




How to use it for softer clipping
Sag
Tone controls
Compressor ???


Vivek

Opamp style feedback supposedly improves characteristics.

Might allow use of standard tricks to soften clipping, add tone controls ????



from http://stephan.win31.de/music.htm

Vivek

18K and 10uF

Fc =  0.48 Hz if I calculated it properly

= gain setting rather than bass boost  ?


Rob Strand

#27
QuoteRob, do you mean gain set by pins 1 and 8 ?


The pin 1 and 5 trick has only been shown for the bass boost application which is straight from the data sheet.

Or do you mean to make the Pins 1 and 5 bass filter's bandwidth so wide that it becomes a gain control instead ?

For the clipper I was thinking pins 1 and 5 like a normal clipper.   The main point was not to let the gain go below 20 during clipping and that way it stays stable.

If you make the cap large enough it's pretty much going to reduce the gain across the whole band-width.   The other caps, like the output caps, would then dominate the roll-off so no bass boost in practical terms.

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

Rob Strand

QuoteOpamp style feedback supposedly improves characteristics.

Might allow use of standard tricks to soften clipping, add tone controls ????
That method might be worth investigating.    Something different for the LM386.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Vivek

If we put diodes into feedback loop

But big compliance resistor

We could acheive 2 knee transfer characteristics

Worth trying


But back to the question : what really does LM386 bring to the table ? Can softer edges around clipping be achieved more easily with Opamps ? What's special about LM386 for this application ? Are we beating a horse that died 20 years ago ?

teemuk

^ This.

Do you need the capability to drive a very low impedance load? If not, LM386 seems redundant. Just use an opamp.

If yes, why do you need to control how the actua LM386 circuit clips instead of just peak limiting the input signal and attenuating it to proper amplitude?

And if you must clip within the LM386 circuit then what's wrong with employing feedback diodes from output to inverting input? (Use a voltage divider to match chip's peak output to diode's lower forward voltage. This also prevents the chip driving clipping diodes to excessive power dissipation).

Or is the sole intention to just experiment with more unconventional ideas? 

Steben

Experiments partially, lm386 as a power amp.
Mind you, the 386 is already tasty on its own. Think of noisy cricket but with supro twist.
  • SUPPORTER
Rules apply only for those who are not allowed to break them

Steben

Quote from: Vivek on September 24, 2021, 05:48:30 AM
Opamp style feedback supposedly improves characteristics.

The HiFi ones :)

Clipping will likely be harder
  • SUPPORTER
Rules apply only for those who are not allowed to break them

Rob Strand

#33
Something I always find interesting and sometimes amusing (and sometimes frustrating) is the internal schematics on ICs.

Thinking about the sound of the LM386 you might take a look at the internal schematic.  Then as your mind scans over it you realized it's obviously not quite like the real schematic.

Here's the common schematic,



So obvious things that are oversimplified are:
- textbook current source.  The precise current source will affect the swing and how it clips.
   It's going to be done with some sort of common transistor current source.
- Lack of compensation caps.   They would have to be there.
- The output stage biasing.  Far too simplified as shown.  Some resistance is needed in the base and/or the emitters.
- something to limit the current on the negative swings.

Some behavioural quirks of LM386 from the datasheet are how the output swing becomes quite limited with a 4 ohm load.   It's not so clear how positive and negative cycles individually behave with 4 ohm, or without a load.

Other stuff is input bias currents, which is obviously set by the transistor gains, and the quiescent supply current.    There's many other datasheet values to match up for sure.

So digging around I found, this which seems to plug the gap a bit more between the schematic and reality, possible still not real,


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

PRR

#34
Also read on LM380.

The biasing, current limiting, and compensation can be built into the chip, if you control/know the process. Make two junctions on the same wafer, trim the relative areas, you set the relative bias currents. Older mono PNPs had severe loss of hFE at some current, and fT maybe not a MHz.

The "discrete schematic" is often a poor approximation how it works. Widlar was a master of leveraging parasitics to do his bidding. 380/386 is not a Widlar but they all drank in the same places.
  • SUPPORTER

anotherjim

What is the thing with the BJTs showing more than one collector wire? I know multi-emitter, but the collector variety baffles me.

teemuk

#36
Think of it as a "parallel" transistor that just has its collector connected to a different place. Current mirror still forces specific current flow in each transistor.


I think there may be an IC manufacturing process where a single transistor can have several collectors but it still essentially behaves like there would be several individual transistors. If not anything else, it's a method to simplify the circuit diagram.

pinkjimiphoton

best way i've found to soften clipping on a 386 is to add a hi pass filter to the input of it.
less bass = softer clipping and less dirt.
  • SUPPORTER
"When the power of love overcomes the love of power the world will know peace."
Slava Ukraini!
"try whacking the bejesus outta it and see if it works again"....
~Jack Darr

Rob Strand

#38
QuoteThink of it as a "parallel" transistor that just has its collector connected to a different place. Current mirror still forces specific current flow in each transistor.
Teemuk's example gives the basic current mirror with Iref feeding the input to the current mirror.

The LM386 circuit uses a better mirror but it's not a Wilson.  The left most transistor is called a "helper transistor" and supplies the base current to all the transistors.   The current down the 15k resistor is Iref.  There is a 2 Vbe drop from the rail to the 15k resistor instead of a single Vbe drop in Teemuk's example.

The way the helper transistor is drawn on the LM386 circuit looks different to the common drawing for a current source with helper but it's actually the same circuit.   Using Teemuk's NPN example:  The BC wire on Qref is replaced with the helper transistor, the base goes to Qref's collector, the emitter goes to Qref's base and the collector goes to the +ve supply.   The reason the drew it like that is to show Qref is the same as Q1, Q2,  Q3.

You can see the connection at the bottom left of the LM741 (which has emitter  resistors),
http://www.learningaboutelectronics.com/images/Lm741-internal-schematic-diagram.png
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

antonis

Quote from: anotherjim on September 26, 2021, 06:52:15 AM
What is the thing with the BJTs showing more than one collector wire? I know multi-emitter, but the collector variety baffles me.

Just an idea.. :icon_wink:

Multi-Emitter BJTs do not conduct only if all the VBE are below Vγ, in the sort of wired AND...
Multi-Collector BJTs Collectors total current is set as usual by IB, and if all the Collectors are of the same size (area at silicon level) the current is equally split...

A bit further:
Multi-Emitter BJTs are usually used to close some sort of feedback from following stages, maybe avoiding BJT saturation, or in logic input stages where the logic funcion is implemented directly by the wired AND, like in some TTL AND input stages..
Multi-Collector BJTs are useful in IC's since it is rather easy to match the ratio between the Collector areas and split a polarizing current in precise ratios...
(as in the all-time-classic uA741 output stage polarization..)


Or it's just too late here.. :icon_redface:

"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..