I’m trying to simulate an AC switch, also called Solid State Relay (SSR) with KiCAD nightly: 6.0.0-rc1-dev.
I couldn’t get the default NMOS to simulate, but in the end I wanted to simulate with a real Mosfet, so I downloaded the OptiMOS3 PSpice library from Infineon.
It seemed to work just fine, until I set Vgs=0V, and the simulation ends with the message:
Analyses: TRAN: Timestep too small; time = 7.29982e-005, timestep = 1.25e-018: trouble with node “net-q1-pad1”
run simulation(s) aborted
I’m using the transient simulation with step=1us and time=100us.
Any clue on what is happening would be greatly appreciated!
The default MNMOS in the pspice library wouldn’t simulate, I understand there is no model attached. What is the reason? Is there a standard model shipped with KiCAD I could use? If not, where should a pspice beginner go get one?
Not at this point in time. If somebody wants to contribute some we can find a place to put them. The contributor must however show that they made the model from their own measurements as copying a model made by somebody else might create problems with licenses. (All models i have seen so far where under a very restrictive license. Some where even encrypted to further protect the creator of the model.)
You intend to use a PSPICE compatible lib, are reading the LTSPICE manual and are going to use ngspice. All these are flavors of SPICE, similar but not identical. So there might be subtle differences in the syntax.
To make it short: You will need ngspice-28 to run the PSPICE Power MOS libs from Infineon. Actiual KiCad comes with ngspice-26, that cannot read PSPICE device libs. ngspice-28 can do so, having a PSPICE compatibility mode. Please have a look at http://ngspice.sourceforge.net/ngspice-eeschema.html how to switch from ngspice-26 to ngspice-28 and enable the compatibility mode.
Thanks for the help holger, that starts to make sense.
I’ve installed ngspice-28 and… the result is the same! So I took a minimalistic approach and managed to get a “default?” NMOS model to run, however the gate voltage doesn’t seem to do anything. Only the body diode conducts (the current is null when the voltage is positive).
I checked the install and the current was around 56A with the Power MOS simulation, so it seems ngspice-28 is working well.
However the Op-Amp simulation causes KiCAD to crash. How to get the crashlog on windows?
Here is the simple simulation with only 1 MOS which shows the same error.
You are specifiying a gate voltage rise time of 1n. This is unrealistic for a power transistor. Your transient resolution is 1u, much to large for the specified rise time.
Try 10n rise time with ‘dc 5 pulse(0 5 0 10n 10n 40u 80u)’ and ‘.tran 5n 100u’, then the simulation comes to a good end.
With these settings the simulation of a single Mosfet ends with no errors!
Do you have a rule of thumb for setting the ratio between “events” such as a transient, and the simulation time?
The same settings would still not get the initial circuit to simulate successfully so I decreased again the time step and increased the gate voltage rise time to 1us: ‘dc 5 pulse(0 5 0 1u 1u 40u 80u)’ and ‘.tran 1n 100u’ and it worked!
The last step was to set the simulation voltage back up to 100V, but I had to lower the step to 100ps to get it to run. The simulation takes several minutes. Is this the nature of the beast?