LM386 & Spice

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

Reply to
tabbypurr
Loading thread data ...

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
Reply to
Tim Wescott

Untested, so I don't know its quality...

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.
Reply to
Jim Thompson

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/
Reply to
bitrex

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/
Reply to
bitrex

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
Reply to
Winfield Hill

n

t
o

l
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 wil l be bought. I should put a webpage up explaining what I'm doing, or will h ave to re-explain it over & over. In brief its to produce circuits people i n the 3rd world can make from scrap, and sell to get food etc.

NT

Reply to
tabbypurr

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

Reply to
tabbypurr

n

t
o

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.

l

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 ca n 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 delive r about 15-20mA while railing.

NT

Reply to
tabbypurr

About the only time they don't oscillate is when you want them to.

Big electrolytics cost $$, though.

--
www.wescottdesign.com
Reply to
Tim Wescott

For your purposes you need to make sure that the IC model you use correctly models both the chip's sensitivity to power supply variation AND the chip's propensity draw current proportional to the audio. I would breadboard something and spend some quality time with an oscilloscope and a signal generator figuring this out.

You also need to make sure that you have a good model of the increasing battery impedance as the voltage dies. A model that is semi-realistic in a very conservative (safe, not Obama-hating) sort of way is use a voltage source that's 1.5V/cell, with enough series resistance to bring the voltage under load to about 0.9V/cell. Real dry-cell batteries act like they have that much series resistance in there, but the effective series resistance is bypassed by a bunch of effective capacitors. Pretending that those caps aren't there will make life harder for your circuit; if you can make it work under that circumstance, you probably have it made in the shade.

I'm pretty sure that the power supply bypassing that you need is proportional to the series cap from the audio out to the speaker, but I have absolutely no clue what that constant of proportionality is. If you're having people make this from found parts you need to figure out how to tell them that "using a big C3 means you need a big C8" or whatever.

--
www.wescottdesign.com
Reply to
Tim Wescott

386s mostly use not big lytics, they're only driving a 2" speaker after all. Not going to be much bass there.

NT

Reply to
tabbypurr

yup, 2 things I totally don't know.

I am somewhat tempted to do it oldschool. Feed it audio, find out when it goes unstable & double that.

I'd rather use 0.8v/cell to wring the last drops out

I'd rather be as realistic as possible, but like you say is the best model I can do for now.

that last bit's easy enough. I'll try it with different C_outs. I can try 4&16 ohm speakers too, which will change it again.

Thanks

NT

Reply to
tabbypurr

Some time I looked for a LM386 replacement - found this:

TDA7052A DIL8 1W 7mA , 8 ohm bridged 4.5-max.18V Has: Depop, Short-Circuit and Thermal Protection - and is bridged so an output capacitor is not needed:.

-

LM386 DIL8 4mA 4-12V

As you can see, the quiescent current is lower than the bridged TDA7052A.

Glenn

Reply to
Glenn

I don't think there will be many drops to wring out between 0.9 and 0.8V, but for your intended market it's good to try.

Keep in mind that if you use that really conservative model of mine it'll probably work down a lot farther than 0.9V/cell, at least for the part that's due to battery internal impedance.

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

hen

Some unnecessary features there for its typical use. TDA7052A @ Farnell:

LM386 same seller:

NT

Reply to
tabbypurr

o

when

A.

NT

Reply to
tabbypurr

What? No long-throw 2" speakers ?>:-} ...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

On 20/04/15 18.21, Tim Wescott wrote: ...

Something like this:

@article{, author = "Chris Toumazou, John Lidgey", title = "Current amplifiers from voltage op-amps", journal = "Electronics World & Wireless World", pages = "568--573", month = "7", year = "1990", publisher = "Reed Elsevier group", keywords = "CA3096" }

formatting link
Something like on page 27 lower schematic, with e.g LF356 or TL071? Removing C2. Use output from collector 2N2219,2N2905 for feedback.

What is this circuit called?

The bandwidth will be hugely increased.

-

Another circuits that comes to mind:

Art of Electronics, 3rd edition

page 318: The Monticelli circuit.

Patent 5. jul 1984:

formatting link

[4] D. M. Monticelli, ?A quad CMOS single-supply op amp with rail-to-rail output swing,? IEEE J. Solid-State Circuits, vol. SC-21, no. 6, pp. 1026-1034, Dec. 1986.
formatting link

Glenn

Reply to
Glenn

On 20/04/15 23.24, snipped-for-privacy@gmail.com wrote: ...

Then how about this "high-power" low voltage:

LM4871MX 2-5.5V 3W 6.5mA soic-8, bridged:

formatting link

formatting link
Quote: "... No Output Coupling Capacitors, Bootstrap Capacitors, or Snubber Circuits Required ..."

Glenn

Reply to
Glenn

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.