warning, can't find model diode
Circuit: KiCad schematic
Error on line 4 :
d1 0 net-_d1-pad2_ diode
Unable to find definition of model diode
Error: circuit not parsed.
You use a model DIODE (ngspice just prints all in lowercase in the error message).
You could add a text line with something like .model DIODE D to define it.
Thanks for the quick reply. Manually setting “.model diode d” works.
I was assuming that using the simulation diode “Diode symbol for simulation only” with the default settings “Symbol Properties → Edit Spice Modlel… → Model: Diode, Type: Diode” would select the default ngspice diode model described in section 7.2 in the ngspice manual. But apparently that’s not the case.
What is the effect of using this SPICE diode model with “Model: Diode, Type: Diode” when no diode model is chosed for this part by default?
This action creates an instance of a diode called “Diode”, but “Diode” is not defined unless a “modelcard” line is specified somewhere else on the netlist. That’s what the “.model Diode D” directive does. For example, if you used a 1N4148 symbol instead of the DIODE symbol (from pspice symbol library), the model field you’re talking about would be pre-filled in with 1N4148 and would require a “.model 1N4148 D” instead so it matches the symbol. Of course, you can also edit this field to whatever you want and adjust things that way.
Just a heads up to be careful when using default models, since they have many parameters set to zero. Specifically for a diode, the breakdown voltage is set to infinity and there is no junction or diffusion capacitance…among other things. It’s my opinion to never use default models for anything…and you’ll especially get burned if you ignore that advice when using the default MOSFET model.
For a basic model for a small signal diode, I would suggest something like this such that the key parameters are all defined and the user can at least see where the breakdown voltage (BV) is defined. Having the Rs and Cjo defined will help with convergence of the SPICE engine. .model simple_diode D(Is=1n Rs=100m N=1.5 Cjo=1p BV=50 IBV=1n)