Hi everyone,
I had some trouble with simulating vishay optocouplers so I decided to post here in case someone has had similar issues.
Vishey’s spice models sometimes don’t have the “end of file” character, and this causes KiCad to freeze for a few seconds and prevents it from loading the model into the component symbol. This can be fixed by saving the file with UTF-8 encoding using a program like xed (or just adding an a empty line on the end of the model file and saving).
Specific problem with IL300 and VOA300 spice models is the way the simulate current controlled current sources.
Both have similar definitions like:
FPD1 PD1_C PD1_A VALUE {K1I(VV1)}
and
FPD2 PD2_C PD2_A VALUE {K3K1I(VV1)} ;K2=K3K1
This causes problems with ngspice as this isn’t ngspice compatible CCCS definition. (https://ngspice.sourceforge.io/docs/ngspice-manual.pdf see chapter 4.2.3).
Issue can be solved by changing the lines above with:
FPD1 PD1_C PD1_A VV1 K1
and
FPD2 PD2_C PD2_A VV1 {K1*K3}.
I’m a new user so I can’t upload corrected files, but you can apply these changes yourself.