Source code coming soon. The GitHub repository is private for now and opens to everyone very soon.
BetterSPICE Beta 0.8.1 Join the beta Download soon

Calculators Circuit

RC time constant calculator (and L/R)

For an RC circuit τ = RC, for an inductor and a resistor τ = L / R. The calculator draws the charge curve of a step, v(t) = V (1 − e−t/τ), and gives the time to reach any percentage p of it, tp = −τ ln(1 − p).

The 10 to 90 % rise time is τ ln 9, about 2.2 τ, and the 2 % settling time is τ ln 50, about 3.9 τ. In the app the placed check runs a transient and measures both.

The calculator

The app's own calculator window, built from the BetterSPICE 0.8.1 source. What needs a schematic is greyed out here: placing the circuit, running it, applying values to parts and picking parts from the library. Open it in its own window.

The formulas it uses

These are the formulas the calculator shows, copied from its source code. The results in the window above come from the same code as the app.

RC step response

  • τ = RC
  • v(t) = V (1 − e−t/τ)
  • tp = −τ ln(1 − p)
  • tr = τ ln 9

L / R step response

  • τ = L / R
  • v(t) = V (1 − e−t/τ)
  • tp = −τ ln(1 − p)
  • tr = τ ln 9

Sources. First-order step response (any circuit theory text). The placed check measures the 10 to 90 % rise (τ ln 9) and the 2 % settling time (τ ln 50).

Simple and Advanced

Simple is the main values, one set of results and a plot. Advanced is the full design view: the operating range with its corners, tolerance and temperature, checks with their margin (a green tick, an amber warning or a red cross), the parts to order with the ratings they need, warnings that give the fact, the number and the fix, and plots over the whole range. A value typed in one view is the same in the other.

In the app it also places the circuit and checks it

In the app, the buttons under the result act on your circuit: Place and run transient, Place as circuit. The circuit is drawn with library symbols, wires, a source and probes, placed at a free spot in the view, and the analysis that checks it runs at once. With parts selected, Apply to the selected parts writes the result into them, as one undo step.

The last tab of the Advanced view, Verify in simulation, places the calculator's circuit and runs it, with measurements whose pass limits are the calculator's own numbers. A row the simulator cannot check says so and why. More in the manual: Time constant.