Showing OP voltage and current data in EESchema V7.99 nightly builds-How?

Is it possible now to show the operating point voltages and current data in EESchema V7.99? Is this a work in progress? I have created a simple series/parallel (all 3 resistors are 100 ohms each) resistor circuit with a DC voltage source from the spice library. When I click on the operating point tab in the simulation dialog it says “This tab has no settings”. Am I doing something wrong? Do I need to put a .op directive in the schematic and if so how do I do that? Thanks.

Application: KiCad Schematic Editor x64 on x64

Version: (7.99.0-141-gfc68b8d71a), release build

Libraries:
wxWidgets 3.2.2
FreeType 2.12.1
HarfBuzz 6.0.0
FontConfig 2.14.1
libcurl/7.87.0-DEV Schannel zlib/1.2.13

Platform: Windows 10 (build 19045), 64-bit edition, 64 bit, Little endian, wxMSW

Build Info:
Date: Feb 17 2023 06:17:29
wxWidgets: 3.2.2 (wchar_t,wx containers)
Boost: 1.81.0
OCC: 7.6.2
Curl: 7.87.0-DEV
ngspice: 39
Compiler: Visual C++ 1934 without C++ ABI

Build settings:
KICAD_SPICE=ON

SER_PAR_RESISTOR_V8.kicad_sch (12.3 KB)

I guess so, but it only works if you are a spice nut.

@JeffYoung Can you update that description, so it also makes sense when linked to and has a chance to pop up in searches?

1 Like

That just means it doesn’t need anything additional. Just hit the “Run Simulation” button (the one that looks like “Play” on your average 1980’s cassette deck…)

1 Like

That doesn’t work. I’m doing a DC sweep from 0v to 5V. A Graph of the current vs voltage shows up in a graph, but NOTHING is shown on the actual schematic. Maybe doing a sweep means that a steady state DC can’t be worked out, so is not shown. Either way, there is NO voltage or current shown on the schematic.

That’s simply wrong.

Step-by-step:
Open SER_PAR_RESISTOR_V8 in Eeschema
Inspect → Simulator–>Simulation–>Simulation Command–>Operating Point–>OK–> R (Run Simulation)
Back to the Eeschema window
Scroll to enlarge

Holger,
Thanks for the step by step instructions. It works now. Thanks.

Is the power measure also available to display?

EESchema crashes when trying to select power. I may report a bug at some stage if others experience the same crash.

I don’t experience a crash, at least not in the operating point simulation, but the power is not shown in the schematic, and in the simulation result the power is denoted with the letter “V” and the unit is mV (millivolts)…
So there is apparently something not quite right about it.
Perhaps a work in progress?

image

(There isn’t anything to see to the left of the schematic, only a connector which is excluded from the simulation.)

It also seems that power can’t be plotted in the DC sweep diagram, only shown with the cursors and in the table in the middle right. (This screenshot is of the three resistor serial-parallell net as in the rest of the thread above.)

Application: KiCad Schematic Editor x86_64 on x86_64

Version: 7.99.0-1.20230221git543a331.fc37, release build

Libraries:
wxWidgets 3.2.1
FreeType 2.12.1
HarfBuzz 5.2.0
FontConfig 2.14.1
libcurl/7.85.0 OpenSSL/3.0.8 zlib/1.2.12 brotli/1.0.9 libidn2/2.3.4 libpsl/0.21.1 (+libidn2/2.3.3) libssh/0.10.4/openssl/zlib nghttp2/1.51.0

Platform: Fedora release 37 (Thirty Seven), 64 bit, Little endian, wxGTK, KDE, wayland

Build Info:
Date: Feb 21 2023 18:17:26
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.78.0
OCC: 7.6.3
Curl: 7.85.0
ngspice: 39
Compiler: GCC 12.2.1 with C++ ABI 1017

Build settings:
KICAD_SPICE=ON

@hmk, in the last picture (the DC analysis), I assume you used the User Defined Signals dialog to add P(R1), P(R2) and P(R3)?

The traces aren’t shown because the graph doesn’t include a power scale. (That might also be why the cursor grid values show m instead of mW, though I thought I built those units independently of the plot.)

I take that back; we add them automatically. Hmmm…

[Edit: Ahhh… we’re only adding the power scale for transient analyses. I’ll add it to DC-sweep analyses.]

1 Like

I’m not sure that I have figured out the user interface quite yet.

But I drew the schematic with voltage source, ground reference point for simulation, and three resistors.
Then I started simulation (Inspect → Simulator…).
Klicked Edit simulation command icon.
Tab DC Transfer (side note: I’m not sure if it is just me, but I would have expected this tab title to be “DC sweep”).
Sweep type V
Source V1
Starting value 0
Final value 5
Increment step 0,1

Klick OK
Klick play button for simulation.
Now in the signal part of the window on the upper right I have the values available like in the screenshot below, including four P-values.
Klick plot for several of the values and cursor 1 and 2.
Result:

Application: KiCad Schematic Editor x86_64 on x86_64

Version: 7.99.0-1.20230225git4b427b2.fc37, release build

Libraries:
wxWidgets 3.2.1
FreeType 2.12.1
HarfBuzz 5.2.0
FontConfig 2.14.1
libcurl/7.85.0 OpenSSL/3.0.8 zlib/1.2.12 brotli/1.0.9 libidn2/2.3.4 libpsl/0.21.1 (+libidn2/2.3.3) libssh/0.10.4/openssl/zlib nghttp2/1.51.0

Platform: Fedora release 37 (Thirty Seven), 64 bit, Little endian, wxGTK, KDE, wayland

Build Info:
Date: Feb 25 2023 18:16:13
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.78.0
OCC: 7.6.3
Curl: 7.85.0
ngspice: 39
Compiler: GCC 12.2.1 with C++ ABI 1017

Build settings:
KICAD_SPICE=ON

I’ve fixed a couple of bugs in the DC-sweep analysis plotting code. Fixes should be in the current nightly assuming I got them in on time.

On an earlier question, if you want to plot the power for a component on the schematic, add a field with the content ${OP:power}. It will resolve the next time you run a .OP simulation.

(I thought it would clutter the schematic too much to show them for all components.)

2 Likes

I get power in mA, like the screenshot below, but I guess this is fixed to show mW in the commit 23c1a23f, so I will try again tonight after the next nightly for fedora has built (seems to start around 6PM UTC and takes something like 2 hours).

bild

bild

I intuitively try to right-click on the red and purple current and voltage fields in order to get an option to move and rotate them into a suitable position, and another option to choose which ones should be visible or hidden.

bild

If I pull them off of the wire or component they belong to, I would expect a line to appear which indicates where the current / voltage is shown.

If I don’t find the option to choose which ones are shown or hidden by right-clicking on a OP value shown in the schematic, the next place I would try to click in order to set it is here, searching for a column which says “show in schematic” instead of the “plot” column, which is redundant as the field just left of this one says that the OP simulation didn’t provide a plot:

bild

The “overlay” mode is meant to be a quick showing of all the data.

If you want to actually position/style the output, then you need to use fields. In addition to ${OP:power}, ${OP} will give the current of a two-pin component, while ${OP:spice_port} will give the current for multi-pin components (for instance, ${OP:b} for the base of a BJT).

${OP} in a field of a label (such as a Net Label or Directive Label) will show the voltage on the net.

You can also give formatting information. ${OP:power.4mW} will print the power in mW with 4 significant digits. (The default is 3~U, where ~ means auto-range and U is the default unit for the datapoint.)

1 Like

Overlay mode current and voltage visibility is, at the moment, controlled from Menu Preferences → Preferences… → Schematic Editor → Display Options:

Even though I understand it might look cluttered with all values switched on at the same time, perhaps it would still be possible to add the power as the third option here?

The options you describe are very good, and really usable.

At the same time, I find the overlay mode worth some polishing and development too; the visualization with the simulation value fields improve readability and lets the simulation values stand out / appear separate from the component specifications in a natural way.
That’s why I would love to have the ability to position the overlay fields, and make working with them somewhat more intuitive by having the visibility option accessible in a place related to either the fields themselves or the simulation window.

An alternative would be if it were possible to make the symbol fields graphically similar to the overlay fields, and also making them really easy to set up, so you have the needed syntax readily available in the dialogue, or perhaps even as defaults in fields you can select to make visible.

My idea is to make the OP simulation both versatile and easy to use for new users, both at the same time… All kinds of scripting / variables, where you need to first know that you can use them from an external source, because it is not shown in the application itself, tend to be a steep learning curve for new users…
I try to present ideas based on my experience as a user, to possibly give input in that direction.

Now the power axis shows up and power is plotted.

Application: x86_64 on x86_64

Version: 7.99.0-1.20230226git51d46c0.fc37, release build

Libraries:
wxWidgets 3.2.1
FreeType 2.12.1
HarfBuzz 5.2.0
FontConfig 2.14.1
libcurl/7.85.0 OpenSSL/3.0.8 zlib/1.2.12 brotli/1.0.9 libidn2/2.3.4 libpsl/0.21.1 (+libidn2/2.3.3) libssh/0.10.4/openssl/zlib nghttp2/1.51.0

Platform: Fedora release 37 (Thirty Seven), 64 bit, Little endian, wxGTK, KDE, wayland

Build Info:
Date: Feb 26 2023 18:17:34
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.78.0
OCC: 7.6.3
Curl: 7.85.0
ngspice: 39
Compiler: GCC 12.2.1 with C++ ABI 1017

Build settings:
KICAD_SPICE=ON

1 Like