> Previous contributions to the AboutSpice.com mailing-list

Submitted by: hvogt on 2005-10-02 18:46:40.
Topic:Re: Re: simulate variable resistors
Body:add a little bit of structure
* Voltage controlled potentiometer
* vary supply and control voltage
.DC Vhigh 0 1 0.01 Vcontrol 0 1 0.2
*control voltage
Vcontrol control 0 DC 1
*supply to resistor
Vhigh high 0 DC 1
* V(mid) is the potentiometer wiper output
*upper part of resistor
BResu high mid I=((V(high)-V(mid))/10k/(V(control)+1e-6))
*lower part of resistor BResd mid low I=(V(mid)-V(low))/10k/(1e-6+1-V(control))
* add 1e-6 to prevent divide by zero (adds only a small error)
*measure current:
Vlow low 0 DC 0
.END
Reply to this contribution | Write to the contributor
Submitted by: hvogt on 2005-10-02 18:37:31.
Topic:Re: simulate variable resistors
Body:Hi,
a potentiometer with plain old Spice (as found in http://www.uni-duisburg.de/FB9/EBS/hauptteil_software_en.html:
* Voltage controlled potentiometer
* vary supply and control voltage
.DC Vhigh 0 1 0.01 Vcontrol 0 1 0.2
*control voltage
Vcontrol control 0 DC 1
*supply to resistor
Vhigh high 0 DC 1
* V(mid) is the potentiometer wiper output
*upper part of resistor
BResu high mid I=((V(high)-V(mid))/10k/(V(control)+1e-6))
*lower part of resistor
BResd mid low I=(V(mid)-V(low))/10k/(1e-6+1-V(control))
* add 1e-6 to prevent divide by zero (adds only a small error)
*measure current:
Vlow low 0 DC 0
.END

Regards
Holger
Reply to this contribution | Write to the contributor
Submitted by: steeletraps on 2005-08-26 20:33:32.
Topic:Re: simulate variable resistors
Body:Hi,
I don't know anything about Opus, but have they expanded beyond the basic SPICE. With my Micro-Cap version, I can define the value of a resistor as:

1k-R(R1)

and then have another resistor called R1 that is the one I sweep in DC analysis to mimic a 1kohm pot. I believe PSpice has something very similar too.
Reply to this contribution | Write to the contributor
Submitted by: nateD on 2005-08-18 10:35:08.
Topic:simulate variable resistors
Body:I need to simulate the sweep of a three pole variable resistor. I know that I can do a .DC analysis that sweeps a single parameter value, but how do I simulate one side of a variable resistor increasing and the other side decreasing?
I am using Spice Opus version 2.22 on Linux, but could step back into the windows world and use pspice if I had to.
Any bright ideas, or am I just too dim to see the obvious solution?
Thanks for your help,
Nate
Reply to this contribution | Write to the contributor

Post a new contribution | Back to the list of topics