LTspice current analysis or equation plotting

Thread Starter

SamR

Joined Mar 19, 2019
5,031
Simple little circuit and I want to plot the current for a fixed voltage with changing resistance. I can get the curve I am looking for by doing a DC operating point simulation and changing the plot value to -V(n002). It still gives me the value in volts (inverse of amps) and I want to plot the value in Amps as the resistance changes. How would I do this? Is it possible to do it as an equation in the trace? I tried doing V(n002)/X but it gives me a flat line. I do not really understand just what the DC operating point analysis trace is doing.

Capturecur.PNG Currenta.png
 

cmartinez

Joined Jan 17, 2007
8,220
Simple little circuit and I want to plot the current for a fixed voltage with changing resistance. I can get the curve I am looking for by doing a DC operating point simulation and changing the plot value to -V(n002). It still gives me the value in volts (inverse of amps) and I want to plot the value in Amps as the resistance changes. How would I do this? Is it possible to do it as an equation in the trace? I tried doing V(n002)/X but it gives me a flat line. I do not really understand just what the DC operating point analysis trace is doing.

View attachment 177469 View attachment 177470
You mean like this?

upload_2019-5-15_17-5-56.png
 

eetech00

Joined Jun 8, 2013
3,859
hi

Mouse over R1 until a current probe appears then click. The current thru R1 will appear in the waveform viewer.

suggestion,
Label the wires so they don't change.

eT
 

Thread Starter

SamR

Joined Mar 19, 2019
5,031
Mouse over R1 until a current probe appears then click.
I don't get the probe, just a hand to change values. Also saw pressing ALT, doesn't work either. I should be able to declare an equation to use the V&R values, but don't know how apparently. Everything I tried didn't work.
 

crutschow

Joined Mar 14, 2008
34,285
Is it possible to do it as an equation in the trace?
Yes, you can do many general equations.
Press the Help button and look up Waveform Arithmetic.

For example, V(x)/I(x) will give the resistance of a device, where V(x) is the voltage across the device, and I(x) is the current through it.

To plot the voltage across a device, left-click and hold on one node, while holding move to the other node, release the button.

To plot device power, hold down ALT key and Left-Click the device.
 

crutschow

Joined Mar 14, 2008
34,285
I don't get the probe, just a hand to change values.
It only works after you've run a Transient simulation, and haven't changed the circuit in any way.
For active devices with more than two nodes, you have to hover near the connection points to get the current icon.
 

eetech00

Joined Jun 8, 2013
3,859
I don't get the probe, just a hand to change values. Also saw pressing ALT, doesn't work either. I should be able to declare an equation to use the V&R values, but don't know how apparently. Everything I tried didn't work.
Hmmm..

You shouldn't have to do any of that. Just place the mouse over the resistor until it changes to a current probe.
That's the way mine works. It doesn't matter whether its a transient or OP sim.

eT
 

eetech00

Joined Jun 8, 2013
3,859
I don't get the probe, just a hand to change values. Also saw pressing ALT, doesn't work either. I should be able to declare an equation to use the V&R values, but don't know how apparently. Everything I tried didn't work.
oh...I see what's wrong.

Deactivate the "hand" first by clicking anywhere on the schematic. Then mouse over the resistor.

et
 

Thread Starter

SamR

Joined Mar 19, 2019
5,031
I am using LTspice XVII. When I run a transient simulation (.tran) and I move the mouse over a wire (unless it is grounded) I get a Voltage Probe. I do not get a Current Probe. When I move the cursor over a device I get a Hand to change the value. I did learn to move the probe to both sides of a device to find the voltage across it. Not the current. Still working on the calculations. abs(n002)/X ??? Still working on it.
 

cmartinez

Joined Jan 17, 2007
8,220
I am using LTspice XVII. When I run a transient simulation (.tran) and I move the mouse over a wire (unless it is grounded) I get a Voltage Probe. I do not get a Current Probe. When I move the cursor over a device I get a Hand to change the value. I did learn to move the probe to both sides of a device to find the voltage across it. Not the current. Still working on the calculations. abs(n002)/X ??? Still working on it.
Current measurement doesn't work on a wire, only on devices. Try hovering the mouse over a resistor, for instance. And if you get a hand, press <esc> and try again.
 
Last edited:

Thread Starter

SamR

Joined Mar 19, 2019
5,031
abs(V(n001))/X divides the Voltage by X's numerical value and not by its value in Ω. abs(V(n001))/R1 is invalid...
 

Attachments

Thread Starter

SamR

Joined Mar 19, 2019
5,031
It only works after you've run a Transient simulation, and haven't changed the circuit in any way.
For active devices with more than two nodes, you have to hover near the connection points to get the current icon.
Maybe it's me but I'm only getting the voltage probe...
 

Thread Starter

SamR

Joined Mar 19, 2019
5,031
Wha!?!?! Hmmm... Do I have some parameter turned off in the control panel??? You are using XVII???
 
Last edited:

Thread Starter

SamR

Joined Mar 19, 2019
5,031
Found it, the save device current was not ticked as is default. Works now except it's giving me negative amps. K thx, still playing with it.
 
Top