Simulator

A function generator simulator, with a scope and a filter to drive

Mokxi is a free online function generator simulator that runs in your browser, with nothing to install and no account needed. A function generator set to a 100 Hz sine, feeding a 16 k and 100 nF low-pass filter, with an oscilloscope on the input and the output and a multimeter on AC volts. Turn the frequency or change the shape and both traces and the meter follow.

  • 505parts on the bench
  • 45boards running now
  • 1.00xreal time, on every board
A function generator driving an RC filterlive0.000 s 0.00x
Click to open it in the editor
Click the circuit to open it in the editor, then click the generator to change its frequency, amplitude or shape. Channel 1 of the scope is the generator, channel 2 is the filter’s output.

What you can do here

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

  • Pick a sine, square, triangle or sawtooth wave
  • Step the frequency in the 1, 2, 5 sequence a bench generator uses
  • Set the amplitude and the offset
  • Watch the input and the output together on a two-channel scope
  • Read the output on a multimeter set to AC volts
  • Find a filter’s corner by turning the frequency until the output drops to 0.707 of the input

What the running circuit shows

One generator, one filter, and a corner you can find by hand.

The generator puts out a sine that peaks at 2.0 V. A 16 k resistor and a 100 nF capacitor make a low-pass filter with its corner at 99.5 Hz, so at the 100 Hz the generator starts on, the output peaks at 1.40 V, which is 0.707 of the input, and the meter reads 0.99 V AC. That is the definition of the corner, on the screen.

Turn the generator down to 20 Hz and the filter lets nearly everything through: the output peaks at 1.93 V and the meter reads 1.36 V. Turn it up to 500 Hz and the output peaks at 0.39 V, with 0.27 V on the meter. At 2 kHz only 0.10 V of peak is left. Past the corner, five times the frequency leaves about a fifth of the signal: that is the 20 dB per decade slope every textbook draws.

Now change the shape. A 100 Hz square wave comes out with rounded edges, peaking at 1.81 V, because the filter takes the fast edges away first. A triangle comes out peaking at 1.16 V and looking close to a sine.

How the generator is modeled

An ideal source behind 50 ohms.

The generator makes four shapes, sine, square, triangle and sawtooth, at the frequency, amplitude and offset you set, and drives the circuit through 50 ohms, as a bench generator does. Place a new one and it starts at 1 kHz, swinging 2.5 V either side of a 2.5 V offset, which suits a circuit on a single 5 V supply.

What it leaves out: distortion, rise time on the square wave’s edges, noise, frequency sweeps and modulation. One thing to know about the meter beside it: its AC range is good up to about 1 kHz. Above that, trust the scope’s trace for the amplitude.

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 waveforms can the function generator make?

Sine, square, triangle and sawtooth, with the frequency, the amplitude and the DC offset each set on the part.

How do I find the cutoff frequency of an RC filter with a function generator?

Feed the filter a sine, watch the input and the output on a scope, and turn the frequency until the output is 0.707 of the input. In this circuit that happens at 100 Hz: 2.0 V of peak in, 1.40 V out. The formula agrees: 1 / (2 x pi x 16 k x 100 nF) is 99.5 Hz.

Why does a square wave come out of a low-pass filter rounded?

A square wave is a sine at its own frequency plus weaker sines at 3, 5, 7 times that. The filter passes the low ones and cuts the high ones, and the high ones are what make the edges sharp.

More simulators

Each one opens on a circuit that is already running.

Turn the frequency knob

Open the circuit, change the frequency and watch the output shrink. Nothing to install, and no account needed.