An Introduction to LTSpice
LTSpice (download from Linear Technology here) is our primary SPICE tool.Â It’s the best free spice tool I’ve ever used, so I wanted to introduce it to any of you who haven’t used it and who aren’t familiar with SPICE in general.Â I’m going to use the inverting amplifier as an example since I’ll be writing about it in another post.Â For the same reason I made video tutorials for EAGLE, I recommend watching the video for this tutorial as it is much easier to follow as you learn to use LTSpice.
After installing LTSpice, run it and open a new schematic.Â A description of most of the toolbar buttons is below.
New Schematic – Open Schematic – Save – Control Panel – Run Simulation – Halt Simulation
Wire – Ground (Common) – Label Net – Resistor – Capacitor – Inductor – Diode – Place Component
Move – Drag – Undo – Redo – Rotate – Mirror – Text Label – Spice Directive
Placing components such as resistors, capacitors, inductors, diodes and ground nodes is very easy.Â Click the appropriate symbol along the top toolbar, then place it on the schematic.Â To rotate or mirror the component, click the corresponding button on the toolbar or press Ctrl+R to rotate or Ctrl+E to mirror.Â To place anything besides those components on the toolbar, press the component button on the toolbar.Â This will open the components dialog.Â From here you can select voltage sources, specialty diodes, transistors and opamps among other things.
The inverting amplifier consists of two resistors and an opamp.Â To be able to test it, we’ll also need to include a voltage source (and grounds of course).Â To place the opamp, click on the component button on the toolbar, then double click on the Opamps folder.Â Scroll all the way to the right and select “opamp” from the list.Â In the description it will tell you that this is an ideal opamp and that you must invoke the spice directive .lib opamp.sub in order to use this opamp.Â Double-click on the ideal opamp and place it on the schematic.Â Then click on the spice directive button, enter in .lib opamp.sub, press OK and place it on the schematic.
To place the voltage supply, click on the component button again, click the the folder-up button, then go to the right and double-click “voltage” and place the supply on the schematic.Â To set the voltage source to something besides a DC value, click advanced and you’ll see other ways to define your voltage source.Â I’ll cover these in a future post, but you can probably figure them out yourself between the voltage source dialog and the LTSpice help.Â For now, enter 1 in DC Value and click OK.
Place a resistor between the positive side of the voltage source and the inverting input of the opamp.Â Place another resistor between the inverting input and the output of the opamp.Â To change the resistor values, right-click the resistor symbol or the R (not R1 or R2) and change the value.Â I made them 100k and 1MEG to have a gain of 10 (you must enter MEG, as m or M is interpreted as milli-).Â Place a ground on the noninverting input and on the negative side of the voltage source.
To connect all of the components, use the wire tool.Â Click on the Label Net button and label the output net as out.Â Your schematic should look similar to the one below.
With the schematic complete, the next step is to si