I’m using a simple push button in my schematic, mapped to the SW_PUSH_6mm footprint in the standard Buttons_Switches_THT library.
In the schematic, it has two pins, 1 & 2. The footprint has 4 pins, two pin1’s and two pin2’s. Internally, within the physical component, the two pin1’s are connected, as are the two pin2’s.
When I go to design the PCB, Pcbnew puts a ratsnest wire between the two pins, and expects them to be connected to a trace on the PCB. I only want to connect to one of the two internally connected pins otherwise its a pain to route the trace to connect the two pins which are already connected via the internals of the push button.
How can I stop Pcbnew from complaining that I haven’t put a trace between pin’s 1 and 1 or between pin’s 2 and 2?
Thanks, but that doesn’t work for me because I don’t know which of the two pins I’m going to connect the trace to, and I have multiple push buttons where some of them have a trace going to the left hand pin, and others have the trace going to the right hand pin.
It would be a real pain to have to work that out in the schematic and connect to the correct pin.
This is something KiCad does not handle well.
TACT switches and RF sockets are the main cases. As some designers use TACT switches as a free jumper link on single layer PCBs, this is no simple answer.
I personally connect all pins as switches are prone to dry joints from long term stresses
You could label the pins 1, 2, 3 and 4 as suggested by Rerouter and on the schematic mark two of them as not connected - they would then show up on Pcbnew as not needing to be connected to anything which is fine as they are already internally connected.
@CarnivalBen To follow up with the above suggestion, as you lay out the board you may find that you need to use different pins. That is fine. Change the schematic to the pins you need and push the change through the netlist. This isn’t much different than gate swapping on a multi-gate IC, (or change GPIO pinouts on a µP), to make trace routing easier. Designing PCBs is necessarily iterative because you can’t think of all the physical constraints at the schematic level unless you are a genius level chess player.
(V5 should make this smoother with a tighter integration between schematic and pcb not needing the netlist.)
I just thought of another technique. Use the footprint with two pin1s and two pin2s first. Then once your layout is (or nearly) crystalized, change the switch to the 4pin model in the schematic (linked to the 4pin footprint) with the used pins connected. That way you aren’t having to reiterate every time you decide to rip and relayout the tracks in the vicinity of the switch.
And yet another technique: connect both pins 1 and both pins 2 on a different layer. In this case, a track on the top layer.
If the board is a single layer one, just don’t send the gerber of the top layer to the fab. If the baord is a 2 layer one, use an internal layer for this purpose.
Small nuicance, I understand, but real pain seems exaggerated.
If you have a button symbol with 4 pins in EEschem, and you want to use another of the pins in PCBnew, just reroute a single wire in EEschem and generate & read the new netlist in PCBnew. Takes about 10 seconds to change the connection.
The most work is in te preparation:
EEschem symbol with 4 pins.
PCBnew Footprint copy & change to 4 different pads.
EEschem: use the new footprint for all buttons. (CvPcb is nice for changing lots of components).
A lot of people seem to be “afraid” / apprehensive of designing custom symbols and footprints, and they rather seem to want to spend more time searching for an already made symbol/ footprint, than to modify an existing one or make a new one from scratch.
But making new symbols or footprints is very easy in KiCad. Drawing a schematic symbol in the symbol editor is very much alike to drawing a schematic in EEschem. Ditto for Footprint / PCBnew. And the Footprint Wizards are also easy & fast to use.
Some time ago I had a project and I was not happy with the default placement of silkscreen text of a bunch of 0805 and 1206 components. Instead of moving those texts one by one for each component, I made a copy of the footprint and changed the default positions of the texts where I wanted them. That was a lot easier & faster then moving each of them individually.
Learn to draw custom Symbols & Footprints, it is a valuable skill to have, and because it is so easy to do in KiCad is one of the many reasons I like KiCad so much. (I have been using a bunch of PCB packages for hobby use for about 30 years).
Small example:
Though there are schematic symbols for a lot of uC’s for EEschem, the location of the ports is seldom convenient for your personal schematic. Rotating & Mirroring ports in the symbol editor moves those pins quickly and efficiently to a place that is more convenient for your schematic.
Thank you everybody for your replies. I can see that the general view on this is to copy the component and footprints to a custom library, edit them to have 4 separate pins, and tweak which pins are connected/not connection as I design the PCB. This actually works really well. Thanks for your help!
Use a 2-pin symbol. Use footprint which has two pins “1” and two pins “2”. When you do the layout, connect to one of each pin pairs. The ratsnest lines are still there for the remaining pads, don’t care about them. Finally open the footprint from the board with “Open in Footprint Editor”. Remove the pad numbers from unused pads. “Update footprint into current board”. There’s no need to touch the schematic.
Only if the pin 0 does not appear in the symbol. Pin number 0 is not some magical number.
(It would be better to set the pin number to empty as this really tells kicad not to connect that one.)
I usually just route a dummy trace on the top PCB layer, which is never used in a single sided PCB fab.
No Schematic editing needed, and it keeps DRC happy.