Simulator

A capacitor simulator: charge it, discharge it, watch the curve

Mokxi is a free online capacitor simulator that runs in your browser, with nothing to install and no account needed. A 5 V supply, a slide switch, a 10 k resistor and a 100 µF capacitor, with a scope on the capacitor showing five seconds across. Click the switch and the capacitor charges along the exponential; click it back and it empties through the same resistor.

  • 269parts on the bench
  • 32boards running now
  • 1.00xreal time, on every board
An RC circuit charging on the scopelive0.000 s 0.00x
Hold the button
Click the slide switch to charge the capacitor, and again to discharge it, or click anything else to open it in the editor.

What you can do here

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

  • Charge and discharge a capacitor with a switch and watch the curve
  • Read the time constant off the trace with the scope’s cursors
  • Change the capacitor or the resistor and watch the curve stretch or shrink
  • Measure a capacitor on the multimeter’s capacitance range
  • Put capacitors in series and in parallel and measure the total
  • Time a 555 or smooth a rectifier with the same part

What the running circuit shows

One time constant is one second.

The time constant is R times C: 10 k times 100 µF is one second. Slide the switch to 5 V and in the engine the capacitor reaches about 3.14 V one second later, 63 percent of the way, then 4.29 V at two seconds and 4.71 V at three. Slide it back to ground after six seconds and it empties through the same resistor, from 4.94 V to about 2.98 V in half a second.

It never quite reaches 5 V. After eight seconds it sits at about 4.95 V, because the scope’s own 1 megohm input is across the capacitor and divides the supply with the 10 k. Take the scope off and it reaches 5.00 V. Change the capacitor to 220 µF and one second gets it only to about 1.82 V.

How the capacitor is modeled

The true exponential, not a step.

Wherever a capacitor sits, the engine solves it with everything on the same nets as one matrix, so an RC network lands on the true exponential to a tenth of a percent, and a 555’s timing comes from its capacitor rather than from a formula. The multimeter’s capacitance range measures one by charging it with 2 µA and timing the ramp, from a nanofarad to a millifarad.

What it leaves out: there is 0.1 ohm of series resistance in every capacitor, less than any real electrolytic’s, and no leakage, dielectric absorption or polarity, so an electrolytic value wired backwards behaves as it does the right way around, where a real one would vent. Every capacitor starts empty when the circuit starts.

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.

How long does a capacitor take to charge?

About five time constants, where one time constant is R times C. After one it is 63 percent charged, after two 86 and after three 95. With 10 k and 100 µF each one is a second, so about five seconds to full.

Can I simulate capacitors in series and in parallel?

Yes. Wire them up and put the multimeter on its capacitance range across them: in parallel the values add, and in series the total is less than the smallest of them.

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.

Charge a capacitor

Open the circuit, flip the switch and watch the scope. Nothing to install, and no account needed.