& Construction

Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
& Manufacturing

Professional CAD/CAM tools built on Inventor and AutoCAD
6 min read
Welcome back to our SPICE Simulation Series, Part 4! In Part 3 we showed you the ins and outs of DC Sweep and AC Sweep analysis. Now it’s time to dive into the final simulation type in Autodesk EAGLE – Transient analysis. We’ll also be covering a commonly asked question: how do you map SPICE models to existing components?
Transient analysis is pretty simple; it simulates the behavior of your circuit’s voltage and current over a defined period of time. This simulation is perfect for identifying performance issues such as nonlinear distortion, intermodulation, saturation, clipping, and oscillations.
A transient analysis in EAGLE takes three variables, Start Time, Stop Time, and TMAX. TMAX defines the maximum allowed step time and can be useful for analyzing oscillators. The other two settings define when the transient analysis starts and stops.
The example project we’ll be working with is an opamp circuit that uses subcircuits and models. Let’s open this now. Look for the opamp project folder within the Projects » ngspice directory in your Autodesk EAGLE Control Panel. Then open opamp1.sch.
In this example circuit, we have two opamp subcircuits. At the top is our voltage supply with a couple of resistors. This voltage is then fed into the middle circuit where we have a negative feedback amplifier. In the bottom, there’s a filter. What we want to do is look at this circuit in the time domain with transient analysis and see what happens to our voltage and current.
Let’s talk about SPICE models before running our simulation. When you place a part like an opamp on a schematic, you get a default model called lm741 that’s already mapped to a library. But how do you change this to map to a SPICE model instead?
Once a new model gets loaded you’ll be taken to the Map Pins tab to map all of the pins on the symbol to SPICE model inputs. We’re not going to make any changes to our opamp at the moment; we just wanted to show you a quick and easy way to load in a new SPICE model.
When parts get added to SPICE models, this will be shown in your netlist. Let’s see how this looks. Select the Simulate button at the top of your interface to open the Simulation dialog, then select the Netlist tab.
When SPICE models are added to parts, this will be shown in your netlist. To make it clear where models are coming from, the directory for each model is referenced. Here we can see that we have two opamps, one is located in the directory of our opamp project folder, the other is in the global models directory folder.
EAGLE will make several attempts to locate models for your parts, looking in this order:
You can use this order of call to your benefit. For example, if you have a part with a model mapped in a library, you can override that model by adding a different model in your project folder. This can be useful if you want to preserve the default EAGLE models library.
Keep in mind, when sharing a schematic design with a fellow designer you’ll need to send both the schematic file and all included SPICE models.
One last thing before we run our simulation. When setting up voltage sources on your schematic, you’ll often need to tweak their sources to define AC/DC values or transient functions. To do this, right-click one of the voltage sources on your schematic and select Source Setup. This will open the Source Setup dialog.
Here you can configure your DC and AC values for your source. For a transient simulation, you might also want to change the value to get an exponential, pulse, or sinusoidal function.
This is a useful dialog all around to set the values for your source parts. We won’t be making any changes to this schematic since it’s already configured, but now you know where to find it.
Now that we’ve got the basics covered let’s run our Transient analysis. Follow along with these steps:
In the Plot tab, we can see all of our signals and their change in voltage/current over time. Everything looks normal as expected, let’s move on to part mapping!
Now we’ll be looking at an example project called mapgates. Let’s open this now. Look for the mapgates project folder within the Projects » ngspice directory in your Autodesk EAGLE Control Panel. Then open MapGates.sch.
This is an interesting example. Here we have a multigate part which includes a double opamp gate and a gate for power. Let’s see how we can map this multigate part.
Now you’re taken to the Map Pins tab. This is where you’ll see all of the gates and pins for your subcircuit and their corresponding model inputs. To map all of the pins to your model you simply have to choose an input that matches with a pin name. If you try to use duplicate model inputs for different pins, you’ll get an error. They all have to be unique.
This is a simple process, pin -IN goes to model in1-, V+ goes to vdd, and so on. Confirm that all of your pins and models match like ours:
This is a pretty complex example for mapping pins, but the process will always be the same for any part. Unless you’re using a part from the ngspice library, you will always need to map symbol pins to SPICE model inputs as we’ve shown here.
Once all of your model inputs are matched to symbol pins select the OK button. You’ll then be taken back to the Add Model dialog. Here we can see there’s a green checkmark next to our X-IC1 part. This signifies that the part has been successfully mapped a SPICE model, nice job!
That covers our SPICE Series, Part 4! Today we learned about the final SPICE simulation method in Autodesk EAGLE, Transient analysis. This method proves an easy way to identify issues with voltage and current performance over a defined period of time. We also looked at how to map SPICE models to existing components.
At this point, we’ve covered all of the basics of SPICE in Autodesk EAGLE, and you now know how to perform all of the simulations. But what happens if you have an existing schematic that needs to be simulated? In a future update, we’ll be showing you how to make it SPICE-compatible, stay tuned!
Have you been following along? Try the new SPICE simulation for free! Download Autodesk EAGLE 8.4 now.
By clicking subscribe, I agree to receive the Fusion newsletter and acknowledge the Autodesk Privacy Statement.
Success!
May we collect and use your data?
Learn more about the Third Party Services we use and our Privacy Statement.May we collect and use your data to tailor your experience?
Explore the benefits of a customized experience by managing your privacy settings for this site or visit our Privacy Statement to learn more about your options.