+ All Categories
Home > Documents > Sweeping POT

Sweeping POT

Date post: 06-Apr-2018
Category:
Upload: sampa-das
View: 219 times
Download: 0 times
Share this document with a friend
7
 1 of 7 Prepared By: Joshua Wang and RW Hendricks Date: January 23, 2007 Revision: 1.0 (original release) Application: PSpice 9.2 and above A major use of the trim pot 1 is in applications where one needs to make small adjustments to the resistance of a branch in a circuit so that the output is a precisely know value. The symbol of a trim pot, found as POT in the BREAKOUT library, is shown in Figure 1. 3 1 2 R1  Figure 1: PSpice symbol for a trim pot. The device has three terminals. Double clicking on the device brings up the Properties table as shown in Figure 2. Using the scroll bar at the bottom of the window, scroll all the way to the right side of the table. There are two variables of interest. “Value”, which defaults to 1 k, is the last entry in the table. This is the value of the resistance between terminals 1 and 3. The second parameter is “SET”, which appears in the middle of the Properties table. Its default is 0.5 as shown. Figure 2: Property Editor data for a trim pot. The device model for a trim pot is shown in Figure 3. This information is found in the Output file generated during the calculations of the model. When the computation results window appears, click on “View Output File” and scroll down to the point where the sub-circuit is created. In  this model, “X” is the value of the parameter “SET”. Thus, it is seen that when SET = 0.0, the resistance between terminals 1 and 2 is (for a 1 K resistor) is 1000.001 while the resistance between terminals 2 and 3 is 0.001 . The 1 m value is to assure that there is some finite, but small, resistance for certain circuits where a divide by zero could cause an overflow. In general, for this model 12 1000 ( 1 ) 0.001  R X = + and 23 1000 0.001  R X = + . 1 A trim pot is sometimes also known as a trimmer pot, a potentiometer, or a trim potentiometer.
Transcript
Page 1: Sweeping POT

8/3/2019 Sweeping POT

http://slidepdf.com/reader/full/sweeping-pot 1/7

1 of 7

Prepared By: Joshua Wang and RW Hendricks

Date: January 23, 2007

Revision: 1.0 (original release)

Application: PSpice 9.2 and above

A major use of the trim pot1

is in applications where one needs to make small adjustments to the

resistance of a branch in a circuit so that the output is a precisely know value. The symbol of a trim

pot, found as POT in the BREAKOUT library, is shown in Figure 1.

31

2

R1

Figure 1: PSpice symbol for a trim pot.

The device has three terminals. Double clicking on the device brings up the Properties table asshown in Figure 2. Using the scroll bar at the bottom of the window, scroll all the way to the

right side of the table. There are two variables of interest. “Value”, which defaults to 1 k, is the

last entry in the table. This is the value of the resistance between terminals 1 and 3. The secondparameter is “SET”, which appears in the middle of the Properties table. Its default is 0.5 asshown.

Figure 2: Property Editor data for a trim pot.

The device model for a trim pot is shown in Figure 3. This information is found in the Output filegenerated during the calculations of the model. When the computation results window appears,

click on “View Output File” and scroll down to the point where the sub-circuit is created. In

this model, “X” is the value of the parameter “SET”. Thus, it is seen that when SET = 0.0, the resistancebetween terminals 1 and 2 is (for a 1 K resistor) is 1000.001 while the resistance between terminals 2

and 3 is 0.001 . The 1 m value is to assure that there is some finite, but small, resistance for certain

circuits where a divide by zero could cause an overflow. In general, for this model

12 1000 (1 ) 0.001 R X = ⋅ − + Ω and 23 1000 0.001 R X = ⋅ + Ω .

1A trim pot is sometimes also known as a trimmer pot, a potentiometer, or a trim potentiometer.

Page 2: Sweeping POT

8/3/2019 Sweeping POT

http://slidepdf.com/reader/full/sweeping-pot 2/7

2 of 7

.subckt SCHEMATIC1_R1 1 2 t

RT_R1 1 t (1K*(1-X))+.001

RB_R1 t 2 (1K*X)+.001

.ends SCHEMATIC1_R2

Figure 3: Device model for a trim pot.

In many applications, one wishes to model the effect of sweeping the potentiometer through its range

of resistance values. This may be done as follows. Consider the simple circuit consisting of a voltage

source, a resistor, and a trim pot, as shown in Figure 4. Note that the “unused” end of the pot (terminal 1)

cannot be left “dangling,” but must be connected. As discussed in Section 2.11 of the text, it is good

practice to tie the unused terminal to the wiper. This assures that in the event the wiper becomes open

circuit, there is continuity in the circuit and that the circuit “sees” the end-to-end resistance of the pot.

Double click on the trim pot and change “SET” from its default value of 0.5 to “X” (without the quotes)

as shown in Figure 5. Be sure to use a capital “X”. Next, highlight the “SET” column, click the “Display”

button, and select “Name and Value” for the display format. This will display the expression SET = X as

shown in Figure 4 besire the label R2 for the resistor. Return to the schematic by clicking “Window” andthen “Schematic Page 1” or by clicking on the proper window in the taskbar.

V1

AC = 0.0V

TRAN = 0.0

DC = 10V

R1

1k

3 1

2

R2 SET = X

0

PARAMETERS:

X = 0.1

Figure 4: Example circuit with trim pot.

Next, place a “PARAM” component by clicking “PlacePart” and selecting “PARAM” from the

SPECIAL library as shown in Figure 6. This will place the PARAMETERS heading on the circuit

diagram as shown in Figure 4. Double-click PARAMETERS to open the Property Editor. Click “New

Column,” accept the message that this will permanently change the Undo/Redo information, and enter“X” in the name field as shown in Figure 7. When the name is entered, the “Value” field will change from

gray to white and will accept a value. Enter any value between 0.0 and 1.0 as the value. Then click

“Apply.” Notice that after you click “Apply” the window is set to insert another column. Do not do this.

Rather, exit the “Add New Column” window by clicking either “Cancel” or the red X-box in the upper

right-hand corner. Notice that there is now a new column in the property editor with the variable “X”defined and the value assigned to it as shown in Figure 8. Highlight this new column, press the “Display”

button, and select “Name and Value” from the Display Properties window as before. Click OK and then

click “Apply” on the editor control bar. Finally, return to the schematic window. The circuit diagramshould appear as in Figure 4. If you now click on the value of X in the PARAMETERS table, you can

change it to any value you wish. Of course, based on the definition given in Figure 3, only values between

0 and 1 have physical meaning. You may now run a Bias Point analysis and display either V or I, or both,

as usual.

Page 3: Sweeping POT

8/3/2019 Sweeping POT

http://slidepdf.com/reader/full/sweeping-pot 3/7

3 of 7

Figure 5: Changing the SET value to a variable.

Figure 6: Inserting the PARAM part.

Page 4: Sweeping POT

8/3/2019 Sweeping POT

http://slidepdf.com/reader/full/sweeping-pot 4/7

4 of 7

Figure 7: Creating the global variable “X”.

Figure 8: Properties Editor Window for PARAM part with the new variable “X” defined.

Page 5: Sweeping POT

8/3/2019 Sweeping POT

http://slidepdf.com/reader/full/sweeping-pot 5/7

5 of 7

Figure 9: Setting the simulation sweep parameters.

One could determine the effect of varying X, the parameter of interest, by making sequential changes

in X and rerunning the Bias Point multiple times and ultimately plotting a graph of the results by hand.

However, there is a much more elegant and efficient way to obtain such data. This is by performing a

sweep of the global variable X, as described next.

To see the effect of “turning” the trim pot from a zero ohms resistance between terminals 2 and 3 to

1 k between them, we proceed as follows. Click the PSpice tab in the top toolbar and select either “New

Simulation Profile” or “Edit simulation Profile.” Choose “New” if this is the first time you have set up the

profile, and “Edit” if you wish to rerun an existing profile that will receive only minor modification. This

will open the Simulation Settings screen shown in Figure 9. In this window, select DC Sweep for theAnalysis Type, be sure that only the “Primary Sweep” box is checked under Options, select the Global

Parameter radio button under sweep variable, and set “X” as the Parameter name. Finally, select the

“Sweep Type.” The parameters in the example are for a linearly spaced distribution of X values from 0 to

1 in 0.05 steps. One could do a logarithmic sweep, or one could output values at an arbitrarily selected

array of values of “X”.

Once the desired variables are set, click “OK” and the screen will close. Following this, select

“Run” from the PSpice pull-down menu. Be sure to watch for errors in the listing. If there are no errors, a

graphics screen with no plotted data will be presented as shown in Figure 10.The next step is to select the data you wish to display. This may be done in either of two ways. First,

you may go to the Trace pull-down in Figure 10 and select “Add Trace.” This will present you with a list

of all of the nodes and variables in the circuit diagram you have drawn. Pick the node you are interested

in. For example, an examination of the net list for this circuit, as found by looking at the listing of the

Output file given in the PSpice pull-down menu, shows that the node between the trim pot and the 1 K

Page 6: Sweeping POT

8/3/2019 Sweeping POT

http://slidepdf.com/reader/full/sweeping-pot 6/7

6 of 7

Figure 10: Results window from the sweep operation.

resistor is node N12762. Picking this node in the “Add Trace” window results in the graph shown in

Figure 11. Note that the green square in the caption under the graph identifies the data. You can return to

the “Add Trace” pull-down menu and add multiple curves to the plot. Alternatively, after running the

simulation, you may select the voltage probe shown on the PSpice toolbar and see the same result.

However, note that PSpice will fail to run if the voltage probe is placed on the circuit prior to running the

simulation. Also note that if you wish to show the current in a branch, you must select that branch from

the “Add Trace” pull-down; it seems not to work if you select the current probe .

2Node numbers are assigned randomly by PSpice; your node number will be different.

Page 7: Sweeping POT

8/3/2019 Sweeping POT

http://slidepdf.com/reader/full/sweeping-pot 7/7

7 of 7

Figure 11: Plot of node voltage between nodes 2 and 3 of the trim pot for the circuit shown in Figure 4.


Recommended