You are on page 1of 3

EEE 42: Semiconductor Devices and Circuits Laboratory Lab 1: Introduction to SPICE

Due Dates:
TUV FUV

10am Tuesday, November 27, 2012 (In Class) 10am Friday, November 23, 2012 (In Class)

Objective

SPICE stands for Simulation Program with Integrated Circuit Emphasis. It is the predominant tool used to simulate circuits and was developed at UC Berkeley in the 1970s. You will be using SPICE extensively in your circuit design courses, and this lab will teach you how to use an open source SPICE package called NGSPICE, one of many implementations based on the original Berkeley SPICE. You will learn how to specify and analyze a circuit with NGSPICE as well as how to plot the results of your analysis. You can download NGSPICE at http://ngspice.sourceforge.net/.

SPICE Model of a Diode

With hand calculations, we typically use approximations to simplify our solutions. However, a more accurate analysis requires to consider the second-order eects. This is where computer-aided design becomes necessary as the amount of calculations is increased with every variable considered. Simulation of circuits that contain active devices requires a mathematical model (which we will call SPICE model) that covers the physical parameters of those devices. The accuracy of the simulation will highly depend on the quality of this model.

Figure 1: SPICE model of a diode

The standard SPICE model for a diode, shown in Figure 1, is simple. The model contains a current source with value equal to the ideal diode current Equation (1). This models the steady-state characteristic of the diode.

ID = IS (e nT 1)

VD

(1)

The parameter n is the emission coecient which is equal to 1 for most diodes. The resistor RS models the series resistance contributed by the neutral regions of the junction. With high current levels, the voltage drop across this resistor causes the diode voltage VD to dier from the terminal voltage. The dynamic behavior of the diode is modeled by the parasitic diode capacitance CD , which combines the two dierent charge-storage eects in the diode: the excess minority carrier charge and the space charge.

CD =

VD T IS n Cj0 e T + T (1 VD )m 0

(2)

The parameter T is called the transit time. It represents the excess minority carrier lifetime for long-base diodes, or the mean transit time for short-base diodes. A listing of some SPICE model parameters for some diodes are listed in Table 1.

Parameter Name Saturation current Emission coecient Series resistance Transit time Zero-bias junction capacitance Grading coecient Junction potential Breakdown voltage

Symbol IS n RS T Cj0 m 0 

SPICE IS N RS TT CJ0 M VJ BV

Units A  sec F  V V

Default Value 1.0 E-14 1 0 0 0 0.5 1

1N4148 5.84 E-9 1.94 0.7017 11.07 E-9 0.95 E-12 0.55 0.75 100

1N4001 12.25 E-9 1.83 0.0414 1 E-9 10 E-12 0.5 0.7 50

Table 1: SPICE diode model parameters

Figure 2: Diode current measurement

Procedure

In this part, we will use SPICE to analyze some simple diode circuits. For this exercise, use the SPICE models for the diodes included in the le eee42_diode_models.txt attached in the email. At the end of this exercise, you will need to submit a documentation of your work. Every question in the procedures should be answered concisely in the documentation. All plots generated from simulations should also be attached.
3.1 DC Analysis

In this part, you will learn how to use .DC statement to perform DC analysis in SPICE.
3.1.1 Forward Bias Current

1. Write a SPICE deck for the circuit shown in Figure 2. Use 1N4148 diode model. Note that the voltage source Vmeas should be set to 0V. What is the purpose of placing this voltage source? 2. Sweep the voltage source VS from 0V to 1.5V with 0.2mV increments. 3. Plot the diode current ID versus VS . 4. Repeat the steps 1 to 3 for the diodes 1N914 and 1N4001. What is the cut-in voltage of each diode? What is the corresponding SPICE parameter close to this value?

3.1.2

Reverse Bias Current

1. Use the same circuit in Figure 2. Use 1N4148 diode model. Sweep the voltage source VS from 0V to 150V with 1V increments. 2. Plot the diode current ID versus VS . 3. Repeat the steps 1 to 3 for the diodes 1N914 and 1N4001. What is the reverse breakdown voltage of each diode? What is the corresponding SPICE parameter close to this value?

Figure 3: Circuit 1 for transient analysis

Figure 4: Circuit 2 for transient analysis


3.2 Transient Analysis

In this part, you will learn how to .TRAN statement to perform transient analysis. 1. Write a SPICE deck for the circuit shown in Figure 3. Use RS = 1Kand 1N4148 for the diode. 2. Use a sinusoid voltage source for VS with 10V amplitude and 2KHz frequency. Plot the voltage across resistor RS . Show 4 clock cycles. What is the function of the circuit? What is the peak value of the output? 3. Repeat steps 1 to 2 for the circuit in Figure 4. What is the function of the circuit? What is the peak value of the output? What caused the peak value of output voltage to dier from the peak value of input voltage?

You might also like