Diode mixed pin -> incompatible with ngspice

I Just get the nightly build,and there is still a mix with diode pin, between schematic and net list -> pin are inverted for ngspice syntax.

JP

1 Like

About a year or so ago KiCad started following IPC rules on pin numbering. This affected diodes at the time. I don’t think KiCad will be changing back

The IPC convention puts the diode’s cathode connection on Pin 1. Check your schematic symbols to confirm that they follow this convention. If they do not, then you should consider re-drafting the symbols, as well as the footprints they refer to.

That could avalanche into a lot of work if there is a long history of using symbols that don’t conform to KiCAD’s current practice. To run SPICE from KiCAD without correcting the symbols, you could try redefining the diode models as Subcircuits, with the anode and cathode connections swapped. I don’t know whether KiCAD’s SPICE interface will allow you to call a subcircuit when the symbol shows a diode. The other alternative is to intercept the netlist which KiCAD passes to SPICE and manually edit the Diode statements.

Dale

Have you used the ‘Alternate node sequence’ option in the spice gui?
For most diodes I set it to “2,1” to adapt the pin ordering to what ngspice is expecting.

1 Like

I have made a summary of the things I found while using ngspice from EEschema.
It is here.

Perhaps this will be helpful.