Beige Bag Software

Simple Potentiometers and Rheostats

About the writer: Harvey Morehouse is a contractor/consultant with many years of experience using circuit analysis programs. His primary activities are in Reliability, Safety, Testability and Circuit Analysis. He may be reached at harvey.annie@verizon.net. Simple questions for which I know the answer are free. Complex questions, especially where I am ignorant of the answers, are costly!!!

Summary: The makers of B2SPICE have provided a variable resistor model (not in the library) in a file entitled pot.ckt. Unfortunately, it is misnamed. What is provided is a simple variable resistor model which is more akin to a rheostat than a potentiometer (pot). In this article a simple potentiometer model is created which can be used also as a rheostat as well.

Basics: A potentiometer is a variable, tapped resistor. Normally a voltage (or current) is applied through the device, from one end to the other. The tap connects a portion of the resistance as an output, providing an output that is a fraction of the voltage across the device. The tap may be connected to one end of the device or the other, causing the total device resistance to vary from essentially zero ohms to the full resistance of the device (or the converse, depending on the end the tap is connected to), depending on the position of the tap.

There are complications, however. Some pots are 'infinite resolution'. By this it is meant that the pot slider or tap is designed such that a smooth selection change is provided for the tap position change. (Of course there is usually a practical limit to the physical variability of the tap, limited to perhaps a degree or so of rotation of the tap selection screw.) Other pots, particularly wire-wound versions that are not infinite resolution types, will have an inherit limit to the effective tap control to a value equal to the turn to turn resistance of the pot winding. Vibration can affect the tap setting as well, however for such pots, the usual fix is to cement the adjustment screw to prevent its changing after it is positioned.

Another problem is that of potentiometer resistance variation over life and with temperature. It is expected that variations would be almost identical with life over the two equivalent resistances in a 'real' pot, hence the voltage divisions would be nearly unchanged. A problem would be disproportionate heating in the two sections of the pot, mostly caused by loading of the pot. But this would be a second order effect at most. It is expected then that the only variation of consequence would be the end-to-end resistance variation, and proportionate changes in each of the two equivalent resistances modeling the pot.

In some pots, the taper, or change of resistance with the tap position, is not linear. A common type is a log taper, in which the resistance changes logarithmically with tap position.

The most significant problem is the controlling voltage. One would like to provide a control voltage with a range from zero to one volt, corresponding to a 0% to a 100% pot variation. Such a control might not be physically viable in many circuits if one attempts to use an existing node voltage as a control. As an example, consider a circuit where the controlling voltage might be of the opposite polarity, of a range from v1 to v2 volts corresponding to 0% to 100% setting. Moreover, consider the case where v1 is negative and v2 is positive. Now of course one could use external circuitry to condition the control voltage, however it would be nice if one could imbed these conditions into the model to make it most general.

Now of course if the controlling voltage is a circuit voltage, as opposed to using an 'optimize' function (if provided), then it must be connected in such a manner to provide negative feedback, so that the pot is properly adjusted.

Are these considerations important? They could be. One uses a pot most often to adjust a circuit to a given DC or AC operating point. E.G., setting a voltage or a gain to null out errors or voltage divider errors or resistance values to adjust a gain. One could run a simulation for a given set of conditions to determine the appropriate setting (control voltage value) for a pot, and then fix the control voltage. One then would perform the desired analyses for this case, repeating it as required for different conditions.

It would be very nice IF one could automatically, perhaps in a Monte Carlo or AC or DC analysis, to generate a given set of STARTING Beginning-Of-Life (BOL) conditions or component variations, use these to determine and generate a pot setting, and then, using End-Of-Life (EOL) variations from these BOL conditions simulate the circuit. Some higher priced products allow one to do this. Unfortunately this is not the case in B2SPICE. Perhaps at some time this will be so, but to do this would require a 'scripting' or 'batch' mode of operation.

The problem of HOW one controls/adjusts the pot, what exact setting to use, how to vary this over several simulations is not easily handled. The same problem is present whenever there are Select-At-Test resistors used in a design, for their usage present many of the same problems. But this is more of a design problem, certainly an analysis problem, out of scope for this article that is about modeling of a pot.

Modeling approach: In this paper, we shall only be modeling the simplest of pots. They shall be infinite resolution models, with no limits on tap control other than from zero to 100% control.

But first some explanations are in order. One may create a resistor without using a primitive resistance element. This is done by means of one or two means. Consider Ohm's law. The normal formulation is:

i = e/R

Rewriting, R = i/e

What this means is that, between two nodes, the effective resistance R is determined by the ratio of current to voltage. We can use this in two ways. We can sense the current through the nodes and provide a voltage generator in opposition to the applied voltage source that is equal to the product of that current and the desired resistance value. Alternately, we can measure the voltage across the two nodes and use a current source to force the current from one node to the other to be the quotient of the voltage across the nodes and the desired resistance value. Often both methods are used to create two pot models within a library. Why is this?

If one uses the voltage source method, care must be taken to ensure the device is never connected directly across a voltage source, as convergence problems can occur UNLESS a resistance is provided in series with the voltage source. Otherwise a loop of three voltage sources can occur. If one used the current source method, similar convergence problems can exist. We will use the voltage source method, however, we will add a very small resistance in series with the pot, and at the tap to preclude problems. This will of course, cause the model to be ever so slightly in error, but be of no real significance in all but a few contrived cases.

Circuit Test Model:

The proposed pot model, imbedded in a simple test circuit, is shown in Figure 1 following:


Figure 1
Simple Potentiometer - 1

The netlist for this circuit is shown in the following:

Simple pot 1.ckt
************************
* B2 Spice
************************
* B2 Spice default format (same as Berkeley Spice 3F format)

***** main circuit
R4 N2 0 1g
R1 N1 5 1e-2
R3 N4 0 1K
R2 11 N2 1e-6
V1 N1 0 DC 10
B1 5 7 v =i(vam1)*10000*(1-v(n3))
V2 N4 0 DC 10 SIN( .5 .5 1k 0 0)
VAm2 10 0 0
B2 11 10 v =i(vam2)*10000*v(n3)
VAm1 7 11 0

.OPTIONS gmin = 1E-12 reltol = 1E-4 itl1 = 500 itl4 = 500
+ rshunt = 1G
.TRAN 10u 2m 0 1u
.IC
.END

In this circuit sources V1 and V2, and the ground reference are provided for test purposes. R3 is added to allow the input voltage (provided by source V2) a return path should a voltage source be directly connected to nodes N4 and N5. R4 was added to suppress SPICE warnings about an unconnected node. Neither R1, R2 nor R3 has an appreciable effect on any circuit it may be used in. The 'guts' of the model are elements R1, R2, nonlinear voltage sources B1 and B2, and ammeters Vam2 and Vam2. The resistance of the potentiometer is 10K.

A simulation of the circuit of Figure 1 is provided in Figure 2 following:


Figure 2
Simple Potentiometer - 1 circuit graph

Although it is hard to see, the N2 and N4 voltages track as expected. The current through Source V1 (which is the negative of the current seems distorted, however, noting the axis values shown as unchanging 1mA, reflect the slight computational errors in the overall impedance of the pot model. As the control voltage is set to vary between zero and 1V in a sinusoidal value, the voltage at N2 does also.

Pot model:

The pot model, stripped of the test elements, is shown in Figure 3 following:


Figure 3
Simple pot model

The netlist for this model is as follows:

Simple pot 2.ckt
************************
* B2 Spice
************************
* B2 Spice default format (same as Berkeley Spice 3F format)

***** main circuit
R1 N1 4 1e-3
R3 N4 N5 1K
R2 11 N2 1e-6
B1 4 7 v =i(vam1)*10000*(1-v(n4) - v(n5))
VAm2 9 N3 0
B2 11 9 v =i(vam2)*10000*(v(n4) - v(n5))
VAm1 7 11 0

.OPTIONS gmin = 1E-12 reltol = 1E-4 itl1 = 500 itl4 = 500
+ method = gear rshunt = 1G
.TRAN 10u 2m 0 1u
.IC
.END

Note that the nodes have changed slightly from those in the preceding circuit. Also, resistor R3 could be changed in value if desired. No ground is present, as it is expected that it will be provided by the circuit this pot model is imbedded within.

Conclusions:

A simple three terminal pot model has been created. This circuit is usable for many simulations.


 

 


Beige Bag Software, Inc., 623 W. Huron, Suite 2, Ann Arbor, MI, 48103
(phone) 734.332.0487 (fax) 734.332.0392 (email) info@beigebag.com
© 2005-2010 Beige Bag Software, Inc