Mehmet Emre Doğan



Creating an Ideal Diode for LTSpice

The Problem

 The default diode that comes with LTSpice has a nonzero opening voltage. As shown in the figure 1, the diode D1 has a non-zero opening voltage; however, in simulations, sometimes use of an ideal diode becomes essential.
non-zero opening voltage
Figure 1: The default diode

The Solution

 By creating a custom diode object, this problem could be overcomed. In this tutorial, the creation of the ideal enough diode will be explained.

Method 1

Step 1: Add a spice directive

Opening Spice Directive menu
Figure 2: Opening Spice Directive menu

Step 2: Add the spice directive

.model nameThatDiode D(Ron=0.1n Roff=1G Vfwd=0.001)

Adding Spice Directive
Figure 3: Adding Spice Directive

Step 3: Name your diode

nameThatDiode

naming diode
Figure 4: Naming the diode

Step 4: Success 🎉

success
Figure 5: The result of method 1

Method 2

Step 1: Download the file I have already created

ideal_diode_custom.zip


Step 2: Unzip files to a folder

Step 3: Move that folder to LTSpice library directory

 Generally, the fibrary directory is found at the following path:

C:\Users\YOUR_USER_NAME\Documents\LTspiceXVII\lib\sym

unzipped files
Figure 6: The LTSpice library directory

Step 4: Success 🎉

success
Figure 7: The result of method 2