LM386 & Spice

On 20/04/15 23.44, Jim Thompson wrote: ...

formatting link

or this:

formatting link

Glenn

Reply to
Glenn
Loading thread data ...

Valcom still uses it in their 8" talkback ceiling speakers.

--
 ,-.                                     Give More expect less Love More 
 \_/                                    argue less Listen More talk less 
{|||)<   Don Kuenz                   Laugh More complain less Dream More 
 / \                                      doubt less Hope More fear less 
 `-'                                             Breathe More whine less
Reply to
Don Kuenz

I'm a big fan of Monticelli's output stage, but it relies on multiple area-matched transistors, as you get in an IC, but not so easily in a discrete circuit. It'd be cool to find a high-current op-amp with a Monticelli output stage, but this would probably not be an inexpensive part.

--
 Thanks, 
    - Win
Reply to
Winfield Hill

Interesting. I'll spin it up and check stability. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

I retrieved a copy of the Monticelli paper... lots of feed-forward gimmicks required to keep it stable... but it's of sufficient interest that I will thoroughly dissect it. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

I like it for it's DC stability and predictability, and it's class AA otput characteristics. But it's still a transconductance current out, even if well controlled. So when dealing with capacitive loads it's doubly important to add the necessary internal (capacitive) feedback to drive down the open-loop output impedance, at high frequencies. The Zout plots you typically see are quite revealing.

--
 Thanks, 
    - Win
Reply to
Winfield Hill

Here's the class-AB power booster (+/-100mA) design I did a few years back... it's RRIO, unity gain...

...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

How much loop gain does your power booster have (at DC), and what's its bandwidth and slew rate?

--
 Thanks, 
    - Win
Reply to
Winfield Hill

That was some years ago, I'll have to revisit it. But I remember it was in an integrator loop with signal at 200kHz. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

load)...

DC Loop Gain: 40dB

Slew rate: 5V/usec

Swing: Within 150mV of each rail

Output stage (class-AB) overlap current: 4mA ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

Hi,

You may be interested to try an improved LM386 spice model that is available in the free, online EasyEDA suite here:

formatting link

You can copy the subcircuit by following the instructions in the schematic.

The LM386EE/NJM386EE spice subcircuit model offers improved modelling of output voltage self-centring, typical quiescent and input bias currents and unloaded bandwidth. Output swing is however still a little optimistic with < 8 Ohm load resistances but given the accurate output centring, less so that the original Dilatush model and the later LTspice implementation.

The reason for this output optimism is unclear. To help improve the model in this area, if anyone is willing to share scope traces of the LM386 output voltage driving into clipping with loads of between 4 - 16 Ohms, please contact me.

:)

Reply to
andyfierman

[snip]

How? I can't see a way to copy the subcircuit, only ways to simulate it with easyeda. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

Methinks snipped-for-privacy@gmail.com is just pimping for EasyEDA. I can find no retrievable subcircuit declaration there. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

Maybe it's time to look at the modern cruftsmanlike audio amps:

There's PCBs with this chip, for sale at under $1 on eBay... and it may have other interesting uses (like making HF triangle waves for diode/capacitor multiplier HV supplies).

Reply to
whit3rd

If you're into ebay buying there's another PAM amp delivering 1+1 watt class D, and its supplied asssembled AND delivered direct from China for 65p = $1!

NT

Reply to
tabbypurr

Hi Jim,

Since I posted to this forum, the EasyEDA website has been updated so

(i) you now have to register to run the simulation in that particular project and (ii) therefore, the instructions in the schematic are a bit misleading now.

However, if you register and then go to:

formatting link

and then click on the green "Open in Editor" button on the upper right of the window, this will open the project in the EasyEDA Editor window.

(The button is actually this link:

formatting link

If you then click on the tab labelled "Demonstrating the EasyEDA LM386 spice subckt model" you will be able to run the example.

Alternatively, here is a link to the file which you can run in "Anonymous mode" for which you do not need to register:

formatting link

Just do Ctrl+R to run it.

Either way, tThe instructions in that example explain quite clearly two ways to download the netlist:

"To view the netlist (including the LM386EE subckt), do: Green Man > Simulation Results... > Download netlist or: Super Menu > Miscellaneous > Netlist for Document > Spice..."

However for the avoidance of doubt - and despite your rather ungracious comment - here is a simple copy of the netlist:

********************************************** **********************************************
  • LM386/NJM386 spice subckt model.
*
  • Developed for EasyEDA by:
  • signality.co.uk
*
  • Subckt based on the schematic shown in the
  • NJM386 datasheet:
  • formatting link
  • Specifications based on the above and:
  • formatting link
*
  • Gain accuracy, output voltage self-centring,
  • typical quiescent and input bias currents
  • and unloaded bandwidth are modelled.
*
  • Output swing is optimistic with < 8 Ohm load
  • resistances. The reason for this is unclear.
  • If anyone has scope traces of the LM386 output
  • voltage driving into clipping with loads of
  • between 4 - 16 Ohms please contact:
  • snipped-for-privacy@easyeda.com
*
  • Last edited 150611
********************************************** *
  • IC pins: 2 3 7 1 8 5 6 4
  • | | | | | | | | .subckt LM386EE inn inp byp g1 g8 out vs gnd
  • .param
  • Rbval = 28.25k
  • Re1val = 100
  • Re2val = 1k
  • Re3val = 4
  • Rcval = 10
**
  • Input stage Q1 0 INN q1e 0 PNP1 R1 INN 0 50k Q2 0 INP q2e 0 PNP1 R2 INP 0 50k Q3 0 q1e q4e 0 PNP1 Q4 q4c q1e q4e 0 PNP1 Q5 0 q2e q6e 0 PNP1 Q6 q15b q2e q6e 0 PNP1
**
  • Input stage current mirror Q7 q4c q4c 0 0 NPN Q8 q15b q4c 0 0 NPN
**
  • Input bias curent and gain setting resistors R3 q4e q1e {Rbval} R4 g0 q4e {Re1val} R5 q2e q6e {Rbval} R6 G1 q6e {Re1val} R7 G8 g0 150 R8 G1 G8 1.35k R9 OUT G1 15k R10 BYP g0 15k R11 q10c BYP 15k
**
  • Tail and PNP emitter follower current mirror Q9 0 q10c q10b 0 PNP1 Q10 q10c q10b VS 0 PNP1 Q11 q11c q10b VS 0 PNP1 Q12 q12c q10b VS 0 PNP1
**
  • Emitter follower buffers and
  • quiescent current control Q13 0 q4c q11c 0 PNP2 Q14 q18b q11c q14e 0 NPN R12 q14e 0 {Re2val} Q15 0 q15b q12c 0 PNP2 Q16 q18b q12c q17b 0 NPN
**
  • Voltage gain stage Q17 q23b q17b 0 0 NPN C2 q23b 0 1p
**
  • Crossover distortion/quiescent current mirror. Q18 q18b q18b VS 0 PNP2 Q19 comp q18b VS 0 PNP2 Q20 q25b q18b VS 0 PNP2
**
  • Crossover drop diodes and compensation cap. Q21 comp comp q22b 0 NPN 5 C1 comp q15b 15p R13 q25b comp {Rcval} Q22 q25b q22b q23b 0 NPN 5
**
  • Push-pull output stage with Sziklai pair. Q23 q24b q23b q23e 0 PNP2 Q24 q23e q24b 0 0 NPN 100 R14 OUT q23e {Re3val} Q25 VS q25b q25e 0 NPN 100 R15 q25e OUT {Re3val}
**
  • Models .model NPN NPN(IS=1E-14 VAF=100 BF=400 IKF=0.4
  • XTB=1.5 BR=4 CJC=1E-12 ITF=1 VTF=2 XTF=3) .model PNP1 PNP(IS=1E-14 VAF=100 BF=100 IKF=0.4
  • XTB=1.5 BR=4 CJC=1E-12 ITF=1 VTF=2 XTF=3) .model PNP2 PNP(IS=1E-14 VAF=100 BF=200 IKF=0.4 +XTB=1.5 BR=4 CJC=1E-12 ITF=1 VTF=2 XTF=3)
  • .ends LM386EE
********************************************** **********************************************

:)

Andy

Reply to
andyfierman

My followup's probably too late for the OP. That said, my current project uses a LM386. Allow me to followup for posterity's sake.

Dr. Wickert at UCCS generously makes the requisite LM386 LTSpice symbol (.asy) and subcircuit data (.lib) files available to the public. Wickert's .lib file seems almost identical to Jim's. You can download Wickert's LM386 archive in zipped format at:

formatting link

The zipped archive contains the following files:

lm386.asy Symbol file. Just drop it into your project folder to use it.

LM386.lib Subcircuit data file. Just drop it into your project folder.

lm386.pdf Datasheet.

headphone_amp.asc A sample LTSpice circuit that uses the LM386.

Thank you,

--
Don Kuenz KB7RPU
Reply to
Don Kuenz

Things like power supply decoupling subtleties are unlikely to be modeled accurately.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

thanks, it may prove useful in future.

NT

Reply to
tabbypurr

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.