Diode
The small-signal and rectifier diode, 1N4148 and 1N400x style: current goes from anode to cathode and not the other way, and that is the whole part.
It is what a class reaches for to protect a board from a battery put in backwards, to clamp the kick out of a relay coil or a motor, and to steer one signal into a node without letting the node back out.
Pins
| Pin | What it does |
|---|---|
A |
Anode. Current goes in. |
C |
Cathode, marked with a band on the real part. Current comes out. |
Properties
model: 1N4148 (small-signal switching and clamping), 1N4007 (line-voltage
rectifier and the usual flyback diode on a coil), or one of three Schottkys:
1N5817 (20 V, the lowest drop of the family), 1N5819 (40 V, for a low drop in a
supply path) and BAT54 (200 mA, for a signal clamp). forward overrides the
model, and is read as the drop at 10 mA.
For a diode that conducts backwards at a voltage you choose, see the Zener.
What the model gets right
The Shockley equation, I = Is (exp(Vj / (N Vt)) - 1), with a bulk series
resistance, solved by Newton-Raphson along with everything else the diode is
wired to. So there is no forward drop written down anywhere: the drop is
whatever the curve gives at the current the circuit is passing.
| model | Is |
N |
Rs |
at 5 mA | at 1 A |
|---|---|---|---|---|---|
| 1N4148 | 4.352 nA | 1.906 | 0.646 ohm | 0.68 V | 1.6 V |
| 1N4007 | 7.028 nA | 1.808 | 0.034 ohm | 0.63 V | 0.91 V |
| 1N5817 | 1.0 µA | 1.05 | 0.075 ohm | 0.24 V | 0.45 V |
| 1N5819 | 30 nA | 1.05 | 0.05 ohm | 0.33 V | 0.52 V |
| BAT54 | 100 nA | 1.05 | 0.75 ohm | 0.29 V | not rated |
The three Schottkys are the same equation with a different junction. A
silicon pn junction's saturation current is nanoamps; a metal-silicon one's is
hundreds of nanoamps to microamps, and its N is near 1.05 rather than near 2.
That is the whole of why a Schottky drops a third of a volt where a 1N4148 drops
two thirds, and it falls out of the equation rather than being written down. Each
card is fitted to two points off its datasheet's forward curve; the emission
coefficient is the one assumed number, because a Schottky datasheet does not
print one.
That is the difference this model makes: the old fixed-drop 1N4007 claimed 0.9 V at any current at all, and a real one is at about 0.6 V at four milliamps and only reaches 0.9 V near an amp. The operating point agrees with ngspice 42 on the same card to better than a tenth of a percent.
Reverse biased the diode passes Is and nothing more, which is nanoamps, and
below a nanoamp it lets go of both nets entirely.
What it does not model
No junction capacitance, so it switches instantly. No reverse recovery time, which
is the real difference between a 1N4148 and a 1N4007 in a fast circuit. No
temperature dependence: every junction here is at 27 C, where a real drop moves
about -2 mV a degree. No breakdown on these cards: the junction model has SPICE's
BV and IBV and the Zener is built on them, but no card
here names a reverse rating, so a diode sitting at 400 V reverse simply stays off
rather than avalanching, the one place this part is kinder than the bench. And
there are no current or power ratings either, so nothing stops a BAT54 being
asked for an amp it would not survive.
Reverse recovery is worth saying twice for the Schottkys, because it is the reason to buy one: a real Schottky switches off in nanoseconds where a 1N4007 takes microseconds, which is what makes it the diode in a switching supply. Here every diode switches instantly, so that difference does not exist and the only thing separating a Schottky from a silicon part is the drop.
Common mistakes
Leaving the flyback diode off a relay coil or a motor and expecting nothing bad to happen. Because there is no inductive kick modeled on those parts either, this mistake produces no visible symptom here, which is worth knowing before assuming a circuit that "works in Mokxi" is safe on real hardware.
See it in action
Motor on a transistor uses a diode as the flyback protection across the motor. Open it at /templates.
The reverse polarity protection page puts a Schottky and a silicon diode in a supply line and reads the drop each one costs, and the flyback diode page takes the diode out from across a coil so you can see the spike it was stopping.