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:
- Example models - agreed .. we supply only some basic models to get started, like the DMOD model, or NFET or PFET models, but since there are literally (tens of) thousands of models out there, we did not try to curate and collect models for you. In the best case, you might find some models useful for you, but as you probably know with simulation, it is all about the models, and getting an accurate result depends on you having the right model for the part you are actually using, from the manufacturer that supplies it to you. So even if we have say 10,000 models we may not have the one you are looking for, so the 10,000 models is useless if it does not include yours. We decided to only provide simple basic models to start with. We may provide some widely used libraries in the future, but for now, you supply the models, we will verify them and support them if they are in standard SPICE format. (even sometimes i help users on the forums convert models that are not pure SPICE but are unencrypted tool-specific models, but on a case by case basis if not too difficult to convert)
- About the battery symbol, this is not the case and I will explain how it works:
- EAGLE allows full flexibility to allow you to simulate any circuit, using any symbol, as long as you configure the schematic properly. For example maybe you have a schematic from 20 years ago made in an old version of EAGLE .. no problem, just map spice models to the parts and you are ready to go .. i will explain how it works here, but it is also in the video webinar you noted above https://www.youtube.com/watch?v=BCpYbKRfPa4&t=1s
- start with the spiceconvert.sch example, which is made for the purpose of explaining how adding models works
- that schematic looks like this: http://prntscr.com/l6dz9p
- right click on the battery, choose “Add Model”
- You need to choose the right type for the part .. in this case, it is a independent voltage source, so choose that option http://prntscr.com/l6e0b9 Note that the possible choices in this list depend on the number of pins for the symbol .. so for example for a 2 pin battery symbol, it is not possible to see the MOSFET as a choice, because a MOSFET has more than 2 pins.
- You may change the value here if you like, but this dialog does not care about the value, this is only for mapping, for a voltage source, there is a wizard (right click on it in sch) so it is better to do there, i would just clear out the value for now in this dialog, since the lib part came with some value that is not usable for simulation (it is a string description not a simulatable value like 1V for example)
- click MAP - the mapping dialog lets you connect any arbitrary symbol pins, to the inputs/outputs the SPICE model expects .. click OK to verify the proper mapping: http://prntscr.com/l6e38v
- That is it for the battery and other parts are similar. Personally i like to select all parts, then run Add Model, then I can do all the mapping from one table-based dialog and by running Add Model only one time - see here: http://prntscr.com/l6e4an
- Note also, depending on the Spice Type you choose in the Add Model dialog, the MAP dialog will look different . if you choose a type that does not require a model, you will be brought to the pin connection mapping tab and that is all you need to do .. (for example for resistors, capacitors, or other parts that do not require a model at all) … if the type requires a model file, then it is either a “model card” or a “subcircuit” .. so you need to load the appropriate model for the part type, and as you noted, you do need to know what is required for the part. This is not automatic because there is no way for EAGLE to know what type of part you have, unless you tell it .. for example you can draw a symbol of a CAR, put two pins on it, and it can be mapped to a resistor, capacitor, any valid type that requires two pins. The point here is, it cannot all be automatic, because there is nothing inherent about any symbol that will tell the simulator what it is, you need to tell it. Of course many tools supply ready to use parts, as we do .. for parts we already mapped and supply (like all those in ngspice-simulation, or ngspice-digital, or in misc passive libraries) the type is known, but for arbitrary parts not yet mapped for simulation, you need to go through the Add Model process to ready the schematic
>> 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.