Part

Diode

One way only. For flyback, for steering, and for a battery in backwards.

See every part
  • 2 pins
  • 2 settings
  • In 11 projects
  • In 6 lessons
AC1N4148
Drawn live by the editor's own code, at the size you see it.
At a glance

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). forward overrides the model, and is read as the drop at 10 mA.
forward
0
Pins

2 pins

Named as the editor names them, so a wire lands where you expect it.

Pin
What it does
A
Anode. Current goes in.
C
Cathode, marked with a band on the real part. Current comes out.
How to use 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.

Part pin
Board pin
Anode (A)
The transistor’s collector and motor terminal 2
Cathode (C, the band)
5 V and motor terminal 1

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.

Arduino Uno: motor on a transistorlive0.000 s 0.00x
Click to open it in the editor
This is the simulator itself, running here. Click anything to open it in the editor.
How it is modeled

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`sourcestanding
1N41484.352 nA1.9060.6458 ΩVishay 1N4148 forward characteristicsderived from two points on the forward curve
1N40077.028 nA1.8080.0342 ΩVishay 1N4007 forward characteristicsderived, same way
1N58171.0 µA1.050.075 ΩON Semi 1N5817 VF at 100 mA and 1 AIs/Rs derived from those two points; N assumed
1N581930 nA1.050.05 ΩON Semi 1N5819 VFderived; N assumed
BAT54100 nA1.050.75 ΩNexperia BAT54 VF at 10 mA and 100 mAIs/Rs derived; N assumed

From Diode, in full.

Projects

See the Diode in a project

11 built-in projects use it. Each opens in the editor, already wired.

Boards

The boards it is shown on

Each of these 3 boards has a built-in project with the Diode in it.

Wire up the Diode

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.