Create a footprint with common pads

Hello.

I am new to kicad (or, maybe I used it as school 15 years ago, small parts of the interface feels like I already know them) and I am trying to build a compact keyboard.
I’ve retrieved from a website various components and the PDFs containing the mechanical dimensions and footprints, but for the tactile switches spst, I cannot make kicad’s PCB understand that some pins are already connected inside the component, it insists on me creating a track between them, even if I gave them the same pad number.

In ascii arts, the component from the PDF look like this:

3o+      +o1
  |   /  |
  |--/  -|
  |      |
4o+      +o2

How could I do that with kicad?

Going by your description it sounds, like you work entirely in the layout editor (pcbnew) and have not created a schematic?

Usually, one uses a schematic with components, which will either:

  1. … have those pins numbered incrementally and then electrically connected in the schematic (preferred way) or

  2. … have 1 pin for internally connected pins, with a special footprint that has the connected pins on the same pin number (possible way).

This is how we do it for similar footprints in the official lib.

The fitting symbol is then for example the SW_Push symbol from the switches library

2 Likes

you work entirely in the layout editor (pcbnew) and have not created a schematic?

No, I have a symbol in schematic that reflects the fact that, functionnally, the component only have 2 pins: one before, and one after the switch. I’ve used it (it was provided by kicad, but the pins where just marked «passive» so I tried to create my own, but obviously I made something wrong), and assigned it a footprint I made.

@Rene_Poschl (sorry, this forum is really hard to use, at first, I thought replying to Joan_Sparky would put my post in a new tree…)

This is how we do it for similar footprints in the official lib.

It looks like a lot what I recently tried… affecting the same number to several pads… but still, PCBnew still draw grey lines between the two “1” pad and the two “2” pads?

Yes, so far pcbnew is not aware of internal connections.

Working in Protel to get what I wont I just connected such pins using one of internal layer. Then program draws the connection lines only to the nearest of pads - exactly what I wonted.
To use it in KiCad you have to define that your PCB has more layers then it really have. I’m not working in KiCad yet so don’t know if that generates any unexpected issues.
I was doing it at PCB design stage, I don’t know if I could do it at footprint design, and I don’t know how in KiCad.

Then go with option 1 listed by @Joan_Sparky
Make a symbol with all 4 pins and connect them in the schematic the way you want them to be connected on the pcb.

See https://bugs.launchpad.net/kicad/+bug/593944 (Gate swapping and pin swapping).

but this means that in this case we will eventually have separated nets for pins that are connected electrically after installation of the switches. This will matter for a SPICE simulation and we have to make decisions when we draw the schematic e.g. for a matrix of nine key switches D6 :

JP1 and JP7 are connected !

I am new to KiCAD and I do not have a solution but I will look how I did this in EEDesigner III made by Visionics running under DR-DOS twenty years ago :wink:

Why would you think this matters for spice? There is no layout extraction in spice programs like the one used in kicad. (I have only seen that in the very expensive simulators used for analog integrated circuits.)

And to be honest i doubt it is a good idea to use the exact same circuit for simulation and for pcb design. These task simply have different requirements.

2 Likes

I can justify a common file format for schematic diagrams, so that sections of schematics can be easily exchanged between the simulation tool and the board layout tool without repeating the entire “schematic capture” task. But even for casual, non-critical, designs the schematics used by the two functions (simulation, and board layout) should be different documents.

Dale

1 Like

Are you sure about the pinnumbering of the BP* switches.
If switch pin numbers are counted counter clockwise in the same manner as DIP IC’s then I would expect a switch between pins 1 and 4 and internal connections of 1+2 and 3+4.

----- 8< ---------- 8< ---------- 8< ---------- 8< ---------- 8< ---------- 8< -----
About Spice:
Easy copy of a spice schematic into the PCB design schematic is nice to have, but
when Spice simulation is integrated into Eeschema you also have the benefit of the same GUI for both and not having to learn / use / switch to a different schematics program for drawing the spice simulation schematic.

But the schematic used for spice is not the schematic used for making a PCB.

Spice does not have connectors, but signal generators for inputs and scopes and such for outputs.
It’s silly to simulate both channels of a stereo amplifier in spice.
Power sources are simple symbols in spice while in your real schematic you have voltage regulators with buffer and decoupling caps.

If you want to go real fancy then complete simulation of the PCB with trace inductances and EMI effects will be nice. I do not dream for years to come for something like that to become integrated in KiCad though.

I believe Altium has integrated simulation with virtual microcontrollers and you can even debug microcontroller firmware in it. For such a simulation a keyboard matrix can be a usefull component, but this is also unlikely to be implenented in KiCad in any near future.

I am sorry for my introduction of simulation to this problem. The possibility to have an access to ngspice from the schematics of KiCAD was a big incentive for me to learn a new CAD program.

For a very theoretical discussion I added some components to my original example in order to create a useful printed circuit. If you choose a resistor for the footprint of the voltage source you will get a simple matrix keyboard, without column multiplexing but with analog detection on CP4, CP5 and CP6 (zero key rollover !).
BP%20schem2

In this case we would need a more complicated sub-circuit model for the switches to be able to measure the voltages on R1 and R2 : face_with_raised_eyebrow:
and I am not a specialist for simulations :unamused:

Sorry : two more resistors are necessary for the a correct detection :unamused:

A lot of time you may find NL5 is much easier to do such simulations (ideal, switch, and modeling).
where ngspice usually for more finer tune to the “real” components.

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