Experiment 3 DIODE APPLICATIONS OBJECTIVES. To analyse the diode as a part of electronic circuits. To handle libraries and subcircuits in Pspice. 3.1. Diode model with PSpice OBJECTIVES. To extract a linear model for the diode from the experimental I-V curve. To create a subcircuit in Pspice for this model. To load this subcircuit in a library. Figure 3.1: Circuit with diode and resistance 1. PSpice work NOTE: In Experiment 2, the curve tracer was used to measure I-V curves in diodes. The aim of Experiment 3 is to explain how the instrument measured the different I-V points of the curve. This will be done with the help of Pspice and one of the diode models stored in its libraries. To do this, follow this procedure. Extraction of the model parameters. Draw in OrCad Capture the circuit of Figure 3.1. Use a resistor with R = 1 kΩ and the diode named D1N4002. Obtain the I-V characteristic of the diode by sweeping the DC voltage of the power supply. To do so, create a Simulation profile with the following specifications: • • • • Analysis Type: DC Sweep Sweep Variable: Voltage Source Sweep type: Linear Start Value = 0 V 1 • End Value = 5 V • Increment = 0.1 V The Name of the power supply to be swept must also be provided in the specifications. Place a Current Marker at the diode anode and run the simulation. In Pspice A/D Lite, the current I is a function of the input voltage V . The option Plot followed by Axis Settings... allows to express I as a function of the voltage drop in the diode. In the X-axis menu, click on Axis Variable and choose V(D1:1). Click on OK in both windows. Export the I − VD curve of the diode to a worksheet. To do this, select the curve and use Ctrl+C. Paste the data in the worksheet. Once in the worksheet, represent the curve I − VD in a figure and superimpose a straight line VD = Vγ + I ∗ Rd (3.1) over the high-current range of the I-V curve. Find the appropriate values of Vγ and Rd for a good agreement. Design of a subcircuit Design a subcircuit that represents the previous model (3.1). Remember that this model is valid for voltages larger than Vγ . For lower values, the diode behaves as an open circuit. The design of subcircuits is made with hierarchical blocks; create one with the option Place Hierarchical Block and fill in the following items in the menu: • • • • Reference: D1N Primitive: No Implementation Type: Schematic View Implementation Name: Diode Select the block. Introduce two terminals with the option Place H Pin and fill the menu as: • Name: IN; Type: Input; Width: Scalar • Name: OUT; Type: Output; Width: Scalar Click on the right button of the mouse over the hierarchical block and select Descend Hierarchy. Specify a name for the new schematics: D1N. A new window will appear with two ports corresponding to the terminals IN and OUT defined previously. Draw the circuit of figure 3.2 providing the following values: • • • • R: the value of Rd in your model V : the value of Vγ in your model VON : Vγ + 0.01 1 VOFF : Vγ - 0.01 Once the model for the two conduction states of the diode has been drawn, it can be loaded in a Pspice library. It will be a new library which can be named as componentes.olb or whatever other name can be preferred. To do this, select Tools → Generate Part... in the directory tree. 1 VON and VOFF are parameters of the element S. This element switches between two conduction states of the diode, depending on the value of the voltage drop at the two input terminals of this switch. 2 Figure 3.2: Two conduction-state model for the diode Netlist/source file: Design we are working in Netlist/source file type: Capture Schematic/Design Part name: Diode Primitive: No Destination part library: /COMPONENTES.olb Source Schematic name: Name of the schematic that contains the circuit of the diode model. • Create New Part: Activate this option • • • • • • Accept Pin confirmation window: Ok → save The library and part are generated and loaded in the “output” file. At this point it is advisable to change the symbol of the new part by drawing new lines or inserting text. To do this, go to the directory tree of the project, select the library, click on the right button of the mouse and select Edit part. Draw a symbol similar to the diode, as can be seen in Figure: 3.3. The dotted line represents the symbol itself. Whatever you draw inside is not important. The red lines are referred to the terminals (they must not be deleted).2 Using a subcircuit In Pspice, draw back the circuit of figure 3.1 substituting the diode D1N4002 with the new subcircuit. To extract this subcircuit from the library use the option Get New Part → Libraries. Repeat the DC sweep previously defined, compare the I-V curves in the same figure and highlight the differences. NOTE: If you have any problem in creating or using the subcircuit, substitute the diode D1N4002 with the equivalent circuit of Figure 3.4. 3.2. The half-wave rectifier OBJECTIVES. To obtain the transfer characteristic of the half-wave rectifier. To analyse the response of the rectifier to a sine waveform. To check the capacitive effects at high frequencies. 1. Theoretical work Consider the circuit of figure 3.5 2 In the toolbar on the top right, Snap to Grid must be active. If it is red (inactive), problems can arise when connecting the nodes in the schematics. 3 Figure 3.3: Symbol of the diode Figure 3.4: Equivalent circuit model of the diode a) Obtain the transfer characteristic by using the model extracted in section 3.1 and R = 1KΩ. b) Obtain a new transfer characteristic by using Rd = 0. c) If Vi is a sine wave of 5 V amplitude and period T = 100µs, represent in a figure Vi and the response Vo as a function of the time from 0 to 200µs (use Rd = 0). 2. PSpice work a) Draw the circuit of figure 3.5 and substitute the diode with the model built in section 3.1. Use R = 1kΩ and a voltage source VSIN with offset voltage VOFF = 0 V, an amplitude VAMPL = 5 V and frequency FREQ = 10kHz. b) Define a transient analysis in the simulation profile. End the analysis at 200 µs. Place the voltage markers at the input and output of the circuit and run PSpice. Represent the response Vo as a function of the time from 0 to 200µs and compare it with the theoretical results. 3. Laboratory practice a) Assemble the circuit of figure 3.5 with R = 1 KΩ and a 1N4004 diode. b) Introduce a sine wave at the input, consider two different frequencies (10 KHz and 100 KHz) and measure the output voltage in these two cases. Explain the results and the differences between the two cases. c) Use the XY mode of the oscilloscope to measure the transfer characteristic. d) Compare the measurements with the theoretical and PSpice results. 4 Figure 3.5: The half-wave rectifier 3.3. A basic limiting circuit OBJECTIVES. To study the response of a basic limiting circuit. Figure 3.6: Basic limiting circuit 1. Theoretical work Consider the circuit of figure 3.6 a) Obtain the transfer characteristic using the model found in section 3.1. b) Obtain the transfer characteristic using the same model but with Rd = 0. c) If Vi is a sine wave of 5 V amplitude and period T = 100µs, represent in a figure Vi and the response Vo as a function of the time from 0 to 200µs (use Rd = 0). 2. PSpice work a) Draw the circuit of figure 3.6 and substitute the diode with the model built in section 3.1. Use R = 1kΩ and a voltage source VSIN with offset voltage VOFF = 0 V, an amplitude VAMPL = 5 V and frequency FREQ = 10kHz. b) Define a transient analysis in the simulation profile. End the analysis at 200 µs. Place the voltage markers at the input and output of the circuit and run PSpice. Represent the response Vo as a function of the time from 0 to 200µs and compare it with the theoretical results. 3. Laboratory practice a) b) c) d) Assemble the circuit of figure 3.6 with R = 1 KΩ and a 1N4004 diode. Introduce a sine wave at the input (f = 10 KHz) and measure the output voltage. Use the XY mode of the oscilloscope to measure the transfer characteristic. Compare the measurements with the theoretical and PSpice results. 5 3.4. The clamped capacitor (dc-restorer circuit) OBJECTIVES. To study the response of a clamping circuit. Figure 3.7: Clamped capacitor 1. Theoretical work3 Consider the circuit of figure 3.7. a) If Vi is a sine wave of 5 V amplitude, represent in a figure Vi and the response Vo . b) If Vi is a square wave of 5 V amplitude, represent in a figure Vi and the response Vo . 2. PSpice work a) Draw the circuit of figure 3.7 and substitute the diode with the model built in section 3.1. Use a capacitor C = 1 nF and a voltage source VPULSE with the following parameters: low value V1 =-5 V, high value V2 =5 V, delay time TD = 0 s, rise time TR = 0.1 ns, fall time TF = 0.1 ns, pulse width P W = 50µs and time period P ER = 100µs. b) Define a Transient analysis in the simulation profile. End the analysis at 200 µs. Place the voltage markers at the input and output of the circuit and run PSpice. c) Draw in the same figure the theoretical and PSpice results. A disagreement will be observed when the diode is in its OFF state. A small discharge of the capacitor is observed in the PSpice result. The origin of this discharge is found in the model of the voltage controlled commuter. The resistance between its output terminals is not infinite. Thus, a leakage current flows between its terminals. Estimate the average leakage current as: C∆V Qleakage = ileakage = ∆t ∆t where ∆t is the pulse width where the discharge is observed and ∆V is the variation of the voltage during the discharge. Estimate the value of the resistance between the terminals as: <V > Rleakage = Ileakage where < V > is the average voltage during the discharge. Click on the model of the voltage controlled commuter and compare the value used in the model for the resistance of the OFF state with your results (fill the gaps in Table 3.1). 3 It makes no sense to represent the transfer characteristic of the circuit of figure 3.7 because it depends on the initial charge of the capacitor. 6 spice Ileakage ROF F (calculated) ROF F (commuter model) Rprobe origin of the leakage current laboratory ———————- Table 3.1: Table to be filled with the results of the study of the circuit of Figure 3.7. 3. Laboratory practice a) Assemble the circuit of figure 3.7 with C = 1 nF and a 1N4004 diode. b) Introduce a sine wave of 5 V amplitude at the input (f = 10 KHz) and measure the output voltage. c) Introduce a square wave of 5 V amplitude at the input (time period T = 10−4 s) and measure the output voltage. Observe that the output waveform has a finite average value or DC component. Which is this value? 4 d) Compare the measurements with the theoretical and PSpice results. Do you observe any leakage current in the experimental data? In an affirmative case, determine the average leakage current Ileakage and the equivalent resistance Rleakage (fill the gaps in Table 3.1). Figure 3.8: Figures that must be filled with the results 4 An application of this circuit is the following. Consider a pulse signal being transmitted through a capacitively or ac-coupled system. The capacitive coupling will cause the pulse train to lose whatever dc component it originally had. Feeding the resulting waveform to a clamping circuit provides it with a dc-component. Actually, the clamped circuit restores the dc-component. This is why the circuit is also called dc restorer. 7 Figure 3.9: Figures that must be filled with the results 8