Net tie "exclude from simulation" creates an open circuit

Should I submit this as a bug or feature request, or is there something that I’m missing.

Tonight I tried out net ties so that I could auto-rout for example both wide power traces and a trace that feeds back voltage to an amplifier (see attached project). This was well after I was done fiddling with the simulation.

After the board was routed I returned to play with simulation so I excluded them from simulation and the simulation would not run. I shorted them with a wire in the schematic and the sim runs fine.
Linear voltage controlled current source.zip (177.0 KB)

Yes of course, if you remove the net tie then it’s an open connection for the simulator, and that won’t work. Instead, use it as a 1u Ohm resistor. (I have heard rumors that ngSpice has convergence problems with 0 ohm resistors, but real life wires always have some resistance too.

I appreciate the suggestion. However for net ties, the “exclude” operation could connect the nets instead of removing the net tie element … if KiCAD developers were so inclined. Since simulation typically does not consider trace resistance or current carrying capability, it seems there would be little downside to this. If automatically inserting a zero-ohm resistor is a problem, then why not automatically insert the 1 uOhm as you say? If I insert the 1 uOhm myself, then in routing I still have to draw the copper manually to bridge the gap in the footprint, or create my own footprint with this graphic inserted, defeating the utility of the net tie and footprints provided. But again, I may be missing something.

No, you did not understand me correctly. My intention was not to exchange the net tie for a resistor, but to keep the net tie in the schematic, and just tell spice to treat it as a resistor.

KiCad works according to simple rules, and you can lie to KiCad as much as you want (but it will make your project harder to read). You could also draw a resistor in the schematic, and assign it the footprint of a net tie for the PCB. KiCad does not care, it just matches a schematic symbol with a footprint.

Normally ngSpice assumes what sort of part a schematic symbol is by it’s refdes. ngSpice does knot know anything about the graphics on your screen that is so convenient for humans, and it just uses the refdes to identify symbol type. A RefDes starting with an R is resistor, a C is a capacitor. Changing the RefDes of your nettie to an R (with a number) and assigning a resistor value would already do it.

I am not sure if it’s possible to keep the NT RefDes and still have ngSpice treat it as a resistor. Maybe something can be done with a model or subcircuit. My knowledge of ngSpice is quite limited.

One thing I do agree with is that such things should “just work”. There are a bunch of schematic elements that can easily end up in a simulation while not being important for the simulation at all, and it would be nice if such parts had sensible defaults. Connectors could be excluded from the simulation by default, this net tie, and also fuses could have a default zero ohm (or very low) resistance, battery symbols could double up as voltage sources, etc. These are all small things, but it makes ngSpice easier to setup and less details to fiddle with to get a simulation to work.

Assigning a resistor spice model with 1 uOhm resistance to the net tie allowed the sim to run. Thank you for clarifying your intention.

How did you do that?
(I am not very good with the spice stuff, buzy with other things too) and it’s also good to add this to this thread for others who are searching the forum later.

If you add that, then you can also click on the Mark as Solution checkbox underneath each post, that helps people searching the forum to find answers quicker.

Also, if this works well, I may make an official feature request for this on gitlab later.

nettie → properties → simulation model → built-in SPICE model

Yes, please make the feature request. People could always go change it if there sims care about 1 uOhm. That’s something I haven’t gone through the motions on yet. Is it in the typical github fashion, or is there a special KiCAD webpage for that?

All development for KiCad (except external plugins probably) is managed via gitlab. But there are different sections, and it took me a bit of searching to find the right place to report an issue with symbol libraries. But in the end it worked and I created a feature request for this in:

1 Like

Open Kicad then Help > Report Bug > Create your Feature Request or Bug.
NOTE: In column on LHS, click on “Issues” to see how others form bug reports and feature requests. If not already, you will have to register with Gitlab before creating an issue. :slightly_smiling_face:

1 Like