I have a switch that is located off the circuit board (panel mounted) that is connected to the board via a JST connection. I want my schematic to show both the JST connector and switch, but the pcb only needs to show the JST footprint. I am getting the following error when pressing “Update PCB from schematic” within the PCB layout editor:
Error: Cannot add SW1 (no footprint assigned).
What is the standard way of dealing with this?
I could make an empty footprint file and associate with the switch, or I manually edit the netlist to remove the switch, but the later would require more regular work.
Any other way of dealing with this error? Also from a debugging standpoint, I feel it should be a warning rather than an error.
I found a few other threads:
Not happy with the conclusion there as it would mess with the BOM (i.e. I’d only see the switch in the BOM and not the JST connector).
This one gave a very good method:
Use of “Virtual” Symbols and Normal Wires
KiCad has a feature for excluding symbols placed in the schematic from the PCB and the BOM. This is done by prefixing the reference designator of such a symbol with “#”. This is the same feature that is used for power symbols, pictograms and logos found in the official library.
The text tool and graphical line/polygon tool can be used to extend these drawings further.
In this way the switch should remain in the BOM and is ignored by the PCB layout checker. Perfect!
From KiCad’s historical point of view it really isn’t an error. In KiCad when making a PCB from a schematic the schematic should only represent what is on the PCB. There has been some discussion about how to handle off-board components going forward though. But I don’t recall what (if any) provisions there are for off-board components, do-not-stuff (or do-not-install) components, etc is coming to v6 (and what has been pushed off to v7).
But, remember. For a fully formed system BOM, not only would you need the switch, but you also need the wire connecting the switch to the board (and any mating connector that you may want to use on the switch’s wires). But also, don’t you want the mounting hardware for the board on the BOM so you don’t forget to order them as well. And while we are at it, what about the enclosure? But, wait… If the system has multiple boards, which schematic gets the enclosure… You surely only need one enclosure to house all the boards. This is why the separate system-level schematic is probably a better idea for off-board parts than trying to cram all that extra detail onto your board schematic.
Not quite perfect… The virtual symbols won’t show on the BOM, just like they won’t show on the board. Otherwise you would have a bunch of (for example) ground symbols on your BOM since they are virtual symbols. (Go ahead, edit the reference of one of those ground symbols you placed. Even though you can’t see the reference normally on the schematic because it is hidden by default, it is there and starts with the hash mark (#).)
There are components that you want on the PCB but don’t want on BOM (like PCB spark gaps for example).
Similar, there are components that need to be listed on BOM but should not show up on the PCB (like this switch, or other accessories).
Maybe Kicad should give us component attributes (inlcude in PCB; include in BOM) so we could decide how to proceed and avoid all those workaround and ‘ignores’.
Similar discussion here: Schematic components not included in the BOM
Arg! I didn’t actually retest the BOM, so it appears you are correct.
As far as where to draw the line on what to include in the BOM, you bring up some fair points as I had not considered where to put the actual cable gauge/lengths, though I think Solidworks has the ability to do this, I just haven’t used it.
The switch is essential to the circuit operation, whereas the hardware and enclosure are not. These are purely mechanical components that I keep in my mechanical design (Solidworks). I would put all mounting hardware and enclosure in the 3D cad model and add the PCB as a single part in Solidworks.
I’m not familiar with other pcb design tools, but do other packages offer a more intuitive separation that KiCAD plans to recreate via these future milestones? Curious about how this is handled in other software.