Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 10 Current »

Guide Slides

Prof. Heng CH has created a very comprehensive guide on how to setup LTSpice and how to run simulation
Please download it from LumiNUS or here:

LTSPICE Opamp Setup.pdf

Accelerate Simulation

If you are facing the problem that the simulation runs extremely slow, go to "setting" , and select "SPICE" panel .

Make sure you choose "Gear" under the Default Integration Method.

This will accelerate your simulation. 

Note: if you already selected Gear but your simulation stopped half way and never move forward, consider redo the recoding of signals. 


Tricks to power up OpAmps

Use Net labels to tidy up your schematic. In the below example, all port labelled -Vcc is supplied with -5V from the power source at the bottom, similarly, all ports labelled Vcc is supplied with 5V. 


Remember to include the library files

Always remember to include the OpAmp library files by write into the SPICE directive.

An example of a schematic used OpAmp LM6172, LM7171B and AD8056. 

The file name following ".inc" should be exactly the same as the library file downloaded from LumiNUS. And make sure they are under the same folder as your schematic. 


Feed recorded signal (.dat) as simulation input

If you want to test the performance of your LTSpice design, you can feed the recorded noisy signal as the input of the circuit, and probe the waveform at the output to observe, or save the output as a .wav file, then feed it into GNURadio to see what's the PSR count of the filtered signal. 

 

To do so:

  1. Right-click the power source, under "style", choose "PWL FILE="..."".
  2. Fill in the path to the .dat file, or simply click "Browse" and select the file
  3. Use Net Name to label your output, i.e. vout
  4. Add analysis command line ".tran 0 4ms"
  5. Add this line in the SPICE directive: ".wave name_the_file.wav 16 4e6 vout".
  6. 16 is the number of bits, ranging from 1 to 32. The higher the bits the slower the simulation
  7. 4e6 is the sample rate of the simulation. Similarly, the higher the sample rate, the slower the simulation. You need to make sure this sample rate is the same at the GNURadio setting (4MHz).

The sample rate of your LTSpice simulation should match the sample rate of your opamp_file.grc fs_in. 




  • No labels