Electronics-Related.com
Forums

LM386 & Spice

Started by Unknown April 19, 2015
I need to sim an LM386 amp to see what decoupling caps are neded for stability on end of life batteries. Is there a Spice model for this anywhere? My LTSpice seems to lack any of the IC models I'm likely to use.


NT
On Sun, 19 Apr 2015 05:08:15 -0700, tabbypurr wrote:

> I need to sim an LM386 amp to see what decoupling caps are neded for > stability on end of life batteries. Is there a Spice model for this > anywhere? My LTSpice seems to lack any of the IC models I'm likely to > use. > > > NT
Wow -- is that still being used in new production, or is it just used when people are reading old project magazines? At any rate -- from experience the answer is "lots and lots". You'd need an unusually detailed Spice model to find this out, and you'd need to accurately characterize the behavior of the battery at end-of-life. I'm pretty sure that the issue isn't the low voltage, but rather the fact that the battery's internal impedance goes up, which allows the voltage rail to flop around in response to current demands, which the LM386 then responds to and feeds back in the form of current demand. You may end up with a lower BOM cost and less board space with a rail-rail op-amp and a NPN-PNP transistor pair, assuming that there's not a more modern audio amp chip that'll do ya. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On Sun, 19 Apr 2015 05:08:15 -0700 (PDT), tabbypurr@gmail.com wrote:

>I need to sim an LM386 amp to see what decoupling caps are neded for stability on end of life batteries. Is there a Spice model for this anywhere? My LTSpice seems to lack any of the IC models I'm likely to use. > > >NT
Untested, so I don't know its quality... <http://www.electro-tech-online.com/threads/lm386-model-in-ltspice.29096/> Found on the LTspice List... * Model from Dave Dilatush * lm386 subcircuit model follows: * IC pins: 2 3 7 1 8 5 6 4 * | | | | | | | | .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 1.1 q6 10014 10013 gnd ddnpn * voltage gain stage & rolloff cap: * m was 1 q7 10017 10014 gnd ddnpn 10 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: * m=10 for q10 q10 10018 10017 out ddpnp 10 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: * BF was 400, Is=10f .model ddnpn NPN(Is=10f Xti=3 Eg=1.11 Vaf=100 + Bf=150 Ise=0 Ne=1.5 Ikf=0 Nk=.5 Xtb=1.5 Var=100 + Br=1 Isc=0 Nc=2 Ikr=0 Rc=0 Cjc=2p Mjc=.3333 + Vjc=.75 Fc=.5 Cje=5p Mje=.3333 Vje=.75 Tr=10n + Tf=1n Itf=1 Xtf=0 Vtf=10) * BF was 200, Tf=1n, Tr=10n, Is=10f .model ddpnp PNP(Is=10f Xti=3 Eg=1.11 Vaf=100 + Bf=40 Ise=0 Ne=1.5 Ikf=0 Nk=.5 Xtb=1.5 Var=100 + Br=1 Isc=0 Nc=2 Ikr=0 Rc=0 Cjc=2p Mjc=.3333 + Vjc=.75 Fc=.5 Cje=5p Mje=.3333 Vje=.75 Tr=100n + Tf=10n Itf=1 Xtf=0 Vtf=10) .ends ...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.
Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com>
 Wrote in message:
> On Sun, 19 Apr 2015 05:08:15 -0700 (PDT), tabbypurr@gmail.com wrote: > >>I need to sim an LM386 amp to see what decoupling caps are neded for stability on end of life batteries. Is there a Spice model for this anywhere? My LTSpice seems to lack any of the IC models I'm likely to use. >> >> >>NT > > Untested, so I don't know its quality... > > <http://www.electro-tech-online.com/threads/lm386-model-in-ltspice.29096/>
I believe the Yahoo LTSpice users group has an improved model and subcircuit drawing for the LM386, I will look... -- ----Android NewsGroup Reader---- http://usenet.sinaapp.com/
Tim Wescott <seemywebsite@myfooter.really> Wrote in message:
> On Sun, 19 Apr 2015 05:08:15 -0700, tabbypurr wrote: > >> I need to sim an LM386 amp to see what decoupling caps are neded for >> stability on end of life batteries. Is there a Spice model for this >> anywhere? My LTSpice seems to lack any of the IC models I'm likely to >> use. >> >> >> NT > > Wow -- is that still being used in new production, or is it just used when > people are reading old project magazines? > > At any rate -- from experience the answer is "lots and lots". You'd need > an unusually detailed Spice model to find this out, and you'd need to > accurately characterize the behavior of the battery at end-of-life. I'm > pretty sure that the issue isn't the low voltage, but rather the fact that > the battery's internal impedance goes up, which allows the voltage rail to > flop around in response to current demands, which the LM386 then responds > to and feeds back in the form of current demand. > > You may end up with a lower BOM cost and less board space with a rail-rail > op-amp and a NPN-PNP transistor pair, assuming that there's not a more > modern audio amp chip that'll do ya. > > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com >
The LM386 is about ~20 cents in singles from some suppliers, so yeah I bet it is still being used... -- ----Android NewsGroup Reader---- http://usenet.sinaapp.com/
bitrex wrote...
> Tim Wescott wrote: >> tabbypurr wrote: >> >>> I need to sim an LM386 amp to see what decoupling caps are neded for >>> stability on end of life batteries. Is there a Spice model for this >>> anywhere? My LTSpice seems to lack any of the IC models I'm likely to >>> use. >>> >>> >>> NT >> >> Wow -- is that still being used in new production, or is it just used when >> people are reading old project magazines? >> >> At any rate -- from experience the answer is "lots and lots". You'd need >> an unusually detailed Spice model to find this out, and you'd need to >> accurately characterize the behavior of the battery at end-of-life. I'm >> pretty sure that the issue isn't the low voltage, but rather the fact that >> the battery's internal impedance goes up, which allows the voltage rail to >> flop around in response to current demands, which the LM386 then responds >> to and feeds back in the form of current demand. >> >> You may end up with a lower BOM cost and less board space with a rail-rail >> op-amp and a NPN-PNP transistor pair, assuming that there's not a more >> modern audio amp chip that'll do ya. > > The LM386 is about ~20 cents in singles from some suppliers, > so yeah I bet it is still being used...
Yep, parts like the LM386 are genuine jellybeans, useful, but also very low cost. This is why they last decade after decade. TI's version costs 32 cents from Newark. -- Thanks, - Win
On Monday, 20 April 2015 17:21:58 UTC+1, Tim Wescott  wrote:
> On Sun, 19 Apr 2015 05:08:15 -0700, tabbypurr wrote: > > > I need to sim an LM386 amp to see what decoupling caps are neded for > > stability on end of life batteries. Is there a Spice model for this > > anywhere? My LTSpice seems to lack any of the IC models I'm likely to > > use. > > > > > > NT > > Wow -- is that still being used in new production, or is it just used when > people are reading old project magazines? > > At any rate -- from experience the answer is "lots and lots". You'd need > an unusually detailed Spice model to find this out, and you'd need to > accurately characterize the behavior of the battery at end-of-life. I'm > pretty sure that the issue isn't the low voltage, but rather the fact that > the battery's internal impedance goes up, which allows the voltage rail to > flop around in response to current demands, which the LM386 then responds > to and feeds back in the form of current demand. > > You may end up with a lower BOM cost and less board space with a rail-rail > op-amp and a NPN-PNP transistor pair, assuming that there's not a more > modern audio amp chip that'll do ya.
386 is hugely popular, its the go-to chip for driving a 2" speaker. Cheap & minimal external parts. The BOM on more or less all the projects I'm doing now is zero. Nothing will be bought. I should put a webpage up explaining what I'm doing, or will have to re-explain it over & over. In brief its to produce circuits people in the 3rd world can make from scrap, and sell to get food etc. NT
On Monday, 20 April 2015 18:08:11 UTC+1, bitrex  wrote:
> Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> > Wrote in message: > > On Sun, 19 Apr 2015 05:08:15 -0700 (PDT), nt wrote: > > > >>I need to sim an LM386 amp to see what decoupling caps are neded for stability on end of life batteries. Is there a Spice model for this anywhere? My LTSpice seems to lack any of the IC models I'm likely to use. > >> > >> > >>NT > > > > Untested, so I don't know its quality... > > > > <http://www.electro-tech-online.com/threads/lm386-model-in-ltspice.29096/> > > I believe the Yahoo LTSpice users group has an improved model and > subcircuit drawing for the LM386, I will look...
thank you both. I now have to learn what to .name these files and where to put them, and what else I need to do. And where the 'spice' folder is - most apps seems to turn up in multiple locations on this debian based system. I'll go look for a FAQ. NT
On Monday, 20 April 2015 17:21:58 UTC+1, Tim Wescott  wrote:
> On Sun, 19 Apr 2015 05:08:15 -0700, tabbypurr wrote: > > > I need to sim an LM386 amp to see what decoupling caps are neded for > > stability on end of life batteries. Is there a Spice model for this > > anywhere? My LTSpice seems to lack any of the IC models I'm likely to > > use. > > > > > > NT > > Wow -- is that still being used in new production, or is it just used when > people are reading old project magazines? > > At any rate -- from experience the answer is "lots and lots". You'd need > an unusually detailed Spice model to find this out, and you'd need to > accurately characterize the behavior of the battery at end-of-life. I'm > pretty sure that the issue isn't the low voltage, but rather the fact that > the battery's internal impedance goes up, which allows the voltage rail to > flop around in response to current demands, which the LM386 then responds > to and feeds back in the form of current demand.
exactly. I get to define end of life, and it'll be the resistance at which one can no longer get a useful amount of audio power out.
> You may end up with a lower BOM cost and less board space with a rail-rail > op-amp and a NPN-PNP transistor pair, assuming that there's not a more > modern audio amp chip that'll do ya.
I'm going with the 386 first because there are so many of them out there in junk. Is there an opamp about, tolerably common in consumer goods, that can drive to each rail with enough current to run a little output tr? A watt is quite enough from the output pair, but beta tends to tank as i goes up & Vce down, so can only count on 20 or 30. So the opamp would need to deliver about 15-20mA while railing. NT
On Mon, 20 Apr 2015 13:08:49 -0400, bitrex wrote:

> Tim Wescott <seemywebsite@myfooter.really> Wrote in message: >> On Sun, 19 Apr 2015 05:08:15 -0700, tabbypurr wrote: >> >>> I need to sim an LM386 amp to see what decoupling caps are neded for >>> stability on end of life batteries. Is there a Spice model for this >>> anywhere? My LTSpice seems to lack any of the IC models I'm likely to >>> use. >>> >>> >>> NT >> >> Wow -- is that still being used in new production, or is it just used >> when people are reading old project magazines? >> >> At any rate -- from experience the answer is "lots and lots". You'd >> need an unusually detailed Spice model to find this out, and you'd need >> to accurately characterize the behavior of the battery at end-of-life. >> I'm pretty sure that the issue isn't the low voltage, but rather the >> fact that the battery's internal impedance goes up, which allows the >> voltage rail to flop around in response to current demands, which the >> LM386 then responds to and feeds back in the form of current demand. >> >> You may end up with a lower BOM cost and less board space with a >> rail-rail op-amp and a NPN-PNP transistor pair, assuming that there's >> not a more modern audio amp chip that'll do ya. >> >> -- >> >> Tim Wescott Wescott Design Services http://www.wescottdesign.com >> >> > The LM386 is about ~20 cents in singles from some suppliers, so > yeah I bet it is still being used...
About the only time they don't oscillate is when you want them to. Big electrolytics cost $$, though. -- www.wescottdesign.com