Simulator

A diode simulator: silicon, Schottky and an LED on one supply

Mokxi is a free online diode simulator that runs in your browser, with nothing to install and no account needed. A 5 V supply, two 330 ohm resistors, a 1N4148 silicon diode in one branch and a red LED in the other, and a meter across the diode. Change the diode’s model or turn it around, and the drop and the current change the way its datasheet curve says.

  • 505parts on the bench
  • 45boards running now
  • 1.00xreal time, on every board
A 1N4148 and a red LED, 330 ohm eachlive0.000 s 0.00x
Click to open it in the editor
The meter reads the 1N4148’s forward drop, about 0.74 V. Click the circuit to open it in the editor and turn the diode around.

What you can do here

In the circuit above, or in the editor it opens.

  • Read a diode’s forward drop on a meter, at the current the circuit sets
  • Swap between the 1N4148, the 1N4007 and three Schottky diodes
  • Turn the diode around and watch it block
  • Rectify an AC signal, half wave or with a bridge
  • Clamp a motor’s or a relay’s coil with a flyback diode
  • Hold a voltage steady with a Zener

What the running circuit shows

The same resistor, three different drops.

Each branch is 330 ohm into a diode, across the same 5 V. In the engine the 1N4148 drops about 0.74 V and passes about 12.9 mA. Change its model to the 1N4007 rectifier and it drops about 0.68 V; to the 1N5819 Schottky, about 0.36 V, so about 14.1 mA flows. The red LED in the other branch drops about 1.65 V and passes about 10.2 mA, which is why an LED’s resistor is worked out differently from a plain diode’s.

Turn the 1N4148 around and it blocks: the current falls to nothing and the meter reads the full 5.00 V across it, because with no current the resistor drops nothing. That is the one-way valve, and it is how a diode protects a board from a battery put in backwards.

How the diode is modeled

The Shockley equation, not a fixed 0.7 V.

Each diode is the Shockley equation with a series resistance, solved with the rest of the circuit, so no forward drop is written down anywhere: the drop is what the curve gives at the current the circuit passes. The cards are fitted to datasheet curves, and a Schottky drops a third of a volt where a 1N4148 drops two thirds because its junction is different, not because a table says so. The operating point agrees with ngspice on the same card to better than a tenth of a percent.

What it leaves out: junction capacitance and reverse recovery, so every diode switches instantly and a 1N4148 and a 1N4007 differ only in their drop. Every junction sits at 27 C, there is no reverse breakdown on these cards (the Zener is a part of its own), and nothing stops a small diode being asked for more current than it would survive.

How it works

Three steps from a blank tab to a running circuit.

  1. Open the editor

    It runs in your browser tab. Nothing to install, and you need no account to start.

    Your first project
  2. Wire it and write the code

    Drag parts onto a breadboard, run each wire from pin to pin, and write the sketch beside it.

    Wiring
  3. Press Run

    Your sketch compiles in the tab and runs on a model of the chip, with the Serial Monitor beside it.

    Run and serial
Reviews

What makers say about Mokxi.

“The AI checker helps check and correct my circuits, and it has way more components than Tinkercad. As a student I really appreciate the tool.”

ChloeEngineering student

“I’d been looking for a real online electronic simulator that was intuitive and complete when I found Mokxi. I was able to quickly import a Fritzing file and my Arduino sketch and start testing. Mokxi has all of the makings for the best online Arduino simulator I have been able to find!”

JayModel builderFeatured in his DioramaOS post

“I’m using Mokxi to develop and simulate an STM32-based four-wheel-drive robot car before building the actual hardware. It allows me to experiment with DC motor control, PWM, RPM measurement using photointerrupters, and different acceleration, braking, and reversing strategies, helping me understand and refine the system before implementing it in real life.”

NusretRobot car builder, Hamburg

Share your story

FAQ

Questions, answered.

Is it free?

Yes. The circuit on this page, every part in it and the editor it opens in are on the free plan, with no card.

Do I need an account?

No. The circuit runs the moment the page does, and the editor opens without one. A free account is only for saving a project to the cloud and sharing it by link.

What is the forward voltage of a diode?

It depends on the current and the kind of diode. In the circuit above, at about 13 mA, a 1N4148 drops 0.74 V, a 1N4007 0.68 V and a 1N5819 Schottky 0.36 V, and a red LED at 10 mA drops 1.65 V. Mokxi works it out from each diode’s curve rather than using a fixed figure.

Can I simulate a Zener diode?

Yes. The Zener is its own part, conducting backwards at the voltage you choose, and the Zener regulator page holds a load at that voltage as the supply changes.

Can I plot a diode’s I-V curve?

Yes. Open Analysis in the editor’s more menu and use the DC sweep to step the supply and plot the current. The LED I-V curve page does it for an LED, and the same sweep works with a diode in its place.

Can I use a diode in an Arduino circuit?

Yes. Every diode here wires to the boards like any other part. The Arduino DC motor guide puts a 1N4007 across a motor driven from an Uno through a transistor, and the reverse polarity page puts a Schottky in a supply line.

Is there a diode simulator app?

There is nothing to download: the simulator runs in the browser on Windows, Mac, Linux and Chromebooks, and on phones and tablets. On Android there is also the Mokxi app on Google Play, which is the same editor full screen.

More simulators

Each one opens on a circuit that is already running.

Turn a diode around

Open the circuit, change the model and read the meter. Nothing to install, and no account needed.