Simulator

An online oscilloscope simulator, on a resistor circuit

Mokxi is a free online oscilloscope simulator, and yes, it works on a resistor: the circuit below runs a resistor and a capacitor on a two-channel scope in your browser, with nothing to install and no account needed. A signal generator drives a 1.6 k resistor into a 100 nF capacitor, and the scope watches both ends: one trace on the generator side of the resistor, one on the capacitor. The resistor limits how fast the capacitor can charge, so the second trace comes out smaller and a step behind. Press Run, change the frequency and watch both.

  • 505parts on the bench
  • 45boards running now
  • 1.00xreal time, on every board
A resistor and a capacitor on a two-channel scopelive0.000 s 0.00x
Click to open it in the editor
The second trace is the capacitor’s voltage, about 0.7 of the input and an eighth of a cycle behind it. Click the circuit to open it in the editor and change the frequency.

What you can do here

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

  • Clip two channels to any two points and watch both voltages over time
  • Step the time base and the volts per division on the scope’s face while the circuit runs
  • Trigger on either channel, rising or falling, in Auto, Normal or Single
  • Read peak to peak, frequency and duty off the measurement strip
  • Put cursors on the trace, switch to XY, or look at an FFT in the Scope tab
  • Drive it from the signal generator: a sine, a square or a triangle

How to read it: a scope on a resistor

Volts against time, one trace per channel.

A scope draws voltage against time, so on a resistor it shows the voltage across it, and by Ohm’s law the current through it is that voltage divided by the resistance. Clip a channel to one leg and the ground clip to the other end, and a resistor alone draws a trace the same shape as whatever drives it. Put a capacitor behind it and the picture gets interesting: the resistor and the capacitor make a low pass whose corner is f = 1 / (2πRC), which for 1.6 k and 100 nF is 995 Hz.

The generator sits on 1 kHz, 2 V peak, so the input trace is 2 V high and the capacitor’s trace peaks at about 1.41 V, 0.705 of it, and trails by 45 degrees, an eighth of a cycle. To read the lag, count the divisions between the two rising crossings and divide by the divisions in one cycle. Take the frequency down to 100 Hz and the traces sit almost on top of each other; take it up to 10 kHz and the second one nearly vanishes, down by a factor of ten. Switch the generator to a square wave and the capacitor rounds the corners off.

A second circuit: an inductor and a resistor

Two traces, one corner frequency.

The same corner, made the other way around: a signal generator puts a 1 kHz sine, 2 V peak, into a 160 mH inductor and a 1 k resistor, and the scope watches both ends. The inductor is in series and the resistor is across the output, so the circuit is a low pass whose corner is where the inductor’s reactance equals the resistance: f = R / (2πL), which for 1 k and 160 mH is 995 Hz. The generator sits on 1 kHz, as good as on the corner, so in the engine the output peaks at about 1.41 V against the input’s 2.00 V, a ratio of 0.705, and lags it by 45 degrees, an eighth of a cycle. The screen shows 4 ms across: four whole cycles.

Turn the generator down to 100 Hz and the two traces sit almost on top of each other, 1.99 V against 2.00 V. Turn it up to 10 kHz and the output falls to about 0.20 V, a tenth of the input, and lags by nearly a quarter of a cycle. That is a filter’s frequency response, read off two traces at three settings.

How the scope is modeled

A real probe load, and no noise.

Each channel is 1 megohm to the ground clip, as a real probe is, and the engine counts that load: on the capacitor simulator’s circuit, 10 k charging 100 µF, the scope’s megohm holds the capacitor at about 4.95 V instead of 5.00 V. The screen is 256 samples, and the scope keeps four screens behind it so it can draw the newest one that starts on a rising edge, which is what makes a repeating waveform stand still. With no edge to find it free-runs, as a bench scope’s auto trigger does.

What it leaves out: the probe has no input capacitance, so there is nothing to compensate and no x10 setting, and there is no bandwidth limit, no noise and no vertical quantization, so the trace is exactly what the solver computed. Samples are point readings, so a spike narrower than the gap between two of them is missing rather than drawn as a thin line. There is no math channel and no persistence.

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.

Can you simulate an oscilloscope online with a resistor?

Yes. Put a signal generator and a resistor on the canvas, clip a scope channel across the resistor and press Run: the trace is the voltage across it, and dividing by the resistance gives the current. Add a capacitor, as in the circuit above, and the scope shows the RC filter’s delay as well.

Can I use the oscilloscope with an Arduino?

Yes. Clip a channel to any pin and the scope draws what the pin does: a PWM output shows its duty cycle, and a serial line shows its bits. For several digital lines at once, the logic analyzer decodes UART, I2C and SPI.

Is there a function generator to go with it?

Yes. The signal generator makes a sine, a square or a triangle wave with a frequency, an amplitude, an offset and, for the square, a duty cycle, and it can drive anything on the canvas.

Does it work on a Chromebook?

Yes. It runs in Chrome with nothing to install, which is how many school physics and electronics classes use it.

Is there an oscilloscope simulator app?

There is nothing to download: the scope 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.

Read a trace

Open the circuit, change the frequency and watch both traces. Nothing to install, and no account needed.