Ratsnest connection issue with normal diodes

Hi experts,
I am seeing some ratsnest connection problems in pcbnew with standard diodes.
To illustrate, I have created a very simple circuit in EEschema using two standard diodes, a Zener diode, and an LED as follows:
image

Loading the netlist in pcbnew shows the following ratsnest:

As one can see, whereas the Zener diode (D3) and the LED (D4) anode and cathode terminals are connected correctly as drawn in the schematic, the anode and cathode connections of the standard diodes (D1 & D2) are reversed in the ratsnest though.

I can hardly believe that this can be a bug but probably I am simply confusing something here.
Could someone help me in understanding where my mistake is, please?

For your reference, I have attached the “.sch”, “.kicad_pcb” and “.net” files here - just in case they are required.

210101 Test.sch (4.2 KB)
210101 Test.net (6.9 KB)
210101 Test.kicad_pcb (24.8 KB)

I am using Kicad Version (5.8.1) -1 on Windows 10 Pro 64-bit.

Application: KiCad
Version: (5.1.8)-1, release build
Libraries:
wxWidgets 3.0.5
libcurl/7.71.0 OpenSSL/1.1.1g (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.41.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.73.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.71.0
Compiler: GCC 10.2.0 with C++ ABI 1014

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=OFF
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON

Looking forward to your advice/comments.
Thanks and best regards

Those big (and ugly) diodes are from the spice library, and these do indeed have A and C reversed (compared to most common pin assignments). Use the components from the Device library for normal schematics
There are at least two of them D (with open body) and D_ALT (with color filled body).

I always check diodes manually after assigning footprints and importing in the PCB. It’s just one of those things I don’t trust.

1 Like

@paulvdh
Thanks a lot for your quick response.
I exchanged the diodes in my circuit with “D_ALT” ones and now the ratsnest shows the right A & C polarity. Thanks for your valuable tip.

Just curious, is there a specific reason that even though the fact that the spice library symbol has the wrong polarity, it is still not removed by the engineers in KiCad?

Best regards

The spicy diode strikes again!

The Spice Diode is needed for the Spice simulator, which uses a different numbering convention for diodes. There are a few ways to solve the issue, but not much consensus.

2 Likes

Whereas pin numbering for devices with 5 or more pins seems to be pretty well standardized, there is considerable non-standardization on diodes and 3 pin SOT type devices.

Pin numbering is a critical intermediate step between the schematic symbol and the package pins. But unfortunately it is not “cast in stone.” I use my own schematic and footprint libraries, and particularly for diodes I always check to confirm.

Normally a DIP package would be numbered counterclockwise, but I once had a DIP transformer in which the two rows of pins were both numbered left to right. This was NOT supplied by a major manufacturer…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.