
Open the project folder on GitHub · Schematic PDF
Two vendors’ SPICE models of the same BZX84C5V6 zener, wired in from their own files: at 5 mA one gives 5.600 V and the other 5.594 V.
Circuit
I1 and I2 each drive 5 mA into the cathode of a 5.6 V BZX84C5V6 zener, D1 and D2, whose anodes are grounded, so both run in reverse breakdown. D1 uses the Symmetry Design Systems model in BZX84C5V6.LIB and its cathode is node sym; D2 uses the Diodes Incorporated model in BZX84C5V6.spice.txt and its cathode is node diodes. The workbook runs .op.
Both model files are third-party and keep their own notices. BZX84C5V6.LIB was generated by Symmetry Design Systems’ MODPEX, dated 26 July 2005 in its header, and is the file Rectifier 4D Zener NPN uses. BZX84C5V6.spice.txt is Diodes Incorporated’s model, provided as is under the disclaimer at its top, and is the file Voltage Protection Discrete uses.
What To Look For
Each zener’s model is set by four fields on its symbol:
| Field | D1 | D2 |
|---|---|---|
Sim.Library | BZX84C5V6.LIB | BZX84C5V6.spice.txt |
Sim.Name | BZX84C5V6 | DI_BZX84C5V6 |
Sim.Device | SUBCKT | SUBCKT |
Sim.Pins | 1=1 2=2 | 1=2 2=1 |
Sim.Libraryis a path relative to the project folder. The model file sits beside the schematic, so its name is the whole path. KiCad turns it into an.includeline with the absolute path when it writes the netlist.Sim.Namepicks the model inside that file: the name after.SUBCKT, or after.model.- Both files define a
.SUBCKT, a small circuit of several elements, soSim.DeviceisSUBCKTand the netlist line starts with X:XD1 GND /sym BZX84C5V6. A file holding a single.modelline is used as a built-in device instead. Actuator NPN Switch LED does this:LED.libholds.model LED D (...), D1 there hasSim.DeviceD, and its netlist line isD1 3.3v Net-_D1-K_ LED. Sim.Pins, set on the Pin Assignments tab of the Simulation Model Editor, pairs each symbol pin with a subcircuit port. The zener symbol’s pin 1 is the cathode and pin 2 the anode. The two vendors number their ports differently, though both list the anode first: Symmetry writes.SUBCKT BZX84C5V6 2 1and calls the cathode port 1, while Diodes writes.SUBCKT DI_BZX84C5V6 1 2and calls the anode port 1. With the pins set as in the table, both netlist lines put the anode on ground:XD1 GND /sym BZX84C5V6andXD2 GND /diodes DI_BZX84C5V6.- Pin assignments do not carry over from one model to another. Give D2 D1’s
1=1 2=2and the netlist line becomesXD2 /diodes GND DI_BZX84C5V6: the zener is wired backwards, I2 drives it forward, and diodes reads 0.712 V instead of 5.594 V. Give D1 D2’s1=2 2=1and sym reads 0.770 V. - The Diodes model is a 3.33 V source VZ in series with a diode DR (IS = 5.15 fA, N = 3, RS = 24.5 Ω) carrying the 5 mA: Vz = VZ + N · VT · ln(I / IS) + I · RS = 3.33 V + 3 × 25.865 mV × 27.601 + 5 mA × 24.5 Ω = 3.33 + 2.1417 + 0.1225 = 5.5942 V.
- The Symmetry model holds its breakdown in a controlled source EV1 that copies 1 mA × 5532.13 Ω = 5.532 V. The rest of the subcircuit adds a simulated 68 mV at 5 mA, for 5.600 V.
- The project runs ngspice in KiCad’s default compatibility mode, LTspice and PSpice (
model_mode4 in the.kicad_pro; ngspice reports “Compatibility modes selected: ps lt a”). Vendor models are written for those simulators: the Symmetry header says “MODEL FORMAT: PSpice”. These two parse the same without it: with the mode off, ngspice gives the same two voltages to seven digits.
The simulation gives 5.60017 V at sym and 5.59423 V at diodes.
How To Run
Open Simulation-Vendor-model.kicad_sch in KiCad, click Simulate, and run the operating point tab. KiCad lists V(/sym) and V(/diodes). To see the fields, open D1’s or D2’s properties and click Simulation Model… to open the Simulation Model Editor: the Model tab shows the library and name, the Pin Assignments tab the pins.
Try This
- Set I1 and I2 to 5.5 mA. The simulated sym rises only 0.5 mV, to 5.6007 V, and diodes rises 19.6 mV, to 5.6139 V. The two models agree at 5 mA but not on the slope: the Diodes model’s is RS + N · VT / I = 24.5 Ω + 3 × 25.865 mV / 5 mA = 40.0 Ω, the Symmetry model’s a simulated 1.0 Ω.
Made for KiCad 10.