Apologies if it was already answered, i did a rapid search online but couldn’t find an answer.
I am looking into kicad’s spice engine to see if it’s worth it to migrate from doing sim in ltspice of parts of the schematic, to doing everything inside the PCB project.
I’m trying to do AC analysis of some filters, so i’ve started with ideal components.
Now i wanted to replace ideal components with the actual models. Kemet lets you add capacitors in ksim, then export the list of the selected capacitors as subcircuits. For example,
.SUBCKT C0402C104K4RAC 1 6
*Temp = 25°C, Bias = 0VDC, Center Frequency = 10000 Hz
*KEMET Model RLC Cerm
R1 3 4 4.474954128265381
R2 2 5 2.1500000953674316
R3 1 6 11310000128
L1 1 2 1.2250001013569546E-11
L2 2 3 2.3275001925782133E-10
C1 4 6 8.520571270764776E-08
C2 5 6 1.399999976158142E-12
.ENDS
I put the directive in a lib file, then i can select the lib and the model in the lib instead of using the ideal capacitor. So far so good.
My question is: Can i instead place the directive inside the symbol? I see there is an option for builtin spice model → raw spice element where i can paste the code.
The reason i ask is: I’m thinking about what would be the best approach to mantain a project: have a general set of libs in a place and call them from projects, do the same but a lib for every project, or have the directive somewhere in the schematic and set the capacitor as its subcircuit name (as i’m doing in LTSPICE)
Thanks