Skip to content

Conversation

@ubruhin
Copy link
Member

@ubruhin ubruhin commented Oct 16, 2025

The first part for LibrePCB-Libraries/CK.lplib#10: generating symbols & components for DIP switches, to be added to the Base library. Generates DIP switches from 1 to 14 circuits.

Packages and devices for C&K DIP switches are under construction too, but will be added in a separate PR later (and belong to the manufacturer-specific library then).

Symbol of the 3x DIP switch:

image

Component of the 3x DIP switch:

image

So there is a symbol variant for a single, "combined" gate, and a "split" variant with each switch as a separate gate.

Everything was straight-forward, except two things:

First, I'm not sure about the look of the symbol. Often, DIP switches are drawn with circles, for example in KiCad:

image

This seems to be the IEEE 315 style, which we actually also support e.g. in the Relay components where we provide both European and American variants. Not sure if we really also should provide American DIP switches as this would then lead to 4 different symbol variants for each component 🤔

And second, I was not sure how to name the symbol pins and component signals. I have now named the pins like "5" and "5.2" (for circuit number 5) and the signals "5a" and "5b". This allows to display the pin name for "5", but hide "5.2" so the circuit numbers are visible in the symbol in a clean & lean way, though it feels a little bit hacky.

Any inputs welcome.

Library PR: LibrePCB-Libraries/LibrePCB_Base.lplib#164

@ubruhin
Copy link
Member Author

ubruhin commented Oct 20, 2025

Now also generating American symbol variants:

image

@ubruhin ubruhin force-pushed the dip-switches-sym-cmp branch 3 times, most recently from 91ef1ba to b7100b8 Compare October 21, 2025 10:12
@ubruhin ubruhin force-pushed the dip-switches-sym-cmp branch from b7100b8 to 689b16b Compare October 25, 2025 23:03
@ubruhin ubruhin merged commit 12c96de into master Oct 25, 2025
8 checks passed
@ubruhin ubruhin deleted the dip-switches-sym-cmp branch October 25, 2025 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants