basic question on SPICE

B

Boris Feinbrand

Guest
Hello group,

I'm trying to simulate a wheatstone bridge as it is used in several sensors.
My intention is the simulation of the physical effect by using a voltage or
current
source. In my case I've a current sensing application using a GMR AA004-02
(nve)
which is sensing AC. For that reason the use of a param sweep won't bring
the
results I need.

What I need know is a kind of voltage(or current) controlled
resistor/impedance.
I tried to mange that issue with a JFET but since that's quite tricky to get
the desired range
and dynamic range I hope there's an easier way to do it.

thank you in advance

regards
Christoph
 
In article <40a28e6c$1@olaf.komtel.net>,
"Boris Feinbrand" <nobody.special@freenet.de> wrote:

What I need know is a kind of voltage(or current) controlled
resistor/impedance.
I tried to mange that issue with a JFET but since that's
quite tricky to get the desired range
and dynamic range I hope there's an easier way to do it.
Read about 'Non-linear Dependent Sources':

http://newton.ex.ac.uk/teaching/CDHW/Electronics2/userguide/sec3.html#3.2.3


Charles.
 
On Wed, 12 May 2004 22:51:55 +0200, "Boris Feinbrand"
<nobody.special@freenet.de> wrote:

Hello group,

I'm trying to simulate a wheatstone bridge as it is used in several sensors.
My intention is the simulation of the physical effect by using a voltage or
current
source. In my case I've a current sensing application using a GMR AA004-02
(nve)
which is sensing AC. For that reason the use of a param sweep won't bring
the
results I need.

What I need know is a kind of voltage(or current) controlled
resistor/impedance.
I tried to mange that issue with a JFET but since that's quite tricky to get
the desired range
and dynamic range I hope there's an easier way to do it.

thank you in advance

regards
Christoph
Some versions of Spice support a voltage-controlled switch. The
resistance will vary with input voltage. Unfortunately, it isn't a
linear relationship.

You can make your own voltage controlled resistor. See
http://www.ecircuitcenter.com/Circuits/vc_resistor1/vc_resistor1.htm
for some ideas.

Mark
 
What I need know is a kind of voltage(or current) controlled
resistor/impedance.

You can make your own voltage controlled resistor. See
http://www.ecircuitcenter.com/Circuits/vc_resistor1/vc_resistor1.htm
for some ideas.

Mark
Thank you Mark,

I tried to use the implementations from the provided link and
poorly failed. My colleges nor I know whats going wrong. I built
a little circuit with a resistor in series to the VCR and tried
to simulate that using Protel 99SE SP6. The generated netlist is
shown below. The netlist failed to simulate unless I delete the
comments at the top of the file. As far as I remember the first
line of a SPICE file is treated as comment anyway so that it's no
wonder that the simulator accepts the file after having comments
deleted.
The error the simulator is reporting is:

Error: Unknown subckt: xr1 out 0 vctrl 0 vcres1 res=1k

As far as I can see there's no reason for that message! Have you
got an idea what's going wron?

Any hint appriciated ...

regards and thanks in advance

Christoph

============================
*SPICE Netlist generated by Advanced Sim server on 14.05.2004 09:07:48
*for: VCR1.nsx

*Schematic Netlist:
XR1 OUT 0 VCTRL 0 VCRES1 RES=1k
R2 VCC OUT 1k
V3 VCTRL 0 DC 0 PWL(0 0.5 12.5m 1.5)
VCC VCC 0 1V

*Selected Circuit Analyses:
..TRAN 5E-5 0.0125 0 5E-5
..OP

*Models and Subcircuit:
..SUBCKT VCRES1 1 4 5 6 RES=1K
RS 1 2 1U
ERES 2 3 VALUE = I(VSENSE)*RES*V(5,6)
VSENSE 3 4 DC 0V
..ENDS

..END
 
On 14 May 2004 00:36:04 -0700, forennutzung@freenet.de (Christoph R.)
wrote:

What I need know is a kind of voltage(or current) controlled
resistor/impedance.

You can make your own voltage controlled resistor. See
http://www.ecircuitcenter.com/Circuits/vc_resistor1/vc_resistor1.htm
for some ideas.

Mark

Thank you Mark,

I tried to use the implementations from the provided link and
poorly failed. My colleges nor I know whats going wrong. I built
a little circuit with a resistor in series to the VCR and tried
to simulate that using Protel 99SE SP6. The generated netlist is
shown below. The netlist failed to simulate unless I delete the
comments at the top of the file. As far as I remember the first
line of a SPICE file is treated as comment anyway so that it's no
wonder that the simulator accepts the file after having comments
deleted.
The error the simulator is reporting is:

Error: Unknown subckt: xr1 out 0 vctrl 0 vcres1 res=1k

As far as I can see there's no reason for that message! Have you
got an idea what's going wron?

Any hint appriciated ...

regards and thanks in advance

Christoph

============================
*SPICE Netlist generated by Advanced Sim server on 14.05.2004 09:07:48
*for: VCR1.nsx

*Schematic Netlist:
XR1 OUT 0 VCTRL 0 VCRES1 RES=1k
R2 VCC OUT 1k
V3 VCTRL 0 DC 0 PWL(0 0.5 12.5m 1.5)
VCC VCC 0 1V

*Selected Circuit Analyses:
.TRAN 5E-5 0.0125 0 5E-5
.OP

*Models and Subcircuit:
.SUBCKT VCRES1 1 4 5 6 RES=1K
RS 1 2 1U
ERES 2 3 VALUE = I(VSENSE)*RES*V(5,6)
VSENSE 3 4 DC 0V
.ENDS

.END
See...

"VOLTAGE VARIABLE RESISTOR SYMBOL/SUBCIRCUIT"

On the Subcircuits & Symbols Page of my website.

You may need to edit the subcircuit to conform to your particular
flavor of Spice.


...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
 
On 14 May 2004 00:36:04 -0700, forennutzung@freenet.de (Christoph R.)
wrote:

What I need know is a kind of voltage(or current) controlled
resistor/impedance.

You can make your own voltage controlled resistor. See
http://www.ecircuitcenter.com/Circuits/vc_resistor1/vc_resistor1.htm
for some ideas.

Mark

Thank you Mark,

I tried to use the implementations from the provided link and
poorly failed. My colleges nor I know whats going wrong. I built
a little circuit with a resistor in series to the VCR and tried
to simulate that using Protel 99SE SP6. The generated netlist is
shown below. The netlist failed to simulate unless I delete the
comments at the top of the file. As far as I remember the first
line of a SPICE file is treated as comment anyway so that it's no
wonder that the simulator accepts the file after having comments
deleted.
The error the simulator is reporting is:

Error: Unknown subckt: xr1 out 0 vctrl 0 vcres1 res=1k

As far as I can see there's no reason for that message! Have you
got an idea what's going wron?

Any hint appriciated ...

regards and thanks in advance

Christoph

============================
*SPICE Netlist generated by Advanced Sim server on 14.05.2004 09:07:48
*for: VCR1.nsx

*Schematic Netlist:
XR1 OUT 0 VCTRL 0 VCRES1 RES=1k
R2 VCC OUT 1k
V3 VCTRL 0 DC 0 PWL(0 0.5 12.5m 1.5)
VCC VCC 0 1V

*Selected Circuit Analyses:
.TRAN 5E-5 0.0125 0 5E-5
.OP

*Models and Subcircuit:
.SUBCKT VCRES1 1 4 5 6 RES=1K
RS 1 2 1U
ERES 2 3 VALUE = I(VSENSE)*RES*V(5,6)
VSENSE 3 4 DC 0V
.ENDS

.END

Your subckt syntax might be bad. In PSpice, your subckt line should
read:
..SUBCKT VCRES1 1 4 5 6 PARAMS: RES=1K
^^^^^^^
You may need to use some curly brackets for your equations. See the
documentation for your flavor of Spice as it could be different from
what I'm used to.

The better solution is to use the voltage-controlled current source
soulution. Less parts and some say it converges better.

Mark
 
Hi Guys,

If you are using Protel keep in mind that its syntax is a little
bit different from the often used Pspice syntax. Protel uses a
modified version of Berkely Spice (Kernel 3f5 I think)

Subcircuits in Protel are defined as follows:

SUBCKT NAME {params}
command line 1
command line 2
...
ENDS. NAME
^^^^^ that's what is misssing in your model!

See below


forennutzung@freenet.de (Christoph R.) wrote in
<9f193cef.0405132336.6eb40d33@posting.google.com>:

Any hint appriciated ...

*Models and Subcircuit:
.SUBCKT VCRES1 1 4 5 6 RES=1K
RS 1 2 1U
ERES 2 3 VALUE = I(VSENSE)*RES*V(5,6)
VSENSE 3 4 DC 0V
.ENDS
^^^^^^^^^^
Add VCRES1 here

Regards and good luck with your sims
Michael
 
mboh.noslender@online.de (Michael Bohlender) wrote in message news:<94EA77FB9miboh@130.133.1.4>...
Hi Guys,

If you are using Protel keep in mind that its syntax is a little
bit different from the often used Pspice syntax. Protel uses a
modified version of Berkely Spice (Kernel 3f5 I think)

Subcircuits in Protel are defined as follows:

SUBCKT NAME {params}
command line 1
command line 2
...
ENDS. NAME
^^^^^ that's what is misssing in your model!

See below


forennutzung@freenet.de (Christoph R.) wrote in
9f193cef.0405132336.6eb40d33@posting.google.com>:

Any hint appriciated ...

*Models and Subcircuit:
.SUBCKT VCRES1 1 4 5 6 RES=1K
RS 1 2 1U
ERES 2 3 VALUE = I(VSENSE)*RES*V(5,6)
VSENSE 3 4 DC 0V
.ENDS
^^^^^^^^^^
Add VCRES1 here

Regards and good luck with your sims
Michael
Thank you Michael but I already checked that out. No effect!
I don't know if Protel does support the VALUE-directive. So I tried
to use the 3rd methode pointed out by the link provided from Mark.
I don't have it present by now but the try also failed poorly.

So, has anybody implemented that SUBCKT on Protel99SE ?

regards Christoph
 

Welcome to EDABoard.com

Sponsor

Back
Top