An LED circuit simulator with a meter in it
Mokxi is a free online LED circuit simulator that runs in your browser, with nothing to install and no account needed. Three LEDs, three resistors and a 5 V supply on a real breadboard, with a multimeter in series with the red LED reading its current. Change a resistor or an LED color and the current changes the way it would on a bench.
- 455parts on the bench
- 43boards running now
- 1.00xreal time, on every board
What you can do here
In the circuit above, or in the editor it opens.
- Change a resistor and read the new current on the meter
- Swap an LED’s color and watch its forward voltage change the current
- Push an LED past its 20 mA rating and see what a missing resistor costs
- Move the meter to volts and measure the drop across each part
- Add a button, a transistor or a microcontroller pin to switch the LEDs
- Save the circuit and share it with one link
What the running circuit shows
The same resistor, three different currents.
Each LED has its own 220 ohm resistor from the 5 V rail. The current through each one is whatever voltage the LED leaves over, divided by 220: I = (5 V − Vf) / 220 Ω. The forward voltage Vf depends on the color, so one resistor value gives three currents.
In the engine the red LED drops about 1.74 V and the meter reads 14.8 mA. The yellow one drops about 1.91 V and takes about 14.0 mA. The blue one drops about 2.84 V and takes about 9.8 mA, which is why a blue LED next to a red one on the same resistor looks dimmer than you expect.
Change the red LED’s resistor to 1 k and the meter falls to about 3.5 mA. Change it to 47 ohm and it climbs to about 56 mA, far past the 20 mA a plain 5 mm LED is rated for. Turn the red LED white and the meter reads about 9.4 mA.
How the LED is modeled
A real diode curve, not a lamp with a threshold.
An LED in Mokxi is a diode with a color-dependent curve, solved with the rest of the circuit by nodal analysis, so its voltage rises a little as its current rises, the way a datasheet’s I-V curve does. Its brightness follows its current. The meter in series has a 1 ohm shunt, so it costs the circuit about 15 millivolts to measure the red LED.
What it leaves out: an LED here does not heat up or age. Push 56 mA through one and it glows on, where a real one would dim and fail within minutes; only well past that, with the resistor taken out altogether, does the Circuit Doctor say it would burn out. The page says the rating so the simulator does not teach that 56 mA is safe.
Questions
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 resistor do I need for an LED on 5 V?
Take the supply, subtract the LED’s forward voltage, and divide by the current you want. For a red LED at about 15 mA on 5 V that is (5 − 1.8) / 0.015, about 220 ohm, which is the value in the circuit above.
Can I drive the LEDs from an Arduino pin?
Yes. Drop an Arduino Uno, an ESP32 or a Pico on the bench, wire a pin to the resistor instead of the 5 V rail, and the same circuit blinks from code.
Can I measure the voltage across the LED?
Yes. Turn the meter’s dial to DC volts, put the red lead on the LED’s anode and the black on its cathode, and it reads the forward voltage.
More simulators
Each one opens on a circuit that is already running.
Light your first LED circuit
Open the circuit, change a resistor and press Run. Nothing to install, and no account needed.