FireCADCalc

PWM to Analogue: RC Filter Ripple and Settling Time

Average output, exact peak-to-peak ripple and settling time of a single-pole RC filter turning a PWM signal into an analogue voltage.

Inputs

Examples: Illustrative 3.3 V PWM at 20 kHzLow duty, slow filterFast PWM, small cap

Accepted: 0.1 to 100 V
Accepted: 0 to 100 %
Accepted: 0.001 to 100,000 kHz
Accepted: 0.001 to 100,000 kΩ
Accepted: 1E-6 to 10,000 µF
Accepted: 1E-4 to 50 %

Results

The capacitor charges towards V_H while the PWM is high and discharges while it is low. In steady state the swing is exactly ΔV = V_H(1 − a)(1 − b)/(1 − ab) with a = e^(−DT/τ) and b = e^(−(1−D)T/τ); it is largest at 50 % duty and, for τ ≫ T, close to V_H D(1 − D)T/τ. Lowering the ripple by raising τ slows the response: a step settles to within ε after τ ln(1/ε). A second RC stage or an active filter breaks this trade-off.

Filter corner frequency1,591.5Hz
Average output2.4750V
Peak-to-peak ripple30.936mV
Settling time to the band0.46052ms

Download PDF CSV Link to this result Compare another case

Log in to save calculations to your dashboard.

Worked example

Example: Illustrative 3.3 V PWM at 20 kHz. The inputs, in the units selected above:

InputValue
PWM high level3.3000 V
Duty cycle50.000 %
PWM frequency20.000 kHz
Filter resistance10.000 kΩ
Filter capacitance1.0000 µF
Settling band as a share of the step0.40000 %

Applying the formula below gives:

ResultValue
Filter corner frequency15.915 Hz
Average output1.6500 V
Peak-to-peak ripple4.1250 mV
Settling time to the band55.215 ms

Open this example in the calculator and change any input.

Formula

\(\Delta V = V_H\frac{(1-a)(1-b)}{1-ab}, \quad a = e^{-DT/\tau}, \quad b = e^{-(1-D)T/\tau}, \quad t_s = \tau\ln\frac1\epsilon\)

Variables

Symbol Meaning SI unit
\(V_H\) PWM high level V
\(D\) Duty cycle -
\(f\) PWM frequency 1/s
\(R\) Filter resistance Ω
\(C\) Filter capacitance F
\(\epsilon\) Settling band as a share of the step -
\(f_c\) Filter corner frequency 1/s
\(\bar V\) Average output V
\(\Delta V\) Peak-to-peak ripple V
\(t_s\) Settling time to the band s

Method and standards

PWM filter.

Where it is used

  • Microcontroller analogue outputs.
  • LED dimming and motor reference signals.

Common mistakes

  • Using the corner frequency alone to judge ripple.
  • Loading the filter with a low-impedance input.

Assumptions and limits

  • Ideal PWM source; unloaded filter.

References

  • First-order RC response to a rectangular wave

Questions and answers

How big is the ripple at 50 % duty?

With τ much longer than the period, about V_H T/(4τ): 3.3 V at 20 kHz through 10 k and 1 µF gives about 4 mV.

How do I reduce ripple without slowing the response?

Raise the PWM frequency, or use a second filter stage.

What do the defaults represent?

An illustrative 3.3 V, 20 kHz PWM at 50 % through 10 kΩ and 1 µF, settling to 0.4 % (8-bit).

Method and article reviewed by FireCAD engineering on 17 November 2026. Every result is checked against an independent calculation on each release: how we verify our calculators.

Sources

Horowitz and Hill, The Art of Electronics, 3rd ed. (Cambridge, 2015)

Related calculators

Free engineering calculators: every page computes in SI and converts to your units. Results are for engineering estimation; verify critical designs against the referenced standards.

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.