Electronics > Projects, Designs, and Technical Stuff
LTspice for EE students
Kashif:
Guys,
I am working on series of lessons on LTspice which could be extremely useful if you want to learn LTspice or get deeper into to some advanced level simulation. First lesson is up on my blog, check it out. I am open for any feedback and if you would like to see your favorite circuit simulated, please let me know.
Here is the excerpt and and a link to full post:
https://iexploresiliconvalley.com/2019/02/03/ltspice-lesson-1-generating-iv-curves/
LTspice Lesson 1: Generating IV curves
Posted on February 3, 2019 by iexploresiliconvalley
“Never perform a measurement or simulation without first anticipating the results you expect to see.” ~Eric Bogatin’s Rule # 9
Learn these spice commands: .dc .param
In these 10 lesson series, we will explore LTspice circuit simulator. Assumption is that you’re a beginner or someone who already plays around with it a bit and feel it has potential to solve circuit problems, and perhaps provide intuition and insight how electronic circuits works. Ultimately, it will help solve a real world EE problem and continue to provide a quick go to tool for a quick circuit simulation of some proof of concept.
The approach we will take is that we will never simulate a circuit unless we know what output we expect to see. This is beautifully captured by world-renowned signal integrity expert Eric Bogatin rule # 9. [1]
First of all, why start with IV curves? Voltage-Currrent (aka IV) relationship of a component can tell us a lot about behavior of that component. In a nutshell, by applying a voltage across its terminal and measuring the resulted current, one can figure out the resistance or more generally impedance of the component. Later this knowledge can lead to electrical models which can help design and predict the behavior of a circuit. This is a good starting point as we will get to know immediately two of most important LTspice simulation commands: .dc and .param
We will look at IV curves of following components:
Resistor
Diode
NPN and PNP BJT
NMOS and PMOS MOSFET
Solar cell
We will be using following 5 steps approach for each of the circuit in these tutorials:
Step 1: Draw a circuit.
Step 2: Add proper dot simulation command.
Step 3. Predict its behavior.
Step 4: Simulate and verify behavior with your prediction.
Step 5: (Optional) Repeat step 3 if result doesn’t match prediction and extend the example for some other use case or different parameters.
https://iexploresiliconvalley.com/2019/02/03/ltspice-lesson-1-generating-iv-curves/
iMo:
The way how the LTSpice plots the curves (when stepping through parameters) is a big pain.
They should implement a way how to add the "parameter values" to the respective curves plotted out..
:palm:
macboy:
--- Quote from: imo on February 26, 2019, 06:36:47 pm ---The way how the LTSpice plots the curves (when stepping through parameters) is a big pain.
They should implement a way how to add the "parameter values" to the respective curves plotted out..
:palm:
--- End quote ---
It is incredibly un-intuitive, but the information is available.
First you need to add a cursor to a curve by left-clicking on the name of the parameter in the plot window. You can move the cursor to another step by pressing the up or down arrow keys. Then, right-click on the cursor itself (not parameter name) in the plot window. The step information is then displayed... In a modal window that you must dismiss before doing anything else. |O
iMo:
I've been doing that that way :phew:
@Mike Engelhardt: I think the simplest and fastest hack would be to add the information on the actual parameter into the "Cursors" window. While stepping through the traces with up and down keys you may see the name of the stepping parameter and its actual value then.. :)
Kashif:
I agree with you guys. It's one of the limitation :-- in LTspice, but can't really complain with a free tool like this. :-+
Imo suggestion on actual parameter into cursor window certainly helpful, but I would personally like to see a .step parameter legend on the plot window.
I am only aware of 3 ways to get the .step info.
1. As macboy pointed out, use a cursor along with up or down arrow keys to select a step, then right right click cursor itself (tedious and intuitive if you have lots of steps)
2. Right click on the plot window and select "View" and then "Select Steps"
3. using .measure and .step to calculate some parameter at different steps. View the data in "Spice Error Log" by selecting "View" from the menu bar.
Navigation
[0] Message Index
[#] Next page
Go to full version