The first box is my modulating signal and the last box is my demodulated signal (filtered signal)

I used my signal to change the duty Cycle of a PWM modulator (fix PWM frequency and variable Duty cycle ). MY PWM output frequency is 20KHz. My input signal it will be from 0 to 100Hz.

My question is what is the best way to filter the signal to obtain the lowest distortion ?

I have two way, the simple one is to use an diode envelop detector: enter image description here

The second which I just read about is Infinite Impedance Detector enter image description here

What are your recommendations ? Is it enough to use an diode envelop detector with third order low pass filer to eliminate the ripples ?


1 Answer 1


You are thinking of a solution that is inappropriate. Filtering a PWM signal requires only low pass filtering and not envelope detection and certainly not the 2nd circuit you have shown.

For simple filters use a resistor and capacitor in series across the PWM output to ground. The capacitor is grounded and the common R and C node voltage has the filtered output. A more sophisticated filter might be based around an op-amp 2nd order filter and this is akin to replacing the resistor with an inductor.

Higher order filters give improved results i.e. smaller ripple voltages due to the unmodulated PWM frequency.

If your modulation frequency is 100Hz try making an RC lowpass filter with a 3dB cut-off at about 200Hz. There will be some attenuation of 100Hz signals (maybe 1dB) and if this is too much progress to an op-amp (or inductor) 2nd order filter.

  • \$\begingroup\$ How could I calculated the ripple amplitude of the output of a 3rd order Sallen-Key Butterworth Low-pass filter with 200Hz cutoff frequency , 12V 25KHz Modulated signal & 2.5V 100Hz modulating signal \$\endgroup\$
    – John Alawi
    Apr 19, 2015 at 21:06
  • \$\begingroup\$ A 3rd order low pass filter's output falls away at 60dB per decade above the cut off. This means for a 200Hz cut-off a 20kHz signal will be 120dB down in amplitude. \$\endgroup\$
    – Andy aka
    Apr 19, 2015 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.