Author Topic: Simulation inside EDA software - ngspice  (Read 6334 times)

0 Members and 1 Guest are viewing this topic.

Offline rx8pilotTopic starter

  • Super Contributor
  • ***
  • Posts: 3634
  • Country: us
  • If you want more money, be more valuable.
Simulation inside EDA software - ngspice
« on: October 13, 2018, 11:47:43 pm »
I have been using LTSpice for most simulation needs during design. It is extremely clunky by modern software interface standards which essentially means that the learning curve is very steep if you want anything more complicated than a voltage divider. The good news is that if you take the time to learn all the secrets - the underlying solution engine is very powerful.

I use Eagle and they now have ngspice 'integrated'. The sales pitch is that it is faster to simulate in the package you are designing in to avoid the double work of creating the schematic twice. So, I have been trying. And, failing. And, failing some more.

It is hard to tell the difference between my inexperience in the software and its limitations - but it seems over the top un-intuitive even when compared to LTSpice. I have logged a number of hours trying to set up a capacitor charging simulation with a voltage controlled switch to discharge (a few R's and C's). No luck. This is a circuit that I can setup in LTSpice in about 2 minutes. The first time in LTSpice, maybe 5 minutes if I had to find something on the internet.

In Eagle/ngspice - no success after hours of fiddling and digging until my day was wiped out. My instinct is to give up and consider the integrated simulation a useless toy for the marketing dept. Perhaps, I am just missing something. Some proper training, PDF's, videos, etc? Eagle training and documentation are abysmal overall - their YouTube videos cover about 5% of my questions after watching hours of rambling 'webinars'.

Has any used ngspice with success? Anyone with Eagle or the other packages that are using ngspice engine?
Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Simulation inside EDA software - ngspice
« Reply #1 on: October 14, 2018, 12:21:40 am »
Forget about using a schematic for simulation as a real world circuit. You always end up adding parasitic and ideal components to make the circuit give a realistic simulation result within a reasonable amount of time. Also a complete circuit will be way to slow to simulate.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline rx8pilotTopic starter

  • Super Contributor
  • ***
  • Posts: 3634
  • Country: us
  • If you want more money, be more valuable.
Re: Simulation inside EDA software - ngspice
« Reply #2 on: October 14, 2018, 12:45:27 am »
Forget about using a schematic for simulation as a real world circuit. You always end up adding parasitic and ideal components to make the circuit give a realistic simulation result within a reasonable amount of time. Also a complete circuit will be way to slow to simulate.

I have no expectation of modeling a real-world circuit, just hashing out concepts is what I mainly do. It gets me in the ballpark and can catch some of the dumb mistakes that may not be obvious.
Not the whole circuit either, just sections that I am not too sure about. Simulation is a great tool if our expectations are reasonable.

Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Offline DerekG

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: nf
Re: Simulation inside EDA software - ngspice
« Reply #3 on: October 14, 2018, 01:05:03 am »
I have been using LTSpice for most simulation needs during design. It is extremely clunky by modern software interface standards which essentially means that the learning curve is very steep if you want anything more complicated than a voltage divider.

I would recommend you take a look at the simulator in DesignSoft Tina Cad. It is very intuitive compared to most (all) other powerful simulators. It is so good that the engineers at Maxim, Infineon, Texas Instruments & others use it. It is also taught in a number of universities as it produces accurate results without a high leaning curve.
I also sat between Elvis & Bigfoot on the UFO.
 

Offline rx8pilotTopic starter

  • Super Contributor
  • ***
  • Posts: 3634
  • Country: us
  • If you want more money, be more valuable.
Re: Simulation inside EDA software - ngspice
« Reply #4 on: October 14, 2018, 01:25:46 am »

I would recommend you take a look at the simulator in DesignSoft Tina Cad. It is very intuitive compared to most (all) other powerful simulators. It is so good that the engineers at Maxim, Infineon, Texas Instruments & others use it. It is also taught in a number of universities as it produces accurate results without a high leaning curve.

TI introduced me to TINA, but I have not done anything with it yet. I watched a few videos related to the TI version and it seemed like an all-new thing.
Do you use it a lot?
Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Offline DerekG

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: nf
Re: Simulation inside EDA software - ngspice
« Reply #5 on: October 14, 2018, 01:58:29 am »
TI introduced me to TINA, but I have not done anything with it yet.

The TI version is a "somewhat" cut down version of the full TINA Cad version. The TI version is free & contains most of the Texas Instruments components in the modeling library ready for you to use.

There are a few things like the high end "smoke analysis" etc that are not included in the TI version. Most users don't require these unless they are actually modeling to put the components into a TO-220 package etc.

Quote
I watched a few videos related to the TI version and it seemed like an all-new thing.

The "deal" with TI was done in late 2015 from memory, but TINA CAD themselves have been around since the mid 1990's.

Quote
Do you use it a lot?

Not a lot, but it is great to confirm things like the minimum current in an actual circuit to fully turn on a specific type of transistor, or the -3db point in a filter when other components are also hanging off the input etc.

The TI version is free & there is a training video to get you started.

If only TINA CAD could read in my DipTrace schematics directly :)
I also sat between Elvis & Bigfoot on the UFO.
 
The following users thanked this post: nctnico

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14471
  • Country: fr
Re: Simulation inside EDA software - ngspice
« Reply #6 on: October 14, 2018, 09:17:09 pm »
I have been using LTSpice for most simulation needs during design. It is extremely clunky by modern software interface standards which essentially means that the learning curve is very steep if you want anything more complicated than a voltage divider. The good news is that if you take the time to learn all the secrets - the underlying solution engine is very powerful.

Yeah, turns out a lot of CAD programs are clunky. Especially the EDA tools.
LTSpice is not that hard to get used too though. Just go trough all the menus and toolbars. You may find features that you thought didn't exist.
The main pet peave I have is that it has essentially the same selection approach as KiCad: you can't select items and then issue some operation on the selection. You first have to select an operation, and then you can drag, move, copy... which is clunky by itself but you get used to it. The bad thing is that you can only "select" items this way individually or in rectangular regions. If they don't fit in a rectangle exactly, you have to do it in several passes. Admittedly that sucks. But it's definitely workable for medium-sized schematics.

Its simulation engine is Spice-based, but not too badly optimized. It's certainly faster (or even much faster) than ngspice in a lot of cases.

The sales pitch is that it is faster to simulate in the package you are designing in to avoid the double work of creating the schematic twice.

I don't believe that claim whatsoever, because in practice you're pretty much never going to use the exact same schematic for design than for simulation. I've just never got around to that with any real-life project. Besides, most often you'll simulate only parts of the design, not the the design as a whole (which is often not even possible). There are admittedly some simulation tools that you can make full-system simulations with, but they are much more complicated and involved than just Spice simulators. So you're still not likely to do that from within your EDA package.

Has any used ngspice with success? Anyone with Eagle or the other packages that are using ngspice engine?

I've used it a lot as a stand-alone tool. You have to write Spice circuits directly. It's not that difficult and gives you full control.

I've also tested the new KiCad's integrated simulator - it's ngspice under the hood with a not-too-shabby GUI. It just works as far as I've tested it. KiCad's schematic editor has its quirks but in the same vein of LTSpice (maybe a tad better). It's usable.

The thing with LTSpice is that, even though it's a capable simulator, I tend to shy away from it progressively. Even though you can integrate third-party Spice models in it, and I've done that quite a bit, of course it's much faster to use built-in models, so you find yourself using Linear Tech. parts a bit more often than you'd like. Obviously it's just given away for free for that exact reason. ;)
« Last Edit: October 14, 2018, 09:21:39 pm by SiliconWizard »
 

Offline rx8pilotTopic starter

  • Super Contributor
  • ***
  • Posts: 3634
  • Country: us
  • If you want more money, be more valuable.
Re: Simulation inside EDA software - ngspice
« Reply #7 on: October 14, 2018, 11:09:29 pm »
The sales pitch is that it is faster to simulate in the package you are designing in to avoid the double work of creating the schematic twice.

I don't believe that claim whatsoever, because in practice you're pretty much never going to use the exact same schematic for design than for simulation.

For sure - the schematic is different and the parts used in the schematic are different from the real parts. In Eagle, you can map a spice model to any part which is convenient but not enough to use your schematic directly in a simulation.

In my test, I did copy a section of my schematic and made the appropriate changes to setup a simulation. Sadly, you cannot simulate a section so I still have to copy the simulation to an all-new file anyway. At that point, I would prefer to just use LTSpice.

For a second, it looked like the graphing was kind of neat in Eagle, but it is not interactive like LTSpice. It does not allow freedom to probe around and see the results immediately.

Aaaaaand yes.....LTSpice has encouraged me to use Linear parts because they all have models ready to go with example circuits. Lately, I have been using a lot more TI parts and they have licensed Tina - which appears to be a better interface overall. Easier. The full version is not free, but it is not expensive at all.
Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Simulation inside EDA software - ngspice
« Reply #8 on: October 18, 2018, 07:48:52 pm »
I just played a little bit with TI's free Tina version and it seems reasonable to use but there will be a learning curve. The interface seems to hide some of the settings so getting control over the finer details will require reading the manual. Drawing the schematic has the typical short-cuts (ctrl-r for rotate for example).
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Araho

  • Regular Contributor
  • *
  • Posts: 74
  • Country: no
Re: Simulation inside EDA software - ngspice
« Reply #9 on: October 21, 2018, 05:37:18 pm »
Altium actually also has an integrated spice-version now. If you do your due diligence when creating components and generally add the supplied models, I guess it would save you learning "yet another clunky UI". Apparently, it works with any spice-model, and seemed pretty self-explanatory when I tried it last week.
 

Offline rx8pilotTopic starter

  • Super Contributor
  • ***
  • Posts: 3634
  • Country: us
  • If you want more money, be more valuable.
Re: Simulation inside EDA software - ngspice
« Reply #10 on: October 21, 2018, 06:12:45 pm »
Altium actually also has an integrated spice-version now. If you do your due diligence when creating components and generally add the supplied models, I guess it would save you learning "yet another clunky UI". Apparently, it works with any spice-model, and seemed pretty self-explanatory when I tried it last week.

One of the things that would make it useful inside EDA software is to be able to define sub-circuits for simulation. I never need to sim an entire design - just little sections. it would seem ideal to have a way to isolate a section - define sources, loads, directives, etc. After you have iterated based on the sims, just 'hide' the simulation elements and keep designing away.

I am not sure how having this pseudo-integration is really all that helpful since I have to make a special and separate design just for simulation anyway. After it is done, I have to manually translate to the real system design.
Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14471
  • Country: fr
Re: Simulation inside EDA software - ngspice
« Reply #11 on: October 21, 2018, 06:38:59 pm »
For sure.

As Araho said, the real plus point would be not to have to learn another UI with different approaches and shortcuts.
But other than that... yes that helps keeping all of your design work in one EDA project. Not sure I'm 100% in favor of that though. Don't like to put all my eggs in the same basket.

And, even just thinking of the perspective to have to launch the AD monster just to make a couple simulations... ouch. >:D
 

Offline Araho

  • Regular Contributor
  • *
  • Posts: 74
  • Country: no
Re: Simulation inside EDA software - ngspice
« Reply #12 on: October 23, 2018, 01:22:54 pm »
One of the things that would make it useful inside EDA software is to be able to define sub-circuits for simulation. I never need to sim an entire design - just little sections. it would seem ideal to have a way to isolate a section - define sources, loads, directives, etc. After you have iterated based on the sims, just 'hide' the simulation elements and keep designing away.


AFAIK, it simulates on a sheet-by-sheet basis with defined signals only. So it might be possible to create designs that are simulatable "as-is", maybe via some compiler directives...
 

Online shapirus

  • Super Contributor
  • ***
  • Posts: 1333
  • Country: ua
Re: Simulation inside EDA software - ngspice
« Reply #13 on: November 30, 2023, 11:42:03 pm »
It's an old topic, but relevant, so why not bring it up to see how things changed in 5 years.

...the bottom line is that they have not, as far as helping the user achieve the goal goes.

I am trying hard to migrate off of (pirated, of course) Proteus to KiCad + ngspice. Ngspice is FOSS, which is cool, but it's worth nothing if there is no supporting ecosystem, and by that I mean models. Every single component beyond the basic resistor, capacitor, diode and transistor (and a few more) primitives require hours of frustrating search in the internet for models, where most of you can find are LTSpice or PSPICE models. Sometimes, if you're lucky, after trying several models you can find one that doesn't give cryptic errors (because the ngspice's compatibility layer doesn't support certain features) and works, sometimes it even works as expected (e.g. implements the 555's reset pin, unlike many). In most cases, however, you end up with a handful of models, none of which are supported by ngspice.

I don't know how people are using it for anything beyond a resistor divider. Does everyone create their own IC models from basic elements?

I haven't given up yet. But if/when I do, my next attempt will be exporting netlist to LTspice (if it's possible) and running simulation in it. At least it should support models created for LTSpice. Or maybe create schematics in it and then import back to KiCad (to create a PCB), which the current development branch supports. But it kind of sucks. I'd love to use ngspice, but without a big library of supported models it's useless for me.

Please someone correct me if I'm missing something obvious.

p.s. to make it clear: yes I do understand that simulation will not represent a real circuit. It's the same for me as for the OP: get a ballpark estimate for values, verify ideas, design something by trial and error, and make sure that VDD is not shorted to GND before proceeding to building a breadboard (or whatever) prototype. It doesn't, usually, require a careful analysis of parasitics etc.
« Last Edit: December 01, 2023, 12:01:02 am by shapirus »
 

Offline Warhawk

  • Frequent Contributor
  • **
  • Posts: 821
  • Country: 00
    • Personal resume
Re: Simulation inside EDA software - ngspice
« Reply #14 on: December 01, 2023, 11:56:22 am »
That's the reality of simulations. Every simulation is as good as the input. If you're wildly browsing the internet trying to find spice models the simulation ends up likely junk. Garbage in, garbage out. Modern semiconductors are so complex that many models are just either for AC or transient analysis. It is important to open the spice model and read what the model does. By no means the simulation model represents what is truly inside on the silicon level. For this reason, you may find many ideal gm stages, silly caps, etc. You get most reliable results if you use the tool provided by the semi vendor. I use circuit simulators for debugging early concepts. Most of time I use idealized components.
I work at TI. This means that I use Tina TI (hate it), pSpice of TI (I am ok with it), but also qspice and LTspice (only for hobby). PSpice is notoriously bad for switchers therefore Simplix is the right tool for it.
tl;dr;
Don't waste your time with simulations. Go to the lab instead. You learn more. After you get enough experience, you will understand better when simulation helps. I unfortunately see too many young engineers blindly relying on simulations...

When you get there, you will understand the brilliancy of LTspice or qspice.

Online shapirus

  • Super Contributor
  • ***
  • Posts: 1333
  • Country: ua
Re: Simulation inside EDA software - ngspice
« Reply #15 on: December 01, 2023, 04:05:13 pm »
That's the reality of simulations. Every simulation is as good as the input.
That's clear. I will add: "...assuming that models for the components you use exist and the simulator does not crash with syntax errors", which is where ngspice does not shine.

If you're wildly browsing the internet trying to find spice models the simulation ends up likely junk. Garbage in, garbage out.
When they work at all, they work for me, most of the time. Again, I understand the limitations. Edge cases, switching conditions, power-on transitions, real silicon pecularities, complex processors are to be tested in hardware anyway. LTSpice runs well with what I have attempted so far. Proteus runs perfectly, I was able to simulate (interactively!) entire devices in it, but no complex things so far -- no MCUs etc.: where these are required, I use dummy voltage sources and resistor or transistor primitives in place of the actual device's i/o pins. Simulating those sounds like more hassle than wiring them up on a breadboard anyway, which is the opposite situation than that of discrete analog and simple logic parts.

Modern semiconductors are so complex that many models are just either for AC or transient analysis. It is important to open the spice model and read what the model does. By no means the simulation model represents what is truly inside on the silicon level.
Not my case really. I don't develop complex (or any) boards for commercial production. I need simulation mostly for ancient ICs like CD4xxx/HEF4xxx and some basic comparators and op amps for my DIY stuff that I mostly do for fun, however sometimes I actually use what I create. Even there, with the most jellybean parts, ngspice fails before it starts, that's even before we can talk of whether the simulation results are realistic.

My use case for simulation, again, is to get an answer to "is the wiring correct? did I not mess up the inputs and outputs? will I get the expected signal at a given output when a switch is pressed or a particular voltage is fed to a given input?" before proceeding to breadboard proofing and PCB design. I use simulation to verify concepts and get a qualitative estimation, not to make precise measurements.

Proteus works for this. LTSpice works too. Both offer huge libraries of models, regardless of the software's price (insanely expensive and pretending that individual hobbyists do not exist, vs free for personal use).

Ngspice only works if you can find compatible models, which are scarce. Any given user, including myself, can improve it for themselves by learning the spice syntax and its various dialects, which will allow to rewrite certain models to become compatible with ngspice. Its syntax is not uncomprehensible, so it is feasible, but it makes me remember my Fortran days, and that, I'll say, was somewhat of a mixed experience.

In other words, ngspice is as user-unfriendly as it gets and assumes quite a steep learning curve even before you start using it for anything beyond its builtin primitives. This is quite unlike other simulators that I have tried. That being said, I have a feeling that I'll get there eventually. Yes it is possible to launch LTSpice (it works well under wine) from KiCad via the netlist export dialog, but it's so inconvenient and LTSpice's UI is so ugly, inconvenient, and outdated (much more so than that of KiCad, and the latter is improving because of being in active development) that probably adapting the LTSpice models to ngspice is a better way after all.

Speaking of Proteus, well, it gets the job done, but I hate to be using a pirated copy, it is glitchy under wine, and its PCB design functionality is rather lacking, buggy, and the UI is poorly made. Apparently they cannot afford hiring a UX specialist. But I'm not paying, so I can't complain, that's why I want to move to a FOSS solution instead.

I work at TI.
Speaking of TI, the fact that many, if not most of the parts, have freely downloadable pspice models on the TI website, is great. Kudos to TI for this.
PSpice models also tend to work with ngspice more often than the LTSpice ones, based on what I have tried so far.
There used to be a downloadable archive that contained all the models, but it shrank over time and now it's completely empty. Not sure what the motivation behind it was and whether it was intended, but maybe you could ask someone around who might be controlling that stuff to see if they could restore it :). It'd be useful to be able to conveniently have everything locally in a single package.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3358
  • Country: nl
Re: Simulation inside EDA software - ngspice
« Reply #16 on: December 02, 2023, 07:42:53 pm »
There are two threads on the KiCad user forum with ngSpice simulation examples:

https://forum.kicad.info/t/simulation-examples-for-kicad-eeschema-ngspice/34443

https://forum.kicad.info/t/more-simulation-examples-for-kicad-eeschema-ngspice/45546

And those have zipped up projects to help you to get started.

Also, in the last year several enhancement have been made for the integration of ngSpice in KiCad.
These are available in the current "nightly V7.99", and will be part of the next stable release which will be KiCad V8 and is expected around the end of February 2024. You can have a look at the changes in the thread below.

https://forum.kicad.info/t/post-v7-new-features-and-development-news/40144
 
The following users thanked this post: shapirus

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 891
  • Country: gb
Re: Simulation inside EDA software - ngspice
« Reply #17 on: December 02, 2023, 08:32:22 pm »
I dabble in QUCS-S, LTSPICE, and now I've started using QSPICE. These 3 can only do schematics and simulation, but they are useful for cross-referencing and making sure that all the simulations agree. LTSPICE schematics can be imported into KiCad, which is useful.
A hierarchical design could be simulated block by block in LTSPICE (although not sure if LTSPICE does hierarchical blocks) and then imported into KiCad step by step (and also simulated in KiCad as well).
QSPICE has great potential as it hierarchical blocks can be "stuffed" or "unstuffed" (I.E can be included or exclude from a simulation). It also has the advantage of being able to do mixed signal simulation of analogue AND digital circuits at the same time using Verilog and C++ code. The QSPICE forum is a very useful resource and Mike Engelhardt is very responsive to any questions you may have. I've not really tried simulation in KiCad yet, but it's useful to be able to just do a schematic once with a view to making a PCB later.

PS I use Altium as well but just for PCB design. Simulation in Altium seems a bit of an afterthought.
PS This might also be of interest as a source of examples https://forum.qorvo.com/t/seeking-recommendations-for-starting-up-a-repository-for-sharable-user-custom-c-and-verilog-blocks/16157
« Last Edit: December 02, 2023, 08:54:51 pm by djsb »
David
Hertfordshire,UK
University Electronics Technician, London PIC,CCS C,Arduino,Kicad, Altium Designer,LPKF S103,S62 Operator, Electronics instructor. Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. Credited Kicad French to English translator.
 

Online shapirus

  • Super Contributor
  • ***
  • Posts: 1333
  • Country: ua
Re: Simulation inside EDA software - ngspice
« Reply #18 on: December 02, 2023, 11:07:44 pm »
There are two threads on the KiCad user forum with ngSpice simulation examples:

https://forum.kicad.info/t/simulation-examples-for-kicad-eeschema-ngspice/34443

https://forum.kicad.info/t/more-simulation-examples-for-kicad-eeschema-ngspice/45546

And those have zipped up projects to help you to get started.
Yeah they can be quite useful, however most of them are built using basic primitives. I can see, however, that the basic primitives now include a generic op amp, which is good. It's getting better, and at the same time I'm also learning how to use it and work around its shortcomings, so synergetically it's gonna give a satisfying result.

Also, in the last year several enhancement have been made for the integration of ngSpice in KiCad.
These are available in the current "nightly V7.99", and will be part of the next stable release which will be KiCad V8 and is expected around the end of February 2024. You can have a look at the changes in the thread below.

https://forum.kicad.info/t/post-v7-new-features-and-development-news/40144
I'm actually using 7.99 now. It has its glitches, which I report in the issue tracker (the opportunity that does not exist with commercial software), some of the issues aren't 7.99-specific, but overall I like it, especially the dual cursors in the simulation plot. Many things are done in a much more convenient way than in Proteus, which I used before, and, frankly, after a few days, once I got the basic concepts of running "offline" spice simulation, I don't think that realtime/interactive simulation is all that important. Lighting up LEDs and bulbs and burning fuses are cool, though. Maybe some day KiCad will have them.

Still, finding models that work for specific ICs is often a pain. It's also somewhat of a PITA to manually assign models to every part that you place on schematics, then reassign pins, which rarely match the model's ones (and many models have them numeric instead of aliases!), and that is a time consuming process. Support for multi-unit chips does not exist: you either have to simulate them as separate chips, which I currently do, or modify the model to represent a multi-unit IC.

At the same time, there are models for many ICs that are offered by the semiconductor manufacturers, and those work more frequently than they don't. In fact they almost always work, as long as they are analog models (I've not had much success using digital ones: ngspice doesn't like mixed mode). Some models have weird constants, e.g., insanely high input capacitances, which don't agree with the datasheet, but that's usually easy to fix.

...I have yet to see the PCB design part of KiCad. Hopefully it'll be more satisfying than the simulator :)
 

Online shapirus

  • Super Contributor
  • ***
  • Posts: 1333
  • Country: ua
Re: Simulation inside EDA software - ngspice
« Reply #19 on: December 02, 2023, 11:51:08 pm »
I've not really tried simulation in KiCad yet, but it's useful to be able to just do a schematic once with a view to making a PCB later.
It's actually super convenient when you can design a schematic, simulate it and build a PCB in the same software without having to redraw the schematic twice. Obviously you can't simulate everything, but still.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3358
  • Country: nl
Re: Simulation inside EDA software - ngspice
« Reply #20 on: December 03, 2023, 12:48:40 am »
Indeed. A schematic for Simulation is not the same as for making a PCB, but first doing your simulations, and then using the same project (or a copy) to modify it and design the PCB is a time saver.

And doing it in the same program and the same GUI also simplifies it. You don't have to go searching for the other program or learn it's user interface.

And I guess there are also options to use just one sheet of a bigger (hierarchical) project for the simulation.

Simulation and PCB design are also not mutually exclusive. For the schematic it is just some extra meta data. Simulation needs attached simulation models, while the PCB needs footprint links. And parts can be excluded from either the simulation (for example connectors) or from the PCB (voltage and signal sources).
 

Online shapirus

  • Super Contributor
  • ***
  • Posts: 1333
  • Country: ua
Re: Simulation inside EDA software - ngspice
« Reply #21 on: December 03, 2023, 03:38:40 pm »
Indeed. A schematic for Simulation is not the same as for making a PCB, but first doing your simulations, and then using the same project (or a copy) to modify it and design the PCB is a time saver.
They can actually be the same, at least that's been my experience so far. The "exclude from simulation" and "exclude from PCB layout" checkboxes in the component attributes allow to create a single schematic that suits both the simulator and the PCB editor. Again, I haven't done anything too complicated, so maybe I simply haven't hit some limitations in this area yet.

I have "backported" changes to schematics based on both the simulation and PCB editing results countless times, since each of them, by allowing to look at the same thing from a different side, so to speak, can give ideas as for what extra parts may be needed, or, on the contrary, what parts are extraneous. After (almost) every such a change I re-run the simulator to make sure that it still works as expected, and then update the PCB layout with respect to the schematics change.
Thus it is very useful to have a single schematics, serving as the single source of truth (if that's the right term), or the "master copy", that, when it's changed, automatically updates the respective data in both the PCB editor and the simulator.
« Last Edit: December 03, 2023, 03:46:45 pm by shapirus »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf