LTspice for EE students - Page 1
Forum section: electronics / projects

author: Kashif
author_rank: Contributor
timestamp: February 26, 2019, 05:47:57 pm
content: 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 curvesPosted 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 # 9Learn these spice commands: .dc .paramIn 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. 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 .paramWe will look at IV curves of following components:ResistorDiodeNPN and PNP BJTNMOS and PMOS MOSFETSolar cellWe 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/

author: iMo
author_rank: Super Contributor
timestamp: February 26, 2019, 06:36:47 pm
content: 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..

author: macboy
author_rank: Super Contributor
timestamp: February 26, 2019, 08:10:14 pm
content: Quote from: imo on February 26, 2019, 06:36:47 pmIt 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.

author: iMo
author_rank: Super Contributor
timestamp: February 27, 2019, 02:14:34 pm
content: I've been doing that that way@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..

author: Kashif
author_rank: Contributor
timestamp: February 27, 2019, 08:32:47 pm
content: I agree with you guys. It's one of the limitationin 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.

author: iMo
author_rank: Super Contributor
timestamp: February 28, 2019, 03:47:21 pm
content: FYI - There is a huge LTspice information and libs/models base on yahoo groups.

author: JayHattler
author_rank: Newbie
timestamp: February 28, 2019, 06:54:58 pm
content: Kashif,I have read your first entry in this series and look forward very much to the rest of them.Jay

author: Kashif
author_rank: Contributor
timestamp: July 20, 2019, 01:42:10 am
content: 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/

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 20, 2019, 02:41:41 pm
content: Quote from: Kashif on February 27, 2019, 08:32:47 pmThat'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...

author: Audioguru again
author_rank: Regular Contributor
timestamp: July 20, 2019, 07:04:25 pm
content: 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!

author: Kashif
author_rank: Contributor
timestamp: July 22, 2019, 06:00:43 pm
content: @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.

author: Audioguru again
author_rank: Regular Contributor
timestamp: July 22, 2019, 06:07:17 pm
content: 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.

author: RoGeorge
author_rank: Super Contributor
timestamp: July 22, 2019, 06:31:00 pm
content: 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.

author: Kashif
author_rank: Contributor
timestamp: July 22, 2019, 10:42:27 pm
content: 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!