Validating linear regulator results in “Violating S4.2”

When creating a symbol for a linear regulator the validator yells:

Violating S4.2 - https://klc.kicad.org/symbol/s4/s4.2/
    Pins should be grouped by function
    Positive power pins should be placed at top of symbol

It states that the supply voltage should be at the top. My symbol looks like this:

S1213

So obviously I didn’t draw the supply voltage at the top because it would feel
very weird to have a regulator with a power supply at the top. And even the
symbol provided by the official libs has the supply voltage on the left and
the output voltage on the right, as it’s common practice for a linear regulator:

official-L7805

However, when I run the validator on the official symbol for the L7805, the
output is as follows:

Checking symbol 'Regulator_Linear:L7805':
  Violating S3.1 - https://klc.kicad.org/symbol/s3/s3.1/
    Origin is centered on the middle of the symbol
    Symbol unit 1 not centered on origin
  Violating S3.6 - https://klc.kicad.org/symbol/s3/s3.6/
    Pin name position offset
    Pin offset outside allowed range

I’m surprised symbols in the official lib have validation errors, but it’s not
violating S4.2, which is what I’m getting.

Why does the official symbol allow power input on the left but yells at me if
I do the same for a custom symbol?

Application: KiCad Schematic Editor

Version: 6.0.6+dfsg-1, release build

Libraries:
	wxWidgets 3.0.5
	libcurl/7.84.0 OpenSSL/3.0.4 zlib/1.2.11 brotli/1.0.9 zstd/1.5.2 libidn2/2.3.3 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.10.0 nghttp2/1.47.0 librtmp/2.3 OpenLDAP/2.5.12

Platform: Linux 5.18.0-2-amd64 x86_64, 64 bit, Little endian, wxGTK, lightdm-xsession, x11

Build Info:
	Date: Jun 20 2022 18:00:05
	wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.74.0
	OCC: 7.5.2
	Curl: 7.83.1
	ngspice: 37
	Compiler: GCC 11.3.0 with C++ ABI 1016

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON
1 Like

The official symbol doesn’t give a warning because the validator is looking for pin names that match this regex: ^[ad]*v(aa|cc|dd|bat|in)$, which works out to vaa, vcc, vdd, vbat, vin, or any of those prefixed with a or d, case insensitive. IN in the 7805 symbol doesn’t qualify :slight_smile:

I’m not a librarian, but where you put the input pin is fine. You can look at voltage regulator merge requests on gitlab and that warning is universally ignored for regulators because the input pins make more sense on the left for those symbols.

Keep in mind that the script is a guideline and first check for making reviews easier, not the final arbiter of right vs. wrong. There are things it won’t pick up as well as false positives. It doesn’t know that your symbol is a regulator and slightly different rules apply :slight_smile:

3 Likes

Ok, that makes sense. Thanks for looking into that.

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