Author Topic: LM386 softer clipping  (Read 3186 times)

Rob Strand

Re: LM386 softer clipping
« Reply #20 on: September 24, 2021, 04:07:55 AM »
Quote
However ...

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.
« Last Edit: September 24, 2021, 04:18:12 AM by Rob Strand »
Send:     . .- .-. - .... / - --- / --. --- .-. -

teemuk

Re: LM386 softer clipping
« Reply #21 on: September 24, 2021, 04:32:41 AM »
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

  • Awesome!
  • ****
  • Posts: 1440
  • Total likes: 454
  • Do good for others, good will happen to you !
Re: LM386 softer clipping
« Reply #22 on: September 24, 2021, 04:34:00 AM »
The x2 is to do with the mirror.


That explains why I look fat !!

Rob Strand

Re: LM386 softer clipping
« Reply #23 on: September 24, 2021, 04:46:03 AM »
Quote
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
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:     . .- .-. - .... / - --- / --. --- .-. -

Vivek

  • Awesome!
  • ****
  • Posts: 1440
  • Total likes: 454
  • Do good for others, good will happen to you !
Re: LM386 softer clipping
« Reply #24 on: September 24, 2021, 05:35:47 AM »
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 ???

« Last Edit: September 24, 2021, 05:53:31 AM by Vivek »

Vivek

  • Awesome!
  • ****
  • Posts: 1440
  • Total likes: 454
  • Do good for others, good will happen to you !
Re: LM386 softer clipping
« Reply #25 on: September 24, 2021, 05:48:30 AM »
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

  • Awesome!
  • ****
  • Posts: 1440
  • Total likes: 454
  • Do good for others, good will happen to you !
Re: LM386 softer clipping
« Reply #26 on: September 24, 2021, 06:18:33 AM »
18K and 10uF

Fc =  0.48 Hz if I calculated it properly

= gain setting rather than bass boost  ?


Rob Strand

Re: LM386 softer clipping
« Reply #27 on: September 24, 2021, 06:47:48 AM »
Quote
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 ?

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.

« Last Edit: September 24, 2021, 06:51:53 AM by Rob Strand »
Send:     . .- .-. - .... / - --- / --. --- .-. -

Rob Strand

Re: LM386 softer clipping
« Reply #28 on: September 24, 2021, 06:54:26 AM »
Quote
Opamp 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:     . .- .-. - .... / - --- / --. --- .-. -

Vivek

  • Awesome!
  • ****
  • Posts: 1440
  • Total likes: 454
  • Do good for others, good will happen to you !
Re: LM386 softer clipping
« Reply #29 on: September 24, 2021, 07:55:42 AM »
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

Re: LM386 softer clipping
« Reply #30 on: September 24, 2021, 08:35:35 AM »
^ 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

Re: LM386 softer clipping
« Reply #31 on: September 24, 2021, 08:44:17 AM »
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.
Rules apply only for those who are not allowed to break them

Steben

Re: LM386 softer clipping
« Reply #32 on: September 24, 2021, 12:06:38 PM »
Opamp style feedback supposedly improves characteristics.

The HiFi ones :)

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

Rob Strand

Re: LM386 softer clipping
« Reply #33 on: September 25, 2021, 12:51:09 AM »
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,


« Last Edit: September 25, 2021, 01:26:27 AM by Rob Strand »
Send:     . .- .-. - .... / - --- / --. --- .-. -

PRR

Re: LM386 softer clipping
« Reply #34 on: September 25, 2021, 03:35:23 PM »
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.
« Last Edit: September 26, 2021, 09:37:52 PM by PRR »
  • SUPPORTER

anotherjim

Re: LM386 softer clipping
« Reply #35 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.
Croeso i Diystompboxes.

Comma a question.

teemuk

Re: LM386 softer clipping
« Reply #36 on: September 26, 2021, 08:54:55 AM »
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.
« Last Edit: September 26, 2021, 09:01:42 AM by teemuk »

pinkjimiphoton

Re: LM386 softer clipping
« Reply #37 on: September 26, 2021, 12:09:19 PM »
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!

Rob Strand

Re: LM386 softer clipping
« Reply #38 on: September 26, 2021, 09:34:33 PM »
Quote
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.
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
« Last Edit: September 27, 2021, 01:39:14 AM by Rob Strand »
Send:     . .- .-. - .... / - --- / --. --- .-. -

antonis

Re: LM386 softer clipping
« Reply #39 on: September 27, 2021, 04:44:48 PM »
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..