Electronics-Related.com
Forums

LTspice is a difficult tool to make useful

Started by Ricketty C May 28, 2020
I can't believe the difficulties I have sometimes with this tool.  So much of it is counter intuitive and even dysfunctional.  I just when through an hour or two trying to change a model connected to a FET.  Turns out that saving a matching symbol under the new name and editing the library file name in the symbol attributes doesn't cut it.  The symbol in the schematic has attributes taken from that symbol that it won't show you or let you edit from the schematic.  So once you change the symbol you have to delete the component from your schematic and add it back in again from the library.  

If the schematic is going to keep its own copy of the attribute, you would think it would show up in the attributes editing dialog with all the others. 

The last few days were spent fighting convergence problems which I ultimately solved by just using a damn LT part from their library rather than the part that I wanted. 

Bleech!  Every time I try to use LTspice it's like Lucy snagging the football away from Charlie Brown.  And just like Charlie, I keep coming back. 

-- 

  Rick C.

  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
Am 28.05.2020 um 10:48 schrieb Ricketty C:
> I can't believe the difficulties I have sometimes with this tool. So much of it is counter intuitive and even dysfunctional. I just when through an hour or two trying to change a model connected to a FET. Turns out that saving a matching symbol under the new name and editing the library file name in the symbol attributes doesn't cut it. The symbol in the schematic has attributes taken from that symbol that it won't show you or let you edit from the schematic. So once you change the symbol you have to delete the component from your schematic and add it back in again from the library. > > If the schematic is going to keep its own copy of the attribute, you would think it would show up in the attributes editing dialog with all the others. > > > Bleech! Every time I try to use LTspice it's like Lucy snagging the football away from Charlie Brown. And just like Charlie, I keep coming back. >
Hello Rick, LTspice is used by most R&D engineers, because its free and you get free support. There is a large and very helpful LTspice user group. Please join it. https://groups.io/g/LTspice > The last few days were spent fighting convergence problems which I ultimately solved by just using a damn LT part from their library rather than the part that I wanted. Especially the SPICE-models from Microchip make a lot of trouble due to convergence problems, because they contain a lot of functions like IF() and TABLE()) which have a discontinuous derivative. I simulate them often with the Universalopamp2 - SpiceModel level.3a or level3.b. Right-mouse-click on it and adjust GBW, slew rate and Rin. Helmut
On Thu, 28 May 2020 11:43:48 +0200, Helmut Sennewald
<helmutsennewald@t-online.de> wrote:

>Am 28.05.2020 um 10:48 schrieb Ricketty C: >> I can't believe the difficulties I have sometimes with this tool. So much of it is counter intuitive and even dysfunctional. I just when through an hour or two trying to change a model connected to a FET. Turns out that saving a matching symbol under the new name and editing the library file name in the symbol attributes doesn't cut it. The symbol in the schematic has attributes taken from that symbol that it won't show you or let you edit from the schematic. So once you change the symbol you have to delete the component from your schematic and add it back in again from the library. >> >> If the schematic is going to keep its own copy of the attribute, you would think it would show up in the attributes editing dialog with all the others. >> >> >> Bleech! Every time I try to use LTspice it's like Lucy snagging the football away from Charlie Brown. And just like Charlie, I keep coming back. >> > > >Hello Rick, > >LTspice is used by most R&D engineers, because its free and you get free >support. There is a large and very helpful LTspice user group. Please >join it. > >https://groups.io/g/LTspice > > > > > The last few days were spent fighting convergence problems which I >ultimately solved by just using a damn LT part from their library rather >than the part that I wanted. > >Especially the SPICE-models from Microchip make a lot of trouble due to >convergence problems, because they contain a lot of functions like IF() >and TABLE()) which have a discontinuous derivative. I simulate them >often with the Universalopamp2 - SpiceModel level.3a or level3.b. >Right-mouse-click on it and adjust GBW, slew rate and Rin. > >Helmut
LT Spice is wonderful. I'd pay a lot for it if I had to. I use Universalopamp2 by default too. If an opamp is sufficiently strange that Universalopamp2 won't be good enough, I use an available model and don't trust it. Analog Devices is behind on providing models lately, and some are buggy. -- John Larkin Highland Technology, Inc Science teaches us to doubt. Claude Bernard
Ricketty C <gnuarm.deletethisbit@gmail.com> wrote:

 >Bleech!  Every time I try to use LTspice it's like Lucy snagging the
 >football away from Charlie Brown.  And just like Charlie, I keep
 >coming back.

Of course, that is true. But LT-Spice is a tool written by an enginer
for other enginers and we all have a personality like Lucy.

If it was written by salesdruids it would look nice and cool without
any good functionality. I this case you are the football on the ground.

It is an interesting question how it will change now with
Analog. Perhaps it is a good idea to save a working copy for future
use....

Olaf


On Thu, 28 May 2020 18:09:06 +0200, olaf <olaf@criseis.ruhr.de> wrote:

>Ricketty C <gnuarm.deletethisbit@gmail.com> wrote: > > >Bleech! Every time I try to use LTspice it's like Lucy snagging the > >football away from Charlie Brown. And just like Charlie, I keep > >coming back. > >Of course, that is true. But LT-Spice is a tool written by an enginer >for other enginers and we all have a personality like Lucy.
There's a video interview with Mike, the inventor of LT Spice, where he says that the real value of a circuit simulator is to "cultivate your intuition." https://www.youtube.com/watch?v=x6TrbD7-IwU I think he is a bit wrong about some other points, but the instinct training thing is very real. I have got people started using LT Spice in literally 5 minutes.
> >If it was written by salesdruids it would look nice and cool without >any good functionality. I this case you are the football on the ground. > >It is an interesting question how it will change now with >Analog. Perhaps it is a good idea to save a working copy for future >use....
I hope Analog doesn't wreck it. -- John Larkin Highland Technology, Inc Science teaches us to doubt. Claude Bernard
On Thursday, May 28, 2020 at 5:43:54 AM UTC-4, Helmut Sennewald wrote:
> Am 28.05.2020 um 10:48 schrieb Ricketty C: > > I can't believe the difficulties I have sometimes with this tool. So much of it is counter intuitive and even dysfunctional. I just when through an hour or two trying to change a model connected to a FET. Turns out that saving a matching symbol under the new name and editing the library file name in the symbol attributes doesn't cut it. The symbol in the schematic has attributes taken from that symbol that it won't show you or let you edit from the schematic. So once you change the symbol you have to delete the component from your schematic and add it back in again from the library. > > > > If the schematic is going to keep its own copy of the attribute, you would think it would show up in the attributes editing dialog with all the others. > > > > > > Bleech! Every time I try to use LTspice it's like Lucy snagging the football away from Charlie Brown. And just like Charlie, I keep coming back. > > > > > Hello Rick, > > LTspice is used by most R&D engineers, because its free and you get free > support. There is a large and very helpful LTspice user group. Please > join it. > > https://groups.io/g/LTspice
Yes, I am aware of that group and have been posting there about the many issues I've had over the last few weeks. I do get help with the problems and that is greatly appreciated. However, I also get many comments that I need to read the documentation... which is often not there. In one particular case I has having trouble learning how to use models from the CD4000 library. I was told to read the info files that come with the library. However those files simply tell you to unzip the files and have no information at all on how to use the models! I suppose that particular poster never actually read the help files for themselves.
> > The last few days were spent fighting convergence problems which I > ultimately solved by just using a damn LT part from their library rather > than the part that I wanted. > > Especially the SPICE-models from Microchip make a lot of trouble due to > convergence problems, because they contain a lot of functions like IF() > and TABLE()) which have a discontinuous derivative. I simulate them > often with the Universalopamp2 - SpiceModel level.3a or level3.b. > Right-mouse-click on it and adjust GBW, slew rate and Rin. > > Helmut
Thanks, but this part is not an opamp, it's a comparator. I would need to construct my own model with open collector outputs, internal reference, etc. and part of the reason I want to simulate is to verify I am using the part correctly. Constructing my own model then verifies that I make the same mistake in both model and usage. I'm having the same problem with a similar model from Maxim. Do they also write poor models? Looking at the various models I've downloaded I see multiple files that were written by a company MODPEX. I suppose they are a third party that companies use rather than writing their own models? -- Rick C. + Get 1,000 miles of free Supercharging + Tesla referral code - https://ts.la/richard11209
Am 28.05.2020 um 20:43 schrieb Ricketty C:
> > In one particular case I has having trouble learning how to use models from the CD4000 library. I was told to read the info files that come with the library. However those files simply tell you to unzip the files and have no information at all on how to use the models! I suppose that particular poster never actually read the help files for themselves.
Hello Rick, Sorry about the not so good experience with the group in this case. I have written the models and symbols of the CD4000 and 74HC/74HCTxx devices starting 2003 in my free time. The models are a compromise between complexity and simulation speed. I didn't jump into this thread, because I thought many people already answered the questions.
> Thanks, but this part is not an opamp, it's a comparator. I would need to construct my own model with open collector outputs, internal reference, etc. and part of the reason I want to simulate is to verify I am using the part correctly. Constructing my own model then verifies that I make the same mistake in both model and usage. > > I'm having the same problem with a similar model from Maxim. Do they also write poor models? >
Mike Engelhardt (author of LTspice) created a special model OTA with good behavior due to convergence. It has been used in many opamp models of LTspice. This OTA-model is not available in normal SPICE as an intrinic model. That's why models from other companies often use IF() and TABLE() models. MAXIM and Microchip provides a (limited) SPICE-software from SiMetrix for their ICs. I am not sure whether SiMetrix use the PSPICE-models from the web page or they use modified models for better convergence. Best regards, Helmut PS: I am one of the moderators of the LTspice group in groups.io. This group is the successor of the Yahoo group.
On Thursday, May 28, 2020 at 3:46:31 PM UTC-4, Helmut Sennewald wrote:
> Am 28.05.2020 um 20:43 schrieb Ricketty C: > > > > In one particular case I has having trouble learning how to use models from the CD4000 library. I was told to read the info files that come with the library. However those files simply tell you to unzip the files and have no information at all on how to use the models! I suppose that particular poster never actually read the help files for themselves. > > Hello Rick, > Sorry about the not so good experience with the group in this case. > I have written the models and symbols of the CD4000 and 74HC/74HCTxx > devices starting 2003 in my free time. The models are a compromise > between complexity and simulation speed. I didn't jump into this thread, > because I thought many people already answered the questions.
Yes, several people responded and I thanked them for their help. I did eventually get the parts working. The point I raised in that thread is that the documentation leaves a great deal to be desired. That point seemed to be disputed which led to the comment about reading the LTspice help and the readme files with the models and symbols which had nothing regarding the use, only unpacking the zip files.
> > Thanks, but this part is not an opamp, it's a comparator. I would need to construct my own model with open collector outputs, internal reference, etc. and part of the reason I want to simulate is to verify I am using the part correctly. Constructing my own model then verifies that I make the same mistake in both model and usage. > > > > I'm having the same problem with a similar model from Maxim. Do they also write poor models? > > > > Mike Engelhardt (author of LTspice) created a special model OTA with > good behavior due to convergence. It has been used in many opamp models > of LTspice. This OTA-model is not available in normal SPICE as an > intrinic model. That's why models from other companies often use IF() > and TABLE() models. MAXIM and Microchip provides a (limited) > SPICE-software from SiMetrix for their ICs. I am not sure whether > SiMetrix use the PSPICE-models from the web page or they use modified > models for better convergence.
Perhaps I am missing something. The part I am using is a comparator. Are you suggesting I should make my own comparator from the opamp model?
> PS: I am one of the moderators of the LTspice group in groups.io. This > group is the successor of the Yahoo group.
Yes, I am aware of both you and both groups. Thanks for your support. You have been amazing over the years. -- Rick C. -- Get 1,000 miles of free Supercharging -- Tesla referral code - https://ts.la/richard11209
Am 28.05.2020 um 22:15 schrieb Ricketty C:
 > Perhaps I am missing something.  The part I am using is a comparator. 
  > Are you suggesting I should make my own comparator from the opamp 
model?

Hello Rick,

I often use the comparator "diffschmitt" from [Digital].
Right-mouse-click on it in the schematic and enter some parameters in 
the attribute "SpiceLine".

SpiceLine Vhigh=5 Vt=0 Vh=0.1m

If you need an open collector output, then add a resistor between the 
output of the diffschmitt and the base of a default NPN-Transistor or a 
NMOS-transistor. If you use a NMOS-transistor, you have to add a model 
line with a useful parameter Kp, because the value of KP of the 
default-NMOS is too small in most cases.

Best regards,
Helmut

On Thursday, May 28, 2020 at 5:04:54 PM UTC-4, Helmut Sennewald wrote:
> Am 28.05.2020 um 22:15 schrieb Ricketty C: > > Perhaps I am missing something. The part I am using is a comparator. > > Are you suggesting I should make my own comparator from the opamp > model? > > Hello Rick, > > I often use the comparator "diffschmitt" from [Digital]. > Right-mouse-click on it in the schematic and enter some parameters in > the attribute "SpiceLine". > > SpiceLine Vhigh=5 Vt=0 Vh=0.1m > > If you need an open collector output, then add a resistor between the > output of the diffschmitt and the base of a default NPN-Transistor or a > NMOS-transistor. If you use a NMOS-transistor, you have to add a model > line with a useful parameter Kp, because the value of KP of the > default-NMOS is too small in most cases. > > Best regards, > Helmut
Ok, I get that. I can always make my own models. But as I mentioned, they aren't as simple as falling off a log. The comparators I'm using have built in references and hysteresis so that by the time I've built the model and done the research to try to match the parameters I'm modeling and then tested against those parameters, I've done a huge amount of work. That's why manufacturers make models for customers to use. I wonder how they deal with the discontinuities with other simulators? -- Rick C. -+ Get 1,000 miles of free Supercharging -+ Tesla referral code - https://ts.la/richard11209