Sign in

Not a member? | Forgot your Password?

Search Sci.Electronics.Design

Search tips

Recent Blogs on Electronics-Related

Two Capacitors Are Better Than One
posted by Jason Sachs


Voltage Drops Are Falling on My Head: Operating Points, Linearization, Temperature Coefficients, and Thermal Runaway
posted by Jason Sachs


Optimizing Optoisolators, and Other Stories of Making Do With Less
posted by Jason Sachs


Someday We’ll Find It, The Kelvin Connection
posted by Jason Sachs


10 Items of Test Equipment You Should Know
posted by Jason Sachs


First-Order Systems: The Happy Family
posted by Jason Sachs


Lost Secrets of the H-Bridge, Part IV: DC Link Decoupling and Why Electrolytic Capacitors Are Not Enough
posted by Jason Sachs


April is Oscilloscope Month: In Which We Discover Agilent Offers Us a Happy Deal and a Sad Name
posted by Jason Sachs


Specifying the Maximum Amplifier Noise When Driving an ADC
posted by Rick Lyons


BGA and QFP at Home 1 - A Practical Guide.
posted by Victor Yurkovsky


3 LEDs powered by fingers - puzzle
posted by Henryk Gasperowicz


Series circuit - 3 LEDs
posted by Henryk Gasperowicz


Video: The PN Junction. How Diodes Work?
posted by Stephane Boucher


Two jobs
posted by Stephane Boucher


2N3055 | 8051 | Amplifier | AVR | Battery | Capacitors | Charger | CMOS | Converter | DAC | Decoder | Demodulator | Diode | Ethernet | Flash | FPGA | GPS | I2C | IDE | Laser | LCD | LED | LTSpice | MOSFET | Op-amp | Oscillator | Oscilloscope | PCB | PID | PLL | PSpice | PSU | PWM | RFID | RS232 | RS485 | SMPS | Solenoid | Spice | Switcher | TCP/IP | Transformer | Transistor | TTL | USB | VCO | Zener

See Also

DSPEmbedded SystemsFPGA

design | Looking for a better LM386 Spice model


There are 2 messages in this thread.

You are currently looking at messages 1 to 2.

Looking for a better LM386 Spice model - Bitrex - 2010-05-14 03:38:00

I'm using the only model of the LM386 I was able to find on the Web in 
LTSpice, but discovered that it has a major flaw: the output doesn't sit 
anywhere near halfway between Vcc and ground.  I'd be thrilled anyone 
has access to a better model, or could explain how to correct this one? 
Thanks.





* lm386 subcircuit model follows:

************************************original* IC pins:     2   3   7   1 
   8   5   6   4
* IC pins:     1   2   3   4   5   6   7   8
*              |   |   |   |   |   |   |   |
.subckt lm386 g1  inn inp gnd out  vs byp g8
************************************original*.subckt lm386 inn inp byp 
g1  g8 out  vs gnd

* input emitter-follower buffers:

q1 gnd inn 10011 ddpnp
r1 inn gnd 50k
q2 gnd inp 10012 ddpnp
r2 inp gnd 50k

* differential input stage, gain-setting
* resistors, and internal feedback resistor:

q3 10013 10011 10008 ddpnp
q4 10014 10012 g1 ddpnp
r3 vs byp 15k
r4 byp 10008 15k
r5 10008 g8 150
r6 g8 g1 1.35k
r7 g1 out 15k

* input stage current mirror:

q5 10013 10013 gnd ddnpn
q6 10014 10013 gnd ddnpn

* voltage gain stage & rolloff cap:

q7 10017 10014 gnd ddnpn
c1 10014 10017 15pf

* current mirror source for gain stage:

i1 10002 vs dc 5m
q8 10004 10002 vs ddpnp
q9 10002 10002 vs ddpnp

* Sziklai-connected push-pull output stage:

q10 10018 10017 out ddpnp
q11 10004 10004 10009 ddnpn 100
q12 10009 10009 10017 ddnpn 100
q13 vs 10004 out ddnpn 100
q14 out 10018 gnd ddnpn 100

* generic transistor models generated
* with MicroSim's PARTs utility, using
* default parameters except Bf:

.model ddnpn NPN(Isf Xti=3 Eg=1.11 Vaf0
+ Bf@0 Ise=0 Ne=1.5 Ikf=0 Nk=.5 Xtb=1.5 Var0
+ Br=1 Isc=0 Nc=2 Ikr=0 Rc=0 Cjc=2p Mjc=.3333
+ Vjc=.75 Fc=.5 Cje=5p Mje=.3333 Vje=.75 Trn
+ Tf=1n Itf=1 Xtf=0 Vtf)

.model ddpnp PNP(Isf Xti=3 Eg=1.11 Vaf0
+ Bf 0 Ise=0 Ne=1.5 Ikf=0 Nk=.5 Xtb=1.5 Var0
+ Br=1 Isc=0 Nc=2 Ikr=0 Rc=0 Cjc=2p Mjc=.3333
+ Vjc=.75 Fc=.5 Cje=5p Mje=.3333 Vje=.75 Trn
+ Tf=1n Itf=1 Xtf=0 Vtf)

.ends
*----------end of subcircuit model-----------


Re: Looking for a better LM386 Spice model - Bitrex - 2010-05-14 04:33:00

  Disregard - I'm not sure what I did wrong but the circuit now has its 
output sitting at approximately the correct voltage.  User error.


Bitrex wrote:
> I'm using the only model of the LM386 I was able to find on the Web in 
> LTSpice, but discovered that it has a major flaw: the output doesn't sit 
> anywhere near halfway between Vcc and ground.  I'd be thrilled anyone 
> has access to a better model, or could explain how to correct this one? 
> Thanks.
>
> 
> 
> 
> 
> * lm386 subcircuit model follows:
> 
> ************************************original* IC pins:     2   3   7   1 
>   8   5   6   4
> * IC pins:     1   2   3   4   5   6   7   8
> *              |   |   |   |   |   |   |   |
> .subckt lm386 g1  inn inp gnd out  vs byp g8
> ************************************original*.subckt lm386 inn inp byp 
> g1  g8 out  vs gnd
> 
> * input emitter-follower buffers:
> 
> q1 gnd inn 10011 ddpnp
> r1 inn gnd 50k
> q2 gnd inp 10012 ddpnp
> r2 inp gnd 50k
> 
> * differential input stage, gain-setting
> * resistors, and internal feedback resistor:
> 
> q3 10013 10011 10008 ddpnp
> q4 10014 10012 g1 ddpnp
> r3 vs byp 15k
> r4 byp 10008 15k
> r5 10008 g8 150
> r6 g8 g1 1.35k
> r7 g1 out 15k
> 
> * input stage current mirror:
> 
> q5 10013 10013 gnd ddnpn
> q6 10014 10013 gnd ddnpn
> 
> * voltage gain stage & rolloff cap:
> 
> q7 10017 10014 gnd ddnpn
> c1 10014 10017 15pf
> 
> * current mirror source for gain stage:
> 
> i1 10002 vs dc 5m
> q8 10004 10002 vs ddpnp
> q9 10002 10002 vs ddpnp
> 
> * Sziklai-connected push-pull output stage:
> 
> q10 10018 10017 out ddpnp
> q11 10004 10004 10009 ddnpn 100
> q12 10009 10009 10017 ddnpn 100
> q13 vs 10004 out ddnpn 100
> q14 out 10018 gnd ddnpn 100
> 
> * generic transistor models generated
> * with MicroSim's PARTs utility, using
> * default parameters except Bf:
> 
> .model ddnpn NPN(Isf Xti=3 Eg=1.11 Vaf0
> + Bf@0 Ise=0 Ne=1.5 Ikf=0 Nk=.5 Xtb=1.5 Var0
> + Br=1 Isc=0 Nc=2 Ikr=0 Rc=0 Cjc=2p Mjc=.3333
> + Vjc=.75 Fc=.5 Cje=5p Mje=.3333 Vje=.75 Trn
> + Tf=1n Itf=1 Xtf=0 Vtf)
> 
> .model ddpnp PNP(Isf Xti=3 Eg=1.11 Vaf0
> + Bf 0 Ise=0 Ne=1.5 Ikf=0 Nk=.5 Xtb=1.5 Var0
> + Br=1 Isc=0 Nc=2 Ikr=0 Rc=0 Cjc=2p Mjc=.3333
> + Vjc=.75 Fc=.5 Cje=5p Mje=.3333 Vje=.75 Trn
> + Tf=1n Itf=1 Xtf=0 Vtf)
> 
> .ends
> *----------end of subcircuit model-----------
>