Diode
One way only. For flyback, for steering, and for a battery in backwards.
- 2 pins
- 2 settings
- In 11 projects
- In 6 lessons
The Diode in brief
What it is, and every setting the properties panel gives it.
A diode lets current through from its anode to its cathode, the end with the band, and blocks it the other way. Mokxi’s diode has no forward drop written down anywhere: it solves the Shockley equation with a series resistance, so the drop is whatever the curve gives at the current the circuit passes. A 1N4007 sits near 0.63 V at 5 mA and reaches 0.91 V only near an amp; a 1N4148 is 0.68 V at 5 mA; the 1N5817 Schottky drops 0.24 V at 5 mA and 0.45 V at an amp, which is the reason to pick one for a supply line. Reverse biased it passes nanoamps. The model property picks the 1N4148, 1N4007, 1N5817, 1N5819 or BAT54. Three things are left out: there is no junction capacitance or reverse recovery, so every diode switches instantly, no temperature drift, and no reverse breakdown. The motor and relay coil parts have no inductive kick either, so a missing flyback diode shows no symptom here.
- Family
- Timers and analog
- Pins
- 2
- model
- 1N4148 (or 1N4007, 1N5817, 1N5819, BAT54)
- 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).
forwardoverrides the model, and is read as the drop at 10 mA. - forward
- 0
2 pins
Named as the editor names them, so a wire lands where you expect it.
How to wire a diode the right way around
Current flows through a diode from the anode (A) into the cathode (C), the end with the band, once the anode is a few tenths of a volt higher. Across a motor or a relay coil, the flyback diode goes band toward the positive supply, so it is reverse biased while the coil runs and only conducts on the kick when it switches off. In a supply line it goes in series, band toward the load, so a battery put in backwards cannot push current through.
Pick it by its drop. A 1N4007 is the usual flyback and rectifier diode; a 1N5817 Schottky drops less than half as much. On the reverse polarity page, about 47 mA through a 1N5817 costs 0.30 V and through a 1N4007 0.73 V. The motor in the circuit here has no inductance, so its diode carries nothing in the simulation; the flyback diode page shows the spike on an inductor.
A diode works the same next to any board. On a 3.3 V supply, a Schottky’s smaller drop is often the difference between a circuit that runs and one that browns out.
What is true about the Diode, here
In its help article’s own words: what the simulation gets right, and where it stops.
Modeled
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.
Not modeled
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.
Diodes: `diode`
| model | `Is` | `N` | `Rs` | source | standing |
|---|---|---|---|---|---|
1N4148 | 4.352 nA | 1.906 | 0.6458 Ω | Vishay 1N4148 forward characteristics | derived from two points on the forward curve |
1N4007 | 7.028 nA | 1.808 | 0.0342 Ω | Vishay 1N4007 forward characteristics | derived, same way |
1N5817 | 1.0 µA | 1.05 | 0.075 Ω | ON Semi 1N5817 VF at 100 mA and 1 A | Is/Rs derived from those two points; N assumed |
1N5819 | 30 nA | 1.05 | 0.05 Ω | ON Semi 1N5819 VF | derived; N assumed |
BAT54 | 100 nA | 1.05 | 0.75 Ω | Nexperia BAT54 VF at 10 mA and 100 mA | Is/Rs derived; N assumed |
From Diode, in full.
See the Diode in a project
11 built-in projects use it. Each opens in the editor, already wired.
Where it turns up in a lesson
6 lessons place it in their own circuits.
The boards it is shown on
Each of these 3 boards has a built-in project with the Diode in it.
The rest of the bench
Every one of these is drawn and simulated the same way.
Wire up the Diode
Open the editor and push it into the breadboard. It is free, and it runs on your own machine.