Author Topic: LTspice for EE students  (Read 3326 times)

0 Members and 1 Guest are viewing this topic.

Offline KashifTopic starter

  • Contributor
  • Posts: 17
  • Country: us
    • Explore Silicon
LTspice for EE students
« on: February 26, 2019, 05:47:57 pm »
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/
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4782
  • Country: pm
  • It's important to try new things..
Re: LTspice for EE students
« Reply #1 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:
 

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2254
  • Country: ca
Re: LTspice for EE students
« Reply #2 on: February 26, 2019, 08:10:14 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:
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
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4782
  • Country: pm
  • It's important to try new things..
Re: LTspice for EE students
« Reply #3 on: February 27, 2019, 02:14:34 pm »
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..   :)
« Last Edit: February 27, 2019, 02:23:05 pm by imo »
 

Offline KashifTopic starter

  • Contributor
  • Posts: 17
  • Country: us
    • Explore Silicon
Re: LTspice for EE students
« Reply #4 on: February 27, 2019, 08:32:47 pm »
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.
« Last Edit: February 27, 2019, 10:09:43 pm by Kashif »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4782
  • Country: pm
  • It's important to try new things..
Re: LTspice for EE students
« Reply #5 on: February 28, 2019, 03:47:21 pm »
FYI - There is a huge LTspice information and libs/models base on yahoo groups.
 

Offline JayHattler

  • Newbie
  • Posts: 2
  • Country: us
Re: LTspice for EE students
« Reply #6 on: February 28, 2019, 06:54:58 pm »
Kashif,

I have read your first entry in this series and look forward very much to the rest of them.

Jay
 

Offline KashifTopic starter

  • Contributor
  • Posts: 17
  • Country: us
    • Explore Silicon
Re: LTspice for EE students
« Reply #7 on: July 20, 2019, 01:42:10 am »
Here is the lesson 2. It's very simple and discusses .op command. Check it out if interested!

https://iexploresiliconvalley.com/2019/07/19/ltspice-lesson-2-node-voltage-and-mesh-current-analysis-using-ltspice/
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14471
  • Country: fr
Re: LTspice for EE students
« Reply #8 on: July 20, 2019, 02:41:41 pm »
I agree with you guys. It's one of the limitation  :-- in LTspice, but can't really complain with a free tool like this.  :-+

That's for sure. The simulation engine is pretty good.
The schematic entry is less so, but it's still workable for simulation purposes. No big issue there.

I must admit I think the waveform viewer is the part that leaves the most to be desired. It's pretty clunky and has acquired a lot of new bugs in LTSpice XVII that weren't there in previous versions. Sometimes it irritates me to no end. I wish it got some serious overhaul...
 

Offline Audioguru again

  • Regular Contributor
  • *
  • Posts: 115
  • Country: ca
Re: LTspice for EE students
« Reply #9 on: July 20, 2019, 07:04:25 pm »
A student using electronic simulation software must learn the software is stupid to important things like maximum allowed current and the heating of a transistor.
I have use LTspice where a 2N3904 transistor (max allowed current is 200mA) conducting many Amps and glowing white hot!
 

Offline KashifTopic starter

  • Contributor
  • Posts: 17
  • Country: us
    • Explore Silicon
Re: LTspice for EE students
« Reply #10 on: July 22, 2019, 06:00:43 pm »
@Audioguru, I agree relying on simulation by itself is pretty dump way to design any circuit. That's where engineering intuition coupled with real datasheet reading comes into play. Having said that, simulation tools are good to build intuition and all real world design are simulated in some way to find potential issues ahead of time.
 

Offline Audioguru again

  • Regular Contributor
  • *
  • Posts: 115
  • Country: ca
Re: LTspice for EE students
« Reply #11 on: July 22, 2019, 06:07:17 pm »
Students look at the graphs of "typical" devices on a datasheet without reading the minimum and maximum printed spec's, or they simulate a circuit with a "typical" model. Then they complain that their built circuit does not work.
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6202
  • Country: ro
Re: LTspice for EE students
« Reply #12 on: July 22, 2019, 06:31:00 pm »
Looks very promising!  :-+

Just a thought, wouldn't be good to base the lessons on QUCS SPICE instead of LTspice, so not to depend on anything commercial (unless the lessons are sponsored by LT, of course)?

After all, QUCS have some extra tools included, filters active/passive, in microstrip or lumped elements, RF generic blocks like directional couplers, transmission lines with losses, scatter parameters analysis and so on, compatible with other flavors of SPICE in libraries and file formats, scripting capabilities, Octave interface, good documentation and examples, works on all major OSs, open source and free, etc.


Offline KashifTopic starter

  • Contributor
  • Posts: 17
  • Country: us
    • Explore Silicon
Re: LTspice for EE students
« Reply #13 on: July 22, 2019, 10:42:27 pm »
Thank RoGeorge. QUCS is an excellent tool; it seem it got better than the last time I used about 4 years ago. Once I finish all 10 of my lessons, I might be able to incorporate QUCS in my examples as well!
« Last Edit: July 24, 2019, 05:41:52 pm by Kashif »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf