I slogged through the 83 minute webinar on simulation in Eagle. It seems like it can cover a lot of territory during the circuit design phase. At the moment, I am still using LTSpice to simulate relatively small sections of my designs. I am not an expert, but I know it well enough to get the answers I need fairly quickly.
After trying Eagle ngspice simulation - I have been bombarded with errors and lack of any usable generic library to get a design started.
Trying to add-model to a battery symbol only gives me the option to pick from MOSFET models.
The example models cover very little territory and do not seem to have any attributes associated so I am left to just pick from a cryptic list and wonder what the model is for.
How do you best manage a spice library of typical parts? Is there a place to download a reasonable starter library for conceptual level designs?
Full disclosure: I have only spent about 2 hours looking at the simulation so far, so my understanding is clearly very limited. With that in mind, what I have seen so far makes me want to run away as fast as I can. I do NOT want to spend a pile of time attempting to learn a system that I will ultimately deem worse than LTSpice (which is already a comically clunky piece of software - but FREE).
In the end - all I really want is the fastest possible path to getting answers while I design a new circuit. Has anyone dug into Eagle simulation enough to compare it to LTSpice, PSpice, Tina, etc, etc? Is it worth what appears to be a considerable learning curve and establish a usable library?
How do I add/place/define a voltage source? Intuitively - I would just pick a voltage source and define its parameters. In this case, I tried to add-model to a generic battery, but my only options are unrelated to a voltage source.
After a few more HOURS.....I still have not been able to figure out a voltage controlled switch in a simulation.
While I am sure this is 'easy' after someone knows how to do it.....it is not intuitive. To be fair, LTSpice is FAR from intuitive, yet it took about 3 minutes to sort out a voltage controlled switch. After I know how to set them up, I can add them in seconds.
If a switch is this much of a pain, I really don't want to bother with a circuit worth simulating. There is a non-zero chance that I am a total moron - but my opinion is that any moron should be able to add a switch to a simulation within minutes even if they have never done it before.
Here I have an error on line 20, but the netlist has no line numbers. Still not sure why I need to even mess with a model and net definitions for a voltage controlled switch. Last time I looked at the calendar, it is 2018.
Thanks for the info .. you are right, sometimes something that is not 100% intuitive can completely frustrate you, so it is important we know where those points are for users .. i will read through your comments above carefully and respond shortly.
OK, a lot to unpack, and thanks for all the feedback. Responses to each comment below:
>> I slogged through the 83 minute webinar on simulation in Eagle. It seems like it can cover a lot of territory during the circuit design phase. At the moment, I am still using LTSpice to simulate relatively small sections of my designs. I am not an expert, but I know it well enough to get the answers I need fairly quickly. After trying Eagle ngspice simulation - I have been bombarded with errors and lack of any usable generic library to get a design started.
Webinar length is hard to set properly .. if too short it does not cover enough, too long and it feels like “slogging” as you put it .. agree .. the last one I did with Jorge was fairly comprehensive i thought but still there was more we did not cover .. anyway let’s get to the questions ..
About the usable libraries .. ngspice-simulation has analog parts ready to use, and ngspice-digital has digital parts and some A/D, D/A parts .. we have also provided something like 20 examples using those parts (including the ones you asked about below) - you can find these under /examples/ngspice/ in the install directory or in the control panel in eagle, when “include examples” is checked on the Directories dialog.
>> Trying to add-model to a battery symbol only gives me the option to pick from MOSFET models.
The example models cover very little territory and do not seem to have any attributes associated so I am left to just pick from a cryptic list and wonder what the model is for.
A couple points here:
>> How do you best manage a spice library of typical parts? Is there a place to download a reasonable starter library for conceptual level designs?
Look into ngspice-simulation and ngspice-digital, also libraries like rcl that have all passive parts mapped. These libraries have ready-to-simulate parts and the many examples provided with EAGLE show their usage
>> Full disclosure: I have only spent about 2 hours looking at the simulation so far, so my understanding is clearly very limited. With that in mind, what I have seen so far makes me want to run away as fast as I can. I do NOT want to spend a pile of time attempting to learn a system that I will ultimately deem worse than LTSpice (which is already a comically clunky piece of software - but FREE).
Well let’s try to fix that .. there are likely just a couple points of confusion, where we can do better, but I will try to explain the basic processes here ..
>> In the end - all I really want is the fastest possible path to getting answers while I design a new circuit. Has anyone dug into Eagle simulation enough to compare it to LTSpice, PSpice, Tina, etc, etc? Is it worth what appears to be a considerable learning curve and establish a usable library?
Valid points made .. of course we have to compare to what is available regularly .. one point is that we use NGSPICE, which is open-source, and generally follows standard SPICE usage that has been valid and proven for decades. Without naming names, those other tools use encrypted models, or non-standard and non-SPICE model parameters because they want to try to force you to use their tools. In our opinion, the best case is when you are able to download pure SPICE models from the manufacturer, and simulate without any tool-specific weirdness .. unfortunately, some of these tools have been successful in convincing manufacturers to supply only their models (for example you can find PSPICE models in many places), but this severely limits you. It is best to stick with manufacturers that provide standard, pure SPICE models so you are not locked into using any one tool. (pretty much ALL tools are able to use pure SPICE format models).
>> How do I add/place/define a voltage source? Intuitively - I would just pick a voltage source and define its parameters. In this case, I tried to add-model to a generic battery, but my only options are unrelated to a voltage source.
Not true and it is very simple. Make sure the part is mapped as a independent voltage source, and then right click on the part and choose “Analog Source Setup”. This wizard is specific to independent sources (also exists for independent current sources), and it was made to make your life easy .. set DC, AC, and transient parameters like (SIN, PULSE, other functions). You can always also enter any valid value into the part outside of the wizard, by just using VALUE command (for example if you want to enter PWL data, you can do it there, it is not in the wizard yet)
See example of source setup dialog here: http://prntscr.com/l6eopv
>> After a few more HOURS.....I still have not been able to figure out a voltage controlled switch in a simulation.
There is an example called vswitch.sch made to show how this works. http://prntscr.com/l6epbb There is really nothing to do, just place the part and connect it up, it should work just fine. Note that the part used in the library is mapped to the model called VSMOD and running SIM to view the netlist will show you the model, copied here:
.MODEL VSMOD SW(VT=1V VH=0 RON=1e-3 ROFF=1e12)
This model has a threshold voltage of 1V, and you can set other parameters as well. Note that all the parameters possible for each model type are described in the ngspice manual in more detail.
>> While I am sure this is 'easy' after someone knows how to do it.....it is not intuitive. To be fair, LTSpice is FAR from intuitive, yet it took about 3 minutes to sort out a voltage controlled switch. After I know how to set them up, I can add them in seconds. If a switch is this much of a pain, I really don't want to bother with a circuit worth simulating. There is a non-zero chance that I am a total moron - but my opinion is that any moron should be able to add a switch to a simulation within minutes even if they have never done it before.
Agreed and understood, again though, it should not take more than a few seconds to use the switch provided, or to make your own.
>> Here I have an error on line 20, but the netlist has no line numbers. Still not sure why I need to even mess with a model and net definitions for a voltage controlled switch. Last time I looked at the calendar, it is 2018.
Ok so here it cannot find your model .. it means you either did not map the part, or maybe you moved the schematic but forgot to move the models with it, or maybe you tried to map the part manually? I cannot tell, but there should be no problem using your switch model if you map it and provide the model properly .. do this .. right click on the part, choose Remove Model (if one exists) and map it again with the information above and let me know if still any issues, and i can help.
I'm definitely having similar issues - this SPICE system doesn't really work.
first, the instructions for adding a spice model to a library component tell me to push the Add Model button but there isn't one. I tried to type various things into the model dialog box but it didn't seem to like any of them.
After I gave up on that I created a small schematic and pushed the LTSPice model (or Export Setup) button but it just came up and said, "LTSpiceIV (scad3.exe not found.)
At this point I gave up.
How soon until you have a stable system?
Thanks,
in the screenshot you posted note the part is not mapped (the exclamation point should be a green check mark) .. you need to click the MAP button to map the part, then you will be able to add a model, assumming you choose a type that requires one.
A VALUE field is there for convenience .. for example for a resistor or capacitor, you can enter the value of the part (independent of mapping) .. for your transistor .. there is nothing to enter in the VALUE or MODEL fields, just move ahead to map the part.
I would also note, it looks like you are on an older version .. the dialog should look like below. I would try with the latest version as there have been many changes since the version you are using.
Thank you Ed,
from the way the UI was laid out I was assuming that I didn't press the map button until after I got the green check.
I pressed the MAP button and tried to select PFET but I go the following error message:
I'm on 9.2.2, is there a newer version? 🙂
DougM
No that is the latest .. are you in the library editor or schematic? I probably forgot if the columns are dynamic based on the editor .. it would make sense .. a out the unexpected condition, we will try to reproduce it .. so you loaded a PFET model and it crashed? I will check it out
fyi do not use Ltspice features .. there are some bugs and we will not support it going forward .. use the native built in simulation ., i will look at what is going on
I'm in the library.
So I switched over to the schematic and used the Add Model button to add models for each component in a simple p-fet switch:
and mapped all the components, but in the map to model dialog as soon as I click Map to Model (PFET.mdl) I get a similar error (addspicemodel.cpp line 499)
Thanks,
OK I understand ... i thought we addressed this issue previously but i think if you check your settings, and make sure to turn on "Include Examples" in the Directories dialog, that problem will go away .. i need to check what is going on with that one because i thought we addressed it .. i will look into it again, thank you.
Thanks for the info the issue is verified, it will be fixed in the next release .. for now just turn on "Include Examples" and it should not crash .. this same issue was fixed but in a different place for a different workflow, but this one was missed .. the fix for that is done and will be out with the next EAGLE version
Can't find what you're looking for? Ask the community or share your knowledge.