simple ltspice help

C

chapmjw

Guest
How can I set a voltage source based on a measured voltage?

For example, take 2 simple loops.
I'd like to set V3 to 5 times V2
Loop 1: V1(10 volts) to V2(0 volts) to R1(100ohm) to ground.
Loop 2: V3(V2 * 5) to R2(100 ohm) to ground.


* C:\Program Files\LTC\SwCADIII\Draft1.asc
V1 N002 0 10
V2 N003 N002 0
R1 N003 0 100

V3 N001 0 V2 5 <---tried many different combinations here
R2 N001 0 100

..tran 0 1 0 .01 startup
..backanno
..end

thanks
jim
 
On 16 Feb 2007 10:42:06 -0800, "chapmjw" <chapmjw@gmail.com> wrote:

How can I set a voltage source based on a measured voltage?

For example, take 2 simple loops.
I'd like to set V3 to 5 times V2
Loop 1: V1(10 volts) to V2(0 volts) to R1(100ohm) to ground.
Loop 2: V3(V2 * 5) to R2(100 ohm) to ground.


* C:\Program Files\LTC\SwCADIII\Draft1.asc
V1 N002 0 10
V2 N003 N002 0
R1 N003 0 100

V3 N001 0 V2 5 <---tried many different combinations here
R2 N001 0 100

.tran 0 1 0 .01 startup
.backanno
.end

thanks
jim
LTspice is reading "V3 N001 0 V2 5" as "V2" is a node. Since you then
have too many nodes LTspice is probably giving you an error message.

I think it's the same in LTspice as in PSpice...

V3 N001 0 {V(N003)*5}

I don't know if...

V3 N001 0 {V2*5}

will work in LTspice or not. PSpice would require a .PARAM statement.

...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.
 
"chapmjw" <chapmjw@gmail.com> schrieb im Newsbeitrag
news:1171651326.868631.253350@m58g2000cwm.googlegroups.com...
How can I set a voltage source based on a measured voltage?

For example, take 2 simple loops.
I'd like to set V3 to 5 times V2
Loop 1: V1(10 volts) to V2(0 volts) to R1(100ohm) to ground.
Loop 2: V3(V2 * 5) to R2(100 ohm) to ground.


* C:\Program Files\LTC\SwCADIII\Draft1.asc
V1 N002 0 10
V2 N003 N002 0
R1 N003 0 100

V3 N001 0 V2 5 <---tried many different combinations here
R2 N001 0 100

.tran 0 1 0 .01 startup
.backanno
.end

thanks
jim
Hell Jim,

There are voltage controlled voltage and current sources and current
controlled voltage and current sources.
(VCVS=E, VCCS=G, CCVS=H, CCCS=F)

You can solve your problem with a E-source.
It has two inputs for the control voltage and two output nodes. You have to
set the gain to 5 in your case.
These sources are available for schematic drawings of course.

Syntax: Exxx n+ n- nc+ nc- <gain>
The final netlist will look like the following.
E1 N001 0 N003 N002 5

All this is pure SPICE. I recommend to read about the devices of SPICE or at
least the help of LTspice.

Best regards,
Helmut
 
"chapmjw" <chapmjw@gmail.com> wrote in message
news:1171651326.868631.253350@m58g2000cwm.googlegroups.com...
How can I set a voltage source based on a measured voltage?

For example, take 2 simple loops.
I'd like to set V3 to 5 times V2
Loop 1: V1(10 volts) to V2(0 volts) to R1(100ohm) to ground.
Loop 2: V3(V2 * 5) to R2(100 ohm) to ground.


* C:\Program Files\LTC\SwCADIII\Draft1.asc
V1 N002 0 10
V2 N003 N002 0
R1 N003 0 100

V3 N001 0 V2 5 <---tried many different combinations here
R2 N001 0 100

.tran 0 1 0 .01 startup
.backanno
.end

thanks
jim
I'm not sure what V2 is there for but lose it and label the 10V source to
resistor wire as (say) Fred. That fred node can be referred to elsewhere
using the very handy "bv" component.

V1 Fred 0 10
R1 Fred 0 100
R2 N001 0 100
B1 N001 0 V=v(fred) * 5
..tran 1
..backanno
..end




--
Posted via a free Usenet account from http://www.teranews.com
 
"john jardine" <john@jjdesigns.fsnet.co.uk> wrote in message
news:45d61d5f$0$16297$88260bb3@free.teranews.com...
"chapmjw" <chapmjw@gmail.com> wrote in message
news:1171651326.868631.253350@m58g2000cwm.googlegroups.com...
How can I set a voltage source based on a measured voltage?

For example, take 2 simple loops.
I'd like to set V3 to 5 times V2
Loop 1: V1(10 volts) to V2(0 volts) to R1(100ohm) to ground.
Loop 2: V3(V2 * 5) to R2(100 ohm) to ground.


* C:\Program Files\LTC\SwCADIII\Draft1.asc
V1 N002 0 10
V2 N003 N002 0
R1 N003 0 100

V3 N001 0 V2 5 <---tried many different combinations here
R2 N001 0 100

.tran 0 1 0 .01 startup
.backanno
.end

thanks
jim


I'm not sure what V2 is there for but lose it and label the 10V source to
resistor wire as (say) Fred. That fred node can be referred to elsewhere
using the very handy "bv" component.

V1 Fred 0 10
R1 Fred 0 100
R2 N001 0 100
B1 N001 0 V=v(fred) * 5
.tran 1
.backanno
.end
My nodes number up slightly different, so clarify by the diagram ...

Version 4
SHEET 1 480 164
WIRE 48 -304 -96 -304
WIRE -96 -208 -96 -304
WIRE 48 -160 48 -304
WIRE 336 -144 176 -144
WIRE 336 -96 336 -144
WIRE 176 -80 176 -144
WIRE -96 -48 -96 -208
WIRE 48 32 48 -80
WIRE 176 32 176 0
WIRE 336 32 336 -16
FLAG -96 32 0
FLAG 48 32 0
FLAG 176 32 0
FLAG 336 32 0
FLAG -96 -208 Fred
SYMBOL voltage -96 -64 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 10
SYMBOL res 32 -176 R0
SYMATTR InstName R1
SYMATTR Value 100
SYMBOL res 320 -112 R0
SYMATTR InstName R2
SYMATTR Value 100
SYMBOL bv 176 -96 R0
SYMATTR InstName B1
SYMATTR Value V=v(fred) * 5
TEXT -210 44 Left 0 !.tran 1



--
Posted via a free Usenet account from http://www.teranews.com
 

Welcome to EDABoard.com

Sponsor

Back
Top