I have a schematic that I am simulating in KiCad. Everything is working. But I need to add some Molex connectors (3- and 4-pin). I would like to either exclude them from the simulation or to add some kind of benign model to the pins. What is the best method for this situation?
There are a few options, and which you choose depends on your preferences and what the purpose of the connectors is.
Maybe the simplest option is to go into the spice model settings for the connector symbols and select “disable symbol for simulation”. Then the symbol will not be included in the simulation or affect it in any way. For many non-electrically-relevant symbols, like heatsinks or mounting holes, this is probably the only option.
Another option is to write a custom spice subcircuit model for each connector. What you put in the model depends on the purpose of the connector, but they can be quite simple. If you imagine an audio amplifier circuit, with an input and an output connector, you could write a model for the input connector that connects one pin to a 1k sine wave source and another pin to ground, effectively modeling the audio source for the amplifier. The output connector’s spice model could have a resistive load (modeling the speaker impedance, or the input impedance of the next device in the signal path, etc.) and a ground connection. If you have power connectors, you could include your DC voltage sources directly in the spice model for the power connector.
What I like about writing spice models for the connectors is that you can avoid littering your schematic with spice-specific symbols that don’t represent physical components on the PCB. You can hide them all in the model files for your connectors. However, this can also be seen as a downside because it hides how the schematic is set up for simulation. I definitely would only use this method in a schematic that represents a real PCB, and even then I think it’s fair to dislike it. For schematics that exist only for simulation, I think it’s better to be explicit with your sources and loads, and not include components that don’t matter for simulation (like connectors).
Maybe that answers your question?