|
|||||||
March 27, 1997 Spice simulates potentiometer Stanley
Shell and Sopheap Heng, University of California--Los
Angeles, Spice and its derivatives are useful tools for simulating the performance of electrical and mechanical circuits. Most versions of Spice can simulate voltage sources, current sources, and voltage- and current-controlled voltage and current sources, as well as can sweep model parameters, which in turn sweep component values as well as voltages or currents. For example, Listing 1 and the circuit in Figure 1 show how you can model a potentiometer and sweep its output from one end to the other. Specifically, the circuit in Figure 1 uses a potentiometer to provide an offset voltage for an op amp. Listing 1 shows the corresponding PSpice listing. This Spice program models the circuit's output as the potentiometer sweeps from one end to the other. There is no need to run the program repeatedly to obtain the data for each potentiometer setting. Listing 1 uses the statement STEP LIN PARAM RVAL .001 500.001 10 to output values step by step, in increments of 10V, starting with 0.001 and ending with 500.001. Replacing this STEP statement with the following DC statement enables you to make plots such as VOUT vs the swept value of the potentiometer: DC LIN PARAM RVAL .001 500.001 10 In both cases, you must globally declare the sweep parameters as indicated in the brackets following R1 and R2 in Listing 1. (DI #2002) |
|||||||
|
|||||||
| EDN Access | Feedback | Table of Contents | |
|||||||
| Copyright © 1997 EDN Magazine, EDN Access. EDN is a registered trademark of Reed Properties Inc, used under license. EDN is published by Cahners Publishing Company, a unit of Reed Elsevier Inc. | |||||||