Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to Simulate Op Amp Supply Current in Ltspice

118 views
Skip to first unread message

D from BC

unread,
Mar 15, 2009, 10:58:32 PM3/15/09
to
How do I simulate op amp supply current in Ltspice?

I think I pick level 3a but I don't know the parameter name for the
supply current.


D from BC
myrealaddress(at)comic(dot)com
BC, Canada
Posted to usenet sci.electronics.design

Helmut Sennewald

unread,
Mar 16, 2009, 2:35:32 AM3/16/09
to
"D from BC" <myreal...@comic.com> schrieb im Newsbeitrag
news:t4frr4ploerlri4ko...@4ax.com...

Hello D from BC,

I think you talk about the quiescent current.
Just add a resistor between V+ and V- for every opamp in your schematic.

If you want do that in the model file, you have to save it with a different
name.
This would require a modified symbol too.

Best regards,
Helmut


D from BC

unread,
Mar 16, 2009, 3:00:56 AM3/16/09
to

It's a bit rough, but might do. Thanks..

Brett Holden

unread,
Mar 16, 2009, 11:33:31 PM3/16/09
to

"Helmut Sennewald" <helmuts...@t-online.de> wrote in message
news:gpkrvk$prn$00$1...@news.t-online.com...
Many manufacturers do not accurately supply current. That includes Linear
Technology. I wanted to monitor current using a LT1097 (if memory serves)
low power amplifier as a comparator and "measured" something like 13ma into
the V+ and V- terminals.

When I complained about this to Mike Englehardt's department I got the
excuse "we don't model supply current" and also, "don't use an opamp we have
comparators".

I thought their reply was pretty lame.

D from BC

unread,
Mar 17, 2009, 12:28:46 AM3/17/09
to

Bummer :(
Oh well.. I'll have to make do..
Thanks

Brett Holden

unread,
Mar 17, 2009, 1:45:16 PM3/17/09
to

"D from BC" <myreal...@comic.com> wrote in message
news:5n9ur4hveljebg51t...@4ax.com...

Pardon me, it was about a year ago and my memory is foggy. I don't want to
be unfair to LTC.

They probaby said "... don't always model supply current for opamps". Not
always. Or more probably it was something like "... not modelled for use as
comparator". I forget exactly, so it was wrong for me to try and quote what
I don't accurately remember.

In all fairness, I did not breadboard the circuit. For all I know the LT1097
(and a handful of other opamps I tried) might actually draw +/- 13ma when
used as a comparator.

But, I decided to use a comparator. Supply current can often be measured
just like Helmut stated, but not always.


Jim Thompson

unread,
Mar 17, 2009, 3:55:03 PM3/17/09
to
On Tue, 17 Mar 2009 13:45:16 -0400, "Brett Holden"
<brett...@bellso.net> wrote:

Power supply currents are tricky to model for simulation. It's easy
enough to include load currents, but currents flowing in compensation
capacitors can have some pretty wild behavior.

The only real way to do a behavioral model properly is to start with a
device-level netlist, then match behavioral to device-level.

I get calls all the time about modeling with two consistent results:

(1) The semiconductor company won't share the "real" netlist, wanting
modeling from the data sheet... what a crock, and...

(2) They expect it to be done for virtually free.

Thus I haven't ever done any commercial modeling... just for my own
internal use where I already have access to an accurate netlist, and
process library.

I'm considering model generation on the side, _as_I_can_get_to_it_ ...
free... for non-commercial use.

Might be good advertising and get me some design jobs ;-)

What would people like to see modeled?

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| 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

D from BC

unread,
Mar 17, 2009, 4:10:57 PM3/17/09
to

A LMV431 shunt regulator?? :)
It can be modeled with an op amp that draws about 100uA of quiescent

Jim Thompson

unread,
Mar 17, 2009, 4:57:50 PM3/17/09
to

Ask and yee shall receive... actually done back in 2002 ;-)

.SUBCKT LMV431 R A K
** by Jim Thompson, © 2002-2009 **
R_R1 N_1 N_2 0.25
E_BUF1 N_3 0 R 0 1
R_R7 N_3 A 1Meg
V_V1 N_2 A 1.24V
D_D1 A K D1N4148
F_F1 K A VF_F1 1
VF_F1 N_3 N_1 0V
.ENDS LMV431

D from BC

unread,
Mar 17, 2009, 5:07:20 PM3/17/09
to
On Tue, 17 Mar 2009 13:57:50 -0700, Jim Thompson
<To-Email-Use-Th...@My-Web-Site.com> wrote:

Neato..

Charlie E.

unread,
Mar 19, 2009, 2:32:20 PM3/19/09
to
On Tue, 17 Mar 2009 12:55:03 -0700, Jim Thompson
<To-Email-Use-Th...@My-Web-Site.com> wrote:

Hi Jim,
I remember several requests for modeling of supply current 'back in
the day' and it always got the same reply - healthy laughter!

Same as modeling tants for their more emphatic behaviors... 8-)

Charlie

Jim Thompson

unread,
Mar 19, 2009, 2:40:20 PM3/19/09
to
On Thu, 19 Mar 2009 18:32:20 GMT, Charlie E. <edmo...@ieee.org>
wrote:

In a way, modeling power supply current shouldn't matter, _provided_
there is adequate bypassing.


But, in my chip designs, I'm always checking that because micro-power
seems to be the watchword today.

Charlie E.

unread,
Mar 19, 2009, 4:57:50 PM3/19/09
to
On Thu, 19 Mar 2009 11:40:20 -0700, Jim Thompson
<To-Email-Use-Th...@My-Web-Site.com> wrote:

>On Thu, 19 Mar 2009 18:32:20 GMT, Charlie E. <edmo...@ieee.org>
>wrote:
>

...Jim Thompson
>>
>>Hi Jim,
>>I remember several requests for modeling of supply current 'back in
>>the day' and it always got the same reply - healthy laughter!
>>
>>Same as modeling tants for their more emphatic behaviors... 8-)
>>
>>Charlie
>
>In a way, modeling power supply current shouldn't matter, _provided_
>there is adequate bypassing.
>
>
>But, in my chip designs, I'm always checking that because micro-power
>seems to be the watchword today.
>
> ...Jim Thompson

Ah, but you see, there is this one trick, where you feed the power
supplies via a small resistance, and then connect transistors to the
power supply pins to build a higher power opamp out of the chip,
However, since almost none of the opamp models actual reflect the
true, tranisient nature of the current draw on the chip, you can't
model this in PSpice, you have to breadboard it and try to get the
bias right.

Charlie

Jim Thompson

unread,
Mar 19, 2009, 5:43:20 PM3/19/09
to
On Thu, 19 Mar 2009 20:57:50 GMT, Charlie E. <edmo...@ieee.org>
wrote:

>On Thu, 19 Mar 2009 11:40:20 -0700, Jim Thompson
><To-Email-Use-Th...@My-Web-Site.com> wrote:
>
>>On Thu, 19 Mar 2009 18:32:20 GMT, Charlie E. <edmo...@ieee.org>
>>wrote:
>>
> ...Jim Thompson
>>>
>>>Hi Jim,
>>>I remember several requests for modeling of supply current 'back in
>>>the day' and it always got the same reply - healthy laughter!
>>>
>>>Same as modeling tants for their more emphatic behaviors... 8-)
>>>
>>>Charlie
>>
>>In a way, modeling power supply current shouldn't matter, _provided_
>>there is adequate bypassing.
>>
>>
>>But, in my chip designs, I'm always checking that because micro-power
>>seems to be the watchword today.
>>
>> ...Jim Thompson
>
>Ah, but you see, there is this one trick, where you feed the power
>supplies via a small resistance, and then connect transistors to the
>power supply pins to build a higher power opamp out of the chip,
>However, since almost none of the opamp models actual reflect the
>true, tranisient nature of the current draw on the chip, you can't
>model this in PSpice, you have to breadboard it and try to get the
>bias right.
>
>Charlie

Yep. I recall first using that 'trick' around 1970 ;-)

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

Bill Clinton also had a Stimulus Package. Her name was Monica.

krw

unread,
Mar 19, 2009, 6:30:41 PM3/19/09
to
On Thu, 19 Mar 2009 11:40:20 -0700, Jim Thompson
<To-Email-Use-Th...@My-Web-Site.com> wrote:

>On Thu, 19 Mar 2009 18:32:20 GMT, Charlie E. <edmo...@ieee.org>
>wrote:

<snip>

>>Hi Jim,
>>I remember several requests for modeling of supply current 'back in
>>the day' and it always got the same reply - healthy laughter!
>>
>>Same as modeling tants for their more emphatic behaviors... 8-)
>>
>>Charlie
>
>In a way, modeling power supply current shouldn't matter, _provided_
>there is adequate bypassing.

How do you assure adequate bypassing? How do you get the power grid
right? Package? Someone has to do all that rot.

>But, in my chip designs, I'm always checking that because micro-power
>seems to be the watchword today.

Mega-power (130W processor - 3GHz) is also a problem. There is a ton
of power distribution simulation done on logic ASICs.

Helmut Sennewald

unread,
Mar 19, 2009, 6:34:23 PM3/19/09
to

"Charlie E." <edmo...@ieee.org> schrieb im Newsbeitrag
news:p8c5s4lagv37br17f...@4ax.com...


Hello Charlie,

I have made a subcircuit which reflects the output current to the supply
voltages.
You can download it from the LTspice Yahhoo group.
There is the model, symbol and an exmple in this folder.

Files > Lib > Opamp Load Curr. From Supplies
http://tech.groups.yahoo.com/group/LTspice/files/%20Lib/Opamp%20Load%20Curr.%20From%20Supplies/

.SUBCKT xopps in out psp psm vgnd
* Additional quiescent current if needed.
* Example: X1 xopps .... IQ=1m
.PARAM IQ=1p
V1 in out 0
G1 psp vgnd VALUE={if((I(V1)>0),(I(V1)+IQ),IQ)}
G2 vgnd psm VALUE={if((I(V1)<0),(-I(V1)+IQ),IQ)}
.ends
Best regards,Helmut


Jim Thompson

unread,
Mar 19, 2009, 6:50:50 PM3/19/09
to

That's fine if IQ is a constant, relative to output swing... not
accurate for most OpAmps I know of, plus you have compensation
capacitor slewing currents in the real world.

Helmut Sennewald

unread,
Mar 19, 2009, 7:24:44 PM3/19/09
to

"Jim Thompson" <To-Email-Use-Th...@My-Web-Site.com> schrieb im
Newsbeitrag news:cri5s4546u6o9ttsf...@4ax.com...


Hello Jim,

"A bird in the hand is worth two in the bush."

Best regards,
Helmut


Jim Thompson

unread,
Mar 19, 2009, 8:22:07 PM3/19/09
to
On Fri, 20 Mar 2009 00:24:44 +0100, "Helmut Sennewald"
<helmuts...@t-online.de> wrote:

[snip]


>
>
>Hello Jim,
>
>"A bird in the hand is worth two in the bush."
>
>Best regards,
>Helmut
>

Of course ;-)

I do pretty much the same as you, except I merge it into the OpAmp
model, avoiding the "{IF(..." crossover.

As I've said before, _accurate_ modeling of PS current is not trivial.

JosephKK

unread,
Mar 21, 2009, 2:13:14 PM3/21/09
to
On Thu, 19 Mar 2009 20:57:50 GMT, Charlie E. <edmo...@ieee.org>
wrote:

>On Thu, 19 Mar 2009 11:40:20 -0700, Jim Thompson
><To-Email-Use-Th...@My-Web-Site.com> wrote:
>
>>On Thu, 19 Mar 2009 18:32:20 GMT, Charlie E. <edmo...@ieee.org>
>>wrote:
>>
> ...Jim Thompson
>>>
>>>Hi Jim,
>>>I remember several requests for modeling of supply current 'back in
>>>the day' and it always got the same reply - healthy laughter!
>>>
>>>Same as modeling tants for their more emphatic behaviors... 8-)
>>>
>>>Charlie
>>
>>In a way, modeling power supply current shouldn't matter, _provided_
>>there is adequate bypassing.
>>
>>
>>But, in my chip designs, I'm always checking that because micro-power
>>seems to be the watchword today.
>>
>> ...Jim Thompson
>
>Ah, but you see, there is this one trick, where you feed the power
>supplies via a small resistance, and then connect transistors to the
>power supply pins to build a higher power opamp out of the chip,
>However, since almost none of the opamp models actual reflect the
>true, tranisient nature of the current draw on the chip, you can't
>model this in PSpice, you have to breadboard it and try to get the
>bias right.
>
>Charlie

If anyone remembers the old LH0002 buffers you could try a subcircuit
that is similar.
.

Robert Monsen

unread,
Mar 21, 2009, 9:24:32 PM3/21/09
to
On Tue, 17 Mar 2009 13:57:50 -0700, Jim Thompson
<To-Email-Use-Th...@My-Web-Site.com> wrote:

E_BUF1 N_3 A R A 1

>R_R7 N_3 A 1Meg
>V_V1 N_2 A 1.24V
>D_D1 A K D1N4148
>F_F1 K A VF_F1 1
>VF_F1 N_3 N_1 0V
>.ENDS LMV431
>
> ...Jim Thompson

First thing I did was use it to build a follower... more current out
than in. Cool trick!

Regards,
Bob Monsen

0 new messages