PSpice Application Notes

PSpice App Note_Modeling Potentiometers and Variable Resistors

Issue link: https://resources.pcb.cadence.com/i/1480198

Contents of this Issue

Navigation

Page 2 of 12

APPLICATION NOTE 2 Figure 2: Simulation result for Linear potentiometer circuit For this analysis, a DC sweep of the parameter PSET is used and PSET is swept from 0 to 1 in increments of 0.2. So far we have assumed that the pot is linear, but for a logarithmic pot we need an extra parameter, that is, the dynamic range of the pot. The potentiometer can then be implemented by the following subcircuit. .SUBCKT POT (TOP, BOTTOM, TAP) PARAMS: R=1K RANGE=1000 SET=.5 RTOP TOP TAP {R-(R/RANGE)*PWR(RANGE,SET)} RBOT TAP BOTTOM { (R/RANGE)*PWR(RANGE,SET)} .ENDS As SET goes from 0 to 1, the value of RBOT goes logarithmically from RĂ·RANGE to R. RTOP makes up the difference between RBOT and the total resistance of the pot. If a time-varying potentiometer is needed, it can be built using the same ideas as above. The subcircuit for time- varying potentiometer implements a voltage controlled resistance. One then builds an appropriate controlling waveform (using, for instance, the piecewise linear (PWL) type) to vary the resistance as desired. Figure 3: Time-varying potentiometer test circuit

Articles in this issue

view archives of PSpice Application Notes - PSpice App Note_Modeling Potentiometers and Variable Resistors