Want to understand the proposed workflow for present Kicad

Simulation (Ngspice) Projects

Given Kicad allows to do a simulation of a circuit and as well from schematic capture design a PCB for the project.

I would like to understand the Kicad project philosophy stance on what would be the proposed workflow:

Let’s say a project that has some parts that go outside the PCB, but are required to do the simulation (think of a simple preamp with three pots a Baxandall tone control plus volume), in and out connectors and of course power.

From all I could see in the manuals the way to do would be to have two similar but not equal diagrams captured, one for simulation and other for the elaboration of the PCB layouts.

Is it the case, or have we other ways of doing it?

TIA

First, I don’t think there’s a “Kicad project philosophy” for how users should use the simulation tool. Do what makes sense for your project.

In my usage, it depends on how big my project is. For a bigger project, I’m usually uninterested in simulating the whole board. I am much more likely to be doing small simulation scraps as I’m putting together the bigger project. For example, I’m interested in a simulation of an analog filter section; I’m not going to simulate the whole board with all of its analog and digital bits (most of my boards have a microcontroller on them somewhere; I don’t simulate those parts).

For a small board that is, for example, just the analog filter mentioned above, I might play some games. In those cases I might write a simple model for the power supply connector that is a couple of ideal sources, simulating the power provided from offboard in the real world. I might write a model for the input signal connector that is an ac voltage source, or an output connector model that is the expected load. This obfuscates the simulation a bit (a dedicated simulation schematic would be cleaner) but it means I don’t have to maintain two schematics, one for simulation and one for the PCB.

Basically, for simple projects where most of the circuit is what I want to simulate I may use one schematic for both purposes. For more complex projects, I do small simulation schematics, mostly because I don’t want to simulate the entire thing in any case.

1 Like

I have a workflow here: Best possible workflow
It does not cover simulations though.

My aims are reusability, readability, repeatability. How more KiCad can do for me, how fewer mistakes I get to make. I rely on the replicate layout and place footprint plugins, the ‘insert schematic sheet content’ and the ‘append board’ options alot. It really helps me getting flawless PCBs in 1 hour time (depening ofcourse what it is I am building)

Kind regards :wine_glass:

Bas

I guess it mostly depends on the situation. For small projects, the simulation and the PCB may be similar enough so one schematic fits both, but often you only want to simulate a small part of a big project, and in such cases it does not make sense to make the whole schematic compatible with the simulator. (So that’s a very similar answer to gkeeth’s) Every now and then I think about making a feature request to set the (relatively new) Exclude from Simulation attribute for all schematic symbols in KiCad’s default libraries for symbols that do not make sense in the simulator. From mounting holes to connectors, and maybe even microcontrollers.

As far as I know, there is also no direct way to limit the simulator to a single sheet. It is possible however to use hierarchical sheets and then include a sheet from another project. For example first create a project for the simulation. Later create another project for the PCB, and then include the sheet made for the simulator, and dress it up further with for example footprint assignments.

KiCad does have a built in function for mapping pin numbers. Simulation models often have other pin numbers assigned then IC packages.

1 Like

Yes, that’s why I’m asking about your ideas about!

I hear you @gkeeth.

My first shot is always avoid having to maintain more than an schematic as the possibility of becoming divergent increases with time.

I concur that on complex projects where some heavy (from the point of view of simulation, as you mention a microcontroller) parts it is best to treat them separately.

At this moment my approach is similar to the one described, so I think that for now is the best with the available technology.

Regards

I hear you about diverging schematics, but I think that risk is somewhat reduced when you use small simulation schematics that focus on a single block of your full project.

As for breaking things up, it’s not just that it’s expensive to simulate big circuits (though there is that). It’s also that I generally want each simulation to focus on a specific thing, like the AC performance of a filter. Simulating parts of the circuit that don’t contribute to the specific aspect I’m looking at just complicates the analysis.

And when I have multiple analyses, sometimes I want to set up the simulation differently for each analysis. You can get pretty far with sweeps and .steps, but it’s often easier to make a tweaked version of a circuit (or even have multiple versions of a circuit in the same schematic).

Yes, in the end of the day we’ve to create processes that are supported by the available technology.

Thanks for sharing your experience.

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