why is this amp clipping?

formatting link

This is universalopamp2, level.2, and the current limit should be 1 amp. It's behaving like it has internal resistance in series with its output, or a soft current limit.

If I use the level.1 amp, which presumably ignores the current limit parameter, it swings to the rails.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin
Loading thread data ...

I wish you would post the ASC file so we can confirm your results. Otherwise we are just guessing in the dark.

Reply to
Steve Wilson

mandag den 24. september 2018 kl. 02.22.07 UTC+2 skrev John Larkin:

maybe it doesn't have rail-to-rail output ?

try upping the supply a few volt and see if it goes away on the high side

Reply to
Lasse Langwadt Christensen

One param is rail=0, which should make it rro. Another is ilimit=1. Something else is going on.

Making rail=1 or so makes it worse.

Nope, the waveform doesn't change.

I guess I'll just run at level.1, which ignores the ilimit and rail params. It's just strange.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

There are 4 levels in universalopamp2. Here are the first two

Op Amp In SPICE terms an op amp is not really a model it is a sub-circuit (ie it is made up of combination of the basic model elements). However LTSpice has a handy universal op amp sub-circuit with 4 levels of complexity. To use it select the UniversalOpamp component from the op amp library (it's the very last one).

You can select the level by Right Clicking on the component (NB not CTRL right clicking) Level 1 is a basic 1 pole op amp that doesn't even use supply rails Level 2 is my favourite. It has supply rails, voltage, current and slew rate limits.

For more info on the parameters of the universal op-amp look at the file C:\Program Files\LTC\SwCADIII\examples\Educational\UniversalOpamp.asc

formatting link

Here are the 4 levels

This demonstrates the use of the symbol UniversalOpamp2(improved version to the UniversalOpamp). You set the SpiceModel to be higher to simulate more aspects of opamp behavior. Level1 is merely a transconductance working into an R||C and doesn't use power from the supplies. Level2 adds slewrate, current and voltage limits. Level3a adds a second pole. Level3b adds a delay to the dominate pole response. Noise is modeled at all levels.

formatting link

Your circuit will behave differently as you select different levels.

Reply to
Steve Wilson

You can save a lot of wasted thrshing about. Just go directly to

C:\Program Files\LTC\SwCADIII\examples\Educational\UniversalOpamp.asc

There is a lot of useful information you should know. Thanks to JL for raising the issue.

Reply to
Steve Wilson

I've tried all the opamp levels, and I have seen the example.

I'm simulating a circuit that uses the TCA0372 power opamp, which can output a full amp at about 1 volt off the rails, and UniversalOpamp2 can't model it. Level.1 ignores the power supplies, so clearly can't simulate clipping or calculate power dissipation.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

Why not post your ASC?

If none of the levels do what you want. then make your own model.

Reply to
Steve Wilson

I managed to plug the old Motorola TCA0372 macromodel into LT Spice but it doesn't want to converge. It does the startup stuff forever.

grrrrr.

I guess I'll have to design this product the old-fashioned way, with math and stuff.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

On Sunday, September 23, 2018 at 11:22:06 PM UTC-4, John Larkin wrote:

That's no fun. Try this

Version 4 SHEET 1 1288 680 WIRE 1008 -160 448 -160 WIRE 880 -128 528 -128 WIRE 1184 -128 880 -128 WIRE 880 -112 880 -128 WIRE 1184 -112 1184 -128 WIRE 528 -96 528 -128 WIRE 448 -80 448 -160 WIRE 496 -80 448 -80 WIRE 688 -64 560 -64 WIRE 768 -64 688 -64 WIRE 816 -64 768 -64 WIRE 352 -48 336 -48 WIRE 496 -48 352 -48 WIRE 336 -32 336 -48 WIRE 1184 -16 1184 -32 WIRE 880 32 880 -16 WIRE 1008 32 1008 -160 WIRE 1008 32 880 32 WIRE 1088 32 1008 32 WIRE 1104 32 1088 32 WIRE 1104 48 1104 32 WIRE 336 64 336 48 WIRE 880 80 880 32 WIRE 768 128 768 -64 WIRE 816 128 768 128 WIRE 1104 144 1104 128 WIRE 528 192 528 -32 WIRE 880 192 880 176 WIRE 880 192 528 192 WIRE 528 224 528 192 WIRE 528 320 528 304 FLAG 1184 -16 0 FLAG 528 320 0 FLAG 336 64 0 FLAG 1088 32 Vout FLAG 352 -48 Vin FLAG 1104 144 0 FLAG 688 -64 U1O SYMBOL voltage 336 -48 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V1 SYMATTR Value SINE(0 20 1kHz) SYMBOL voltage 528 208 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V2 SYMATTR Value -15.53 SYMBOL voltage 1184 -128 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V3 SYMATTR Value +15.53 SYMBOL res 1088 32 R0 SYMATTR InstName R1 SYMATTR Value 14 SYMBOL opamps\\1pole 528 -64 R0 SYMATTR InstName U1 SYMATTR SpiceLine ilimit=1 rail=0 Vos=0 SYMBOL npn 816 -112 R0 SYMATTR InstName Q1 SYMATTR Value TIP31C SYMBOL pnp 816 176 M180 SYMATTR InstName Q2 SYMATTR Value TIP32C TEXT 384 -216 Left 2 !.tran 0 1m 0 1u TEXT 384 -248 Left 2 ;'Larkin RRO OpAmp

Reply to
Steve Wilson

John Larkin

it is spice, nothing to do with reality.

probably need tweeking a little pappa mama ra meter in its model.

Reply to
<698839253X6D445TD

Tell me when you can get two identical 'real' circuits to behave exactly the same. Which one is 'real'?

Or three circuits? Or four?

You can easily get any number of identical circuits to behave exactly the same in Spice, to within the limits of numerical accuracy.

Over the decades, Spice has been taught to millions of engineers. It is an invaluable tool, if you know how to use it.

Reply to
Steve Wilson

Steve Wilson thought

Strawman

A _real_ circuit is one that you can power up, and does whatever. Spice is no more than the like of NASA's 'artist impressions of alien planets'.

To the limits that model fits reality, and it never 100% will. Especially in the RF field you would need a lot more than that simple spice to get anything working. Or experience.

Interesting in this context is that sort of recently (last year or a year ago IIRC) somebody started a research into 'make a neural net say WHY it makes a decision'. You see AI (alias neural nets) more and more make decisions, even life supporting decisions (medical diagnosis, controlling cars, trains, and planes, etc). Just like somebody who has experience designing some circuit will make decisions that spice does no have, and never will have, a clue about. It is called 'experience' in common language.

Much more important than a simple mathematical construct,

The difference between going to the moon and returning (they had no spice) and string theory (mamamatical babble).

Earth was flat was also toucht to the scientists of those days. When people come from uni-verse-city who never held a soldering iron in their front legs, and never did see a real transistor in their life, I'd say the writing on the wall (or graffiti in plain language) announces the end that was predicted by all the prophets .. LOL

Copyright

Reply to
<698839253X6D445TD

You could say the same about algebra and Ohm's Law.

Spice is great, when used carefully. The alternatives are to do a heap of nonlinear calculus, or design everything by breadboarding and fiddling.

I just wish UniversalOpamp2 behaved as it is parameterized. Not that it's documented very well.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

That stalls on not finding 1pole, but something like that would work. It works if I drop in most any rrio opamp from the library.

Where does opamps\\1pole come from?

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

On Monday, September 24, 2018 at 10:38:12 AM UTC-4, John Larkin wrote: .

I can't believe it. I use IV, since it runs in XP. In XVII, it can't find the opamp symbol. But if you go to Educational/opamp.asc, which also uses opamp, it has no trouble finding the symbol and running.

I am becoming convinced that Mike E. did not write XVII. There are too many glitches and aberrations like this. I recommend returning to IV to avoid these problems.

Anyway, thanks for taking a look.

Probably from the beginning. Maybe PSpice.

Reply to
Steve Wilson

I also find that IV on XP runs about twice as fast as XVII on Win7. I haven't tried IV on Win7, but I find everything runs slower on W7.

Reply to
Steve Wilson

XVII runs fine under Win7. Sims seem to run a bit faster than IV under Win7, maybe 25% or so.

XVII really screwed up the simulation editors. I complained directly to Mike, and he likes them the new way they are. He is still involved.

Since IV is not supported, and updates don't seeem to work any more, XVII is the way to go. It's 64 bit code, so probably won't run under XP.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

You still run IV? Then I don't need to waste time trying to convert my IV files to XVII.

But he doesn't write the kind of crap that's in XVII.

XVII 32 bit won't run in XP either. It makes a call that doesn't exist in XP.

You don't need updates for IV. It runs fine with none of the snags, aberrations, gotchas and quirks of XVII.

Reply to
Steve Wilson

John Larkin

About ohms's law yes, about algebra no. Ohm's law is from an _observation_ in experiments done, and in essentially also incomplete. We now know current it is quantized for example, one electron at the time.

Bit of spices is nice in food.

Exactly, do not make it too hot, I once tried eating some peppers, were much stronger than I expected... WAOOAOOA

That spice ran on my old Linux PC in wine, on this one it somehow crashes the system. So I removed it (not the system but spice). And to tell you the truth... I needed it for some filter but found some website with an online filter calculator that actually did draw the phase/ frequency response for most filters. Nothing special but saves time, for that sort of thing sure use a computah.

I am still curious about your waveform simulator or whatever you call it, what is the sample frequency?

Reply to
<698839253X6D445TD

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.