March 7, 2025

Explore Our Topics!

Check out the extensive list of topics we discuss: 

  1. Communication Protocols:
    USB 
    - RS232 
    Ethernet 
    AMBA Protocol: APB, AHB and ASB 
    UART, I2C AND SPI
  2. Important concepts in VLSI:
    Designing a Chip? Here Are the 12 Important Concepts You Need to Know
    Metastability 
    - Setup time and Hold time
    Signal Integrity and Crosstalk effect
    Skews and Slack 
    Antenna Effect
  3. Semiconductor Memories
  4. Analog vs Digital Electronics
  5. Most Frequently Asked Questions in VLSI
  6. VLSI and Semiconductor Nuggets: Bite-Sized knowledge for Enthusiasts
  7. Common Acronyms in VLSI and Semiconductor Industry
  8. Transistors:
    BJT
    JFET
    MOSFET
    CMOS
    Transmission Gate CMOS
    Dynamic CMOS
  9. Sequential Circuits:
    Registers
    Counters
    Latches
    Flip Flops
  10. FPGA:
    ASIC vs FPGA
    FPGA Insights: From Concept to Configuration
    Full-Custom and Semi-Custom VLSI Designs: Pros, Cons and differences
    From Theory to Practice: CMOS Logic Circuit Design Rules Made Easy with Examples
  11. CMOS Fabrication:
    CMOS Fabrication
    Twin-Tub CMOS Technology
  12. Combinational Circuits
    - Logic Gates 
    - Boolean Algebra and DeMorgan's Law 
    - Multiplexer (MUX) and Demultiplexer (DEMUX) 
    - Half Adder
    - Full Adder
    - Half Subtractor
    - Full Subtractor
    - Encoders
    - Decoder
  13. Analog Electronics
    - OPAMP
    - Inverting and Non-inverting Amplifiers
    - Characteristics of OPAMP
    - OPAMP Application: Adder, Subtractor, Differentiator, and More!  
    - Filters
    - Hard Disk Drives Explained
    - Passive Components: Capacitors and Resistors Explained
    - LTSpice Tutorial 1: Installation and First Circuit Simulation
  14. Verilog
    - Verilog Datatypes
    - Comments, Numeral Formats and Operators
    - Modules and Ports
    - assign, always and initial keywords
    Blocking and Non-Blocking Assignments
    - Conditional Statements
    - Looping Statements
    - break and continue Statement
    - Tasks and Functions
    - Parameter and generate
    - Verilog Codes
  15. System Verilog: 
    Disable fork and Wait fork.
    Fork and Join.
  16. Project on Intel Quartus Prime and Modelsim:
    Vending Machine Controller
  17. Xilinx Vivado Projects
    1)VHDL
    Counters using Testbench code
    Flip Flops using Testbench code
    Logic Gates using Testbench code
    Full Adder using Half Adder and Testbench code
    Half Adder using Testbench code
    2)Verilog
    Logic Gates using Testbench code
    Counters using Testbench code
    Full Adder using Half Adder and Testbench code
    Half Adder using Testbench code
  18. VLSI Design Flow:
    Design Flow in VLSI
    Y chart or Gajski Kuhn Chart
  19. Projects on esim:
    Step-by-Step guide on how to Design and Implement a Full Adder using CMOS and sky130nm PDK
    Step-by-Step guide on how to Design and Implement a Half Adder using CMOS and sky130nm PDK
    Step-by-Step guide on how to Design and Implement a 2:1 MUX using CMOS and sky130nm PDK
    Step-by-Step guide on how to Design and Implement a Mixed-Signal Circuit of 2:1 Multiplexer
  20. IoT based project:
    Arduino
    Step-by-Step guide on how to Interface Load Cell using Arduino
  21. Kmaps:
    Simplifying Boolean Equations with Karnaugh Maps - Part:2 Implicants, Prime Implicants and Essential Prime Implicants. 
    Simplifying Boolean Equations with Karnaugh Maps - Part:1 Grouping Rules.
    Simplifying Boolean Equation with Karnaugh Maps.

March 6, 2025

LTspice Tutorial 1: Installation and First Circuit Simulation — A Step-by-Step Guide

 LTspice is a SPICE-based analog circuit simulation software developed by Analog Devices (originally by Linear Technology). It is the most widely used SPICE simulator in the industry. LTspice features schematic capture for designing electronic circuits, an advanced SPICE-based simulator, and a waveform viewer for analyzing simulation results. It supports various circuit analysis types, including transient, noise, AC, DC, DC transfer function, and DC operating point simulations, along with Fourier analysis. Additionally, it can calculate component heat dissipation and generate efficiency reports. While it does not generate printed circuit board (PCB) layouts, it allows netlist export for use in PCB design software.

It is commonly used in analog circuit design for simulating amplifiers, filters, signal conditioning circuits, and sensor interfaces. Mixed-signal circuits involving analog and digital components can also be tested within LTspice. Many universities and research institutions use LTspice for teaching circuit design concepts and conducting advanced research in analog/RF circuit design, power systems, and semiconductor device modeling. It is a preferred tool due to its accuracy, free availability, and extensive component library.

Installation process

You can download the software from the link below. It is completely free, easy to install, and ready to use within minutes.
LTSpice Download Link

Designing Our First Circuit: Voltage Divider in LTspice

Let’s begin by designing our first circuit, a voltage divider. Below is the basic schematic, which consists of a voltage source and two resistors in series.

Step 1: Create a New Schematic

  • Open LTspice and start a new schematic (automatically named “Draft 1”).

Step 2: Placing Components

  • The toolbar at the top contains essential components.
  • To place a resistor, select it from the toolbar or press “R” on your keyboard. Press “Esc” to deselect.
  • For a voltage source, go to the Components menu, scroll to the end, and select “Voltage”.
  • Finally, add a ground connection.
  • Use the wire tool to connect the components. One of LTspice’s best features is that wires automatically link components when dragged through them.

Step 3: Assigning Component Values

  • To set values for resistors and voltage:
  • Hover over a component, right-click, and enter the desired values in the pop-up window.
  • You can also add text labels to your schematic for clarity.
  • Once done, your complete circuit should resemble the following diagram.

Step 4: Running the Simulation

  • To simulate the circuit, set the stop time to 1 second for a basic analysis.
  • Keep the remaining settings default for a simple simulation.
  • Now that we have designed our voltage divider circuit, let’s measure different values across different components in LTspice.

Step 5: Measuring Voltage

  • Move your mouse cursor over the circuit schematic. You will see a red probe icon when hovering over a node.
  • Click on the node where you want to measure the voltage. The corresponding voltage waveform will be displayed in the simulation window.
  • In our case, you can probe the middle node between R1 and R2 to measure the divided voltage.

Measure Voltage Difference (Across Two Nodes)

  • To measure the voltage difference between two nodes:
  • Hold Ctrl while clicking on one node, then click on another node.
  • This will plot the voltage difference between the two selected points.
  • Example:
  • If you click on the top of R1 (where V1 is applied) and then on the bottom of R2 (ground), you will see the total applied voltage.

Additional Tips:

  • The measured voltage appears as a graph in the simulation window.
  • Move the cursor over the waveform to see exact values at different time points.
  • To adjust the voltage scale, click on the voltage axis in the simulation window and manually set the range.
  • In this case, you can adjust the scale from 12V to 0V for better visualization of the waveform.

Step 6: Measuring Current

  • In LTspice, current is measured through a component, not at a single node like voltage.
  • Move the mouse cursor over a resistor (R1 or R2) or the voltage source (V1).
  • You will see a current probe icon (clamp symbol) appear.
  • Click on the component (e.g., R1 or R2) where you want to measure the current.
  • The corresponding current waveform will appear in the simulation window.

Step 7: Measuring Current through the Voltage Source

  • To measure the total circuit current, hover over the voltage source (V1).
  • When the current probe appears, click on it. This will show the current supplied by the source.

Step 8: Adjusting the Current Scale

  • If needed, click on the current axis in the simulation window and adjust the range for better visualization.
  • You can also right-click on the waveform and select “Add Cursors” for precise measurements.

Step 9: How to Remove Unwanted Waveforms

If you have selected multiple components for measurement and want to remove some waveforms from the simulation window, follow these steps:

Method 1: Right-Click and Delete

  1. Move the cursor over the waveform (voltage or current) you want to remove.
  2. Right-click on the waveform.
  3. Select “Delete This Trace” from the menu.

Step 10: Measuring Power

  • Move your cursor over the component whose power you want to measure.
  • Hold the “Alt” Key — The cursor will change to a power symbol (a probe with a watt symbol).
  • Click on the Component — LTspice will automatically display the power waveform in the simulation window.
  • Adjust the Scale (Optional) — If needed, right-click on the waveform and adjust the axis scale for better visualization.

Step 11: How to Add a Label in LTspice

Adding labels in LTspice helps in identifying nodes easily, especially when dealing with complex circuits.

Steps to Add a Label:

  1. Select the Label Tool — Click on the “net” tool.
  2. Enter the Label Name — A small window will pop up. Type the desired label name (e.g., “Output”) and click OK.
  3. Place the Label — Click at the node where you want to add the label.
  4. Connect with a Wire (if needed) — If the label isn’t directly at the node, use the wire tool to connect it properly.
  5. Verify the Label — Once added, the label will be visible, and LTspice will recognize it as a named node in the simulation results.

Step 12: How to View Only a Specific Waveform in LTspice

If multiple waveforms are displayed and you want to see only the current through R1, follow these steps:

  1. Double-Click on the Component — Locate R1 in the schematic and double-click on it.
  2. Only the Current Through R1 Will Be Displayed — LTspice will remove all other waveforms and display only the selected component’s current.
  3. To Bring Back Other Waveforms — If you need to view additional signals, you will have to reselect them by probing the circuit again.

Step 13: Performing Operations on Waveforms

We can also double the output voltage and see it by going to the Expression Editor.

In this way, we can perform different mathematical operations like:

  • Addition
  • Subtraction
  • Multiplication
  • Custom functions on signals

Step 14: How to Start with a DC Supply That Ramps from 0V to 10V in LTspice

If you want the DC supply to start from 0V and gradually ramp up to 10V, follow these steps:

  1. Go to Simulate → Configure Analysis
  2. Select the “Transient” Tab
  3. Check the Option — Enable “Start external DC supply voltages at 0V”
  4. Run the Simulation — Click OK and run the simulation to see the voltage ramp-up.
  5. Control the Area to View the Ramp-Up Waveform — Click and drag over the desired area to zoom in and focus on the ramp-up.

This method is useful when simulating circuits that require a smooth power-up behavior! 🚀📈

In this tutorial, we covered the installation of LTspice and designed a simple voltage divider circuit. We learned how to place components, assign values, run simulations, and measure voltage, current, and power. These are fundamental steps in circuit simulation, forming the basis for more advanced designs.

✔️ Try designing your own circuit in LTspice and share your experience in the comments!
✔️ If you found this guide helpful, share it with others who might benefit!
✔️ Follow me for more LTspice tutorials and circuit design tips!

Explore Our Topics!

Check out the extensive list of topics we discuss:  Communication Protocols: -  USB   - RS232   -  Ethernet   -  AMBA Protocol: APB, AHB and...